vaeth/bookmarkdupes

[Request] Exclude folders more easily

Closed this issue · 8 comments

Hello,
Thank you for the great extension!

I would like to request making it a little easier to exclude multiple folders. Right now I have to manually type the path with the correct '\0' in the folder tree, which gets tedious when excluding several folders.

Maybe there is an easier method of entering the paths which I don't know. It would be nice to have a more interactive UI menu, e.g. a Browse button, where we select the folders with the mouse directly from the tree. I'm sure that requires a lot more work, so I'm not expecting much.

Thank you for the consideration.

vaeth commented

Unless you want to be sure to have no “false positives”, you do not have to type the full path: It suffices to specify the folder name alone (regular expressions only need to match a substring if you do not anchor them with ^ or $ symbols).
Copying of folder names is easy from an "Edit bookmark" window. (However, be aware that some symbols in the name might have a special meaning if interpreted as a regular expression, e.g. “.” or “|”)

Moreover, you probably need to enter the exceptional folders only once: Observe that there is an option to save the rules, even in sync storage.

I would like to avoid any optical additions to the UI: It is already confusing enough, especially in expert mode. Adding more options might help power users like you but will scare away the majority of users.

Another thing: It is not accidental that in expert mode (i.e. in everything above the 3 main action buttons) there is no access to existing bookmarks necessary. Traversing the bookmark tree (which would be necessary to build your suggested menu of folders) costs a lot of time and memory. Moreover, there is then the problem that the displayed list can become outdated, etc.

So, all in all I am not inclined to add such an additional menu.

Thank you for the response.
First let me say that I'm just an average Firefox user, not a programmer or in any way tech oriented. At best I can follow good instructions.

About adding more options to expert mode, I wasn't suggesting it should be in expert mode or anywhere specifically. As to the suggestion that an actual UI, where the user selects a folder with mouse clicks via a Browse menu (similar to how it's done in most user-friendly OS's), the goal is to be less confusing than manually typing in commands in expert mode. I'm a little confused as to why that would be more confusing to most users, if it's meant to be more user-friendly. Maybe we're talking about different things, or maybe I didn't explain it well. I'm talking about a 'Browse' button than opens the folder trees and lets the user mouser-select any number of subfolders to exclude. This would replace the existing manual entering of paths with complex syntax. It's not "in addition to", it's "instead of".

Again, I'm sure that's a lot of extra work, so if not possible I understand, but certainly my suggestion is meant to make things more user-friendly to most users like myself, not more confusing.

Unless you want to be sure to have no “false positives”, you do not have to type the full path: It suffices to specify the folder name alone (regular expressions only need to match a substring if you do not anchor them with ^ or $ symbols).
Copying of folder names is easy from an "Edit bookmark" window. (However, be aware that some symbols in the name might have a special meaning if interpreted as a regular expression, e.g. “.” or “|”)

I'm not even sure how to respond to this because I actually don't understand most of it. Please keep in mind that I"m not a programmer, so I'm not familiar with a lot of the terminology.

  • What do you mean by "false positives" when searching for dupes, and how could I get those?

  • I don't have to type the full path? I was following the example given in the instructions for Expert mode, which says the following:
    "The bookmark's name refers to the full bookmark path as it appears in the browser with folder names separated by the null character. For instance, if you have in “Bookmark Menu” a folder “Collection” which contains your bookmark "Example", the bookmark's name becomes Bookmark Menu\0Collection\0Example (where \0 denotes the null character which can be matched by the regular expression with \0 or \x00)."
    The only example there says to enter the full path with \0. I didn't see anything about just using the folder name. Would you be kind enough to provide more extensive examples/instructions? How can I use just the folder name, if there may be multiple folders with the same name under different branches?

  • Everything about regular expressions and substring matching is beyond me (and probably beyond most average users). You said you want things to be less confusing to the average non-tech non-coder user, and I think the way to do that is not necessarily by trying to teach users about coding and regular expressions, etc.
    For instance, I followed one of the external links for regular expressions tutorial, and as soon as I read the first two sentences about patterns of characters and Javascript mumbo jumbo, I just closed the page.
    Here is the thing - i'm just an idiot looking for an extension where I can press a few buttons, and it does magic for me, just like most other extensions. I'm not really interested in learning about programming. And in all fairness, most of the popular extensions are idiot-proof and require simple button presses, and that's what most users are used to. So I would say, know your audience :-)

The way things are presented, the folder exclusion feature is really limited only to coder and programmers who know about regular expressions. I believe you can easily make it more accessible to the average user by simply providing good examples of how to exclude folders, not so much teaching users about coding.

Copying of folder names is easy from an "Edit bookmark" window.

See, I'm just an average moron. I didn't even know that's possible. How do I go to "Edit bookmark"? All I know is to right click on a bookmark and open Properties, which doesn't show any paths. It's been my experience that Firefox never shows parent folder or path of the bookmarks without extensions.

Sorry for the long response. Thank you very much for your help and consideration.

vaeth commented

I'm talking about a 'Browse' button [...]
looking for an extension where I where I can press a few buttons [...]

That's the contradiction: a few buttons vs. a huge list of buttons - yet another button for yet another fancy feature. The number of buttons is already much too large now for the average user. Here is a typical opinion of that:
https://addons.mozilla.org/addon/bookmark-dupes/reviews/1098992/
(“To difficult to use. A waste of time. Might as well delete the bookmarks one at a time.“ 2|5 stars)
I am quite sure he was not talking about expert mode, since I did everything to discourage the average user from enabling that.

The way things are presented, the folder exclusion feature is really limited only to coder

It is a feature interesting only for power users. Average users have no need for such fancy things:
Average users will probably just press "Dupes", then e.g. "Mark all but oldest in each group" and then - to actually exclude folders - select a folder from the list "-- select a folder to get corresponding buttons for marking --" and then choose "unmark all from selected folder". (And repeat this for every folders they want to exclude.)

This is not exactly the same as excluding the folders already from the search of duplicates but comes quite close to it.

Power users have many additional feature requests like yours (go through the list of closed issues here to see some of them) which could either be implemented by adding one/several buttons for each of these particular requests or by providing a rather generic solution which covers all of them at once (and which can even do "exotic" things of the user suddenly needs to). I decided for the latter and to discourage everybody except said power users to attempt this.

What do you mean by "false positives"

If you specify e.g. \0keep\0 then every bookmark which is contained in a folder named keep (or a subfolder thereof) is excluded. For instance,

Bookmark Menu | keep | bookmark1
Bookmark Menu | keep | another folder | bookmark2
Bookmarks Toolbar | some topic | a subtopic | keep | bookmark3

all would be excluded, although perhaps when you wrote "\0keep\0" you had in mind only the Bookmark Menu | keep folder and did not remember that you had another folder "keep" somewhere so that "bookmark3" is excluded although you actually did not intend to. This "mistake" would not have happened if you would have specified the full path ^Bookmarks Menu\0keep\0.
In this sense, "bookmark3" is a "false positive" (i.e. unintended match) of the shorter-to-type condition \0keep\0.

If you would have specified the even short-to-type condition keep instead, then this means that every bookmark which contains "keep" somewhere in its name or in its path is excluded, too, e.g.

Bookmark Menu | keep only temporary | bookmark4
Bookmarks Toolbar | foo | housekeeping

The bookmark's name refers to the full bookmark path

Yes. For instance, in the last example, the bookmark's name in the last example is

Bookmarks Toolbar\0foo\0housekeeping

It is matched e.g. by any of the following regular expressions:

  • keep
  • foo
  • \0foo\0
  • \0foo\0house....ing
  • \0foo\0house.*ing
  • ^Bookmarks Toolbar\0foo\0housekeeping

It is not matched by any of the following regular expressions:

  • \0keep\0
  • ^foo\0

Regular expressions are no rocket science. Anyway, it seems we agree that they are for advanced users only, who require advanced features not available by "standard" means. Exclusion of a certain list of folders already from searching is such an advanced feature IMHO.

How do I go to "Edit bookmark"

I meant the standard firefox window to edit your bookmarks. This has nothing to do with the extension.
Only now I realize that in current firefox versions they have renamed the menu entry. It is now called "Bookmarks -> Show all bookmarks (Ctrl+Shift+O)"

Here is a typical opinion of that: https://addons.mozilla.org/addon/bookmark-dupes/reviews/1098992/

Actually that's not a 'typical' opinion, since 99% of the reviews are excellent and users like the extension :-) That review is very unique compared to all others. I'm just saying it's what I see :-).

I would say that the menu does look a little intimidating, but the problem is not really too many buttons. It's the many large text boxes with strange syntax in them, with many check boxes next to them.

"Excluding folders" is a feature interesting only for power users.

Wait, so you are saying that I'm a power user because I want to use that feature? I don't consider myself a power user just because I'm interested in some feature.

Regular expressions are no rocket science. Anyway, it seems we agree that they are for advanced users only, who require advanced features not available by "standard" means. Exclusion of a certain list of folders already from searching is such an advanced feature IMHO.

I think you are confusing two groups of users here. Allow me to explain, and I'm only trying to help.
Just because a user requests a feature that you consider an 'advanced' feature, doesn't mean that the user himself is an 'advanced user' who has any technical knowledge about anything.
Case in point - I made a request for an 'advanced' feature, but I am not an advanced user with any technical knowledge :-)

Let me give you an example: I may want to buy the fastest computer on the planet, which would be an 'advanced' request, but that doesn't mean that I know more about computers than the average person who only knows how to turn on a computer. I hope you understand what I"m saying.

Anyway. I was just looking for an easier way of excluding folders because I happen to have dupes that I want to keep, and manually typing the expressions seems tedious.

So you are saying that the quickest way to do it is:

  • copy/paste the top folder name
  • enter \0
  • copy/paste the next folder name in the tree
  • enter \0
  • etc etc etc. until I have the full path.

Is that correct? Do you know if there is a more direct way to copy/paste the full path?

Thanks!

vaeth commented

Actually that's not a 'typical' opinion

There were many complaints that it is too complicated. Even long before expert mode existed.
Apparently, the buttons for marking and unmarking confused users already.
And compared to this, what you request is really a power user feature:
An exclusion list requires not only a single button but a full list which must appear somewhere.

So you are saying that the quickest way to do it is

If you are sure that your folder's names are unique you do not have the problem with false positives.
In this case, you can just copy/paste the folder's name itself and put a \0 and \0 in front and back. (The latter can even be omitted if you are sure that your folder does not occur in the name of another folder or bookmark)

I asked about the full path method. I have thousands of bookmarks and hundreds of folder, so I can never be sure that multiple folders don't have the same name. The short method is not secure, so I'm asking about the full path.

Are the steps I described above the best way to enter the full path?
copy/paste the top folder name
enter \0
copy/paste the next folder name in the tree
enter \0
etc etc etc. until I have the full path.

Is there a quicker way of copying/pasting the full path?
Thank you.

vaeth commented

If you want the full path you need to do that, and actually even more:

  1. You have to quote special symbols . ? + * \ | ^ $ [ ] ( ) { }.
    E.g. instead of Folder (1) you have to write Folder \(1\).

  2. (Less important) start the first path with a ^ (e.g. ^Bookmark Menu instead of Bookmark Menu). This makes only a difference if you have another folder which ends with the text Bookmark Menu.

Is there a quicker way of copying/pasting the full path?

No, although in certain situations you might shortcut by using the power of regular expressions.

Some examples:

  1. If you want to exclude
Bookmark Menu | Container | Some Folder
Bookmark Menu | Container | Another folder

you can do it by a single path

^Bookmark Menu\0Container\0(Some Folder|Another folder)\0

(the | means or).

  1. When you know that certain things are unique you can omit intermediate components by omitting them with .*. For instance,
^Bookmark Menu\0Sorted\0.*\0Collection\0

will exclude all "Collection" folders which occur somewhere in "Bookmark Menu | Sorted"

OK, these are useful examples. Thank you for your help.
Also thank you for considering my request, even though it will not be implemented. Feel free to close the thread.
:-)