Giter Club home page Giter Club logo

pyorgmode's Introduction

**PyOrgMode is currently unmaintained, I do not use it anymore. It would benefit from a complete rewrite. There was no need for that stupid plugin architecture. Contact me if you are interested in getting it better, but I would really just recommend that it is just started from scratch with better practices of documentation, testing…**

PyOrgMode

PyOrgMode is a small python library able to do simple tasks with your org files. It allows you to generate org files or treat them in an automated fashion.

This project is not my top priority, but I’m more than happy to receive pull requests. Don’t worry, even if it takes some time, I go through all of them ;)

I’d like to thank all the people that contributes (see AUTHORS file).

Quick Start

Installation

Download the git repo and then install the package.

git clone https://github.com/bjonnh/PyOrgMode.git
cd PyOrgMode/
sudo python setup.py install

Import an Org-Mode file

Import PyOrgMode

import PyOrgMode

Create an Org data structure to hold the org-mode file.

base = PyOrgMode.OrgDataStructure()

Load the org-mode file.

base.load_from_file("test.org")

Create an org-mode file

Create an Org data structure to hold the org-mode file.

base = PyOrgMode.OrgDataStructure()

Create a new TODO item

new_todo = PyOrgMode.OrgNode.Element()
new_todo.heading = "I am a new todo item"
new_todo.tags=["things", "important"]
new_todo.level = 1
new_todo.todo = "TODO"

Add a scheduled item and a deadline to the item.

_sched = PyOrgMode.OrgSchedule()
_sched._append(new_todo, _sched.Element(scheduled="<2015-08-01 Sat 12:00-13:00>"))
_sched._append(new_todo, _sched.Element(deadline="<2015-08-01 Sat 12:00-13:00>"))

Create a logbook drawer

_props = PyOrgMode.OrgDrawer.Element("LOGBOOK")
# Add a properties drawer
_props.append(PyOrgMode.OrgDrawer.Element("- State \"SOMEDAY\"    from \"TODO\"     [2015-07-01 Wed 09:45]"))
# Append the properties to the new todo item
new_todo.append_clean(_props)

Create a properties drawer

_props = PyOrgMode.OrgDrawer.Element("PROPERTIES")
# Add a properties drawer
_props.append(PyOrgMode.OrgDrawer.Property("FRUITS", "pineapples"))
_props.append(PyOrgMode.OrgDrawer.Property("NAMES", "bob, sally"))
# Append the properties to the new todo item
new_todo.append_clean(_props)

Append the todo item to the base object

base.root.append_clean(new_todo)

Save the org object to a file

base.save_to_file("output.org")

Tools

Tangle (Export the files)

Documentation

Authors

Jonathan BISSON <firstname.lastname at bjonnh.net> : initiator of the project
Antti KAIHOLA <akaihol plus orgmode at ambitone dot com>
m3wolf (github)
bordercore (github)
wroberts (github)
gonvaled (github)
10nin (github)
CodeMonk (github)
midraal (github)
whacked (github)
maxandersen (github)
CodeMonk (github)
midraal (github)
Seamus Tuohy (@elationfoundation on github)
clemente (github)
kbarber2 (github)
sp1ff (github)
inducer (github)

pyorgmode's People

Contributors

bjonnh avatar gvol avatar clemente avatar cwittern avatar jakirkham avatar 10nin avatar gonvaled avatar bordercore avatar kbarber2 avatar inducer avatar akaihola avatar codemonk avatar gregoryhugaerts avatar lispandfound avatar jschueller avatar maxandersen avatar sp1ff avatar seamustuohy avatar

Watchers

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