Coder Social home page Coder Social logo

liborg's Introduction

liborg: org-mode file parser and code generator library and more

This project is still under development but you can already test this parser and code generator if you want :)

Currently the library contains only a Python-based implementation of the org-mode parser and code generator.

Usage

The usage of this library is very simple. Just import the libOrg class and call the constructor with a file name.

import libOrg from libOrg

orgfile = libOrg( "<PATH-TO-AN-ORG-FILE>" )

Now the file is already parsed and can be generated to the desired format. Just call the method generate and pass a file stream parameter and libOrg does the rest. By default the generate method exports to HTML.

import sys
orgfile.generate( sys.stdout )

You want to export to a different language? No problem! libOrg is designed very flexible and currently it defines an export format to HTML and LaTeX. And it is very easy to adopted, change or even create new export formats for libOrg.

Here is another example where a parsed org file is generated to a temporary file with the LaTeX exporter.

import io
with io.open( "out.tex" , "w" ) as fd:
    orgfile.generate( fd, emit = libOrg.LATEX )

I will provide more export formats in the future but currently the focus is only on the HTML and the LaTeX export format.

Org-mode Language Support

A fully list of all features is coming soon!

Example

In the var folder you can find a quick example org-mode file which was translated to HTML and LaTeX. Furthermore, the LaTeX file was compiled to a PDF file.

Copyright and License

The copyright holder of liborg is Philipp Paulweber (@ppaulweber) and the used license of libstdhl is a GNU GPLv3+ with an additional permission (“GPL Linking Exception”).

liborg's People

Contributors

ppaulweber 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.