org_parser 0.1.1 copy "org_parser: ^0.1.1" to clipboard
org_parser: ^0.1.1 copied to clipboard

outdated

An Org-mode parser for Dart

org_parser #

An Org-mode parser for Dart.

Usage #

For displaying Org-mode documents in Flutter applications, see org_flutter. For an example application that displays Org-mode documents with org_parser and org_flutter, see orgro.

This package allows you to parse raw Org-mode documents into a structured in-memory representation.

import 'package:org_parser/org_parser.dart';

final doc = OrgDocument.parse('''* TODO [#A] foo bar
baz buzz''');
print(doc.children[0].headline.keyword); # TODO

Caveats #

This parser was developed for an application that is halfway between pretty-printing and evaluating/interpreting, so in many cases the parsed structure does not split out constituent parts as thoroughly as needed for some applications.

Supported syntax #

  • Sections/headlines

    * TODO [#A] foo bar
    
  • Blocks

    #+BEGIN_SRC
    foo bar
    #+END_SRC
    
  • Affiliated keywords

    #+name: foo
    
  • Fixed-width areas

    : foo bar
    : baz buzz
    
  • Tables

    | foo | bar |
    |-----+-----|
    | biz | baz |
    
  • Lists

    - foo
      - [X] bar
        1. baz
        2. buzz
    
  • Drawers

    :PROPERTIES:
    foo bar
    :END:
    
  • Footnotes

    Foo bar[fn:1] biz buzz
    
    [fn:1] Bazinga
    
  • Links

    [[http://example.com][example]]
    
    http://example.com
    
  • Emphasis markup

    *bold* /italic/ _underline_ +strikethrough+ ~code~ =verbatim=
    
  • Timestamps

    [2020-05-05 Tue]
    
    <2020-05-05 Tue 10:00>
    
  • Macro references

    {{{kbd(C-c C-c)}}}