GetNotes, a script to retrieve metadata notes!
I was going through my RSS new entries and spotted a blog post from Sathya that cought my attention!
The blog-post Sathya wrote was about files metadata. Some one asked whether there is a way to retrieve files notes as text documents or not!! The notes the person was pointing at are the ones which are written in the “Notes” tab in nautilus properties window! … but they couldn’t find an easy way to do it!
Because of my curiously, I had to know if there is a thing being done in linux that has no tool for retrieving the info out of it easily! So I googled and googled until I found this pre-installed tool $gvfs-info which gets the metadata of any file using the following syntax!
gvfs-info [file]
This would return a list with all the metadata info of a specific file which wouldn’t be that practicle to get the notes from! But when using some pipes …
gvfs-info [file] | grep annotation | sed s/' metadata::annotation: '/''/g
This gives only the note, so …
gvfs-info [file] | grep annotation | sed s/' metadata::annotation: '/''/g > [output].note
saves the note as a text file and can be opened with any text editor! Seeing that I’ve done it, I was going to comment on Sethya’s blog but … I though I should be doing one thing more! And thus, a GUI python script!
Okay, not a full GUI script, I’m using zenity for the GUI part, but it is a python script! Well, the code isn’t python pure actually, I also used some shell commands! But it works! And if you’re wondering about language support, it supports UTF-8, yes Arabic is supported! ;)
Here are some screen-shots :)
This slideshow requires JavaScript.
It’s easy to use, all you have to do is to select all the files you want to retrieve the notes from, and click open! If one of the files does not have notes, it will not save it and will notify you! If you’re wondering, the name of the saved files will be the same as the original ones, except that they are appended with a .note!
If you’re interested, here’s the script! To be able to run it, just make sure it’s marked executable first ($chmod +x GetNotes.py), then just run it! $./GetNotes.py to run it from the command line!
Just in case if you can’t download it … here’s the code!
Enjoy :)
~ by AnxiousNut on September 22, 2010.
Posted in Downlaod, Programming, Python
Tags: annotation, Linux, metadata, notes, properties, python, script, ubuntu, utf8



Awesome! Thanks a lot!
^_^ You’re welcome!
this is cool and all but I have to ask this (which is many times more important than meta data annotations):
how did you make that screenshot slide thingamabob?
interesting post.
@Sigtermer:
I was like this :) then :| then :/ anyways
When adding an image into your post, in the image tool window there will be a button at the end saying “Insert slideshow” or something like that! Yes, click it!
Great tip, thanks very much!
hello there and thanks in your info – I’ve certainly picked up anything new from proper here. I did on the other hand expertise several technical points using this site, since I skilled to reload the site a lot of instances prior to I may get it to load properly. I were thinking about in case your hosting is OK? No longer that I am complaining, but slow loading circumstances occasions will very frequently affect your placement in google and can damage your high quality ranking if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I am including this RSS to my e-mail and can glance out for much more of your respective interesting content. Make sure you replace this once more very soon..
Hey, thanks for taking the time to write this comment! :)
Site consistency is nothing I have control over, this is hosted on wordpress servers. Honestly, I’ve never seen any wordpress hosted blog have any sort of problems, they all work as fine. Slow loading speed is probably an issue your ISP is having since the site loads here in a flash. However, I might be wrong, maybe wordpress had an issue when you were getting here. Coincidence, maybe.
As for Ads, … I have no control over that as well. :( Since this is a free hosting service, wordpress has control over ads. However, I never see any with AdBlock+ plugin installed into my browser. ;)
Thanks for adding my RSS to your feeds. Hope you enjoy it here! :)