Discussion:
[zathura] Bookmark file location
gi1242+zathura
2013-06-14 15:33:19 UTC
Permalink
Hi All,

I was trying to find the bookmark file location so I can sync it between
machines.

My .config/zathura has only my zathurarc. Reading the source suggests a
"bookmarks.sqlite" file, which I can't find anywhere in my home
directory. I don't set the data directory manually in my config file. I
can of course, but that means I will loose all my current bookmarks.

Thanks,

GI

PS: I don't know if I'm using sqlite bookmarks or if I'm using a plain
bookmarks, and don't know how to find out either.
--
'Committee' -- The unwilling, picked from the unfit, to do the
unnecessary.
Marwan Tanager
2013-06-14 15:52:05 UTC
Permalink
Post by gi1242+zathura
Hi All,
I was trying to find the bookmark file location so I can sync it between
machines.
My .config/zathura has only my zathurarc. Reading the source suggests a
"bookmarks.sqlite" file, which I can't find anywhere in my home
directory. I don't set the data directory manually in my config file. I
can of course, but that means I will loose all my current bookmarks.
The default location for the data directory is "$HOME"/.local/share/zathura/

If you are using the plain database, the bookmarks file is just a plain regular
file called 'bookmarks' under that directory, the initialization settings for
previously opened files are in a file called 'history', and the command history
in a file called 'input-history'.

If you are using the sqlite backend, all the data is stored in
bookmarks.sqlite, under the same directory as above.
Post by gi1242+zathura
PS: I don't know if I'm using sqlite bookmarks or if I'm using a plain
bookmarks, and don't know how to find out either.
Just fire up zathura and type in the command inputbar "set database", and the
particular backend that you're using will show up. It's an init-only setting,
so it won't appear in autocompletion. You can set it to what you want in
zathurarc by adding, for example, the following line:

set database sqlite
, or
set database plain


--
Marwan
gi1242+zathura
2013-06-14 16:08:30 UTC
Permalink
Post by Marwan Tanager
Post by gi1242+zathura
I was trying to find the bookmark file location so I can sync it
between machines.
The default location for the data directory is
"$HOME"/.local/share/zathura/
Perfect, thanks!!
Post by Marwan Tanager
Post by gi1242+zathura
PS: I don't know if I'm using sqlite bookmarks or if I'm using a plain
bookmarks, and don't know how to find out either.
Just fire up zathura and type in the command inputbar "set database",
and the particular backend that you're using will show up. It's an
init-only setting, so it won't appear in autocompletion. You can set
it to what you want in zathurarc by adding, for example, the following
set database sqlite
, or
set database plain
Thanks! I guess I was using the plain database. What are the advantages
of the sqlite database? My history file is some 10000 lines long and the
performance seems fine for me, as of now.

Best,

GI
--
Difference between a virus and Windows? Viruses never fail.
Marwan Tanager
2013-06-14 16:32:39 UTC
Permalink
What are the advantages of the sqlite database? My history file is some
10000 lines long and the performance seems fine for me, as of now.
For applications that don't generate a lot of data like zathura, you won't see
a big difference. On the other hand, some desktop applications (think Web
browsers), are heavy on IO, since clicking each link generates a record; for
application like these, and especially if you use them heavily, plain files is
not an option, since retrieving records from them would be very inefficient,
because they have to be searched linearly.

Also, from a developer perspective, storing application-specific data in a
SQLite database is much more flexible, since it facilitates creating and
extending data storage schemas that would best-fit the application needs.


--
Marwan

Loading...