Skip to content

Instantly share code, notes, and snippets.

@proppy
Created January 2, 2010 13:59
Show Gist options
  • Save proppy/267504 to your computer and use it in GitHub Desktop.
Save proppy/267504 to your computer and use it in GitHub Desktop.
proppy@powerminer:~/Documents$ ledger -f proppy.ledger xml | xsltproc stripnamespace.xsl - | xsltproc xmltojsonv1.xsl - | sed s@,,@,@g | sed s@,}@}@g | python -mjson.tool | python -c 'import sys; import json; import couchdb; print [couchdb.Server("http://localhost:8000")["ledger"].create(e) for e in json.loads(sys.stdin.read())[0]["ledger"]["entry"]]'
['e673c7ad3f1c35d7226f6a5f9a89a410', '425bf48875ec51665515a9445bd5142c', '9bc1e3e2ac1fd898d1402edda4148e52', 'ca9718d6ed6b3ed25b53868254e035ce', 'df1858cda314f14e2ed151e17e44508e']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment