Personal fork from https://github.com/gonvaled/PyOrgMode.git

Daniel Gonzalez (pegasus-mint) 0c04f973f4 Vesion bumped to 0.1, because 0.03c is a pre-relase according to pip and will not allow installing without the --pre flag 9 years ago
PyOrgMode 0c23c74814 Preparing to push to pypi, and bumped version to 0.03b (tag needed for the github tarball) 9 years ago
.gitignore 0c23c74814 Preparing to push to pypi, and bumped version to 0.03b (tag needed for the github tarball) 9 years ago
AUTHORS 0c23c74814 Preparing to push to pypi, and bumped version to 0.03b (tag needed for the github tarball) 9 years ago
ChangeLog a89f1f50e0 Version 0.03a (lot of changes see ChangeLog for details) 13 years ago
LICENSE b5899fc418 version 0.01a 13 years ago
README.org 0c23c74814 Preparing to push to pypi, and bumped version to 0.03b (tag needed for the github tarball) 9 years ago
TODO 0c23c74814 Preparing to push to pypi, and bumped version to 0.03b (tag needed for the github tarball) 9 years ago
setup.py 0c04f973f4 Vesion bumped to 0.1, because 0.03c is a pre-relase according to pip and will not allow installing without the --pre flag 9 years ago

README.org

#+BABEL: :comments no #+VERSION: 0.03a * PyOrgMode ** Tools [[elisp:org-babel-tangle][Tangle]] (Export the files) ** Documentation *** TODO TODO LIST [0/9] :PROPERTIES: :ID: 6d76f100-d4a8-44f3-8206-d5da6c095f78 :END: #+begin_src ascii :tangle TODO :exports code --- General - [ ] Add a documentation system (finding a way for html and pdf export ?) - [ ] Document every function correctly (docstrings) - [ ] Add some examples - [ ] Error/Warning managment - [ ] Check for other OS compatibility - [ ] TODO tags (and others) - [ ] Add more types of data (List…) #+end_src *** BUG LIST [0%] *** ChangeLog :PROPERTIES: :ID: b2c042e4-e1f4-49ed-8f0e-2b5f8671e080 :END: #+begin_src ascii :tangle ChangeLog :exports code 0.03a - External changes Objects (Schedule, Clock, Drawer, Table, Node) are now called OrgSchedule, OrgClock, OrgDrawer, OrgTable, OrgNode to avoid conflicts OrgSchedule: Added the support for combo lines (SCHEDULED+DEADLINE+CLOSED) OrgClock: Now uses the new OrgDate class DataStructure is now called OrgDataStructure - Internal changes Restructuration of the .org tangling-file (Document, Code and Tests sections for each kind of class) Restructuration of Plugin and Elements system (mainly to keep the indentation) OrgDate: A new class for managing date and times (and active/inactive time-date formats) Included the patch from KAIHOLA Antti about a wrong parenting bug - Documentation Added some details about functions (a lot of work remains) - Tests Added the test from KAIHOLA Antti for the parser Added the different test tools from KAIGOLA Antti (like test_simple-agenda updated to use unittest) - Python compliance Added the minimal setup file of KAIHOLA Antti 0.02b - External changes Added the patch from KAIHOLA Antti about time format. 0.02a - External changes Added a Clock plugin in order to manage CLOCK: elements Thank to "siberianlaika" for the idea Added a TYPE attribute to the different OrgPlugins elements Maybe we should find a more practical way than this one Removed some debug "prints" Indentation problem that causes wrong reparenting Thanks to Matthew Robison for his patch Added a append_clean function to Node class This function is used to add a tree to a node A call to reparent_cleanlevels is done at the end Added reparent_cleanlevels to Node class This function reparent all the elements. Using a content to parent way of doing. It checks the content of the first element (call it E), and set the parent of each E-childs to E. This is really useful when moving one tree to another place. Loading the default plugins in the Node class init. This avoids to do it in the load_from_file (which was a bad idea). Added a new example using the TYPE attribute and append_clean. 0.01j - External changes Added load_plugin function to DataStructure 0.01i - Internal changes Renamed Plugin class to OrgPlugin Added close function to plugins Adding Table cells subdivision (easier editing) - PyOrgMode.org Structure change Added test.py in the document 0.01h - Internal changes Added Plugin system (simplifying the main loop of DataStructure) The DataStructure class is now an OrgElement - External changes Node,Table,Drawer and Schedule are now plugins. Their object method is now joined by PluginName.Element - New elements Added Table element (as a Plugin) 0.01g - Changed elements Node : Added priority management 0.01f - New elements Added Schedule element for 'DEADLINE: and 'SCHEDULED: - Optimizations Class DataStructure : Trying to simplify the Reg exps #+end_src *** Authors #+srcname: authors #+begin_src ascii :tangle AUTHORS :exports code Jonathan BISSON : initiator of the project Antti KAIHOLA m3wolf Will Roberts #+end_src ** Code *** License :PROPERTIES: :ID: 31a46da7-f49b-4826-9c46-1513054f6202 :END: #+srcname: license_comments #+begin_src python :tangle PyOrgMode.py :exports code # -*- encoding: utf-8 -*- ############################################################################## # # PyOrgMode, a python module for treating with orgfiles # Copyright (C) 2010 Jonathan BISSON (bissonjonathan on the google thing). # All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ############################################################################## #+end_src *** Setup **** Code :PROPERTIES: :ID: ce230397-f460-4184-954c-ddc19f365256 :END: #+srcname: setup.org #+begin_src python :tangle setup.py :exports code from setuptools import setup setup( name='PyOrgMode', version='0.03a', py_modules=['PyOrgMode'], ) #+end_src *** Imports :PROPERTIES: :ID: 5fa2a7a6-476a-43c2-81f4-0fee4ee86fe2 :END: #+srcname: imports #+begin_src python :tangle PyOrgMode.py :exports code """ The PyOrgMode class is able to read,modify and create orgfiles. The internal representation of the file allows the use of orgfiles easily in your projects. """ import re import string import copy import time #+end_src *** Class OrgDate **** Documentation ***** TODO-LIST :PROPERTIES: :ID: bfedf310-51ec-4c51-a193-aaf36e3a7ea7 :END: #+begin_src ascii :tangle TODO :exports code --- Class OrgDate - [ ] Must support locale (conversion for example) - [ ] Must support empty initialisation - [ ] Must use data validation - [ ] Must support recurrent events (+1w …) #+end_src **** Code :PROPERTIES: :ID: c420b975-747f-448a-bdc4-6454f9ffaea6 :END: #+srcname: class_OrgDate #+begin_src python :tangle PyOrgMode.py :exports code class OrgDate: """Functions for date management""" format = 0 TIMED = 1 DATED = 2 WEEKDAYED = 4 ACTIVE = 8 INACTIVE = 16 RANGED = 32 REPEAT = 64 # TODO: Timestamp with repeater interval DICT_RE = {'start': '[[<]', 'end': '[]>]', 'date': '([0-9]{4})-([0-9]{2})-([0-9]{2})(\s+([\w]+))?', 'time': '([0-9]{2}):([0-9]{2})', 'repeat': '[\+\.]{1,2}\d+[dwmy]'} def __init__(self,value=None): """ Initialisation of an OrgDate element. """ if value != None: self.set_value(value) def parse_datetime(self, s): """ Parses an org-mode date time string. Returns (timed, weekdayed, time_struct, repeat). """ search_re = '(?P{date})(\s+(?P