My favorites | Sign in
Project Logo
                
Feeds:
People details
Project owners:
  clach04

A pure Python library and tools for accessing Tombo http://tombo.sourceforge.jp/En/ notes in either plain text or encrypted (.chi files). See PyTomboBackground for more information.

In progress project GtkTombo.

Tool example

Command line example (there is a mini web based search too), a grep-like search tool for searching plain and encrypted notes.

Plain text search only:

# tombogrep.py -i stork aesop
12.txt:Stork that soon set to work gobbling them all up.  Then the Frogs

Search plain and encrypted, prompting for password:

# tombogrep.py -i stork aesop -e
12.txt:Stork that soon set to work gobbling them all up.  Then the Frogs
Password for note 19.chi:
19.chi:The Fox and the Stork
19.chi:At one time the Fox and the Stork were on visiting terms and
19.chi:seemed very good friends.  So the Fox invited the Stork to dinner,
19.chi:shallow dish.  This the Fox could easily lap up, but the Stork
19.chi:"Pray do not apologise," said the Stork.  "I hope you will
19.chi:appointed when the Fox should visit the Stork; but when they were
19.chi:"I will not apologise for the dinner," said the Stork:

Search plain and encrypted, specifying password on command line (NOTE insecure!):

# tombogrep.py -i stork aesop -e -p password
12.txt:Stork that soon set to work gobbling them all up.  Then the Frogs
19.chi:The Fox and the Stork
19.chi:At one time the Fox and the Stork were on visiting terms and
19.chi:seemed very good friends.  So the Fox invited the Stork to dinner,
19.chi:shallow dish.  This the Fox could easily lap up, but the Stork
19.chi:"Pray do not apologise," said the Stork.  "I hope you will
19.chi:appointed when the Fox should visit the Stork; but when they were
19.chi:"I will not apologise for the dinner," said the Stork:

Same results as for prompting password but no prompting.

Library example

Simple save and load:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytombo.tombonote
>>> data = """
... hello
... world
... """
>>> filename = 'demo.chi'
>>> pytombo.tombonote.encrypt_file(filename, data, 'password')
>>> repr(open(filename, 'rb').read())
'\'BF01\\x10\\x00\\x00\\x00\\xc1\\xdb\\xd5flk\\xdf\\x9f\\xd5"\\xb9\\xc4\\xcb\\n{\\xa0\\x10\\xbb{"#,b\\xd5\\x0cm\\xa1E\\x
eaK\\xa0\\x1d\\xba\\xd6xy\\xb3\\xdb\\x08\\x0c\''
>>> newdata = pytombo.tombonote.decrypt_file(filename, 'password')
>>> repr(newdata)
"'\\nhello\\nworld\\n'"








Powered by Google Project Hosting