Skip to content

Commit

Permalink
readme update + fix timestamp type
Browse files Browse the repository at this point in the history
  • Loading branch information
dexif committed Jan 4, 2024
1 parent ebdb186 commit 30e0553
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In short:

## Device message converter script

converts messages to **JSON, KML, GPX, GEOJSON, CSV**
Converts messages to **KML, GPX, GEOJSON, CSV**

* [NodeJS](message-converter/nodejs)
* [Python](message-converter/python)
Expand Down
6 changes: 6 additions & 0 deletions message-converter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Device message converter script

Converts messages to **KML, GPX, GEOJSON, CSV**

* [NodeJS](message-converter/nodejs)
* [Python](message-converter/python)
2 changes: 1 addition & 1 deletion message-converter/nodejs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# message converter

Script to convert flespi device messages to **JSON, KML, GPX, GEOJSON, CSV** formats
Script to convert flespi device messages to **KML, GPX, GEOJSON, CSV** formats

## Install the dependencies
```bash
Expand Down
2 changes: 1 addition & 1 deletion message-converter/python/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# message converter

Script to convert flespi device messages to **JSON, KML, GPX, GEOJSON, CSV** formats
Script to convert flespi device messages to **KML, GPX, GEOJSON, CSV** formats

### Run script
```bash
Expand Down
6 changes: 2 additions & 4 deletions message-converter/python/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import sys
import time
from datetime import datetime
from xml.etree.ElementTree import Element, SubElement, tostring
from xml.dom import minidom

def main():
# Read command line arguments
Expand Down Expand Up @@ -58,8 +56,8 @@ def convert_kml(data, device_id, from_timestamp, to_timestamp):
<Placemark>
<name>#{device_id}</name>
<TimeSpan>
<begin>{format_unix_utc(from_timestamp)}</begin>
<end>{format_unix_utc(to_timestamp)}</end>
<begin>{format_unix_utc(int(from_timestamp))}</begin>
<end>{format_unix_utc(int(to_timestamp))}</end>
</TimeSpan>
<LineString>
<coordinates>{coordinates}</coordinates>
Expand Down

0 comments on commit 30e0553

Please sign in to comment.