App-orgsel
view release on metacpan or search on metacpan
- No functional changes.
- [doc] Add some real-world examples.
- [doc] Tweak Description.
0.011 2020-04-29 Released-By: PERLANCAR; Urgency: low
- [build] Rebuild with updated App::CSelUtils to remove dependency to
the deprecated Perinci::Sub::ArgEntity::*.
0.010 2020-04-27 Released-By: PERLANCAR; Urgency: low
- No functional changes.
- [build] Rebuild with newer Perinci::CmdLine::POD to render a more
complete usage line of Perinci::CmdLine scripts in POD (now all
options are listed, not just '[options]').
script/orgsel view on Meta::CPAN
# select the second-level headlines where we store the todo items (title-only)
% orgsel todo.org 'Headline[level=2]' --node-action eval:'print $_->title->as_string,"\n"'
[2021-06-26 Sat] SQLite::KeyValueStore::Simple: add delete function
[2021-06-21 Mon] Perinci::CmdLine: unwanted removal of quotes?
[2021-06-21 Mon] Config::IOD: set_value() eats comments
[2021-06-18 Fri] Acme::CPANModules: category
[2021-06-17 Thu] perl module: Software::Catalog::SW::rakudo::moar
[2020-05-26 Tue] create a more generic version of csv-grep or csv-map
[2020-05-29 Fri] csvutils: make csv-grep-fields, a more flexible form of csv-select-fields
# when was a specific todo list last updated? (we look at log entries)
% orgsel todo.org 'Headline[level=2][title.as_string =~ /set_value/] Timestamp:first'
[2021-06-22]
# how many bugs do we have?
% orgsel todo.org 'Headline[level=2][todo_state="BUG"]' --count
# how many bugs and other undone todo items?
% orgsel todo.org 'Headline[level=2][is_todo is true][is_done is false]' --count
# how many undone todo items for csvutils project?
script/orgsel view on Meta::CPAN
# dump a particular todo item (helps visualize structure to select further)
% orgsel todo.org 'Headline[level=2][title.as_string =~ /eats comments/]' | dump-org-structure
# show the update log of the todo item (with the "- log ::"):
% orgsel todo.org 'Headline[level=2][title.as_string =~ /eats comments/] > List > ListItem[desc_term.text = "log"]:parent'
# show the update log of the todo item (without the "- log ::"):
% orgsel todo.org 'Headline[level=2][title.as_string =~ /eats comments/] > List > ListItem[desc_term.text = "log"] + *'
# select todo items which have been updated at least twice (by looking at
# number of list items under "log")
% orgsel todo.org 'Headline[level=2] > List > ListItem[desc_term.text = "log"] + *:has-min-children(2):parent:parent'
=head2 Examples using F<addressbook.org>
Example document F<addressbook.org> (you can get this from the distribution
shared file):
#+TODO: TODO | OLD
( run in 0.301 second using v1.01-cache-2.11-cpan-05444aca049 )