Jot
Created 24 March 2003
I needed a quick way to add XML elements to an XML file (to track links to post to my blog), so I wrote this small Python tool to do it.
Jot is good at one thing: appending XML elements to a file. The location and structure of the file is configurable at the top of the program. When run, Jot sits as an icon in the Windows notification tray (you know, in the lower-right corner of the screen). Double-clicking the icon brings up a dialog box so you can fill in the details of the element.
For example, this configuration:
# The path to the XML file.
jotfile = 'c:/temp/quick.qx'
# The name of the root element in the XML file.
rootname = 'quickentries'
# The name of each entry in the XML file.
entryname = 'entry'
# A list of dicts defining the attributes for the entries.
attrs = [
{ 'name': 'titleword', 'label': 'Title word:', 'default': 'word' },
{ 'name': 'href', 'label': 'URL:', 'default': 'http://' },
{ 'name': 'text', 'label': 'Link text:', 'default': 'text' },
{ 'name': 'comment', 'label': 'Comment:', 'default': '' },
]
will cause this dialog to appear:
After filling in some data, and clicking OK, c:/temp/quick.qx will contain:
<?xml version="1.0"?>
<quickentries>
<entry
comment=""
href="http://www.ericharshbarger.com/lego/milhouse.html"
text="Lego Milhouse"
titleword="Milhouse"/>
</quickentries>
After clicking the icon and entering data in the dialog again, the file will have two <entry> elements, and so on.
Jot requires:
- Python,
- wxPython, and
- Jason’s path module.
You’ll need to find an icon file you like, and name it jot.ico.
Download: jot.pyw
Comments
Add a comment: