Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter by tags #17

Closed
infotexture opened this issue Mar 18, 2014 · 6 comments
Closed

Filter by tags #17

infotexture opened this issue Mar 18, 2014 · 6 comments

Comments

@infotexture
Copy link

Would be nice if the CLI supported a means to filter the list of entries by tags like jrnl. See http://maebert.github.io/jrnl/usage.html#using-tags.

TaskPaper-style @project tags can be used to filter the file in TaskPaper, but it might be useful if the doing CLI could do the same, without having to open the file in TaskPaper.

@ttscoff
Copy link
Owner

ttscoff commented Mar 18, 2014

I just added tagging commands for the next release. You can doing tag foo bar to add @foo and @bar to the last entry (or specify -c X for the last X entries). You can remove tags with doing tag -r foo (also with -c flag).

As far as filtering, I currently only have it implemented in custom views. You can add keys for tags and tags_bool to specify a list of tags to filter by and whether multiple tags are AND or OR. Then running doing view custom_view_name would give you lists based on the filter settings. I also added the ability to use All for the section name in the custom view to combine entries from all sections. May make that an array eventually, for specifying multiple sections.

I'm (kind of) planning a "filter" command to do this on the fly, but haven't worked it in yet.

@bar
Copy link

bar commented Mar 18, 2014

Hey, who summoned me? :)

@ttscoff
Copy link
Owner

ttscoff commented Mar 18, 2014

Sorry, I forgot my "bar" tag example would be a mention...

@bar
Copy link

bar commented Mar 18, 2014

@ttscoff sure, no problem!

@ttscoff
Copy link
Owner

ttscoff commented Mar 18, 2014

@infotexture see #21 to help test out the new tag filtering features.

@ttscoff ttscoff closed this as completed Mar 19, 2014
@infotexture
Copy link
Author

Excellent, thanks! Looks like tag filtering is case sensitive in v0.2.4.

If an entry is tagged with @VIP, running doing show all vip comes up empty, but doing show all VIP yields the expected results.

Not a big problem, but given the other fuzzy smarts in doing, might make sense to be more forgiving here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants