ignore category file #78

Open
opened 2020-01-16 03:54:58 +00:00 by cmccabe · 9 comments
Owner

Like the 'ignore' file, but allows a user to ignore categories of links.

Like the 'ignore' file, but allows a user to ignore categories of links.
cmccabe added the
enhancement
label 2020-01-16 03:54:58 +00:00
Collaborator

Interesting. That sounds in interesting idea. Would adding categories to this file be manual or something done through the tui?

Interesting. That sounds in interesting idea. Would adding categories to this file be manual or something done through the tui?
Author
Owner

Could be either. The simplest way would be just like the 'ignore' file. Just create a 'ignore-cat' (?) file and add names of categories you want to ignore, one category per line. If we were to add a TUI method for managing it, we could use the same approach for the user-ignore file too.

Could be either. The simplest way would be just like the 'ignore' file. Just create a 'ignore-cat' (?) file and add names of categories you want to ignore, one category per line. If we were to add a TUI method for managing it, we could use the same approach for the user-ignore file too.
Collaborator

The benefit for using the tui to handle the categories vs users is that from the main category menu if ignore is an option then they can just enter the category number and not have to spell it out. It is only a small benefit, so if it added a lot of cruft tot he code may not be worth it. but it is a small convenience I think would be nice. I'm not sure that there is any equivalent benefit to doing so with users, as there is no page where users are numbered. So with categories that menu option should only appear on the category selection view. Whereas for users it might need to be in every menu, which starts to clutter things a tad. I could go either way on it though.

The benefit for using the tui to handle the categories vs users is that from the main category menu if ignore is an option then they can just enter the category number and not have to spell it out. It is only a small benefit, so if it added a lot of cruft tot he code may not be worth it. but it is a small convenience I think would be nice. I'm not sure that there is any equivalent benefit to doing so with users, as there is no page where users are numbered. So with categories that menu option should only appear on the category selection view. Whereas for users it might need to be in every menu, which starts to clutter things a tad. I could go either way on it though.
Author
Owner

Agreed. A TUI for categories only makes sense.

What about un-ignoring categories? Would that still be manually editing the file? A TUI for adding and removing would be a lot more code.

Agreed. A TUI for categories only makes sense. What about un-ignoring categories? Would that still be manually editing the file? A TUI for adding and removing would be a lot more code.
Collaborator

Another option would be to store entries in the user configuration file.

It might be easiest to build the ignore functionality first before building any user interface.

Another option would be to store entries in the user configuration file. It might be easiest to build the ignore functionality first before building any user interface.
Collaborator

I agree with @asdf . Building the functionality first is the good call. Figuring out how people interact with it can come after. I really like configuration files (I know some people loathe them), so long as it is well commented for where and how to add things I think that sounds like a good idea that would meet user expectations.

I agree with @asdf . Building the functionality first is the good call. Figuring out how people interact with it can come after. I really like configuration files (I know some people loathe them), so long as it is well commented for where and how to add things I think that sounds like a good idea that would meet user expectations.
Author
Owner

The only concern I have about putting ignore in the config file just arose as I got a question about installation -- specifically a single central installation verses multiple installations by each user on a system. In the central install, the config file would not be writable by users, whereas the ignore file would still be in each user's ~/.linkulator/ directory.

So if we do go with a config file, we probably need to have two config files: one that stays next to the main linkulator.sh script and one that stays in each user's linkulator data directory. I.e. a main config file and a user config file.

The only concern I have about putting ignore in the config file just arose as I got a question about installation -- specifically a single central installation verses multiple installations by each user on a system. In the central install, the config file would not be writable by users, whereas the ignore file would still be in each user's ~/.linkulator/ directory. So if we do go with a config file, we probably need to have two config files: one that stays next to the main linkulator.sh script and one that stays in each user's linkulator data directory. I.e. a main config file and a user config file.
Collaborator

I think we might have that type of functionality already.

config.py is part of the application, and has some defaults stored in it, but they are intended as system-wide options.

linkulatorrc is a user specific configuration file, stored in the user's home directory. It's not tied to where linkulator is installed to. The current ignore file is a similar configuration file.

So to clarify my suggestion, a list of categories to ignore could be stored in linkulatorrc

Let me know if I've not understood this properly.

I think we might have that type of functionality already. config.py is part of the application, and has some defaults stored in it, but they are intended as system-wide options. linkulatorrc is a user specific configuration file, stored in the user's home directory. It's not tied to where linkulator is installed to. The current ignore file is a similar configuration file. So to clarify my suggestion, a list of categories to ignore could be stored in linkulatorrc Let me know if I've not understood this properly.
Author
Owner

That makes sense to me and sounds good!

That makes sense to me and sounds good!
Sign in to join this conversation.
No description provided.