Coder Social home page Coder Social logo

organic.el's Introduction

Organic.el is a command line interface for Emacs Org-mode. It is implemented as a Emacs Lisp script that processes Org-mode files specified in the command line. Currently it provides an ability to export, publish and execute Org-mode files.

The following commands convert the README file to the supported formats.

org init                               # init packages in build directory
org export -o latex -O pdf README.org  # export to PDF
org export -o latex README.org         # export to LaTeX
org export -o odt README.org           # export to ODT
org export -o md README.org            # export to Markdown
org export -o html README.org          # export to HTML
org export -o txt README.org           # export to plain text

Organic.el uses repository-local configuration to fetch the packages and configure Emacs. File .org/packages.el contains package-agnostic configuration and is used to list packages that are required to build and export your Org-mode file. Here is an example (and the default) file.

; list the packages you want
(setq package-list '(org org-plus-contrib org-ref htmlize gnuplot))
; list the repositories containing them
(setq package-archives '(("elpa" . "https://tromey.com/elpa/")
                         ("gnu" . "https://elpa.gnu.org/packages/")
                         ("melpa" . "https://melpa.org/packages/")
                         ("org" . "https://orgmode.org/elpa/")))

File .org/config.el contains Org-mode specific configuration that is used to tune build and export options. This repository contains a rather long example of it. In this file you can also define your own conversion functions. Here is the default function that converts from LaTeX to PDF.

(defun org-export/latex->pdf (file build-directory)
  (message
    (shell-command-to-string
      (mapconcat
        'identity
        (list "env max_print_line=1000 texfot --no-stderr --quiet"
              "latexmk -8bit -interaction=nonstopmode -pdf -xelatex -bibtex -shell-escape"
              (concat "-output-directory=" build-directory)
              "-f" file)
        " ")))
  (delete-file file))

organic.el's People

Stargazers

phasmid avatar

Watchers

James Cloos avatar Ivan Gankevich 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.