]> git.ipfire.org Git - location/libloc.git/blobdiff - examples/python/create-database.py
test: Generate database dynamically
[location/libloc.git] / examples / python / create-database.py
index 651709c3495956986385391238c14c71ef78f7c1..d2c3b61a9922bde8b18a1daa7a5cec84f92aa508 100644 (file)
@@ -1,6 +1,7 @@
 #!/usr/bin/python3
 
 import location
+import sys
 
 w = location.Writer()
 
@@ -27,4 +28,5 @@ n.asn = a.number
 print(n)
 
 # Write the database to disk
-w.write("test.db")
+for f in sys.argv[1:]:
+    w.write(f)