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

Canonical location of tags in neuron query (v2) #75

Open
srid opened this issue Feb 26, 2021 · 1 comment
Open

Canonical location of tags in neuron query (v2) #75

srid opened this issue Feb 26, 2021 · 1 comment

Comments

@srid
Copy link
Contributor

srid commented Feb 26, 2021

Just a heads-up; this change will become effective as soon as srid/neuron#570 is resolved (I'll comment here once that's done).


There is (will be) another change in neuron query JSON structure, but this time ... it is a positive one (as it obviates having to hack into internal plugin data, which will no longer contain the tags).

Use the following to pull tags out of a zettel structure.

# Get tags for https://www.srid.ca/pass
$ neuron query --id="Pass with GPG" 2> /dev/null | jq .Meta.tags
[
  "blog"
]
$

Note that Meta will contain pretty much everything the user specifies in the YAML frontmatter of Markdown (or org-mode heading properties, as soon as we implement that for v2). So "tags" is not a special field; it is just part of the generic metadata that neuron exposes, eg:

$ neuron query --id="Pass with GPG" 2> /dev/null | jq .Meta
{
  "slug": "pass",
  "date": "2021-01-15",
  "tags": [
    "blog"
  ]
}
$
@srid
Copy link
Contributor Author

srid commented Feb 26, 2021

Done: srid/neuron#572

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

No branches or pull requests

1 participant