Monday, July 30, 2018

Converting Picasa XMP Face Tags to Usable Exif Metadata Tags


Is this the future?
2022 already?

I guess I finally broke the delayed post pattern now that I'm finally finding a good use for this thing--psuedomemory for the technology shit I always forget about.  I spend half my life trying to Google shit I Googled five years ago (and again three years ago, and again eighteen months ago...)  Bookmarking pages hasn't really done me any good, because I forget that I bookmarked a site (and also because there are times I find the bookmark, but can't remember why I saved it, haha.)

So today's episode of "Chris' only reason to post an entry on this elderly blog" is brought to you because I have like 15,000+ pics that aren't really organized.  Back when I used Windows, Picasa made things easier because of the face tagging technology.  If you wanted to find a pic of a certain person, you could just click their name and voila, you were good to go.

However, Picasa typically writes those tags to an internal DB and not to the images themselves.  There's a way to get Picasa to do that, but it writes them to a weird XMP field that isn't typically used by any other photo organizer.

I'm using Debian and GNOME as my desktop environment, so I'm using the default image manager that comes with the distribution.  Unfortunately, it does not use XMP tags for organizing or searching, so I was basically stuck trying to find some way of migrating those Picasa XMP face tags (mwg-rs: Regions/ mwg-rs:RegionList[1]/mwg-rs:Name) into something that another application could search.

The solution is actually really easy to use, but the hard part was actually finding it!  Google searching was a little wonky and the results weren't all that clear.  I finally found this post in the Exif forum, but if you didn't phrase your search terms precisely that way, you'd never find it.   Here's my useless search history:

shotwell search xmp
mwg-rs:Name to exif tag
mwg-rs:Name
linux photo program that can read xmp face
how to search xmp tags 

The post I linked to above was exactly what I needed and it actually was super easy to do.  It's literally one line, assuming all of your photos are in a hierarchical directory.

Here's a video walk-through of how to make that happen:


It only took around 20 minutes to run through about 17,000 files in 254 directories.  Not too shabby!

Here are some links to the stuff that powered today's post (all excellent, Open Source projects)

ExifTool by Phil Harvey- "a platform-independent Perl library...for reading, writing and editing meta information in a wide variety of files."

Shotwell- A digital photo organizer designed for the GNOME desktop environment.

Kazam Screencaster- The screen recording software I used to record the above video.

Monday, July 23, 2018

ComicTagger Error StrpTime


Long time, no see/speak/etc.    You can thank an annoying, seemingly obscure technical problem I ran into for breaking my 42 months of blog silence.  These hiatuses (yatus #bigbrother) seem to be getting longer and longer over the years.

So anyways, I decided to try to organize my electronic comic book collection yesterday and installed a program called ComicTagger, which helps grab and write metadata for comic books.  

I get it installed and ran into my first problem right off the bat.  The application wants you to put in the path to WinRar (or any RAR/UnRAR program) but the little tool you use to navigate through your filesystem doesn't actually navigate anything.  It'll open the box and show you your root folder, but none of the contents.  The workaround for that was to just manually type in the path.  Since I'm running Linux, my path was "/usr/bin/rar" and "usr/bin/unrar"

Problem solved!  Let's get to tagging comics!  I drag and drop a file over to test and wait.  And wait.  And wait some more.  The dialog box that popped up is just sitting at 0% for a few minutes before I realize that there's an error in the terminal window and I'm stuck.  Here's what I see:

Traceback (most recent call last):  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/taggerwindow.py", line 540, in dropEvent    self.fileSelectionList.addPathList( self.droppedFiles )  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/fileselectionlist.py", line 196, in addPathList    row = self.addPathItem( f )  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/fileselectionlist.py", line 271, in addPathItem    if ca.seemsToBeAComicArchive() :  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/comicarchive.py", line 618, in seemsToBeAComicArchive    ( self.getNumberOfPages() > 0)  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/comicarchive.py", line 775, in getNumberOfPages    self.page_count = len( self.getPageNameList( ) )  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/comicarchive.py", line 751, in getPageNameList    files = self.archiver.getArchiveFilenameList()  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/comicarchive.py", line 395, in getArchiveFilenameList    for item in rarc.infolist():  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/__init__.py", line 127, in infolist    return list(self.infoiter())  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/__init__.py", line 122, in infoiter    for params in RarFileImplementation.infoiter(self):  File "/usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/unix.py", line 171, in infoiter    data['datetime'] = time.strptime(fields[2]+" "+fields[3], '%d-%m-%y %H:%M')  File "/usr/lib/python2.7/_strptime.py", line 478, in _strptime_time    return _strptime(data_string, format)[0]  File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime    (data_string, format))ValueError: time data '2006-03-29 18:32' does not match format '%d-%m-%y %H:%M'
The highlighted section is the actual error.  There's nothing about this on the project Github site, the Google site the code was originally housed on, or the application's web forum.  NOTHING.  There is literally one post on an Ubuntu forum where a dude asks about the issue in 2016, but no one ever responded!  And if he ever discovered the fix, he didn't post it in that thread.  DON'T EVER DO THAT.  If you fix your own problem, update the fucking thread!

Anyway, I DID figure out a fix and I decided to post it on my blog, so if anyone else runs into the problem, it's a 30 second fix and not hours of googling like a moron (me!)  I should've just sat down and worked through the problem like I finally did this morning. It took me about 45 minutes and 25ish minutes of that was trying to find and install a text editor that had line numbers on it, haha.  I tried Sublime and it wasn't.  Now I know why the editor war has been ongoing for over 30 years.

In this case, ComicTagger is choking while trying to strip out and reformat the date it finds in my CDisplay RAR Archived Comic Book (CBR) file.  It looks like the (or A) programmer hardcoded the date format as %d-%m-%y %H:%M, which is Day-Month-Year (two digit) Hour:Minute (Military format.)  However, it looks like the file date that was getting pulled from my CBR files were in YYYY-MM-DD HH:MM. The strptime Python module was throwing up an error because the date that was getting passed to it wasn't matching. 

Here's the fix:  I went into /usr/local/lib/python2.7/dist-packages/comictaggerlib/UnRAR2/unix.py and edited line 171 to reflect the actual format that was needed:

data['datetime'] = time.strptime(fields[3]+" "+fields[4], '%Y-%m-%d %H:%M')
There you go.  Now I've wasted another 90 minutes writing this up. I hope you appreciate all that I do for you!

See you in 2022, bitches!

Tuesday, January 6, 2015

Automatically using the Multipurpose Feeder on a Dell B2360DN Printer

Why is this like sacrificing a goat to an angry and judgmental dark lord?  All I wanted to do was be able to print stupid UPS shipping labels without a lot of hassle.  I want the print from the Multipurpose Feeder if there's something in the slot, but from the tray if not.  Automatically.  But, the default setup on my Dell B2360DN printer makes that impossible.  Sure, I could just load up my Tray 1 with all those free, delicious UPS labels, but then I still have to manually tweak something when I send a regular print job.  
RTFM?  Not anymore.  Dell's documentation is shit.  But it can be done! It’s a multi-step process that I’ve pieced together from a few different forums and a bit of dicking around.
After these changes, I can now just send a print job to the printer and unless I shove something into the Multipurpose Feeder (MP Feeder) it’s going to route out of Tray 1.  If I want to print one of my UPS labels, I just stick it in the MP Feeder and the B2360DN will THAT instead of the paper out of Tray 1.  You know, like pretty much every other printer I’ve owned has done out of the box.  But no judgments, Dell.
  1. Front of B2360DN
    Change the default MP Feeder settings in the Diagnostic Menu:
    1. Power off the printer
    2. Hold the OK and left arrow key
    3. Switch the printer on
    4. Release the keys once the amber light comes on
    5. Scroll through the Diagnostic menu using the right arrow.
    6. Select Printer Setup
    7. Select ENGINE 2 (push the right arrow 5 times to reach this option)
    8. Change ENGINE 2 setting to 8* and press OK
    9. Press the return arrow key to return to the Diagnostic Menu
    10. Press the left arrow to select EXIT DIAGNOSTICS
    11. The printer will reboot
  2. Change the Default Source and Paper Type for the Multipurpose Feeder
    1. Press the Wrench key to reach the Admin Menu
    2. Press OK to reach the Paper Menu
    3. Press OK to select Default Source
    4. Press the right arrow to select MP Feeder and press OK
    5. Press the right arrow to reach the Paper Size/Type Menu and press OK
    6. Press the right arrow to select MP Feeder Size and press OK
    7. Select Letter and press OK
    8. Press the right arrow to select MP Feeder Type and press OK
    9. Select Plain Paper and press OK

Friday, February 8, 2013

Tuesday, May 15, 2012

Oh, Good For You, Christian Bale. Good. For. You.

Ever since Christian Bale went batshit crazy on the set, I like to be obnoxious with my wife and drop the "Oh, good for you!" line as much as possible.  I keep saying I want to use it for her text tone, but I can never find a clean copy of that stupid thing!  Every "Good for you" drop/tone/ringtone I've found has either been on a soundboard and you can't download it, or it's in Flash (same problem.)

Luckily, I found a clean, MP3 version of the Christian Bale rant today online (link added for your convenience.)  Through the powers of Audacity (a bad ass bit of shareware, if I do say so myself) I extracted that magical bit and made it into an iPhone formatted tone (M4R.)  For those of you that play with other phones, I've did an MP3 version too.

Enjoy, mofos!

Christian Bale "Oh Good for you!" iPhone ringtone

Christian Bale "Oh Good for you!" Mp3 format

P.S--don't be scared of the littleretard.com URL--that's mine.  I couldn't pass up an awesome domain like that when it was suggested by the registrar a few years ago.  I use it for a picture blog (www.littleretard.com/blog) but it's not updated often.

Wednesday, January 12, 2011

Giggity

Obviously, I've been a fat mofo for quite a while. This blog is the bastard stepchild of a blog I started back in July 2005 to document my fight against my fatty fatty two-by-four nature. A fight that continues, my fine friends.

I hit my highest weight EVER in December 2010 (or the highest recorded weight, that is--it doesn't count if it's not documented) when I entered a weight loss competition with some of my coworkers. Sadly, I lost (blame it on the fact that we started in December; blame it on the fact that I was in New Orleans constantly the eight weeks we tracked our shit; blame it on the rain, yeah yeah; blame it on the ah ah ah ah alcohol baby).

I lost a WHOPPING 10.5 pounds. Boo. Hiss.

Fast forward to June 2010...my coworker (now my boss) decided she needed some motivation to shed a few pounds before her trip to Italy, so she kicked off a Biggest Loser Part Deux in the office. Eight weeks. Eight contestants. $800 on the line. (I'm a shitty story teller, so I'll just blurt out the fact that I handily won that bitch).

Imagine my surprise when I weighed LESS at the start of this comp than I did at the END of the last? By almost 10 pounds. W00T! I have no idea how it happened, as I wasn't really dieting. I slacked off a LOT since then (for a few reasons that I'll get into in a sec), but now that the holidays are over, I'm back to being a diet and exercise Nazi as of 1/3/2011. I'm down about 5 pounds since then and I think I'm off to a good start.

You want in? You know you do...here are some of the tools that I've been using. They seem to work for me:

  • Myfitnesspal.com--I started using this site because they had a decent iPhone app (and yes, I'm back to the iPhone--the 3GS is like a bajillionty times better than Android) that made tracking my food super easy. I've sadly discovered that unless I'm crazy ass OCD about tracking what I eat (and talking about it incessently with Laurie), I start to drift off into picking up breakfast tacos on the way to work; eating double bacon cheeseburgers at lunch; "snacking" on a McDouble AND a fucking McChicken on the way home BEFORE dinner YOU SAD FAT MOTHER FUCKER. In the few months I've used it, they iPhone app has been updated to be even more user friendly. I've tried a couple of other apps (like Sparkpeople) but they are as slow as a stoned turtle fucking.
  • Runkeeper (iPhone app)--I had planned on running a few days a week to build up to a 5K, but then I not only pulled my right hamstring (Octoberish?), I pulled the left a few weeks later and THEN did something to my left Achilles Tendon (or possibly fractured my left heel bone--can't say for sure, because I still haven't gone to the doctor, but I'm leaning towards a strained AT). while using a mother fucking jump rope of all things Runkeeper is the fucking bomb for tracking that shit, with integrated GPS that feeds into a map. What I like about Runkeeper is that you can also use it to track bike routes too.
  • Muscleandstrength.com--Great website to learn about fitness and nutrition (but take everything you read with a grain of salt, especially in the forms). Lots of example videos, which is helpful when you're trying a new split and you have no fucking idea what a Pec Dec Fly is.
  • ExRx.net--another great site to with tons of exercise examples.
  • Digital Kitchen Scale--get one. You need it. Seriously.
  • Jack3d--The label calls it a "pre-exercise CNS-Carnosine-ATP Augmentor". It's a pre-exercise supplement with creatine (rebuild muscles faster) that increases nitric oxide levels (pumping up your muscles) and doubles as an energy drink (much like crack or meth--the shit is potent, yo).
  • Optimum Nutrition Gold Standard Whey Protein (Rocky Road flavor)--I am so mother fucking tired of this flavor. Ugh. I'm getting strawberry next time. Whey protein is a must if you're going to do any strength training. Drink a shake within 30 minutes of completing your workout--again, helps the muscles rebuild faster. I stick with whey only right now since I'm trying to lose weight, but there are other types of proteins out there that are digested more slowly that I'll add when I get into some type of maintenance mode.
I fucked around after August (and the injuries in October screwed up my fitness shit for a couple of months) and gained a few pounds back. Since June 1, I'm down 30 pounds...starting with my 12/2010 weight, I'm down 49 pounds.

I'm still a fat mofo, but not as bad as I was (and not as MUCH as I thought). The trainer at our work gym did a body fat caliper test on me in November and based on that, I'm actually at the tail end of the "normal" range with 22% body fat.. My pants beg to differ, but I'll take what I can get.

Wednesday, January 20, 2010

Bleeding Me

Why am I such a technology whore? I fucking LOVE it. Computers, TVs, Blu-ray players, handheld devices, shit with wires, shit with LEDs, 802.11G & N & Wimax & LTE, air cooled with fins, heatsinks cooled with flourescent liquids, liquid crystal displays. If it's got the juice running in it, I WANT IT ALL.

Consequently, I gots lots of bills that are generated as a result of my love of the integrated circuit.

I was reading an article in Gizmodo over the three-day weekend (The Subscription War: You're Bleeding to Death) and was interested in seeing how my stuff stacked up to the "norm"


Holy shit.
Some of these are annual fees that I'm showing amortized over twelve months (Flickr, domain names, Xbox live, magazines). Sweet baby Jesus, I'm spending over $5,500 a year on subscription entertainment services. This doesn't count the cash I spend on music (a few hundred a year?), spur of the moment PPV movies/Blockbuster runs, trips to the movie theaters (again, a few hundred a year--a trip for a family of four to a flick is not an inexpensive proposition).
What can I do to stop the bleeding? My biggest monthly expense is Verizon Fios, which has my land line phone (and unlimited long distance), my Internet (20 Mbps symmetrical), & my TV service (a brazillian channels, including HBO/Cinemax/Showtime/TMC/Starz/Encore/etc).
My first step is seeing what I can live without from Verizon:
1a) Land line phone
The only time I personally use the home phone is when I'm passing it over to my wife or kids when I get stuck answering the phone. (Quick aside: why the fuck do I have to answer the phone? It's never for me, yet 75% of the time, I'm the one that has to get my fat ass out of my chair and grab it off the wall). All my friends call me on my cell. Most of the time, my wife uses HER cell. We could lose the land line and drop $50 off the bill.
My biggest hurdle is that my alarm monitoring is done over the land line. I could change that to cellular monitoring OR switch to a VoIP service (like Vonage) and do a bit of wiring magic to have it feed into the whole house through the existing wires.
1b) Decrease my Internet service speed to a slower bandwidth. The 20Mbps service currently runs me $61 a month after my "bundled discount"
1c) Kill some of the extraneous channels. Do I REALLY need 73 premium movie channels (NOT counting the HD channels)? I pay an extra $29.99 a month for those.
Apparently I DO need all those channels and I need a FASTER Internet service and I'm too lazy to do a five minute wiring job because instead of killing my services, I signed up for MORE when I hit Verizon's website yesterday. Under a two year contract. Sigh.
Here's what I have now. Same phone service, I now have a 35Mbps symmetrical Internet service, and a new channel package that has an EXTRA movie channel (EpixHD).
But I saved $18 a month by signing up for it! And I got 3 months of free movie channels! I got more for less! Yes! Fuck!
Alright, let's try something else.
Cellphones: $130 a month. I can't shave anything off of that. The $130 a month is for my G1 (including text & data), Laurie's phone (including texts), & Evan's phone. This bill will only INCREASE. Sometime in the next couple of months, I'm putting Laurie onto some type of smartphone (most likely moving her over to AT&T for an iPhone [$80+ a month]). Evan is getting to the point where he's texting his friends (need to add a texting plan for HIM). I'm sure Chloe will soon want a phone. Ok, scratch that one.
Netflix: $17 a month. Actually that one just went up to $17 a month from $9 because I changed to the two-disk a month plan with Blu-ray (can't watch NORMAL dvds now that I have a Blu-ray player. Posh. The intent is to stop getting shit from Redbox & Blockbuster. This will save me money. I swear.
Tivo: $17 (it's slightly less than that, more like $15 with taxes). In THEORY I could lose the tivo and replace it with a DVR from Verizon, but it's the same price and I like the functionality of the Tivo. I could actually roll my own DVR and use XBMC, but I'd have cough up the cash upfront to build a HTPC. I'd lose my On Demand stuff in the bedroom, but gain Netflix streaming, Hulu, website streaming, etc. Hmmm, that sounds fun. That's a big "maybe" sometime soon.
Xbox Live: $5 (that's slightly higher because I forgot to add Evan's account). Have to have this for Netflix streaming on my big screen and killing zombies with my friends over the Internet.
Flickr: $2 ($24.95/year). Easiest way to share pics with friends & family; easiest triple backup of my pictures (which are also backed up on my ipod and my online backup set). Nope, can't do it.
Domain names: $2 ($20 a year). $10 a year X 2 for my email domain & Laurie's too. This may increase when my free service on my photography blog dies next year. I like that domain name too much to get rid of it (http://www.littleretard.com/blog), so this will probably triple next year.
Online backup: $5. Shut your mouth. This $5 a month is the only thing that stands between my balls and Laurie's scissors if our PC ever dies. Can you imagine how much stuff a teacher keeps on her home PC? She'd have to start from scratch at the end of a three month summer break and that ain't happening.
Kid's games: $5. Webkinz are to Chloe what computers are to me. That's all I gots to say about that.
Audible.com: $15. I pay $15 a month for one audiobook per month (on top of the free ones I download from the library). This $15 assures my sanity in the 45 minute to 1 hour commute ONE WAY from Sachse to downtown Dallas. This $15 also assures the life of many individuals who share 75 Central with me. Without me being entertained by my books, I would cut a bitch every day. NOTE: This was a trade off from my "old" entertainment of Sirius.
Magazines: $10. This may be a somewhat conservative estimate. Laurie gets People, Soap Opera Digest, & US Weekly (which needs to be renewed). I get D Magazine & Wired, but I never pay more than $10 a year for mine. You want to tell Laurie she can't get her gossip? Me neither.
Newspaper: $29. Are you fucking kidding me, DMN? $29 a month for the fucking paper? I've tried to kill this, but Laurie is a newspaper fiend. I wish she'd get with the times and get her news off the Internet like I do, but whatchugonnado?
Man, I'm thoroughly fucked. I'm not willing to part with any of this. In fact, it's only going to go up.
Next Topic: The box full of surveillance equipment in my garage that I want to install on my house and why my wife won't let me.