notify of new content on login #72

Open
opened 2020-01-11 12:58:44 +00:00 by cmccabe · 3 comments
Owner

This idea is for an optional feature that notifies the user on shell login if there is new content in linkulator.

It could be a command line switch to linkulator that simply prints "[n] new linkulator links/comments". Or it could be an entirely separate module that does the same thing. Either way, it may be user enabled with a name/value pair in linkulatorrc such as 'loginmessage = off/on' (where off is default).

It should not reset the lastlogin value in linkulatorrc because you would still want the new content to be distinguished when the user starts up linkulator.

While it should print a message if there is new content. It should be silent if there is no new content.

This idea is for an optional feature that notifies the user on shell login if there is new content in linkulator. It could be a command line switch to linkulator that simply prints "[n] new linkulator links/comments". Or it could be an entirely separate module that does the same thing. Either way, it may be user enabled with a name/value pair in linkulatorrc such as 'loginmessage = off/on' (where off is default). It should not reset the lastlogin value in linkulatorrc because you would still want the new content to be distinguished when the user starts up linkulator. While it should print a message if there is new content. It should be silent if there is no new content.
asdf added the
enhancement
label 2020-01-12 02:39:23 +00:00
Collaborator

Great suggestion. I like this idea, even to the point of wanting to have it enabled for any message service like shlog, gab and so on. The same as how it tells you about mail.

It would be good to be able to reuse the existing mail check alert, and it seems it is possible to use it for other purposes than mail as described here. This would still require some process to check and update a file though.

How should the checking of new content be done?

  • We could check the last modified time of all linkulator data files, but this may not be 100% correct if some other change occurs (like if someone touches the file).
  • Reading and processing all linkulator data files, checking for the maximum post date, would be the most correct but possibly expensive.
  • A hybrid approach - only check linkulator data files where the modified date is above a certain value.
Great suggestion. I like this idea, even to the point of wanting to have it enabled for any message service like shlog, gab and so on. The same as how it tells you about mail. It would be good to be able to reuse the existing mail check alert, and it seems it is possible to use it for other purposes than mail as described [here](https://docstore.mik.ua/orelly/unix/upt/ch21_08.htm). This would still require some process to check and update a file though. How should the checking of new content be done? - We could check the last modified time of all linkulator data files, but this may not be 100% correct if some other change occurs (like if someone touches the file). - Reading and processing all linkulator data files, checking for the maximum post date, would be the most correct but possibly expensive. - A hybrid approach - only check linkulator data files where the modified date is above a certain value.
Collaborator

I am of the thought that a user should be able to opt out of this, or maybe into it. Providing a script and letting users add it to their .bash_profile might be a good way to go. It would likely mean lower rates of adoption but more respect for letting a user config their own setup.

I definitely see value in this and would like to be able to turn messaging on for any/all of those you mentioned @asdf. If a script being added to .bash_profile was able to take a list/array/map/whatever of programs that a user would like notifications from that would be even better. For example I may not want to know about gab, but I may really want to know shlog, email, and links... but another user may want gab but may not want to use linkulator. It would allow for nice flexibility.

Since some of these checks may be time consuming it also lets people get to their prompt quicker to be able to opt out of whichever ones they want trading time for information or vice versa.

I am of the thought that a user should be able to opt out of this, or maybe into it. Providing a script and letting users add it to their `.bash_profile` might be a good way to go. It would likely mean lower rates of adoption but more respect for letting a user config their own setup. I definitely see value in this and would like to be able to turn messaging on for any/all of those you mentioned @asdf. If a script being added to `.bash_profile` was able to take a list/array/map/whatever of programs that a user would like notifications from that would be even better. For example I may not want to know about gab, but I may really want to know shlog, email, and links... but another user may want gab but may not want to use linkulator. It would allow for nice flexibility. Since some of these checks may be time consuming it also lets people get to their prompt quicker to be able to opt out of whichever ones they want trading time for information or vice versa.
Collaborator

Revisiting this, implementing this as @cmccabe describes it would be perfect, in the same way that gab implements it. Tools like recent now provide the detail I was suggesting.

Revisiting this, implementing this as @cmccabe describes it would be perfect, in the same way that gab implements it. Tools like `recent` now provide the detail I was suggesting.
asdf added the
this release
label 2021-08-19 08:32:37 +00:00
Sign in to join this conversation.
No description provided.