Index :: FAQ :: Contact

Featured Media: Basenet Radio

The show has been dormant for some time (years) but its back.

Latest HackerMedia:

July 07, 2015

Hacker Public Radio
HPR1807: Arch Linux Development Environment: Ep1
Checking the network Partitioning Making the filesystems Mounting the filesystems Installing the base packages Generate the fstab Chroot and Configuration Boot Loading Complete show notes: http://hackerpublicradio.org/eps/hpr1807.html

July 06, 2015

Hacker Public Radio
HPR1806: HPR Community News for June 2015
New hosts Welcome to our new hosts: kurakura, GNULinuxRTM, cheeto4493. Last Month's Shows Id Day Date Title Host 1781 Mon 2015-06-01 HPR Community News for May 2015 HPR Volunteers 1782 Tue 2015-06-02 ChorusText - a Non-visual Text Editor Open Assistive Device Project kurakura 1783 Wed 2015-06-03 Windows To Linux - Better Late Than Never. GNULinuxRTM 1784 Thu 2015-06-04 Intro to the Fugue and the Open Well-Tempered Clavier Jon Kulp 1785 Fri 2015-06-05 54 - LibreOffice Impress - Creating a Presentation Ahuka 1786 Mon 2015-06-08 What is MapReduce? Charles in NJ 1787 Tue 2015-06-09 A Beginner with a Wok Frank Bell 1788 Wed 2015-06-10 Podcrawl Glasgow 2015 Kevie 1789 Thu 2015-06-11 The Ubuntu Quickly Ebook Template and Ebooks in General Jon Kulp 1790 Fri 2015-06-12 Penguicon 2015 Report Ahuka 1791 Mon 2015-06-15 Organizing Photos with Bash Tony Pelaez 1792 Tue 2015-06-16 An Interview with Andrea Frost David Whitman 1793 Wed 2015-06-17 Some thoughts about the Go language Stilvoid 1794 Thu 2015-06-18 12-Tone Music and My Random 12 Tone Row of the Day Jon Kulp 1795 Fri 2015-06-19 54 - LibreOffice Impress - Templates and Master Pages Ahuka 1796 Mon 2015-06-22 Audacity - Chains, Notches and Labels cheeto4493 1797 Tue 2015-06-23 An Interview with Aaron Wolf of the Snowdrift Co-op Project David Whitman 1798 Wed 2015-06-24 Machine learning and service robots. mirwi 1799 Thu 2015-06-25 Posting From the Command Line on Open Social Networks Jon Kulp 1800 Fri 2015-06-26 YouTube Video Subscriptions Ahuka 1801 Mon 2015-06-29 How to tell your left earbud from your right Ken Fallon 1802 Tue 2015-06-30 An Interview with Emily Hampton a LinuxFest Northwest Volunteer David Whitman Mailing List discussions Policy decisions surrounding HPR are taken by the community as a whole. This discussion takes place on the Mail List which is open to all HPR listeners and contributors. The discussions are open and available on the Gmane archive. The main threads this month were: From: Mike Ray <mike@...> Date: 2015-06-02 11:01:26 +0100 Subject: Comment form and edit field accessibility Link: http://comments.gmane.org/gmane.network.syndication.podcast.hacker-public-radio/863 Messages: 6 From: Ken Fallon <ken@...> Date: 2015-06-03 08:50:04 +0200 Subject: Git repository Link: http://comments.gmane.org/gmane.network.syndication.podcast.hacker-public-radio/869 Messages: 21 From: Ken Fallon <ken@...> Date: 2015-06-03 08:52:14 +0200 Subject: PHP Developers Link: http://comments.gmane.org/gmane.network.syndication.podcast.hacker-public-radio/870 Messages: 1 From: Ken Fallon <ken@...> Date: 2015-06-11 08:23:31 +0200 Subject: Fwd: Ohio LinuxFest 2015 Call for Presentations Link: http://comments.gmane.org/gmane.network.syndication.podcast.hacker-public-radio/891 Messages: 1 From: Ken Fallon <ken@...> Date: 2015-06-22 11:13:58 +0200 Subject: New linux podcast #SYSTEMAU Link: http://comments.gmane.org/gmane.network.syndication.podcast.hacker-public-radio/892 Messages: 3 From: Ken Fallon <ken@...> Date: 2015-06-24 12:41:04 +0200 Subject: Help with shownotes, tags and summaries Link: http://comments.gmane.org/gmane.network.syndication.podcast.hacker-public-radio/895 Messages: 2 From: Dave Morriss <perloid@...> Date: 2015-06-29 15:51:27 +0100 Subject: HPR Community News - next Saturday on 2015-07-04T18:00:00Z Link: http://comments.gmane.org/gmane.network.syndication.podcast.hacker-public-radio/897 Messages: 1 Total messages this month: 35 Comments this month There are 48 comments: hpr1728 (2015-03-18) "Requested Topic: Favourite Browser Extensions" by Fin. Comment 2: Bob Evans on 2015-06-01: "Ad-Block Edge discontinued" hpr1766 (2015-05-11) "Sox of Silence" by Ken Fallon. Comment 2: Urugami on 2015-06-12: "Can it do this...." hpr1771 (2015-05-18) "Audacity: Label Tracks" by Jon Kulp. Comment 3: Urugami on 2015-06-12:"[no title]" hpr1774 (2015-05-21) "Router Hacking" by Jon Kulp. Comment 3: FiftyOneFifty on 2015-06-01: "Single board options" Comment 4: Urugami on 2015-06-12:"[no title]" hpr1780 (2015-05-29) "16 - TrueCrypt and GnuPG - An Update" by Ahuka. Comment 2: Alison Chaiken on 2015-06-10: "TrueCrypt vs. GPG" Comment 3: Kevin O'Brien on 2015-06-17: "Audited" hpr1782 (2015-06-02) "ChorusText - a Non-visual Text Editor Open Assistive Device Project" by kurakura. Comment 1: Mike Ray on 2015-06-02: "Chorustext!" Comment 2: Jon Kulp on 2015-06-02: "Awesome in Many Ways" Comment 3: Mike Ray on 2015-06-08: "Smashing the monopoly of commercial gadgetry" hpr1783 (2015-06-03) "Windows To Linux - Better Late Than Never." by GNULinuxRTM. Comment 1: Jon Kulp on 2015-06-02: "Updates Pain! " Comment 2: 0xf10e on 2015-06-06: "Entertaining episode!" Comment 3: Stilvoid on 2015-06-07: "Seconded" hpr1784 (2015-06-04) "Intro to the Fugue and the Open Well-Tempered Clavier" by Jon Kulp. Comment 1: Kevin O'Brien on 2015-06-04: "Great show!" Comment 2: Jon Kulp on 2015-06-04: "Open Scores" Comment 3: Robert Douglass on 2015-06-04: "Lady Gaga - fan of Bach and the Well-Tempered Clavier" Comment 4: Jon Kulp on 2015-06-04: "Gaga Bach" Comment 5: Ken Fallon on 2015-06-06: "Now I'm "seeing" this everythere " Comment 6: Jon Kulp on 2015-06-06: "Feature, not a bug" Comment 7: Frank on 2015-06-07:"[no title]" Comment 8: Daniel Worth on 2015-06-08: "Fantastic" Comment 9: Alison Chaiken on 2015-06-28: "Heard "Fugue for Friday"?" Comment 10: Jon Kulp on 2015-06-28: "Dragnet Fugue" hpr1787 (2015-06-09) "A Beginner with a Wok" by Frank Bell. Comment 1: Jon Kulp on 2015-06-09: "What about broccoli?" Comment 2: Mike Ray on 2015-06-10: "And baby corns" Comment 3: Frank on 2015-06-10:"[no title]" Comment 4: Jon Kulp on 2015-06-10: "Hollandaise??" Comment 5: Dave Morriss on 2015-06-10: "Thinks to stir-fry" Comment 6: Dave Morriss on 2015-06-10: "Things not thinks" Comment 7: Mike Ray on 2015-06-10: "Round-bttomed woks" Comment 8: Dave Morriss on 2015-06-10: "Wok rings" Comment 9: Frank on 2015-06-11:"[no title]" Comment 10: jezra on 2015-06-11: "chicken and woks" Comment 11: Frank on 2015-06-12:"[no title]" Comment 12: FiftyOneFifty on 2015-06-13:"[no title]" Comment 13: Frank on 2015-06-16: "Thanks for the suggestion" hpr1788 (2015-06-10) "Podcrawl Glasgow 2015" by Kevie. Comment 1: Ken Fallon on 2015-06-11: "So near and yet so expensive" hpr1791 (2015-06-15) "Organizing Photos with Bash" by Tony Pelaez. Comment 1: Dave Morriss on 2015-06-23: "Yay for Bash scripts!" Comment 2: Tony Pelaez on 2015-06-28: "Google CL is broken" hpr1793 (2015-06-17) "Some thoughts about the Go language" by Stilvoid. Comment 1: Frank on 2015-06-18:"[no title]" Comment 2: Dave Morriss on 2015-06-19: "Thanks for the show " Comment 3: Stilvoid on 2015-06-22:"[no title]" hpr1794 (2015-06-18) "12-Tone Music and My Random 12 Tone Row of the Day" by Jon Kulp. Comment 1: Dave Morriss on 2015-06-19: "Interesting lesson" Comment 2: Jon Kulp on 2015-06-19: "Still Ugly " Comment 3: Mike Ray on 2015-06-20: "Atonal music vs. Unrepresentative visual art" Comment 4: Ken Fallon on 2015-06-24: "RSS feed" Comment 5: Jon Kulp on 2015-06-24: "Enjoy pain?" hpr1800 (2015-06-26) "YouTube Video Subscriptions" by Ahuka. Comment 1: Ken Fallon on 2015-06-29: "Links"

July 03, 2015

Hacker Public Radio
HPR1805: 56 - LibreOffice Impress - Styles and Objects 1 - Presentation Styles
We have previously looked at Styles for Writer, and for Calc, and now it is time to look at them for Impress. You may recall from both Writer and Calc that we saw it is important to know that Styles live inside of Templates. So any time you change a Style you needed to make sure it was saved inside of a Template, and if you wanted it to be generally available in all documents or spreadsheets you needed to be sure to make the change inside the Default Template. For more go to http://www.ahuka.com/?page_id=1125 Links http://www.ahuka.com/?page_id=1125

July 02, 2015

Hacker Public Radio
HPR1804: What's in my Bicycle Repair Tool Box
Tools Mentioned Unless otherwise stated, all are made by Park Bicycle Tools: http://www.parktool.com/ SPA-1: Pin Spanner: Green SPA-6: Adjustable Pin Spanner SW-7: Triple Spoke Wrench XLC bike tools crank tool TO-C02 (Crankarm removal tool): http://www.amazon.com/XLC-bike-tools-crank-tool/dp/B000NU2WAS/ SCW-13, SCW-15: 13mm, 15mm Shop Cone Wrenches DCW-1: Double-Ended Cone Wrench FR-1, 2, 5, 6: Freewheel Remover tools BBT-22: Bottom Bracket Tool CN-10: Professional Cable and Housing Cutter Avenir "Third Hand" Cable Puller: 94-27-403 (http://www.avenirusa.com/parts-and-accessories/tools/cable-tools/third-hand-cable-puller.html) HCW-5: Crank and Bottom Bracket Wrench CT-3: Chain tool HCW-15: Headset Wrench Ferrules for cable housing Cable End Caps TW-1: Torque Wrench SR-1: Sprocket Remover / Chain Whip Vise Grips (small and large) Adjustable wrenches: 6", 8", 10", 12"

July 01, 2015

Hacker Public Radio
HPR1803: What's In My Bag?
The blog on Knightwise.com which inspired/sourced this episode: http://knightwise.com/whats-in-your-bag-week-day-3-matt-mcgraw/ The photo of my gear: https://cloud.thestrangeland.net/index.php/s/meDq3hozvgkay2W

June 30, 2015

Hacker Public Radio
HPR1802: An Interview with Emily Hampton a LinuxFest Northwest Volunteer
Emily Hampton Google Plus page admin for LFNW https://plus.google.com/u/0/111293764782511971489 Find out more about LinuxFest Northwest at http://linuxfestnorthwest.org 5 years attending LinuxFest NorthWest 3 Years as a Volunteer

June 29, 2015

Phone Losers
Am I Supposed To Be Doing This
Today's show is sponsored by Tombstone, where I try to trick people into visiting Russia and I indulge Tombstone's foot fetish and we talk to Cocaine Dave and his wife.

Hacker Public Radio
HPR1801: How to tell your left earbud from your right
AMAZING LIFE HACK Tie a knot in your left ear bud lead, and you can feel which is which without looking.

June 26, 2015

Hacker Public Radio
HPR1800: YouTube Video Subscriptions
Although my wife and I have a Cable TV subscription, I have maintained I could give it up easily because so much of what I am interested in is online anyway. For many people that might mean Netflix or Hulu, but for me it means YouTube. This is the golden age of narrow-casting, as opposed to broadcasting, because YouTube gives so many creators the opportunity to find their own audience for things that dont appeal to the masses. For more go to http://www.palain.com/?p=243 Links: https://www.patreon.com/ http://vidcon.com/ http://en.wikipedia.org/wiki/Crash_Course_%28YouTube%29 http://en.wikipedia.org/wiki/SciShow http://www.palain.com/?p=243

June 25, 2015

Phone Losers
Say No To The Sidewalk
Neonlikebjork from Neon Nites sponsors my harassment of old people in this show where I call people whove signed a petition to keep their city looking like Hobo Central.

Hacker Public Radio
HPR1799: Posting From the Command Line on Open Social Networks
Posting From the Command Line on Open Social Networks You can post to your open social media timelines from the command line using API access. Why would you want to do this? Script automated postings. Bots Post from terminal environments. Post from wherever else you are without having to go to the social media site or to the client that you use to access it. Trigger postings via voice command (what I do). On GNU Social Here is the basic format for the command to post a message to a Statusnet / GNU Social timeline: curl -s --basic --user --data status="Hello World" --output /dev/null http://instance.domain.com/api/statuses/update.xml And here is the script I use to post a message to my timeline, launched by a blather voice command: #!/bin/bash # SN account info user=johndoe pass='password123' # a place to store the text message text=/tmp/message.txt # Virtual keystrokes to copy selected text to the clipboard xdotool key Control+c # pipe text out of clipboard into the text file xclip -o > $text # rest for half a sec sleep .5 curl -s --basic --user $user:$pass --data status="$(cat "$text")" --output /dev/null http://instance.domain.com/api/statuses/update.xml rm $text exit 0 On Pump.io On pump.io you have to install the pump.io software on your computer. You don't have to be running a server, you just have to have the binaries so that you can run the commands. I will not go into how this is done on this podcast, but there's a link to the pump.io website below and there should be installation instructions available there. Once you have the software installed, you also have to allow command-line access to your account and get the token for authentication, maybe authorize the user too: pump-register-app -s instance.domain.com -P 443 -t CLI pump-authorize -s instance.domain.com -P 443 -u username Finally you can post to your timeline from the command line: pump-post-note -s instance.domain.com -P 443 -p -u username -n "Hello World." My script to post a message to the pump.io timeline, launched by a blather voice command: #!/bin/bash # a place to put the text. text=/tmp/message.txt # -------------------------------- # Since markdown is possible, I run # the text through markdown to get # a bit of formatting and save it # as a separate file # -------------------------------- pump=/tmp/pump.txt # Virtual keystrokes to copy selected text to the clipboard xdotool key Control+c # pipe text out of clipboard into the text file xclip -o > $text # run Markdown markdown $text > $pump # Post message pump-post-note -s instance.domain.com -P 443 -p -u username -n "$(cat $pump)" sleep 1 rm $text rm $pump exit 0 Links GNU social: https://gnu.io/ https://identi.ca/ (a pump.io network) pump.io Clients: https://github.com/e14n/pump.io/wiki/Clients My Screencast demonstrating the use of blather voice command to post to a timeline https://youtu.be/IJyzF_-6S2o

Off the Hook
Off The Hook - Jun 24, 2015


June 24, 2015

The Linux Link Tech Show
The Linux Link Tech Show Episode 613
scalr, python, ruby, hadoop, aws

Hacker Public Radio
HPR1798: Machine learning and service robots.
Link to the videos of the crawling robots: http://iki.hs-weingarten.de/?lang=eng&page=p_crawler Link to the general Ravensburg-Weingarten University of Applied Sciences page, where you can also find videos of the service robots "Kate" and "Marvin": http://iki.hs-weingarten.de/?lang=eng&page=aktuelles

June 23, 2015

Hacker Public Radio
HPR1797: An Interview with Aaron Wolf of the Snowdrift Co-op Project
An Interview with Aaron Wolf of the Snowdrift Co-op project by David Whitman during LinuxFest Northwest 2015 Aaron Wolf http://blog.wolftune.com/ Snowdrift: https://snowdrift.coop About: We're building a sustainable funding platform for freely-licensed works. Our innovative matching pledge creates a network effect where we all work together to support these public goods. Introducing Snowdrift.coop Our matching patronage system allows everyone to support FLO projects with minimal risk and maximum impact. Unlike the one-to-one matching used in traditional fundraising, we use a many-to-many matching pledge that creates a network effect (like the internet itself) so that we all reinforce one another. Unlike one-time fundraising campaigns that help projects get started, Snowdrift.coop pays out monthly to provide sustainability for ongoing work. Before the times of modern market capitalism, creative workers were supported by wealthy patrons. With Snowdrift.coop, the global community becomes the patron. Instead of businesses deciding the options that we then merely choose from as consumers, we will support and actively work with projects that best serve the interests of the public. Snowdrift wiki: https://snowdrift.coop/p/snowdrift/w IRC at: freenode.net at #snowdrift

June 22, 2015

Phone Losers
More Curling Club Calls
Ethan K. is the sponsor of today's show which is nothing but 45 minutes of curling club member calls. Thanks for the curling club list, Mistress Morgan.

Hacker Public Radio
HPR1796: Audacity - Chains, Notches and Labels
I expand some on Jon Culp's show on using Labels in Audacity. Specifically, I comment on importing a Label track from a Tab separated text file. I go on to talk about using Notch filters, a Nyquist-effect plugin for Audacity. Notch filters work extremely well on certain frequency centered noise like mains hum. I follow up by talking aboutchains. A way of doing batch operations directly in Audacity. Links http://wiki.audacityteam.org/wiki/Nyquist_Effect_Plug-ins#Notch_Filter http://manual.audacityteam.org/o/man/chains_for_batch_processing_and_effects_automation.html

June 19, 2015

Phone Losers
Quad Copters and Job Applicants
Jeremy Albright is the sponsor of today's attempt to discourage people from even bother trying to apply for jobs.

Hacker Public Radio
HPR1795: 54 - LibreOffice Impress - Templates and Master Pages
The terms Template and Master Pages refer to the same thing, but inside the Impress application they are referred to as Master Pages, and they are accessed on the right-hand side of the page. If you as the author do not choose a specific Template to use when creating a new presentation, Impress will base the presentation on the default Template that is built in to Impress. But you can create your own default Template if you like. For more go to http://www.ahuka.com/?page_id=1188 Links http://www.ahuka.com/?page_id=1188

June 18, 2015

Hacker Public Radio
HPR1794: 12-Tone Music and My Random 12 Tone Row of the Day
12-Tone Music (Dodecaphony) and My Random 12 Tone Row of the Day In this episode I cover a bit of music theory as well as some bash scripting. The topic is the Twelve-Tone System of music composition and the scripting of a random 12-tone row to be generated daily. For a full transcript of the show click here. Links Twelve-tone technique Arnold Schoenberg Alban Berg Anton Webern Second Viennese School 12-Tone Matrix Calculator Jon's Random 12-Tone Row of the Day Lilypond Music Notation Software

June 17, 2015

The Linux Link Tech Show
The Linux Link Tech Show Episode 612
scalr, python, ruby, hadoop, redis, lastpass, automation

Hacker Public Radio
HPR1793: Some thoughts about the Go language
Show_Notes: Here are some useful links when learning Go: http://tour.golang.org/welcome/1 http://golang.org/doc/code.html http://golang.org/doc/effective_go.html https://gobyexample.com/ http://learnxinyminutes.com/docs/go/ http://golang.org/ref/spec http://golang.org/ref/spec http://golang.org/pkg/ http://godoc.org/ And here are some links to things I mentioned during the show: https://en.wikipedia.org/wiki/Mebibyte https://en.wikipedia.org/wiki/Heartbleed https://en.wikipedia.org/wiki/C_%28programming_language%29 https://en.wikipedia.org/wiki/Python_%28programming_language%29

June 16, 2015

Phone Losers
Curling and Goodwill Auctions
Servo is the sponsor of today's show, where we call Goodwill auction bidders and a few of Mistress Morgan's curling club members.

Hacker Public Radio
HPR1792: An Interview with Andrea Frost
I interview Andrea Frost at LinuxFest Northwest. Andrea Frost Andrea Frost holds a B.A. in German language and a concentration in mathematics from Western Washington University. A passionate advocate of youth and education, Frost has a wide spectrum of volunteer experience with youth organizations. She is currently an office assistant for Kids Council Northwest and finishing a post-graduate degree in computer science from Western. http://awc.cs.wwu.edu/ Western Washington University Association for Women in Computing http://www.bellinghamherald.com/2015/02/17/4137824_women-to-discuss-challenges-highlights.html?rh=1

June 15, 2015

Hacker Public Radio
HPR1791: Organizing Photos with Bash
Summary In this episode I provide an overview of how I use bash to automate my process for orgainizing photographs on my computer. There are two main objectives of this script: Organize photographs in a folder structure that makes sense to me, e.g. 2015/2015-05-22 Allow me to back up my photographs using a variety of methods. Download the Script This script is hosted on Github and you can download the latest version using following command: git clone https://gist.github.com/81e489b2a7397bb17305.git Script #!/bin/bash shopt -s -o nounset # Create variables and configure script. declare -rx SCRIPT=${0##*/} declare TMPDIR=/tmp/photos declare -r CURRENTDIR=`pwd` declare FILES=$TMPDIR/* declare DESTINATION=/media/Tyr/Pictures/Photos declare -r GOOGLEUSER="tnyplz@gmail.com" declare -r OPTSTRING="-h, -d:" declare -r LONGOPTSTRING="help, destination-directory, no-google-backup, sd-card, tmp-dir, no-delete, backup" declare RESULT declare GOOGLE_BACKUP=true declare SD=false declare SDDIR declare NODELETE=false declare S3=false # Executable dependencies declare -rx find="/usr/bin/find" declare -rx gphoto2="/usr/bin/gphoto2" declare -rx google="/usr/bin/google" declare -rx dcraw="/usr/bin/dcraw" declare -rx rsync="/usr/bin/rsync" declare -rx rename="/usr/bin/rename" declare -rx tar="/usr/bin/tar" declare -rx s3cmd="/usr/bin/s3cmd" # Sanity Checks if test -z $BASH; then printf "$SCRIPT:$LINENO: please run this script with the BASH shelln" >&2 exit 192 fi # check for find if test ! -x $find; then printf "$SCRIPT:$LINENO: the $find command is not available -- abortingn" >&2 exit 192 fi # check for gphoto2 if test ! -x $gphoto2; then printf "$SCRIPT:$LINENO: the $gphoto2 command is not available -- abortingn" >&2 exit 192 fi # check for google if test ! -x $google; then printf "$SCRIPT:$LINENO: the $google command is not available -- abortingn" >&2 fi # check for dcraw if test ! -x $dcraw; then printf "$SCRIPT:$LINENO: the $dcraw command is not available -- abortingn" >&2 fi # check for rename if test ! -x $rename; then printf "$SCRIPT:$LINENO: the $rename command is not available -- abortingn" >&2 exit 192 fi # check for rsync if test ! -x $rsync; then printf "$SCRIPT:$LINENO: the $rsync command is not available -- abortingn" >&2 fi # check for tar if test ! -x $tar; then printf "$SCRIPT:$LINENO: the $tar command is not available -- abortingn" >&2 fi # check for glacier-cmd if test ! -x $s3cmd; then printf "$SCRIPT:$LINENO: the $s3cmd command is not available -- abortingn" >&2 fi # Check for Options # ================= getopt -T if [ $? -ne 4 ]; then printf "$SCRIPT:$LINENO: %sn" "getopt is in compatibility mode" >&2 exit 192 fi RESULT=$(getopt --name "$SCRIPT" --options "$OPTSTRING" --longoptions "$LONGOPTSTRING" -- "$@") if [ $? -gt 0 ]; then exit 192 fi eval set -- "$RESULT" while [ $# -gt 0 ]; do case "$1" in -h | --help) # show help printf "%sn" " This script helps you automate the process of downloading photos from your camera, uploading backups to Google Picasa, and syncing the files with a specified directory. Dependendies: gphoto2 dcraw googlecl rsync s3cmd usage: $SCRIPT [options] Options: -h | --help Show help for $SCRIPT --destination-directory {LOCATION} Set the location where the photos will be copied to. --tmp-dir {LOCATION} Set the temporary directory where images will be downloaded to initially. The default is /tmp/photos. --no-google-backup Disable uploading low rez copies to Google Plus. --sd-card {LOCATION} Set the location of the sd card. --no-delete Do not delete from temp file. --backup {FOLDER} {S3 BUCKET} Create archive from folder and upload to S3. " exit 0 ;; --destination-directory ) shift if [ $# -eq 0 ]; then printf "$SCRIPT:$LINENO: %sn" "Invalid argument for destination. No destination given." >&2 exit 192 fi DESTINATION="$1" ;; --tmp-dir ) shift if [ $# -eq 0 ]; then printf "$SCRIPT:$LINENO: %sn" "Invalid argument for tmp-dir. No temporary directory given." >&2 exit 192 fi TMPDIR="$1" FILES=$TMPDIR/* ;; --no-google-backup ) shift GOOGLE_BACKUP=false ;; --sd-card ) shift SD=true if [ $# -eq 0 ]; then printf "$SCRIPT:$LINENO: %sn" "Invalid argument for sd directory. No sd card directory given." >&2 exit 192 fi SDDIR="$1" ;; --no-delete ) shift NODELETE=true ;; --backup ) shift if [ $# -eq 0 ]; then printf "$SCRIPT:$LINENO: %sn" "Invalid argument for AWS Glacier Backup. Backup folder and vault must be specified." fi S3=true BACKUP_FOLDER="$1" BUCKET="$2" ;; esac shift done # Functions # ========= # function to convert a raw image to jpg. # input: requires the user to specify the file extention ($1). function convert_to_jpg () { FILES2CONVERT=$TMPDIR/*"$1" for FILE in $FILES2CONVERT do FILE2BACKUP=$TMPDIR/Backup/`basename "$FILE" "$1"`'.jpg' if [ -e $FILE2BACKUP ]; then printf "$SCRIPT:$LINENO: Skipping $FILE, jpg file already existsn" elif [ -e $FILE ]; then printf "$SCRIPT:$LINENO: Converting $FILE to $FILE2BACKUPn" $dcraw -cvz -w -o 1 -q 3 "$FILE" | cjpeg -quality 80 -optimize > "$FILE2BACKUP" else printf "Did not convert $FILEn" fi done } # function to resize jpeg to upload to picasa function resize_to_thumb () { FILES2RESIZE=$TMPDIR/Backup/* # TODO pass this in as argument along with destination directory for FILE in $FILES2RESIZE do printf "$SCRIPT:$LINENO: Creating thumbnail for $FILE..." convert $FILE -resize 2048x2048 $TMPDIR/Backup/Upload/`basename "$FILE" ".jpg"`'_thumb.jpg' printf "donen" done } # function to import photos function import_photos () { printf "$SCRIPT:$LINENO: Importing Photosn" if $SD; then cp -p "$SDDIR"/* . else $gphoto2 --quiet --get-all-files fi } # function to remove spaces in file names function remove_spaces () { $find $1 -depth -name "* *" -execdir $rename 's/ /_/g' "{}" ; } # function to sort images into direcotries based on date. # input: directory to sort ($1) # directory to sort into ($2) function sort_images () { SORTDIR=$2'/Sorted/' for FILE in $1 do printf "$SCRIPT:$LINENO: Sorting $FILEn" DATEDIR=$SORTDIR`date -r "$FILE" +%Y`'/'`date -r "$FILE" +%Y-%m-%d` mkdir -p $DATEDIR cp "$FILE" $DATEDIR/ done } # function create archive and upload to AWS S3 # input: directory to create an archive for ($1) # s3 bucket name ($2) function archive_folder () { ARCHIVE=$TMPDIR/$(basename $1).tar.bz2 printf "$SCRIPT:$LINENO: archiving $ARCHIVEn" $tar -cvjf $ARCHIVE $1 $s3cmd put $ARCHIVE $2 } # Create temporary directory mkdir -p $TMPDIR cd $TMPDIR # Create AWS Glacier archive if $S3; then archive_folder $BACKUP_FOLDER $BUCKET cd $CURRENTDIR if [ $NODELETE = false ]; then rm -rf $TMPDIR fi exit 0 fi # Import files from camera import_photos printf "$SCRIPT:$LINENO: Importing Photos Done!n" # Remove Spaces in Filenames remove_spaces $TMPDIR #Convert all files to lower case printf "$SCRIPT:$LINENO: Converting Photos to Lower Case.n" for FILE in * do f=`echo $FILE | tr '[:upper:]' '[:lower:]'` mv "$FILE" "$f" done printf "$SCRIPT:$LINENO: Converting Photos to Lower Case Done!n" # Sort files sort_images "$FILES" "$TMPDIR" printf "$SCRIPT:$LINENO: Sorting Images Done!n" # Create backup jpgs and upload them to Picassa mkdir -p $TMPDIR/Backup cp $TMPDIR/*.jpg $TMPDIR/Backup/ convert_to_jpg ".nef" convert_to_jpg ".nrw" mkdir -p $TMPDIR/Backup/Upload resize_to_thumb if $GOOGLE_BACKUP; then # Upload jpgs to Picassa # Requires that you authorize googlecl through the web browser. $google picasa create --user $GOOGLEUSER --title "Backup "`date +%Y-%m` $TMPDIR/Backup/Upload/* fi # Copy files to final locations $rsync -ravv $TMPDIR/Sorted/ $DESTINATION # TODO test to make sure destination works cd $CURRENTDIR # Remove temp folder if [ $NODELETE = false ]; then rm -rf $TMPDIR fi printf "$SCRIPT:$LINENO: Processing Complete!n" exit 0


[more]
Link to us!

Hackermedia.org is provided by:
Binary Revolution | Infonomicon Computer Club