Skip to content

Small parser for Emacs Org files. Contains sxml converter

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

robert-lawrence/guile-orgfile

Repository files navigation

guile-orgfile is a simple parser for documents written in Emacs Org mode (.org).

This was written for use as an exporter with Haunt, a static site generator written in Guile Scheme. It is not feature complete and is under active development.

Planned features:

  • Parse document tree into sections, with headers exported as <h1>-<h6> tags and section text exported as a <p> tag
  • Parse links, export using <a> tag
  • Wrap header in div that covers all subheaders
  • Parse org tags, convert to html class attributes for div
  • Parse org lists
  • Parse bold, italic, underlined and strikethrough text
  • Parse org code blocks
  • Parse org tables

Usage

(use-modules (orgfile)
             (sxml simple))

(define org-text
  "* A typical org file

a paragraph with an [[http://example.com][example link]]

** Sections can be nested

 1. List item 1
 2. List item 2
 
 
 another paragraph.")

;; Parse the org document
(define doc (parse-orgfile org-text))

;; Convert the document to sxml and write to current output port
(sxml->xml (orgfile->sxml doc))

Installation

Build from git:

./bootstrap
./configure
make
make install

About

Small parser for Emacs Org files. Contains sxml converter

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published