Commits

Anonymous committed aeb703c

minimal example (secrets.db)

Comments (0)

Files changed (2)

-all: dictionary-c.db dictionary-py.db dictionary.diff
+all: dictionary-c.db dictionary-py.db dictionary.diff secrets.db
+
+secrets.db: pushtodbm3.py
+	./pushtodbm3.py
 
 dictionary.diff: dictionary-c.strings dictionary-py.strings
 	diff -u dictionary-c.strings dictionary-py.strings > $@ || true
 	[ -e de-en.txt ] || wget http://ftp.tu-chemnitz.de/pub/Local/urz/ding/de-en/de-en.txt.gz
 
 clean:
-	rm -f pushtodbm pushtodbm2 dictionary.* dictionary-c.* dictionary-py.*
+	rm -f pushtodbm pushtodbm2 dictionary.* dictionary-c.* dictionary-py.* secrets.db
+#!/usr/bin/python
+
+import dbhash
+
+secret = "".join(["secret{:02d}".format(i) for i in range(60)])
+
+db = dbhash.open('secrets.db', 'c')
+for i in range(15000):
+    line = "key{:05d} value{:05d} {}".format(i, i, secret)
+    key, value = line[:8], line[9:19]
+    db[key] = value
+db.close()