Skip to main content

Posts

Showing posts from May, 2011

It's been a while...

...since I viewed ncurses as new technology. It is, however, for more flexible than... printf ("%sPrompt for Input here:", curs(22,1)); ...which is itself an upgrade from the original... printf ("\33[22;1HPrompt for Input here:"); ...in this application. So here we go, bringing an app apparently written at glass-Teletype level as far forward as last century.

YouTube video clip to DVD in one command

You may wish to alter the device on which the DVD is burned via ( /dev/sr0 in the example) or the default burn speed, or you may have a more appropriate place to store up to maybe 9GB of temporary files (the DVD content plus an ISO file of the same), however this one command turns a downloaded YouTube clip into a push-in-n-it-plays DVD: #!/bin/sh if [ -f "$1" ]; then     LEN=$(ffmpeg -i "$1" 2>&1 |gawk '/ Duration: / { print gensub(":[0-9][0-9]\\.[0-9][0-9],", "", "g", $2); }')     if [ $LEN = "" ]; then         echo No video minutes seen in the file "'$1'"         return 1     fi else     echo File "'$x'" does not appear to exist or is a dir or device-node     return 1 fi rm -rf /tmp/DVD_temporary /tmp/DVD_temporary.iso /tmp/temporary.xml /tmp/temporary.jpg nice ffmpeg -i "$1" -target ntsc-dvd -y /tmp/temporary.mpg cat <<ENDOFFILE > /tmp/temporary.x

Attitude != progress

Conclusion: a sustained good attitude results in an irreplaceable attribute: determination. The app worked mostly-right, but patience based on surety of my abilities, plus certainty that I don’t know everything, plus continued positive reinforcement/encouragement from one skipping a step in the process (to arrive at “Gorgeous” early), resulted in the key road-block being three completely unrelated roadblocks. The original app didn’t care about whether a dependent was installed or not, so failed silently when it wasn’t installed, rather than the more-common bizarre codified error message; Correcting the code to report failures (& log them in detail) also revealed a slight typoe in my enhancements; Correcting the typoe produced hard data which could then be adjusted to produce not only accurate but quite readable PDF reports. All of this cascaded out of the woodwork across 13 minutes after about 9 hours of debugging, starting with strace . Up to that point, nada. Determination is ir