GithubHelp home page GithubHelp logo

cl-org-more's Introduction

cl-org-more: cl-org-mode improved twice

What is it?

CL-ORG-MORE is a fork of deepfire/cl-org-mode (based on the de-facto standard cl-org-mode) given the abandoned-like look of the original repo. As on now, CL-ORG-MORE is simply a couple of patches and error fixes, but the ambition is to support:

  • [ ] Text markup.
  • [ ] Active elements (links, timestamps, radios).
  • [ ] Orgdown support.
  • [ ] Time-management use (how to do it, though?)

CL-ORG-MORE is a three-component, layered solution for manipulation of Org-structured text:

CL-ORG-MORE-RAW
provides tolerant parsing of Org-structured text into a semi-detailed AST
CL-ORG-MORE
“dresses” the AST into a fairly rich object tree, and allows serialisation into text
CL-ORG-MORE-EXTENDED
allows representation of DAGs in Org files, atop a CAS (content-addressed storage)

It closely follows the official Org Syntax and Org Element API.

Getting started

Clone the repository:

git clone https://github.com/aartaka/cl-org-more

Then, in your CL image, load cl-org-more

;; Put cl-org-more into somewhere ASDF can find it, or run
;; (asdf:load-asd #p"/path/to/cl-org-more/")
(asdf:load-system :cl-org-more-extended)

And then you can test it

(org:org-parse #p"/path/to/your/agenda.org")

And enjoy looking at your file parsed to a cool hierarchical object tree :)

Dependencies

  • CL-ORG-MORE-RAW: alexandria parser-combinators iterate split-sequence
  • CL-ORG-MORE: cl-org-more-raw cl-containers
  • CL-ORG-MORE-EXTENDED: cl-org-more ironclad flexi-streams

Usage

Use (cl-org-mode-raw:org-raw-parse file-or-string) to get a representation of an Org document as a tree of cons cells:

CL-USER> (cl-org-mode-raw:org-raw-parse #p"README.org")
(:ORG (:HEADER :TITLE "cl-org-more: cl-org-mode improved twice")
 (:SECTION "
")
 (:ENTRY (:STARS 1 :TITLE "What is it?")
  (:SECTION "
  CL-ORG-MORE is a three-component, layered solution for
  manipulation of Org-structured text:

  - CL-ORG-MORE-RAW ::
    provides tolerant parsing of Org-structured text into a semi-detailed AST
  - CL-ORG-MORE ::
    \"dresses\" the AST into a fairly rich object tree, and allows serialisation into text
  - CL-ORG-MORE-EXTENDED ::
    allows representation of DAGs in Org files, atop a CAS (content-addressed storage)

It closely follows the official [[https://orgmode.org/worg/dev/org-syntax.html#Greater_Elements][Org Syntax]] and
   [[https://orgmode.org/worg/dev/org-element-api.html][Org Element API]].

"))
...
)

Use (cl-org-mode-extended:org-parse-extended #P"README.org") to get a richer representation.

Use (org-present kind object), where kind is one of :flat or :normal, to print objects back as plain text.

Finally, use the defined readers to access an object’s data:

Node objects define:

title
section
children
status
priority
tags
static-properties

A keyword has:

name value optional

A container has children-of.

A block has parameter-of.

See them all in cl-org-mode.lisp.

Testing

Tests depend on the rt library.

(asdf:test-system :cl-org-more)
(asdf:test-system :cl-org-more-extended)

cl-org-more's People

Contributors

aartaka avatar deepfire avatar ferada avatar jingtaozf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.