How do I query the gvfs metadata for a specific attribute?

Posted by Mathieu Comandon on Ask Ubuntu See other posts from Ask Ubuntu or by Mathieu Comandon
Published on 2010-11-17T21:59:48Z Indexed on 2011/01/03 22:59 UTC
Read the original article Hit count: 297

Filed under:
|
|

A nice feature in evince is that when you close the program and later reopen the same pdf, it automatically jumps to the page you were reading. The problem I have is that I often read ebooks on several computers and I have to find were I was on the last computer I was reading the pdf. I think syncing these bookmarks in UbuntuOne would be a killer feature for people like me who read pdfs on different computers.

By investigating a bit, I found where evince was storing this data, it's in the gvfs metadata and it can be accessed for a particular document by typing

gvfs-ls -a "metadata::evince::page" myEbook.pdf

Rather that querying a particular file, I'd like to query the whole metadata file (located in ~/.local/share/gvfs-metadata/home for the home directory) for any file where this particular attribute is set to some value. The biggest issue is that gvfs metadata and stored in binary files and we all know it's not easy to get something out of a binary file.

So, do you know any way to query the gvfs metadata for some attribute?

© Ask Ubuntu or respective owner

Related posts about evince

Related posts about gvfs