From: Daniel Carl Date: Thu, 18 Jul 2013 00:11:40 +0000 (+0200) Subject: Added announcement for change history file format. X-Git-Url: https://git.owens.tech/style.css/style.css/git?a=commitdiff_plain;h=5fb94561775e07e3dbd137e2fd0a1e2e014cb2a1;p=vimb.git Added announcement for change history file format. --- diff --git a/README.md b/README.md index 07b57b4..bbbbed8 100644 --- a/README.md +++ b/README.md @@ -7,36 +7,6 @@ browsing-experience with low memory and cpu usage. More information and some screenshots of vimb browser in action can be found on the [vimb project page][vimb]. -## changedd bookmark and history file format -The history file and bookmarks file will now holds also the page titles to -serve them in the completion list. This changed the file format and will break -previous bookmark files. The history file will still be usable also with the -latest changes, but the bookmark file must be adapted to the new file format. - -``` -// old format -http://very-long.uri/path.html tag1 tag2 -http://very-long.uri/path-no-tags.html -``` - -``` -// new format -http://very-long.uri/path.htmltitle of the pagetag1 tag2 -http://very-long.uri/path-no-title.htmltag1 tag2 -http://very-long.uri/path-no-title-and-no-tags.html -``` - -The parts of the history and bookmark file are now separated by `` or -`\t` char like the cookie file. Following `sed` command can be used to apply -the required changes to the bookmark file. **Don't forget to backup the file -before running the command** - -``` -// replace the first space in earch line of file to \t\t -// if the line haven't already a \t in it. -sed -i -e '/\t/!{s/ /\t\t/}' bookmark -``` - ## features - vim-like modal - vim-like keybindings diff --git a/src/config.def.h b/src/config.def.h index f6645e0..2172851 100644 --- a/src/config.def.h +++ b/src/config.def.h @@ -29,4 +29,37 @@ #define MAXIMUM_HINTS 500 + +#define ANNOUNCEMENT "\ + \ +Bookmark file format changed \ + \ + \ + \ +

Bookmark file format changed

\ +

The history file and bookmarks file will now holds also the page titles to serve them in the completion list. This will break previous bookmark files.

\ +

The parts of the history and bookmark file are now separated by \\t char like the cookie file.

\ + \ +// old format
\ +http://very-long.uri/path.html tag1 tag2
\ +http://very-long.uri/path-no-tags.html
\ +
\ + \ +// new format
\ +http://very-long.uri/path.html\\ttitle of the page\\ttag1 tag2
\ +http://very-long.uri/path-no-title.html\\t\\ttag1 tag2
\ +http://very-long.uri/path-no-title-and-no-tags.html
\ +
\ +

What to do?

\ +

\ +If you have no entries in you bookmark you must edit them to fit the new format. This can be done with following 'sed' command.

\ +

Don't forget to backup the bookmark file before running the command.

\ + \ +// replace the first space in earch line of file to \\t\\t if the line haven't already a \t in it.
\ +sed -i -e '/\\t/!{s/ /\\t\\t/}' bookmark
\ +
\ +

If you had no entries in the bookmark file or you changed it successfully, you should remove the '#define ANNOUNCEMENT' from config.h file and recompile vimb.

\ + \ +" + #endif /* end of include guard: _CONFIG_H */ diff --git a/src/main.c b/src/main.c index 11e1dc3..c08eaa4 100644 --- a/src/main.c +++ b/src/main.c @@ -1077,8 +1077,12 @@ int main(int argc, char *argv[]) init_core(); +#ifdef ANNOUNCEMENT + webkit_web_view_load_string(vb.gui.webview, ANNOUNCEMENT, "text/html", NULL, NULL); +#else /* command line argument: URL */ vb_load_uri(&(Arg){VB_TARGET_CURRENT, argc > 1 ? argv[argc - 1] : vb.config.home_page}); +#endif /* Run the main GTK+ event loop */ gtk_main();