Loading...
 

Custom Search

Meetings Help

Forums > Meetings> Things I mentioned at the June meeting

Things I mentioned at the June meeting

private message Canada
I thought I'd share the couple tricks that I had shared at the June meeting. I have already written this post once, but clicked the "Preview" button instead of "Post" :\

http://thefrozenfire.com/TV Listings.tar.gz

Basically, you chmod +x the zap2xml.pl script, then run it with a username and password for a Zap2It? account configured as explained on the http://zap2xml.110mb.com/ page.

Keep in mind that you need a few extensions for PHP, such as PDO_SQLITE.

Then, once the listings have been downloaded, you run the parsexmltv.php script, which converts the listings into an SQLite database. Once the database is created, connect to it using your favourite SQLite database viewer. I like the https://addons.mozilla.org/en-US/firefox/addon/5817.

Add a few rows to the favourites table, where the name column is the name of the show (such as "Star Trek: Enterprise"). Keep in mind that the tvnotify.php script compares the favourites table's name column strictly, so case sensitivity and spaces must be exact.

Once you've configured the database with your favourites, you can run the tvnotify.php script to have Ubuntu's libnotify show any programmes showing at the present time. Feel free to change the query, if it suits you. I've also written a PHP-GTK GUI to show all listings, but it's really poor right now.

The other thing I mentioned was the SHA256SUM one-liners.

Zenity to SHA256 hash, displayed in a zenity dialogue:

/bin/bash -c "zenity info text=`zenity entry width=640 title='SHA256SUM a String' text='String to Hash' |tr -d '\n'|sha256sum|cut -b -64`"

Zenity to SHA256 hash, text entry is "hidden", displayed in a zenity dialogue:

/bin/bash -c "zenity info text=`zenity entry width=640 title='SHA256SUM a String' hide-text --text='String to Hash' |tr -d '\n'|sha256sum|cut -b -64`"

Zenity to SHA256 hash, copied to clipboard:

/bin/bash -c "zenity entry width=640 title='SHA256SUM a String' text='String to Hash' |tr -d '\n'|sha256sum|cut -b -64|xsel -i --clipboard"

Zenity to SHA256 hash, copied to clipboard, with hidden entry:

/bin/bash -c "zenity entry hide-text width=640 title='SHA256SUM a String' text='String to Hash' |tr -d '\n'|sha256sum|cut -b -64|xsel -i clipboard"

Selection to SHA256 hash, shown in a zenity dialogue:

bash -c "zenity info text=`xsel -o|sha256sum|cut -b -64`"

Selection to SHA256 hash, copied to clipboard:

bash -c "xsel -o|sha256sum|cut -b -64|xsel -i --clipboard"


Show posts: