/my-little-printer

Generate locally and print personal slips on CUPS thermal printer

Primary LanguageJavaScriptGNU General Public License v2.0GPL-2.0

Print beautifully formatted receipts, generated locally, to any CUPS printer with lite 'plug-in' system.

Does not require arduino or any other additional hardware. My printer (I am using on Citizen CT-S2000) is connected via USB.

Comes with 'plug-in's that allow to print a weather report and news feed. Optimized for 80mm paper output (640 pixel width, can be changed).

Status

Project is in early draft state.

Icons in forecast are currently broken

TODO

  • To separate 'plug-ins' in node packages
  • Compatability with printer project
  • Each section should render seperately
  • To migrate from Promise to Q module

Installation

Clone project and install all dependencies

git clone https://github.com/muchweb/my-little-printer.git
cd my-little-printer
npm install

Add your forecast.io API key and desired location to printerfile.json or Remove forecast entry from printerile.json if you don't have a key.

Running

node ./do.js

This will fetch latest weather and news data and produce an output

How does it work

  1. Download data from RSS feeds
  2. Parse feeds using feedparser
  3. Generate HTML using handlebars
  4. Generate image from HTML
  5. Running CUPS lp command

Requirements

  • Your printer must be installed as default CUPS printer
  • PhantomJS
  • GraphicsMagick (on Debian could be easily installed by running apt-get install graphicsmagick)

Support

Credits