lib aus .gitignore rausgenommen. Kommentare von compare_lists noch ergänzt
This commit is contained in:
@@ -15,7 +15,6 @@ dist/
|
|||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
lib/
|
|
||||||
lib64/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
import argparse
|
||||||
|
import os
|
||||||
|
import pandas
|
||||||
|
# import configparser
|
||||||
|
# import json
|
||||||
|
|
||||||
|
"""
|
||||||
|
Dieses Programm holt sich aus
|
||||||
|
- RD Fusion eine aktuellen Stand der exisitierenden IDS
|
||||||
|
- Sivas eine Liste der gewünschten Teile
|
||||||
|
|
||||||
|
"""
|
||||||
|
def create_excel_export():
|
||||||
|
""" exportiert die Nummern der Sivas ID in eine Excel Datei um vorhandene von fehlenden zu unterscheiden """
|
||||||
|
# Sortierung Teilenummer Bezeichnung Bestandsabfrage Teile Beurteilung Zusatzbemerkung
|
||||||
|
# Sortierung: Minus - Separierten "Pfad" dieses Einzelteils im Assembly
|
||||||
|
# Teilenummer: Sivas Teilenummer
|
||||||
|
# Bezeichnung: SIVAS Bezeichnung
|
||||||
|
# Bestandsabfrage: Importieren oder Verfügbar
|
||||||
|
# die restlichen Spalten bleiben leer
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def compareFiles(rdDataBasePath, jsonPath, sivasId, outPath):
|
||||||
|
# Lies die RD Datenbank ein
|
||||||
|
# hole dir alle Ids aus der Json Datei
|
||||||
|
# Prüfe das Vorhandensein der JsonIds in der RD Datenbank
|
||||||
|
# Schreibe eine Exceldatei mit den korrekten Spalten raus
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
parser = argparse.ArgumentParser(description='fetches data from sivas or ruledesigner fusion', prog='update_database')
|
||||||
|
parser.add_argument('-s', '--sivas', action='store', help='fetch data of this id from sivas fo local database folder')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
dataDir = os.environ.get('CREMIG_DATA')
|
||||||
|
rdDataBasePath = os.environ.get('RD_DATABASE_SOURCE')
|
||||||
|
if args.sivas:
|
||||||
|
exePath = os.environ.get('SIVAS_DATABASE_QUERY')
|
||||||
|
sivasId = str(args.sivas)
|
||||||
|
jsonPath = os.path.join(dataDir, sivasId + ".json")
|
||||||
|
outPath = os.environ.get('CREMIG_WORK')
|
||||||
|
compareFiles(rdDataBasePath, jsonPath, sivasId, outPath)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user