Closed ashiklom closed 7 years ago
This does sound cool! I would say though that a tags interface as in issue #43 that allowed for viewing and managing tags would be more helpful to begin with perhaps?
Either way, whatever you work on, pull requests are welcome! This would require some major work I would say, which I don't have time to help out with at the moment unfortunately. All the best. :smile:
I would say though that a tags interface as in issue #43 that allowed for viewing and managing tags would be more helpful to begin with perhaps?
I see no reason we can't do both! I'm interested in this CLI version because I'd like to develop some bash shortcut programs for common tasks. For instance, I wrote a small bash script called sn-daily
that searches for a note called <YYYY-MM-DD> -- Daily
with tag daily
and opens it for editing if it exists or creates it if it doesn't. I need the Tag API described here to create the note with the given tag.
This would require some major work I would say
The CLI API described here doesn't seem like such a big task, mostly because your code is already well organized :smile:. I've already implemented sncli -k <key> tag get
in a local branch, and I have plan for implementing tag set
, relying ~80-90% on your existing functions, which I'll do once I have a free half hour or so.
Oh ha of course - here's me thinking it would require more server requests :facepalm: (maybe I was thinking about the graphical tags interface at the time, which may be a larger task). Well we have @insanum to thank for the awesome codebase. :+1:
Implemented in PR #46
Syntax like this would be cool.
This could be implemented in stages:
sncli tag get
-- Retrieve the tag string.sncli tag set
-- Modify the entire tag string.sncli tag add
-- Add a tag. After the other two, should just be a simple string concatenation.sncli tag rm
-- Remove a tag. Should just be a string substitution.I can take a stab at implementing this.