Song List Processing 3

Tags

, , ,

The next step was to join all the song entries such that one line ended up with information of one song. So, from this

SONG LISTING
STATION LISTING
LATA MANGESHKAR

01. Chupchup Khade Ho Zaroor Koi Baat Hai
Film: Badi Bahen
Artistes: Lata Mangeshkar, Premlata
02. Chhod Gaye Balam Mujhe
Film: Barsaat
Artistes: Lata Mangeshkar, Mukesh
03. Hawa Mein Udta Jaye
Film: Barsaat
Artiste: Lata Mangeshkar

to this

01. Chupchup Khade Ho Zaroor Koi Baat Hai Film: Badi Bahen Artistes: Lata Mangeshkar, Premlata
02. Chhod Gaye Balam Mujhe Film: Barsaat Artistes: Lata Mangeshkar, Mukesh
03. Hawa Mein Udta Jaye Film: Barsaat Artiste: Lata Mangeshkar

For this purpose, I wrote a Python program, as follows

import os
if __name__ == "__main__":
    count = 0
    bSongLine = False
    bSongLineCompleted = False
    lineToPrint = ""
    #with open("Saregama_Carvaan_Songlist_2.0.txt") as file:
    with open("Saregama_Carvaan_Songlist_1.0.txt") as file:
        for line in file:
            oline = line.strip()
            line = oline.split(" ")
            index = line[0]
            index = index[:len(index)-1]
            if index.isdigit():
                if bSongLine == True:
                    bSongLineCompleted = True
                if bSongLineCompleted == True:
                    print(">>" + lineToPrint)
                lineToPrint = oline
                #print("digit>>" + lineToPrint)
                bSongLine = True
                bSongNameLine = True
                bSongLineCompleted = False
            else:
                if index == "Film":
                    bSongNameLine = False
                    lineToPrint = lineToPrint + "; " + oline
                    #print("film>>" + lineToPrint)
                elif index == "Artistes":
                    bSongNameLine = False
                    lineToPrint = lineToPrint + "; " + oline
                    #print("artistes>>" + lineToPrint)
                else:
                    lineToPrint = lineToPrint + " " + oline
                #count = count + 1
                #if count == 20:
                    # break
            if bSongLine == False:
                print(oline)

Link

Advertisements

Song List Processing 2

Tags

, , , ,

Simply getting the PDF document mentioning the songs was not enough. I wanted more. I wanted a text version of the document. Hence I extracted all the text from the document. Here is how the extract text looks

SONG LISTING
STATION LISTING
LATA MANGESHKAR

01. Chupchup Khade Ho Zaroor Koi Baat Hai
Film: Badi Bahen
Artistes: Lata Mangeshkar, Premlata
02. Chhod Gaye Balam Mujhe
Film: Barsaat
Artistes: Lata Mangeshkar, Mukesh
03. Hawa Mein Udta Jaye
Film: Barsaat
Artiste: Lata Mangeshkar
04. Barsaat Mein Humse Mile
Film: Barsaat
Artiste: Lata Mangeshkar
05. Jiya Beqarar Hai
Film: Barsaat
Artiste: Lata Mangeshkar
06. Patli Kamar Hai
Film: Barsaat
Artistes: Lata Mangeshkar, Mukesh
07. Meri Ankhon Mein Bas Gaya Koi Re
Film: Barsaat
Artiste: Lata Mangeshkar

While this text is better than PDF, I wanted to take it to the next logical step.

Link

Song List Processing 1

Tags

, , ,

In this day of digital music (usually played via mobile phones and portable speakers), I purchased a music player styled to look like a retro radio player – Saregama Carvaan (https://www.amazon.in/Saregama-Carvaan-SKU-R20008-Portable-Porcelain/dp/B071D7M83T?th=1).

The device contains many old Hindi film songs and is very comfortable for the older generation, who is not comfortable with mobile phones.

While the device is loved by my parents, knowing that is contains 5000 (as claimed by the product) songs is not enough. I wanted to know which songs were on the device. Hence I downloaded the PDF version of the song list from the product website.

Here is an image of how the song list looks

saregama

saregama

As you may have guessed, even this was not enough.

Purchase Rethink 2

Tags

, , , , , , , , , , , ,

A few years ago, one of the gadgets that caused this ‘purchase rethink’ was the Samsung Galaxy Tab 2.

Those days, I had purchased the Samsung Galaxy 3 (after much research for features and the price, obviously) – my first Android smartphone — in fact my very first smartphone.

Due to the phone, I got into the habit of reading ebooks on the smartphone. The phone was actually a boon for me, as I love to read books. As I was accustomed to reading books on the computer screem, reading on the smartphone was not so different. In fact, due to formats like epub / mobi / kindle, it was easier to read a book on the smartphone. I was no longer constrained to the PDF books.

Given my reading habits, my family pursuaded me to purchase a tablet. The reason? Screen real estate – which was limited on the 3.2 inch Galaxy 3 – but quite enough on the seven inch Galaxy Tab 2.

I in my infinte wisdom, decided to go for the ‘phone’ enabled version of the tablet. In other words, I decided to opt for the costlier version that allowed the tablet to function like a phone, instead of the pure tablet version (which had WiFi support). The cost difference? The phone version was 1.5 times costlier than the plain version.

On the positive side, the book reading experience was great on the Galaxy Tab 2.

The reason for rethink? There are two.

Within a few days I realized that purchasing the phone version was a mistake. Operating the tablet like a phone was rediculous. Holding the seven inch tablet to the ear is sight to see due to its dimensions. Reason for rethink number one.

As the next logical step, I moved on from the 3.2 inch Galaxy 2 to the Samsung Galaxy S4 Mini, with a screen size of 4.3 inches. Lavish as compared to the Galaxy 2. Now that I had a high resolutio screen, I found that reading books on the phone was once again pleasurable. This is reason number two.

Link

Taj Maintenance

Tags

, , , , , , , , , ,

The Taj Mahal in Agra, India is a beautiful building. To maintain the beauty of the building, the Government of India spends a lot through the Archaeological Society of India. Maintaining such old marvels is a big task.

After returning home from my recent visit to the Taj, I looked at the images at 100% magnification. On the main dome of the Taj, I noted that a lot of hooks have been inserted. Initially puzzled, it took me some time to realize that these must have been placed to ease the task of maintenance.

Supposed the building has to be scrubbed or repaired, it will not be possible to erect a scaffolding around it. Instead, using these hooks, it will be possible to lower a person safely and get the work done.

Good work.

taj_dome

PS: I also noted that the building has a metal plate running from the metal spire to the earth. Essentially a protection against lightning.

Titled

Tags

, , , , , , ,

Our company has an internal social networking site. One of the groups there is the photography group. I am a part of that group and post images and comments.

One of the most common comments that I have seen in the group is that of tilted horizons.

As I had these comments at the back of mind, during my recent visit to the Taj, I tried my level best to not introduce a tilted horizon. But, in many of the images, I was not successful. I got caught up in the beauty of the Taj so much that even after trying a lot, some of them came out with the Taj slanted.

Thanks to tools like Gimp that I have not introduced another wonder to the world — The Leaning Building of Agra.

Invoking Camera Raw from Photoshop

Tags

, , , ,

I recently saw an interesting video. While the usual practice is to use Adobe Camera RAW to process RAW images and then take them to Photoshop, this video mentioned that it is also possible to go the reverse way.

Once an image is loaded in Photoshop, it is possible to edit it in Adobe Camera RAW be launching it from the Filters menu.

But why would launching Camera Raw on a JPG image be beneficial? One benefits of this method is if you have a photo that is too bright. For example, suppose you have a picture when the subject appears white as the subject was near to the camera and flash was used.

By processing the photo in Camera RAW, the overall brightness of the image can be changed and the ‘whiteness’ can be reduced to a certain extent, to get a better photo.