“ The 'free' in free software refers to freedom: it means users have the freedom to run, modify and redistribute the software. Free software contributes to human knowledge, while non-free software does not. Universities should therefore encourage free software for the sake of advancing human knowledge, just as they should encourage scientists and scholars to publish their work.“

Sunday, June 20, 2010

GreenLab.py

See the link on the right of the page --->

GreenLab is a simple python code used to check the status of printed papers on a network printer.

I wrote this code to keep track of printed papers in my lab.
It generates a file (printer_log.txt) which store the number of printed page, the date and the time. It also converts the number of printed pages in percentage of dead tree (based on the information found in the Conservatree website)

If you want to use it you have to
1] Copy the text in your editor (I use Textwrangler)
2] add your printer's address (line#4)
3] Run the script in your terminal, check on the first temp_printer.txt file the line where the printer displays the number of printed pages and write that line index on line#8
3] save the file as GreenLab.py ... that's it!
whenever you open the file the script is run and it retrieves the information about printed pages (obviously you have to be on your local network to get those infos!)

Since it is made with python it 100% multiplatform.

I use it in combination with iCal on Mac.
(iCal periodically runs this script so I can have a log of the printed pages ... and I have the chance to control my tree-killing printer...)

No comments:

Post a Comment