Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3930857
D433.id1051.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
660 B
Referenced Files
None
Subscribers
None
D433.id1051.diff
View Options
Index: tools/spreadsheet2json
===================================================================
--- /dev/null
+++ tools/spreadsheet2json
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+import json
+import sys
+import os.path
+
+if len(sys.argv) < 2:
+ print("Usage: spreadsheet2json <some-copy-paste-of-a-spreadsheet.dat>")
+ sys.exit(1)
+
+source = sys.argv[1]
+if not os.path.exists(source):
+ print("File not found:", source)
+ sys.exit(2)
+
+with open(source, "r") as file:
+ translations = {}
+ for line in file:
+ record = line.rstrip().split('\t')
+ translations[record[0]] = record[1]
+ print(json.dumps(translations, indent=4))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 16:12 (5 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2312770
Default Alt Text
D433.id1051.diff (660 B)
Attached To
Mode
D433: Utility to generate a JSON object from a tabulated file
Attached
Detach File
Event Timeline
Log In to Comment