GNU Pem on the Nanonote

Ernest Kugel erik.kugel at gmail.com
Sun Jul 3 17:06:42 EDT 2011


Hi guys, I've added GNU Pem to the Applications page on the Wiki under 
"accessible from console". Since there was no room to leave instructions 
on how to use Pem, about which Xiangfu Liu rightfully inquired, I've 
compiled a short guide about using GNU Pem. Here it goes.

How to use GNU Pem:

GNU Pem is a console personal expenses manager. It uses brief commands 
to document transactions in comma separated files, which are stored in a 
calendar directory tree inside the ~/.pem folder. Each month is stored 
in a separate file, and months from the same year are stored in their 
own folder. A typical file will be named

~/.pem/11/Jul

for July 2011, and will look something like this:

1309723909,candy,10.00,0.00,

if you spent 10 dollars on candy. The developer does not advise editing 
these files manually, but using Pem to interact with them. I would also 
add they look like they can be easily imported into spreadsheet software 
like OpenOffice.org's Calc or KDE's KSpread.

*System clock notice!*
Because Pem relies on the system clock to save the time of the 
transaction, setting your clock before using Pem is necessary.

*Installation*
To install GNU Pem on the Nanonote, get your Nanonote online and follow 
instructions by Xiangfu Liu:

# opkg update
# opkg install perlbase-essential perlbase-posix perlbase-xsloader perlbase-autoloader perlbase-encoding perlbase-fcntl perlbase-tie
# wgethttp://downloads.qi-hardware.com/people/xiangfu/packages/pem_0.7.8-1_xburst.ipk
# opkg install pem_0.7.8-1_xburst.ipk


*Usage*
To Begin using Pem, simply start documenting transactions from the 
console, by invoking pem with an amount and a description, like this:

# pem 10 candy

Both description and amount are mandatory, and if you specify an amount 
first it would be interpreted as a description. You can track earnings 
by specifying the -e option, like this:

# pem -e 60 eBay

Finally, you can generate reports, the easiest of which is the daily 
report which can be generated with the -s option, like this:

# pem -s

(please note Pem's other options are available through with the --help 
option:

# pem --help

Usage: pem.pl [OPTION] [DESCRIPTION AMOUNT]

Manage personal income and expenses.

Options:

    -c --category<name>   categorise/tag your expenses

    -e --earned           indicates income

    -f --file<name>       specify file name

    -s [n]                show daily report with total after [n] days

    -m [n]                monthly report with total after [n] months

    -C                    show category/tag-wise report

    -t --total            shows just the total when used with -s

    -M<mm>                select the start month (01<= mm<= 12)

    -N<mm>                select an end month (01<= mm<= 12)

    -Y<yy>                select an year (00<= yy<= 99)

    -h --help             show this help

    -v --version          show version

Report bugs to<pj.pandit at yahoo.co.in>


*Bugs*
- Reports wrap around. This results in poor formatting of otherwise very 
readable reports. here's what reports should look like: 
http://www.gnu.org/software/pem/pem-tags.png . On the Ben Nanonote, 
because of the relatively small screen, the same reports appear readable 
but poorly formatted. Workaround to view perfect reports: (1) Generate 
the reports on the Nanonote and view them on a different machine (this 
would make sense for people carrying their Nanonotes around all month 
and then "downloading" the monthly expenses report through an SD card or 
SCP), or (2) SSH into the Nanonote with a larger screen and view the 
reports thus (this would make sense for those who have their Nanonote 
sitting at their desk, networked through USB).

More can be read at http://www.gnu.org/software/pem/

-- 
Ernest Kugel





More information about the discussion mailing list


interactive