4 ms·
If you have fast flatbed scanner, you can scan 300 pages in thirty minutes. Not worth the effort to build automation. Bigger problem was to sort out all errors
by timonoko 5y ago
If you have fast flatbed scanner, you can scan 300 pages in thirty minutes. Not worth the effort to build automation. Bigger problem was to sort out all errors and missed pages afterwards. Real-time display (from Imagemaqick) solved this problem:
while true ; do
for x in *.pnm ; do
killall display
display -rotate 90 $x &
done
sleep 5
done
- timonoko 5y agoNobody asked, but for the record, this is how make real one-page PDF from two-page scans. (gm = GraphicsMagick) mkdir kaksi rm kaksi/* j=102 scale=600 size=500x730 yla=27 for x in *.pnm ; do echo $x gm convert $x -rotate 90 -crop $size+20+$yla -resize $scale -normalize kaksi/k$j.jpg j=$((j+2)) done j=103 for x in *.pnm ; do echo $x gm convert $x -rotate 90 -crop $size+530+$yla -resize $scale -normalize kaksi/k$j.jpg j=$((j+2)) done cd kaksi gm convert *.jpg -format pdf TheBook.pdf
- pflanze 5y agoIf I read this right then it means "every 5 second, open the last scanned page (and nothing else / close the previous one)". But this seems like an inefficient way to do it, opening and killing all irrelevant pages all the time. This will be more efficient and react more quickly: lastfile= while true; do newestfile=$(ls *.pnm | tail -1) if [ "$newestfile" != "$lastfile" ]; then kill % display -rotate 90 "$newestfile" & lastfile=$newestfile fi sleep 0.3 done
- timonoko 5y ago"Saving precious bits like it is 1969". This would make an excellent song title.
- pflanze 5y agoSorry but I find your answer disappointing and crossing over into offending. I spent some time first trying to understand how your code makes sense, then to write up a better solution and posted it, and you don't seem to be thankful at all and are instead dissing my effort. Sure, if it works for you, fine, I was under the impression that you didn't know better. You could have saved me time by indicating that you know your solution is hacky but you don't care.
- timonoko 5y agoYes it is inefficient and weird. And thank you for saving the world. Not only Terran energy crisis, but we are also running out of useful data bits as universal entropy goes to infinity. https://en.wikipedia.org/wiki/Heat_death_of_the_universe https://en.wikipedia.org/wiki/Heat_death_of_the_universe
- deleted 5y ago[deleted]
- pflanze 5y agoPlease check the HN guidelines. "Be kind. Don't be snarky."
- aliswe 5y agodont take offense, i am certain that if you would call eachother up you both would get along terrifically. text is a horrible communication medium!
- pflanze 5y agoThanks. Yes, sometimes communication falls short and down, and one's own state of mind is time dependent and doesn't see everything involved. I was in an eager "would like to see positive feedback" state of mind just as timonoko may have been when originally posting their solution, and then interpreted the rejection in an overly negative light. My apologies to them and for the noise.
- deleted 5y ago[deleted]