elnook / notedo

Notes, Todos, Markdown, Bookmarks and more with VIM support and full-text search - stay'in organized
5 stars 0 forks source link

Dynamic and Automatic Notes #9

Open cmeinco opened 3 years ago

cmeinco commented 3 years ago

Summary I would like a special note that executes a local server command and updates itself. So for instance it can read a file, such as /opt/notedo/notedo.log and update itself every 5 minutes or on some frequency (startup, cron, etc).

Intended Outcome have an easy way to access notes/logs/etc on the server where notedo is running. Like administrative notes.

How will it work? Perfectly.

davidwashere commented 3 years ago

Thoughts on these alternatives?

  1. Creating a CLI command to update a note (ie: notedo update note 123 -f /opt/notedo/notedo.log)
  2. Publishing the API docs so can update via curl
  3. Setup the command to run via the CLI (not web-interface) and perhaps control its frequency via the web interface? (e.g. notedo config cmd-runner log-pull <cmd> and then via the web interface configure via schedule?)

My thoughts are: If a remote request can create commands to be ran on the server that could be exploited for badness, especially in the future for multi-tenancy. I suppose too if in the multi-tenancy world the hosted server is not running the commands, but instead the local notedo binary, perhaps that would be OK

cmeinco commented 3 years ago

i'm thinking this feature would be more about the source of the content. If the note itself wasn't the source of truth, but it was a db or a remote site or... a file. would need a way for the system to poll these sources and keep the displayed/stored content up to date. I think api access/etc might be more meaningful for elnook/notedo#6 to make access to content simpler.