Re: Camera/Sketch/Email app idea?
The initial cheezburgr.sh was this:
Quote:
Originally Posted by Benson
(Post 164304)
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. :confused: 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...
|