Sorting pictures

December 21, 2015 by · Leave a Comment
Filed under: Photography, SmartPhones & PDAs, Technology 

I’ve been backing up my iPhone photos to my Windows 10 desktop using Microsoft’s OneDrive.  The photos are on my local drive as well as the cloud.  The downside is that all the photos, movies, and screen shots are dumped into a single directory, and there are a lot of them.

I prefer to have them sorted by date into directories.  A directory for each year, with sub-directories for each month.  I could do this by hand, but that’s a pain, and I have to remember to do it on a regular basis.  Plus I’ll probably want to do the same for my wife’s iPhone photos.  So I decided to write a python script to scan the camera roll directory, and copy the files to a directory in my photo archive section.  The scrip will create directories if needed and skip files that are already in place.

That part was pretty straight forward. I used os.chdir() to get to source directory and os.listdir() to get the directory contents.  Don’t want to create month directories for directories, just files, so I used os.path.isfile() to filter out non-files, and then check the file extension.  I only want jpg, mov, png, and tiff files.  I use Camera+ most of the time, which produces tiff files instead of jpg files. The png files are screenshots.

I used os.stat() to get the create time, and found files I exported to the camera roll from Camera plus had a create time of when they were exported, not the time the photo was taken. (Once I started having Camera+ dump straight to the camera roll, I didn’t have this problem).

So, I dug a little deeper and found I could get an image created time stamp with a getImageDate() call.  Downside was this didn’t work for png, tiff, or mov files.   So I had to do some extra sorting, and wrote another function to use on just the jpg files. I called the open() function from the Image library, and extracted the exif data using the _getexif() function. This works most of the time, so when it fails I had it return a ‘?’ rather than the time stamp string.  Seeing that caused a fall back to the getImageDate() function.

This extra call to the Image library made the placement of the files more accurate.  I had the base time function return the month as a three character string and the year as a 4 characters string.  This required some basic string manipulation. Those two parameters were added to predetermined destination and passed to a function I had written for another project that checks if directory exits, and creates it if it does not.

Next was to have the program check to see if the file already existed in the correct destination directory.  If it did, don’t bother copying it again. This will make the incremental runs faster and save on unneeded file transfers.

Now I have a functional script that I can set up to automatically run once a week.  Once the files are archived off OneDrive, I can removed them there and on the iPhone is order to free up space.

Originally posted to Urbin Technology.  I put the source code for the time stamp functions there.

HP buys Palm

April 29, 2010 by · Leave a Comment
Filed under: Gear, SmartPhones & PDAs, Technology 

HP has been on a buying spree.  They bought 3Com, and now they have just purchased a former 3Com company, Palm Corp. for $1.2 billion.

The article I linked talks about what HP could do with Palm’s webOS for mobile devices, including using it in netbooks and tablet devices.

What it doesn’t talk about is Palm’s patent portfolio, which could be worth the price of the sale alone.

Originally posted at Urbin Technology

Two new Android phones

January 9, 2010 by · Leave a Comment
Filed under: Gear, SmartPhones & PDAs, Technology 

AT&T is finally carrying an Android based phone, this one is made by Dell, and called the Mini 3. This phone has been selling overseas already, so the specs are pretty well known. 3.5-inch 640×360 display, Bluetooth, 3 megapixel auto-focus camera with flash, microSD, and GPS.   Two things catch my eye, no WiFi and and microSD support.  So that is the bad and good points right off the bat.  No WiFi was one of the major complaints about the Crackberry Storm.

The inclusion of a microSD slot is a big, big plus.  The lack of an additional memory source is the biggest strike against the iPhone hardware, IMNSHO.

The other new Android phone is Google’s own Nexus 1.  We’ll see how long that name lasts.  The estate of Philip K. Dick is already taking legal action against the name.  Otherwise, this is an impressive bit of hardware. It sports a one-gigahertz processor, a 3.7-inch display, a five-megapixel camera, light and proximity sensors, and dual microphones that allow for noise cancellation.  Woot! This phone also has a removable battery!  The serious road warrior can pack a spare for emergencies.  The phone itself only has 512 Meg of flash memory, but it comes with a 4 Gig microSD card.  The phone will support up to 32 Gig in that slot, so expansion is available.

You can buy an unlocked phone direct from Google fro $529.

Originally posted at Urbin Technology.

Bringing another over to the Dark Side

August 30, 2009 by · Leave a Comment
Filed under: SmartPhones & PDAs, Technology 

My brother liked my iPhone more than his smartphone, so he bought himself one yesterday.

More details over at Urbin Technology.

Bad move by Apple

August 3, 2009 by · Leave a Comment
Filed under: SmartPhones & PDAs, Technology 

Apple barred the new Google Talk App from the iTunes App Store.

The initial claim was that the app duplicated core services of the iPhone.

To get around Apple’s monopolitics ban, point your iPhone browwer to www.google.com/talk.

There has been other fallout from Apple’s ban, besides pissed off customers, the FCC is asking questions and Google CEO Eric Schmidt resigned from Apple’s Board of Directors.

Then there is also the added buzz about Google Talk this has generated. Perhaps it would have been better for Apple just to have allowed the app in the iTunes app store.

Originally posted at Urbin Technology

This just may be Nerdvana for some

May 22, 2009 by · 2 Comments
Filed under: Science Fiction, SmartPhones & PDAs, Technology 

Personally I think it’s good, but not that good.
Oh, what am I babbling about? The Klingon Phrase book app for the iPhone.

It’s good to be a geek.

New iPhone hardware rumors

March 30, 2009 by · Leave a Comment
Filed under: SmartPhones & PDAs, Technology 

Apple has changed the rules for the Rev 2, 3G iPhone sales. Customers can buy “unlimited quantities” without the AT&T contract that subsides the price. This is the same tactic Apple used to clear out Rev 1 hardware before they announced the 3G iPhone.

The Apple Developers Conference, June 8-12, would be a good place announce a new rev of the iPhone hardware that will use the new firmware to the best advantage. Apple could use a new iPhone to offset the Palm Pre and new Android phones.

Originally posted at Urbin Technology.

Skype for the iPhone?

March 27, 2009 by · Leave a Comment
Filed under: SmartPhones & PDAs, Technology 

The latest rumors are for an announcement next week.