Skip to content

Commit

Permalink
exporter specification changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelLaber committed Jan 25, 2017
1 parent 68c3884 commit 073b1b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
18 changes: 6 additions & 12 deletions Exporter/README.md
@@ -1,20 +1,14 @@
TODO:
- was ist das beste Datenformat um es der TU Wien zu übergeben?
- Ordnung nach trainset, gesture, collector?


# MOM-Trainer/Exporter (Python)

Lädt, von MOM-Recorder erstellte Daten aus der Datenbank und wandelt diese in ein .CSV-File um.
Lädt, von MOM-Recorder erstellte Daten aus der Datenbank und wandelt diese in ein beliebiges Ausgabeformat, abhängig vom MAPPING um.

## Spezifikationen
[Vokabeln](https://workflowy.com/s/qrLIZmQBRp) in Workflowy (read-only)

Programmablauf:
- Nutzer startet das Programm über die Konsole mit diesen Argumenten:
- TRAINSET.uuid
- MAPPING.id <-- gibt an in welchem Format die vorhandenen Daten ausgegeben werden sollen. Gibt es da schon Libraries?
- ist ein entsprechendes TRAINSET vorhanden, so wird eine .CSV Datei im vorgegebenen Format erstellt
- Format der .CSV Datei
- ist kein passendes TRAINSET vorhanden, so wird eine Fehlermeldung ausgegeben
- **_OPTIONAL-x:** - .json Datei wird ausgegeben
- TRAINSET.uuid [MongoDB:uuid]
- MAPPING.id: [alphanumericKey | "trainset.tmpl.csv"]
- ist ein entsprechendes TRAINSET in der Datenbank vorhanden, so wird eine Datei im vorgegebenen Format [.csv] erstellt und der Dateiname der Datei ausgegeben. Das Programm wird mit STRG+C oder durch schließen der Konsole beendet
- ist kein entsprechendes TRAINSET vorhanden, so wird eine Fehlermeldung ausgegeben und
der Benutzer wird solange aufgefordert erneut eine TRAINSET.uuid einzugeben bis ein entsprechendes TRAINSET vorhanden ist
12 changes: 7 additions & 5 deletions Exporter/Template/trainset.tmpl.csv
@@ -1,15 +1,17 @@
PRÄAMBEL:
##Präambel:
- TRAINSET = collection.trainset.json{MongoDB:uuid}
- PARKOUR = collection.parkour.json{MongoDB:uuid}
- GESTURES = collection.gestures.json{MongoDB:uuid}
- DATA = TRAINSET.collection[i]

##Dateistruktur

FILENAME: %TRAINSET.uuid%
--------------------------
METADATA: (how to add metadata to a .csv file - https://www.w3.org/TR/tabular-data-model/#embedded-metadata)
# creator: Make-O-Matic
# created: %TRAINSET.created.date%, %A{MongoDB:uuid}.created.time%
# faulty: %TRAINSET.status.faulty% <-- da muss ich schauen ob das Sinn macht
# faulty: %TRAINSET.status.faulty%
# experiment: %TRAINSET.experiment.id%
# parkour: %TRAINSET.parkour.id%
# observer: %TRAINSET.parkour.observer.id%
Expand All @@ -18,8 +20,8 @@ METADATA: (how to add metadata to a .csv file - https://www.w3.org/TR/tabular-da

COLUMNS

- "Created" > %TRAINSET.created.date%, %A{MongoDB:uuid}.created.time%
- "Faulty" > %TRAINSET.status.faulty% <-- da muss ich schauen ob das Sinn macht
- "created" > %TRAINSET.created.date%, %A{MongoDB:uuid}.created.time%
- "faulty" > %TRAINSET.status.faulty% <-- da muss ich schauen ob das Sinn macht
- "Experiment-ID" > %TRAINSET.experiment.id%
- "Parkour-ID" > %TRAINSET.parkour.id%
- "Observer-ID" > %TRAINSET.parkour.observer.id%
Expand All @@ -32,7 +34,7 @@ COLUMNS
- "isNesture" > %DATA.exercise.gesture.isNesture%
- "Mutation-ID" > %DATA.exercise.mutation.id%

- "Stamp" > %DATA.data.timestamp.unixtime%
- "STAMP" > %DATA.data.timestamp.unixtime%
- "Collector-ID" > %DATA.collector.id%
- "RFID-ID" > %DATA.rfid%
- "SAMERFID" > %DATA.calculated.isSameRFIDTag%
Expand Down

0 comments on commit 073b1b6

Please sign in to comment.