pcplantdb@lists.ibiblio.org
Subject: pcplantdb
List archive
- From: Chad Knepp <pyg@galatea.org>
- To: pcplantdb@lists.ibiblio.org
- Subject: [pcplantdb] ack! lives
- Date: Thu, 5 Aug 2004 23:11:57 -0500
ack! being the name of my new little ack!ounting package. I'm a day
behind my internal schedule, but I think it'll be no sweat to hook up
Zope interface for it in two days. Anyway, if anyone wants to see a
REALLY BAD little demo of ZODB with Zcatalog's Catalog in a little
over 300 lines you can get it at <http://galatea.org/ack.tar.gz> or
<http://galatea.org/ack.zip> as a .zip file. I'm almost sure it won't
actually work on windows because I do some crazy things with the
terminal. Zope 2.7.2 needs to be in your PYTHONPATH if you attempt to
run it. This is thoroughly un-debuged ;-)
This is not an example of good programing, this is proof of concept.
If you want to see me coding at my best look at the Eden source code.
This is kludge upon kludge with a little bubblegum and tape to hold it
together. There is practically no comments/documentation and it
features lines like this:
self.printEntry(self.root['entries'][self.root['catalog'].paths[entry.data_record_id_]])
...well actually I changed that one because I couldn't even parse it.
Some of the nicest features of ack! have nothing to do with Zope
products. Because I actually want to use this thing, I put a little
effort into making the command-line data entry interface easy to use.
It automatically auto-completes most of the fields and learns (and
retains through ZODB.Persistenc) new categories as desired.
Sequential entries default to the values of the last so a lot of
keystrokes are just enter/return.
Here is a little annotated script:
| --------
| N)ew entry
| R)eport
| D)ump entries
| Q)uit
| --------
| New entry:
I pressed 'n' for New entry
| Person: chad
| Add new person named 'chad'? (y/n)
|
| Month: 8
| Day: 5
| Year: 2004
| Amount: .01
| Category: software
| Add new category named 'software'? (y/n)
|
| Subcategory: permaculture
| Add new subcategory named 'permaculture'? (y/n)
|
| Vendor: chad
| Add new vendor named 'chad'? (y/n)
|
| Notes: purchased Eden
|
| Chad on 8/5/2004
| $0.01 of Software/Permaculture from Chad
| Purchased eden
| Add this entry? (y/n)
| Commited!
|
| --------
| N)ew entry
| R)eport
| D)ump entries
| Q)uit
| --------
I pressed 'n' again.
| New entry:
|
| Person: chad
| Month: 8
| Day: 5
| Year: 2004
| Amount: .02
| Category: software
| Subcategory: trash
| Add new subcategory named 'trash'? (y/n)
|
| Vendor: chad
| Notes: ack
|
| Chad on 8/5/2004
| $0.02 of Software/Trash from Chad
| Ack
| Add this entry? (y/n)
| Commited!
Here my actual keystrokes for this entry were
'\n\n\n\n.02\n\n\ntrash\ny\nack\ny' \n =
enter/return.
| --------
| N)ew entry
| R)eport
| D)ump entries
| Q)uit
| --------
Dump entries just spits out the database again... mostly a debugging
feature.
| Chad on 8/5/2004
| $0.01 of Software/Permaculture from Chad
| Purchased eden
| Chad on 8/5/2004
| $0.02 of Software/Trash from Chad
| Ack
|
| --------
| N)ew entry
| R)eport
| D)ump entries
| Q)uit
| --------
Report generates unformated totals of person/category/subcategory,
person/category, and person for each person. Could also mix in vendor
or vendor/category or some such if desired.
| chad software permaculture $0.01
| chad software trash $0.02
| chad software $0.03
| chad $0.03
Other features that would be helpful in addition to formating things
better would be changing entries/deletion, and searching. It would be
pretty trivial to search through person, category, subcategory,
vendor, and notes (a TextIndex even) with one query. Searching for
amounts greater than/less than and/or in categories might be nice too.
Soooo tired,
Chad
- [pcplantdb] ack! lives, Chad Knepp, 08/05/2004
Archive powered by MHonArc 2.6.24.