Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


hpr1543 :: What's in my bag

The contents of Ken's bag as he prepares for OHM 2013

<< First, < Previous, , Latest >>

Thumbnail of Ken Fallon
Hosted by Ken Fallon on 2014-07-02 is flagged as Explicit and is released under a CC-BY-SA license.
laptop backpack, OHM 2013. (Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr1543

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:19:14

What's in My Toolkit.

This is an open series where Hacker Public Radio Listeners can share with the community the items that they can't live without, what they find useful in day to day life.

Items

$ cat pringbooklet
#!/bin/bash

#HTML Input --> HTML 2 PS --> PS 2 PDF --> PDF Output
#lpstat -p |awk '{print $2}'

if [ $# -lt 2 ]
then
  echo ""
  echo "Usage: `basename $0` {pdf file} {printer name}"
  echo ""
  echo "Available printers: \"$(echo $(lpstat -p |awk '{print $2}' ) )\""
  echo ""
  exit
fi

FILE=$1
PRINTER=$2


if [ $# -eq 3 ]
then
  COPIES="$3"
else
  COPIES="1"
fi

if [ ! -e $FILE ];
then
  echo "Can't find the PDF file $1"
  exit
fi

pdftops -level3 $FILE - | ps2ps - - | psbook | psnup -2 -Pa4 | ps2pdf - |\
    lp -d $PRINTER -o media=a4 -o sides=two-sided-short-edge -n $COPIES -

Comments

Subscribe to the comments RSS feed.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
What is the HOST_ID for the host of this show?
What does HPR mean to you?