Active Topics

 


Reply
Thread Tools
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#21
The initial cheezburgr.sh was this:
Originally Posted by Benson View Post
But here's a script:
Code:
#!/bin/sh
jpegtopnm -exif=/home/user/tmp.cheezburgr.exif $1 >/home/user/tmp.cheezburgr.ppm

echo '<?xml version="1.0" standalone="no"?>' >/home/user/tmp.cheezburgr.xoj
echo '<xournal version="0.4.1">' >>/home/user/tmp.cheezburgr.xoj
echo '<title>Xournal document - see http://math.mit.edu/~auroux/software/xournal/</title>' >>/home/user/tmp.cheezburgr.xoj
echo '<page width="'`pamfile /home/user/tmp.cheezburgr.ppm |cut -f2 |cut -f3 -d' '`'" height="'`pamfile /home/user/tmp.cheezburgr.ppm |cut -f2 |cut -f5 -d' '`'">' >>/home/user/tmp.cheezburgr.xoj
echo '<background type="pixmap" domain="absolute" filename="/home/user/tmp.cheezburgr.ppm" />' >>/home/user/tmp.cheezburgr.xoj
echo '<layer>' >>/home/user/tmp.cheezburgr.xoj
echo '</layer>' >>/home/user/tmp.cheezburgr.xoj
echo '</page>' >>/home/user/tmp.cheezburgr.xoj
echo '</xournal>' >>/home/user/tmp.cheezburgr.xoj

xournal /home/user/tmp.cheezburgr.xoj
if [ ! -e /home/user/MyDocs/tmp.cheezburgr.pdf ] ; then
  rm /home/user/tmp.cheezburgr*
  exit
fi
rm /home/user/tmp.cheezburgr.ppm
pdftoppm -f 1 -l 1 -r 72 /home/user/MyDocs/tmp.cheezburgr.pdf /home/user/tmp.cheezburgr
rm /home/user/MyDocs/tmp.cheezburgr.pdf
pnmtojpeg -exif=/home/user/tmp.cheezburgr.exif /home/user/tmp.cheezburgr-*.ppm >$1_edited.jpg
rm /home/user/tmp.cheezburgr*
As for the newer version (slightly modified, only pertaining to the image acquistion), and the python, that puzzles me. I think I tarred them and attached? But they're certainly not there. Oh well, 'twas ages ago; maybe I simply botched.

I'll look for them to repost, and probably recreate this (with gst-launch, maybe) if I don't find them. Although I hope nobody seriously wants it...
 

The Following User Says Thank You to Benson For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:27.