Update of this post taking care of new Picasa release is explained at http://sandyiit.blogspot.com/2008/09/picasa-30-download-web-albums-in.html
I am slowly turning into a google consumer. When I first ventured into the world wide web, it was dominated by Yahoo. I used Yahoo search and later moved to google search. I used Yahoo mail which I later switched to gmail. I user Yahoo messenger and later switched to GTalk. I used Yahoo pics and also Flickr. I liked flickr but its 200 pics limit was something which irritated me. So when I saw picasa giving a Gig of space for my pics I moved to it. So I am moving out of Yahoo's fold to Google's. Its not that Yahoo is bad but they make things heavy and bloated. Google keeps it simple and tidy which I like and hence so many changes.
Photos is one service where I still love flickr compared to picasa but I still use picasa because of it 1 Gig space and also its desktop application which lets you do quite a lot of things. Still it has its impairments. In my last post I talked about caption, now its time for downloading whole web albums present in picasa web.
Picasa has its own protocol picasa:// to download and upload pictures from desktop to the web. Ideally when you install picasa on your desktop, this protocol should get registered to your web browser which should tell the browser that if such a link appears what to do which is to launch picasa. Sadly only IE seems to understand it and work as expected. Neither Firefox nor Opera seems to understand the protocol and hence it shows a "Download Picasa" link
in the left navigation menu when Picasa is already installed on the desktop. Now how can we
download the whole album?
To do so, just view the source of the page. Do a right click + View Page Source in case of Firefox of press CTRL + F3 in case of opera. Now in the HTML source search for the string picasa://.
Now you will get a statment which looks like:
picasa://downloadfeed/?url=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fback_compat%2Fuser%2Fsandyiit%2Falbumid%2F5152729459149591681%3Fkind%3Dphoto%26alt%3Drss%26imgdl%3D1
This is the download url based on the picasa:// protocol. Now how do you use it to download the album. Simple, just open the command window type in:
> c:\Program Files\Picasa2\Picasa2.exe _url_
The _url_ is the picasa:// url which we got above. When you do so, you will picasa launching itself and loading the web album and asking you whether you want to download it or not. Do it and you have the album at your desktop and the work is done :)
Thursday, January 17, 2008
Monday, January 7, 2008
Picasa: Adding File Names to Caption
Update of this post is available at http://sandyiit.blogspot.com/2008/10/picasa-adding-file-names-to-caption.html
I used to save my pictures in photos@yahoo then moved to flickr. Flickr was good but had a limit of 200 pics per account. So had to move on to the google belt and started using picasa. There was 1 GB up for grabs so I started uploading my pictures to it.
I faced a problem. Normally when I transferred my pictures from my camera to my laptop, I got names like Picture 001.jpg, Picture 002.jpg. So I renamed them to names like 001. The start.jpg which conveyed more information and added to its memory value. Then I uploaded them to picasa to see that none to the names appear in there. Picasa uses IPTC tags to display captions.
Searching in the net, I found the tag was Iptc.Application2.Caption and this post provides nice information to set the captions equal to your filenames but the script
FOR %%c in (*.jpg) DO exiv2 -k -M"add Iptc.Application2.Caption %%c" "%%c"
has a issue. It takes filenames hence appends the extension .JPG to the caption too. Next it tries to add the IPTC tag which if already set, new caption can't be added. We need to force it or simply overwrite it. So I changed the script to
FOR %%c in (*.jpg) DO exiv2 -k -M"set Iptc.Application2.Caption %%~nc" "%%c"
This now sets hence overwrites the Caption tag and also takes the filename without the extension as the caption and thats what I wanted.
P.S: I got a comment:
Barun said...
Sonique/ Sandeep- I tried running the command given by sunil25125 by extracting exiv2-o.18 and making the nmtocap.dat, both in the same directory as my jpg files. But when I double click on the .dat file, I get following errors for each file:
Failed to Open the File
Any way out?
Thanks
And the answer is.
Windows shell might see some problems with the above script specifically the variable declared as %%c. Please try %c is that case specially when you get "Failed to Open the File" . So the script for you will be:
FOR %c in (*.jpg) DO exiv2.exe -k -M"set Iptc.Application2.Caption %~nc" "%c"
I used to save my pictures in photos@yahoo then moved to flickr. Flickr was good but had a limit of 200 pics per account. So had to move on to the google belt and started using picasa. There was 1 GB up for grabs so I started uploading my pictures to it.
I faced a problem. Normally when I transferred my pictures from my camera to my laptop, I got names like Picture 001.jpg, Picture 002.jpg. So I renamed them to names like 001. The start.jpg which conveyed more information and added to its memory value. Then I uploaded them to picasa to see that none to the names appear in there. Picasa uses IPTC tags to display captions.
Searching in the net, I found the tag was Iptc.Application2.Caption and this post provides nice information to set the captions equal to your filenames but the script
FOR %%c in (*.jpg) DO exiv2 -k -M"add Iptc.Application2.Caption %%c" "%%c"
has a issue. It takes filenames hence appends the extension .JPG to the caption too. Next it tries to add the IPTC tag which if already set, new caption can't be added. We need to force it or simply overwrite it. So I changed the script to
FOR %%c in (*.jpg) DO exiv2 -k -M"set Iptc.Application2.Caption %%~nc" "%%c"
This now sets hence overwrites the Caption tag and also takes the filename without the extension as the caption and thats what I wanted.
P.S: I got a comment:
Barun said...
Sonique/ Sandeep- I tried running the command given by sunil25125 by extracting exiv2-o.18 and making the nmtocap.dat, both in the same directory as my jpg files. But when I double click on the .dat file, I get following errors for each file:
Failed to Open the File
Any way out?
Thanks
And the answer is.
Windows shell might see some problems with the above script specifically the variable declared as %%c. Please try %c is that case specially when you get "Failed to Open the File" . So the script for you will be:
FOR %c in (*.jpg) DO exiv2.exe -k -M"set Iptc.Application2.Caption %~nc" "%c"
Monday, December 10, 2007
Copy Firefox bookmarks
Firefox provides an official way to export and import hence copy bookmarks from one machine to other. Now suppose your bookmarks got overwritten accidentally so what you do.
To save yourself, firefox backs up your bookmarks at regular intervals. Although it does not provide a GUI to restore old bookmarks but they are saved.
To do so: go to c:\Documents and Settings\your_username\Application Data\Mozilla\Firefox\Profiles\your_profile. There you will see a bookmarks.html file which is you current set of bookmarks. You will also see a "bookmarkbackups" folder wherein you have your backups. To restore, just copy the bookmark backup to the profile folder and restart your firefox and you are done.
To save yourself, firefox backs up your bookmarks at regular intervals. Although it does not provide a GUI to restore old bookmarks but they are saved.
To do so: go to c:\Documents and Settings\your_username\Application Data\Mozilla\Firefox\Profiles\your_profile. There you will see a bookmarks.html file which is you current set of bookmarks. You will also see a "bookmarkbackups" folder wherein you have your backups. To restore, just copy the bookmark backup to the profile folder and restart your firefox and you are done.
Thursday, December 6, 2007
Setting $DISPLAY in bash and csh
For Bash, open the .bashrc file in you home directory in you favorite editor vi and append the following script at the end of it:
#
# Set the DISPLAY
#
if [ x"$DISPLAY" = x ]
then
TTYPORT=`tty`
if [ "$TTYPORT" = "/dev/console" ]
then
DISPLAY="localhost:0"
elif [ "$REMOTEHOST" = "" ]
then
TTYNAME=`echo $TTYPORT | cut -c6-`
REMOTEHOST=`who|grep "$TTYNAME"|awk '{print $5}'|sed 's/(//'|sed 's/)//'`
DISPLAY="${REMOTEHOST}:0"
else
DISPLAY="${REMOTEHOST}:0"
fi
fi
For Csh, open the .cshrc file in you home directory in you favorite editor vi and append the following script at the end of it:
#
# Set DISPLAY
#
if ( ! $?DISPLAY ) then
set TTYPORT=`tty`
if ( $TTYPORT == /dev/console ) then
setenv DISPLAY "localhost:0"
else if ( $?REMOTEHOST ) then
setenv DISPLAY "${REMOTEHOST}:0"
else
set TTYNAME=`echo $TTYPORT |cut -c6-`
set REMOTEHOST=`who|grep "$TTYNAME"|awk '{print $6}'|sed 's/(//'
|sed 's/)//'`
setenv DISPLAY "${REMOTEHOST}:0"
endif
endif
Note: The csh script is tested on Sun Solaris and the bash script is tested on Ubuntu and Fedora so is expected to work on other flavors of linux too. If you have a different *Nix system then check the output of 'who' and configure your awk accordingly.
#
# Set the DISPLAY
#
if [ x"$DISPLAY" = x ]
then
TTYPORT=`tty`
if [ "$TTYPORT" = "/dev/console" ]
then
DISPLAY="localhost:0"
elif [ "$REMOTEHOST" = "" ]
then
TTYNAME=`echo $TTYPORT | cut -c6-`
REMOTEHOST=`who|grep "$TTYNAME"|awk '{print $5}'|sed 's/(//'|sed 's/)//'`
DISPLAY="${REMOTEHOST}:0"
else
DISPLAY="${REMOTEHOST}:0"
fi
fi
For Csh, open the .cshrc file in you home directory in you favorite editor vi and append the following script at the end of it:
#
# Set DISPLAY
#
if ( ! $?DISPLAY ) then
set TTYPORT=`tty`
if ( $TTYPORT == /dev/console ) then
setenv DISPLAY "localhost:0"
else if ( $?REMOTEHOST ) then
setenv DISPLAY "${REMOTEHOST}:0"
else
set TTYNAME=`echo $TTYPORT |cut -c6-`
set REMOTEHOST=`who|grep "$TTYNAME"|awk '{print $6}'|sed 's/(//'
|sed 's/)//'`
setenv DISPLAY "${REMOTEHOST}:0"
endif
endif
Note: The csh script is tested on Sun Solaris and the bash script is tested on Ubuntu and Fedora so is expected to work on other flavors of linux too. If you have a different *Nix system then check the output of 'who' and configure your awk accordingly.
Wednesday, November 14, 2007
India cracks top 10 is supercomputer list
Top 500 comes up with its list for the top 500 fastest super computers in the world. And surprise, India busted into the top 10 list. It was done by the Tata sons at their Computational Research Labs in Pune. Really Tata guys are doing India proud.
Here goes the story.
30th Edition of TOP500 List of World’s Fastest Supercomputers Released.
Here goes the story.
30th Edition of TOP500 List of World’s Fastest Supercomputers Released.
Wednesday, October 31, 2007
Sensex conquers 20000
Earlier in July, I celebrated Sensex scaling the 15K mark.
Now it has done even better by conquering the 20K level. And I am doing even better with my tango ratio increasing to 7. I still hope that increases as the sensex and Indian economy scales new peaks.
Now it has done even better by conquering the 20K level. And I am doing even better with my tango ratio increasing to 7. I still hope that increases as the sensex and Indian economy scales new peaks.
Tuesday, October 30, 2007
China companies are bigger than ..
Subscribe to:
Posts (Atom)