How do I query the gvfs metadata for a specific attribute?
- by Mathieu Comandon
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?