Org::ParserParse Org documents | |
Download |
Org::Parser Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- Steven Haryanto
- Publisher web site:
- http://search.cpan.org/~sharyanto/
Org::Parser Tags
Org::Parser Description
Parse Org documents Org::Parser is a Perl module that parses Org documents. See http://orgmode.org/ for more details on Org documents.This module uses Log::Any logging framework.This module uses Moo object system.See todo.org in the distribution for the list of already- and not yet implemented stuffs.SYNOPSIS use 5.010; use Org::Parser; my $orgp = Org::Parser->new(); # parse a file my $doc = $orgp->parse_file("$ENV{HOME}/todo.org"); # parse a string $doc = $orgp->parse(< < EOF); #+TODO: TODO | DONE CANCELLED < < < radio target > > > * heading1a ** TODO heading2a SCHEDULED: < 2011-03-31 Thu > ] ** DONE heading2b this will become a link: radio target * TODO heading1b *bold* - some - plain - list - with /checkbox/ * and * sublist * CANCELLED heading1c + definition :: list + another :: def EOF # walk the document tree $doc->walk(sub { my ($el) = @_; return unless $el->isa('Org::Element::Headline'); say "heading level ", $el->level, ": ", $el->title->as_string; });will print something like: heading level 1: heading1a heading level 2: heading2a heading level 2: heading2b *bold* heading level 1: heading1b heading level 1: heading1cA command-line utility is provided for debugging: % dump-org-structure ~/todo.org Document: Setting: "#+TODO: TODO | DONE CANCELLED\n" RadioTarget: "< < < radio target > > >" Text: "\n" Headline: l=1 (title) Text: "heading1a" (children) Headline: l=2 todo=TODO (title) Text: "heading2a" (children) Text: "SCHEDULED: " ... Requirements: · Perl
Org::Parser Related Software