-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge quickmarks and bookmarks / making bookmarks more powerful #882
Comments
Please do not :-) QuickMarks go well with more character like DWB. B + QM = very fast. Bookmarks has the problem that it can not be searched. that's the only issues. The also do not need a shortcut. I think, the division as vimperator or dactyl is a good approach |
@sdoubleyou I don't understand the problem, if bookmarks and quickmarks would be merged, then the resulting marks would be searchable and could optionally have a keyword just like a quickmark. You wouldn't lose anything. |
Just as @lamarpavel said, this is mainly about the way marks are stored on disk - I intend the user-interface to stay the same more or less, except of What I'm a bit worried about is that the format most likely has to change, as I'm not 100% happy with the directory format I proposed for bookmarks, and the What about using yaml, just like the session files? This would mean something like this: - url: http://www.qutebrowser.org/
title: qutebrowser
label: git
- url: http://www.example.org/
title: Example Page
... And could also be easily changed to allow subfolders later: - projects:
- url: http://www.qutebrowser.org/
title: qutebrowser
label: git
- url: http://www.herbstluftwm.org/
title: herbstluftwm
- url: http://www.example.org/
title: Example Page
... However, it clearly loses the "very easy to write by hand, modify by a shell script, etc." property of the old format... @Emdek also proposed using xbel which is a standard format for bookmarks, but meh... it's XML 😉 What do you think? |
Oh - @antoyo, what's your take on this? I know I was the one who proposed the folder format, but now I'm thinking this would be better in the long run. |
While the YAML format is more flexible, it is not compatible with the format used by |
For what it's worth, I often just edit my |
@Carpetsmoker I'm with you on this, especially since qute makes it so easy to bind editing one of the text files to a key (eg I imagine that when merging quickmarks and bookmarks we would have the same syntax for both in a text file and that former quickmarks are bookmarks with an appendix such as |
That would work - but what when you want to add something like labels then? Or have subfolders? Or store a title with quickmarks as well? Having all that in a single line sounds like a very inflexible format... I'm not sure what to do - I can see both sides. I'd like to be able to easily extend the format in the future without worrying about backwards compability (especially for bookmarks), but I'd also like to have a format with much "unixability" (I like that term!) |
Quick idea:
Here the name of the bookmark would be the file name, url and tags should be clear and key is the quickmark string. Few things are "more Unix" than using the filesystem in clever ways, right? Performance-wise it should be fine since fs-tree is being cached by the OS after first access, searching through cached file system hierarchies is something many Unix tools rely on and support and it allows little room for ambiguity. Thoughts? |
I have to think about this - I had a similar idea in the discussion with @antoyo in #681, but with only one As a bonus, this would even be valid YAML - and if you use Some points I'll have to think about:
One possibility would be to have a |
That obviously doesn't scale. Chromium has one Bookmarks file; a json. Load it into ram for full speed ;) |
Looking at what @claudehohl has, as weird as it can be, SQLite may be our best choice here. It can deal with tons of data and won't kill the file system. |
(and now everybody): "SQLite! SQLite! SQLite!" |
Just had a quick discussion about it in IRC:
|
Please leave bookmarks on disk in format editable in vim :-) |
I believe we should stick to a one-liner format. Look at dwb quickmarks: it has a URI, a keyword and a name. |
I don't mind YAML, but I'm a -1 on SQLite. plain text bookmarks have the huge advantage (imo) of being able to be tracked via git. And as @Ambrevar says even 10'000 items should not be a problem to search, right? |
Having had some time to think about it I agree that one file per mark is not a good way to go about it. For the reasons mentioned several times here I am also against any form of locked in format such as SQL. YAML or JSON is kind of okay, but I would much prefer formats that are consice and that can be easily parsed with I suggest taking a look at the format of ctags/exuberant tags for inspiration. |
I also think either YAML or one-liners are the way to go. As for the information possibly required:
|
@The-Compiler tags are very important for me, description is handy |
I think yaml looks good. Just to argue about the format @The-Compiler showed where every bookmark got 4 or 5 lines, I think there is no problem to tell awk to start with the second line and show me every 5th line afterwards. e.g the url and sort it or so. Or just print me every fourth and fifth line just to have "url" "tag" again and sort that. |
I need tags too, please keep it. |
A third for keeping tags. When you start to get into hundereds or thousands of bookmarks, it makes they make it very simple to find related items quickly. Folders, I guess, can serve a similar purpose although I find tags tend to be quicker. |
I'm starting to see the needs for tags too, as I get more bookmarks.
to see only bookmarks with some tags. |
One question: What are you refering to as tags? I know them from Firefox but don't see something similar beeing mentioned in the docs of QB. As far as I understand it there is only an URL and some text (the title) available for each bookmark. An idea for the file format: Keep it in a line oriented format. You can also define a strict syntax for it, for example tab delimited fields with tab chars not allowd inside fields to remove the need of quoteing. This would also be extendable for future fields. And it is very unix tools friendly and very similar to system files on unix: An idea for tags folders and completion: If we make the completion "fuzzy" in the sense that it does not care for the order of input words (so completion on "foo bar" will give the same results as completion on "bar foo") we actually should already have folders and tags implicitly. The idea is that user can edit the "title" in the
For the browser these are all just urls with titles. But if the completion is word-order-insensitive I can think of these as titles, paths/folders or tags however I like. I would also suggest to allow an argument to Oh, and "Yes" I think we can merge bookmarks and quickmarks, |
When a command has positional varargs, keep offering the configured completion for each successive argument. Right now this only influences `config-cycle`. Previously, `config-cycle <option> ` would offer a value completion for only the first argument after the option. Now it will keep offering value completion for each successive argument. This will be useful for passing multiple tags to the new bookmark commands that will be added for qutebrowser#882.
Also adds a tags field to bookmarks. See qutebrowser#882: Merge quickmarks and bookmarks.
The new bookmarks will be a superset of the old quickmarks and bookmarks. See qutebrowser#882. TODO: - Fix importer scripts - Find an alternative to quickmark-save in prompt.feature - Implement keywords for `:open mykeyword`? - Update documentation - Update userscripts
The syntax is `bookmark-tag URL [-r] TAG1,TAG2,...,TAGN`. - If the bookmark does not exist, error - If the bookmark does exist, add the specified tags to the bookmark - If -r (--remove) is given, remove the specified marks The command was initially described by @NoctuaNivalis in qutebrowser#882 (comment) My implementation deviates from the following steps: 2. Fail rather than creating a bookmark that doesn't exist. Adding a bookmark with tags can be done with `bookmark-add {url} {title} {tags...}` 5. Not sure if -R (remove bookmark if no tags left) should be a config option instead. 6. Not sure if -u (refuse non-unique tags) should be a config option instead, or whether a `key` field should be used in place of non-unique tags. Note: One other concern is how to handle urls as keys. Should we use QUrl as a key? If just using a string, how (if at all) should urls be formatted?
bookmark-load [-tbwad] tag1 [tag2...tagN] loads the first bookmark matching all the given tags. The -tbw open the mark in a tab, background tab, and window, respectively. If -a (--open-all) is given, all matching marks are opened. Using -a without one of -tbw is invalid. The -d flag behaves as before and deletes the mark after it is opened (or all matching marks if used with -a) See qutebrowser#882, specifically qutebrowser#882 (comment) for the initial proposal and qutebrowser#882 (comment) for @mschilli87's suggestion of the --all flag. Unfortunately `all` is a python keyword so I had to use `open_all` with a shortcut of `-a`.
When a command has positional varargs, keep offering the configured completion for each successive argument. Right now this only influences `config-cycle`. Previously, `config-cycle <option> ` would offer a value completion for only the first argument after the option. Now it will keep offering value completion for each successive argument. This will be useful for passing multiple tags to the new bookmark commands that will be added for qutebrowser#882.
Also adds a tags field to bookmarks. See qutebrowser#882: Merge quickmarks and bookmarks.
The new bookmarks will be a superset of the old quickmarks and bookmarks. See qutebrowser#882. TODO: - Fix importer scripts - Find an alternative to quickmark-save in prompt.feature - Implement keywords for `:open mykeyword`? - Update documentation - Update userscripts
The syntax is `bookmark-tag URL [-r] TAG1,TAG2,...,TAGN`. - If the bookmark does not exist, error - If the bookmark does exist, add the specified tags to the bookmark - If -r (--remove) is given, remove the specified marks The command was initially described by @NoctuaNivalis in qutebrowser#882 (comment) My implementation deviates from the following steps: 2. Fail rather than creating a bookmark that doesn't exist. Adding a bookmark with tags can be done with `bookmark-add {url} {title} {tags...}` 5. Not sure if -R (remove bookmark if no tags left) should be a config option instead. 6. Not sure if -u (refuse non-unique tags) should be a config option instead, or whether a `key` field should be used in place of non-unique tags. Note: One other concern is how to handle urls as keys. Should we use QUrl as a key? If just using a string, how (if at all) should urls be formatted?
bookmark-load [-tbwad] tag1 [tag2...tagN] loads the first bookmark matching all the given tags. The -tbw open the mark in a tab, background tab, and window, respectively. If -a (--open-all) is given, all matching marks are opened. Using -a without one of -tbw is invalid. The -d flag behaves as before and deletes the mark after it is opened (or all matching marks if used with -a) See qutebrowser#882, specifically qutebrowser#882 (comment) for the initial proposal and qutebrowser#882 (comment) for @mschilli87's suggestion of the --all flag. Unfortunately `all` is a python keyword so I had to use `open_all` with a shortcut of `-a`.
With --unique, bookmark_tag refuses tags that have already been applied to a mark. This supports the use of unique tags as a replacement for the old quickmark keys. See qutebrowser#882 (comment) for the proposal of --unique.
-R or --purge removes the bookmark if it no longer has any tags, as suggested in qutebrowser#882 (comment). This supports using unique tags as a replacement for the old quickmark functionality by making `bookmark-tag -R` an analog to quickmark-del.
Following up after 1-year hangingThis very important issue has hung for more than a year. What's the current state? I understand that for certain issues using It seems to me that essentially we only need
For users who want hierarchical structures to be set, we can also do that by reading every file withing the
changes made by @rcorreI can see lots of changes above made by @rcorre, such as |
@jcguu95 "very important" is quite subjective 😉 @rcorre started a lot of work in #3855 but I haven't been able to take a look yet, because I've been very busy with my studies and other important changes (mainly changes needed to work with Qt updates) in the past year or so. This will change later this year as my studies are almost done now. |
It's time for |
I got pretty overwhelmed by other things as well, but I'm happy to come back to it! I'll probably wait until @The-Compiler has more time though 😁 |
It might not be political correct here. But I happen to come across org-mode.. seems that a very good way to handle plain text file. |
@jcguu95 A decision on the storage format has already been made (and implemented in #3855), any more bikeshedding won't be productive. |
I would love to see support for tags and even categories. :) |
I see no mention of this here, forgive me if it was already talked about: Whichever system is chosen, can the searching be made Just a small suggestion, as after probably a year of using QB, I've noticed that I'm often retyping my quickmark search term because of incorrect |
@adigitoleo that seems like a separate thing - mind opening a new issue? |
See #840 - the difference between quickmarks and bookmarks also is confusing for users sometimes, so it might make sense to merge them into one. Basically, simply having bookmarks with an optional name/label, and when that is set, they're "quickmarks".
edit: The new command should also make sure the URL actually is an URL.
The text was updated successfully, but these errors were encountered: