Rename photos in bulk using EXIF data contained within

I like to have my photos organized into chronological order. So I sort them in folders by year, month and name of the event. Even within the event folders, I like to have the filenames reflect information about photograph. For example, when the photo was clicked, where it was taken, what equipment was used etc.

Lightroom does a very good job of renaming the imported RAW files and exported JPGs using EXIF information that’s encoded into the photographs. But all my photos from my smartphone, my wife’s smartphone end up having messy filenames like IMG00923.JPG or DSC_000_175.JPG etc. These photographs have EXIF information too that can be used, it’s just needs to be extracted. So I wrote this little tool, which can help me achieve this.

It’s called smart-image-renamer. What it does is – go through my entire photo library (or whatever photos I want to rename) and rename all the photos using a format I provide. The format can have things like year, month, date, time, camera, lens, name of event, name of folder etc. For example, let say I went to Half Moon Bay with family and I have a bunch of photos I want to rename. I will write the format as {YYYY}{DD}{MM}{Model}_Half-Moon-Bay{Seq} and these tags within {} are replaced by relevant data stored in the EXIF. So resultant filenames for the photos would look like:

20140529_LGE Nexus 5_Half-Moon-Bay_001.JPEG

20140529_LGE Nexus 5_Half-Moon-Bay_002.JPEG

That’s just one example. There are few more tags that can be used out of EXIF information to rename photos. smart-image-renamer has a nifty test mode too, so that you know what it will do without actually affecting the photos.

Download

Best way to download smart-image-renamer is using pip.

$ pip install smart-image-renamer

Or you can download smart-image-renamer as zip from it’s Github page and install it like any other python package.

$ python setup.py install

I plan to introduce more functionality in future. Let me know if you’d like anything in specific. Feedback on smart-image-renamer is always welcome.

Point Reyes National Seashore – A Photologue

We visited Point Reyes National Seashore last week. It’s a very popular tourist place just few miles north of San Francisco city in California. This park is famous for it’s hiking trails and stunning vistas of seashore and the mountains. I just wanted to share some photos from this mini-trip to the park, so it’s just a photologue rather than a detailed travelogue. I should probably visit it sometime early morning to capture it’s beauty in morning light.

Some photos have glass reflections as they were taken from behind car’s windshield.

Auto Update Script For Plugins Not Hosted On WordPress.org

Auto Update script for WP Plugins not hosted on WordPress.org

This script can be used for WordPress plugins that are not hosted on WordPress.org. It works transparently for users providing same experience as if the plugin was hosted on WordPress.org.

WordPress.org is a very capable platform for plugin/theme developers to host their creations. There are many advantages of hosting your plugin on WordPress.org, for example –

  • Exposure to millions of WordPress users without actually spending anything on advertising
  • An easy source control repository option – subversion
  • Automatic release management and automatic updates to users
  • Automatic web-page generation for the plugin using simple to write README
  • Download statistics for the plugin
  • A very good rating system too

However, recently WordPress has become very strict on licensing of code uploaded on their repositories. They no more allow you to use any code that is licensed under Creative Commons. This is a big problem for me as I’m using a third-party tool licensed under creative commons, and many of my users were dissapointed when I had to remove this tool from my plugin.

So, I decided to host my plugin somewhere else to be able to use code licensed under creative commons. The most important aspect of this decision is that, I’ll loose ability to provide auto-update for my plugins. Then I came across this excellent script written by Kaspars. It allows you to setup auto-update mechanism for your plugin which is not hosted on WordPress.org.

When I started using this script, I realized that there is huge potential in this script to be useful for many more WordPress developers like me. So I developed this script further to make it easier to deploy and added more features to it, for example –

  • Serve multiple plugins using same script
  • Serve different types of versions like stable, alpha, beta, lite, pro, test etc.
  • Easy to configure ini file

I plan to add some more features to this script in future, so I uploaded the same on GitHub.com as a project.

Visit the project page of this script on GitHub.com to download this script or get more details.

Mysore Zoo – A Must Visit Place For Wildlife Enthusiasts

We visited the Mysore Zoo (officially the Sri Chamarajendra Zoological Gardens) in the first week of November. I wasn’t really expecting much as most of the Zoo in India aren’t maintained well. I didn’t know however that I was in for a treat.

The moment you enter the zoo, you are treated with 5 healthy looking Giraffes. They are kept in a large area with tall trees surrounding them.  For me, Giraffes were the main highlight of the Zoo. After seeing the giraffes, my expectations went up and I must say I was not disappointed at all.  The way they have maintained the Zoo and the way the animals are kept is very commendable.

Some more information about the Zoo –
  • Zoo timings are from 8.30 AM till 5.30 PM.  You should get inside in the morning to avoid crowd.
  • There is ample parking space outside the Zoo, so no worries there.
  • They don’t allow any types of plastic bags inside the Zoo (plastic bottles are allowed though).  They give you replacement paper bags for your plastic bags (kudos to authorities)

Must watch animals inside the Zoo –

  • Giraffes of course
  • Rhino
  • African lions
  • Gorilla
  • African elephants (talk to the Mahavat of the elephants, he is very knowledgeable)
  • Entire bird collection
  • Entire raptile collection

UPDATE: Now there is one more reason to visit Mysore Zoo often.  They’ve got 5 green anacondas in the Zoo.  All the anacondas are aged 15 months and slowly they will grow upto 20ft long snakes. Source.

Here are some photos from the visit –

[schema type=”organization” orgtype=”Organization” url=”http://www.mysorezoo.info/” name=”Mysore Zoo (officially the Sri Chamarajendra Zoological Gardens)” description=”Mysore Zoo (officially the Sri Chamarajendra Zoological Gardens) is a 245-acre (99 ha) zoo located near the palace in Mysore, India. It is one of the oldest and most popular zoos in Southern India, and is home to a wide range of species. Mysore Zoo is one of the city’s most popular attractions. It was established under royal patronage in 1892, making it one of the oldest zoos in the world.” city=”Mysore” state=”Karnataka” country=”IN” ]

2 Crazy Ideas To Solve Bangalore’s Traffic Woes

If you were driving on Bangalore roads last week, you would have noticed that your drive was much smoother than usual, you had to honk a lot less than usual, you reached office much fresher than usual.  This was because much less no of vehicles on the road due to festival holidays and the phenomena was more prominent on Wednesday and Thursday.  Wednesday and Thursday were off for most of the IT companies in the city, so either everyone was out of the city on a vacation or relaxing at home like me.

This observation sparked two crazy ideas in my mind to solve Bangalore’s traffic woes (to an extent of course).  So here it goes –

Crazy Idea #1

Divide the companies in the city in 3 different zones – Zone A, Zone B and Zone C.  Companies belonging to Zone A would give the compulsory 2 days off a week on Saturday – Sunday. Companies in Zone B would keep Monday – Tuesday as 2 days off a week.  And Wednesday – Thursday for Zone C.  So now what will happen is – all company cabs, buses, private vehicles of employees are off the road on different days of the week.  Theoretically traffic should reduce by about 30% on all these days but even if it gets reduced by about 15-20%, it is worth it.  There are other advantages also of this concept –

  1. Same reduction in traffic will also be seen at Malls, public places, etc.
  2. Buses/Trains plying to other cities won’t be running over capacity on Saturday-Sunday and under capacity on other days.  Passengers will get spread across the week.
  3. Same effect would be observed for Hotels etc at popular tourist places.  Even long weekends will also be different dates for different people.
  4. Imagine a husband-wife couple working in companies falling in different zones.  Obviously such a setup won’t work out for them, so they will switch to companies in same zone and would stick to those companies for their own convenience.  Over time, such people will get settled in companies and attrition rate would come down (I know this sounds crazy :)).

Crazy Idea #2

Well, this is not exactly a crazy idea and is quite possible to implement.  This idea actually works on a similar concept to Idea #1 but follows a slightly different approach.  All companies in the city should compulsorily have 2 days a week as “Work from home” days.  This idea can probably be implemented at logical teams level.  For example, people working for a project A (not necessarily in same teams) would work from home 2 days a week (Monday and Thursday) and people working on project B can take Tuesday and Friday as work from home days for example.  This concept doesn’t have same advantages as that of Idea #1 but slightly different –

  1. This idea will bring down traffic levels in city as well as noise level and pollution level
  2. This idea will bring down fuel costs for individuals
  3. It will bring down costs like electricity, grocery supplies, for companies

Now don’t get mad at me for thinking wild, as I said before – these ideas are crazy.  What do you say?

Travelogue – Chilly Chikmagalur And A Detour To Ancient Hoysala Empire

Long weekends in August means time for long drives out of Bangalore. So we decided to head out on weekend of 20-21-22nd of August. Checked with friends but all of them dropped out of the plan one after another. So only two of us – me and wifey – were left to enjoy the vacation. So decided a place – Chikmagalur, Belur and Halebidu, booked accommodation – Woodway Homestay, and jolted down the itinerary. Plan was to drive to the mountains of Chikmagalur and visit the historic temples of Belur and Halebidu on the way back.

Here is the route of our entire trip –

Route Map

Day 1 – 20th August 2011

Journey: Bangalore -> Tumkur Road (NH 4) -> Nelamangala -> NH 48 -> Hassan -> Belur -> Chikmagalur.

Our day started at 0500 Hrs when my alarm rang.  Both of us got up and were ready to roll in about an hour.  I hadn’t been to Tumkur road before, so I had to rely on Ovi Maps navigation in my Nokia 5230.  It decided to take me through the city (which turned out to be a bad option even at 0600 Hrs).  We wasted about an hour thanks to the Metro work going on in Yeshwanthpur area. Finally we hit NH4 at about 0715 Hrs and were cruising at speeds hovering around 100 KMPH.

Here you need to watch out for a diversion towards Mangalore on NH48.  There is a big hoarding about this diversion on NH4 which takes you to service lane.  Once you are on NH48, the roads become as smooth as butter.  One can easily maintain an average of 100 KMPH on this road, so did we. However the luxury doesn’t last long as the entire NH48 is not yet complete and you get onto a two lane but still good enough NH48.

If you want to stop on the way for light snack/breakfast, you can stop by at either Kamat Upachar or Cafe Coffee Day few kilometers before Hassan.  We stopped at Kamat but the quality of food is not as good as other Kamat restaurants. Rest of the journey was uneventful, we reached our Homestay by about 1130 Hrs.  Plan was to go to Mullayanagiri and Baba Budangiri peaks in the afternoon.

Mullayanagiri is the tallest peak in Karnataka at the height of 1930 meters and the road leading to the peak is highest motor-able road in Karnataka.  Mullayanagiri is 23 KMs from Chikamagalur town inside Bhadra Wildlife Sanctuary. The road offers you scenic views which will take your breath away.

   

Last mile to the peak is really scary as the road becomes very narrow.  On the way we spotted a green viper snake on the side of the road but by the time I grab my camera out, it ran away in the bushes. When we reached at the top of the hill, it was foggy at the extent that visibility was reduced to about 10 meters.  Also, the wind was blowing at around 50+ KMPH.  There is a temple at the top of the hill, we didn’t visit this temple due to extremely chilly winds.  Mullayanagiri (and Baba Budangiri) is also famous for Kurinji flowers that bloom only once every 12 years.  When that happens, entire hill-top gets covered by blue sheet of flowers.

We spent half n hour on Mullayanagiri and then started for Baba Budangiri.  The road leading to Baba Budangiri peak is very similar to that of Mullayangiri except for lack of tar for last 4 KMs.  This road is as scary with potholes everywhere in the final stretch. There are multiple water streams on the way which makes the drive even more interesting. On the way to Baba Budangiri a group of 10-12 boys stopped our car for help.  They were trekking to the peak but lost their way and came back on the road.  By the time their driver had already reached the top and they were not able to contact him.  They asked us if we can give lift to couple of them to the top of the hill.  Initially we were skeptical but then we believed them and said OK. Continuing on the journey to the hill-top, the roads became so bad that if not for those guys we had to drop, we would have returned back. It was already 0530 Hrs when we reached to the top and it was getting dark very fast.  We just spent 10 minutes and started driving back for the Homestay.


Day 2 – 21st August 2011

We wanted to visit Kemmangundi and Hebbe falls today.  We inquired with caretaker at the Homestay about road conditions, he warned us that roads are not very good and it is quite far from the Homestay (65 KMs to be exact), but we wanted to visit Hebbe falls anyway.  So with the intent to visit some mesmerizing falls, we started from the Homestay at 1000 Hrs.  Road to Kemmangundi is same as that going to Mullayanagiri and Baba Budangiri.  One should continue on the same road inside Bhadra Wildlife Sanctuary. After we crossed the turn to Baba Budangiri, the surroundings became even more beautiful but deserted as well. We continued on this road taking all the natural beauty with little bit of fear inside as we had not seen any vehicle on that road for last 10 KMs. We stopped at couple of places on the way to capture the scenic vistas.

Soon after we entered the jungles from mountain perimeter and words of our caretaker back at the Homestay became true.  Road condition started deteriorating at the level that my Ritzy couldn’t handle anymore. We were around 15 KMs away from Kemmangundi, so decided to head back to the Homestay.  That afternoon it rained heavily so we just stayed at our room and relaxed for the day.

In the evening I decided to check out surroundings to find my favorite photographic subject – Insects.  I actually found a rather rare species – Atlas Moth. Atlas Moth is world’s largest moth with the wing span that can expand up to 12 inches.  The one I saw was about 8 and a half inches wide, so it was probably a male.

Then I found this little fella sitting on a little flower, don’t know what it is –

Next one was a Pillbug.  It is from Woodlice which can turn itself into a ball. It has a very hard shell which protects it from other insects.  This insect is also called a Roly Polly –

  

Day 3 – 22nd August 2011

Journey: Chikmagalur -> Belur -> Halebidu -> Hassan -> Nelmangala -> Bangalore

We started from Chikmagalur at around 1030 Hrs for Belur.  Belur and Halebidu are two towns that were part of Hoysala Empire.  Belur was the capital city then. Both the temples at Belur and Halebidu showcase the architecture of Hoysala Empire. The temple at Belur is called “Channakeshava Temple” (Channakeshava means handsome Vishnu).  It was built by the King Vishnuvardhana in 1117 A.D.

    

Halebidu is about 15 KMs from Belur.  Road conditions are very good and it’s beautiful too.  Halebidu temple was built in 1121 A.D. by Ketumalla – the chief of staff of Hoysala Kingdom. The temple took 105 years to complete. Both the temples are of very similar architecture and sculpture work.

    

After spending an hour at both the temples, we started the return journey.  Stopped at CCD on the way for light lunch and then headed back to Bangalore.

Homestay Review

After checking some 3-4 different homestay, we decided to book Woodway.  They charge 2500/- per person per night including taxes and breakfast+lunch+dinner. It is located in a Coffee Estate about 13 KMs away from Chikmagalur town. If you are in for site seeing, this location is not ideal as all the famous places are on the other side of the town. Property is very well maintained and rooms are very clean and hygienic. They serve you authentic Kannada food (veg and non-veg). Staff is very friendly and all requests were promptly attended to.

  

Ratings:

Cleanliness: 5/5
Food: 3/5
Location: 3/5
Surroundings: 5/5
Staff: 4/5
Value for money: 3/5

That’s all from my side. Hope you enjoyed the ride. Signing off… Tada…