summaryrefslogtreecommitdiff
path: root/docutils/core.py
Commit message (Collapse)AuthorAgeFilesLines
* moved responsibility for applying transforms from publisher towiemann2007-06-241-18/+1
| | | | | | Reader.read and Writer.write methods git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/subdocs@5266 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* do not support transforms for source and destination; this is unused, and ↵wiemann2007-06-231-2/+1
| | | | | | should be done by readers and writers git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/subdocs@5265 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* reverted r5032; breaks Python 2.2 compatibilitywiemann2007-03-211-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@5033 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* replaced 'raw_unicode_escape' with 'ascii', 'backslashreplace' so we don't ↵wiemann2007-03-211-1/+1
| | | | | | get latin1 strings git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@5032 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* fixed docstring of publish_from_doctree;wiemann2006-05-251-3/+3
| | | | | | see http://thread.gmane.org/gmane.text.docutils.user/2852 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4566 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* use $Id$ instead of $Date$ and $Revision$;wiemann2006-05-211-4/+2
| | | | | | | | collapsed Author and Contact fields; use canonical email addresses for David and Felix; (I have reviewed the diff) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4564 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added link to config.html to --help output;wiemann2006-02-281-1/+3
| | | | | | for "general" options: shortened --help output, added CLI index to config.txt git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4361 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* corrected r4199goodger2005-12-141-5/+6
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4208 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* always propagate exceptions when in doubt (when self.settings couldn't be ↵wiemann2005-12-131-2/+2
| | | | | | initialized) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4199 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* don't catch SystemExit exceptionsgoodger2005-12-071-1/+5
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4150 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* in ``Publisher.publish()``, expanded the generic top-level exception catchinggoodger2005-12-061-6/+7
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4148 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Merged "transforms" branch into trunk.wiemann2005-09-201-15/+3
| | | | | | | | | | | | | | | | - Replaced ``default_transforms`` attribute of TransformSpec with ``get_transforms()`` method. - Added universal.Decorations and universal.ExposeInternals transforms as default transforms for all readers. - Added universal.Messages and universal.FilterMessages transforms as default transforms for all writers. - Added ``ReReader`` base class for readers that reread an existing document tree. - Added ``UnfilteredWriter`` base class for writers that pass the document tree on unchanged. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3892 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* made _stylesheet_required setting default to 0,wiemann2005-08-241-6/+0
| | | | | | activating it in the rst2html.py front-end tool git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3830 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* moved document refurbishing logic to doctree reader;wiemann2005-07-081-16/+11
| | | | | | | added source_class argument to publish_parts; improved docstring git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3674 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* do not return parts dictionary in publish_from_doctree;wiemann2005-07-081-2/+1
| | | | | | | you could use publish_parts for that, I think, and returning a tuple unnecessarily complicates the interface git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3671 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* separated default (universal) transforms into two stages so that nowiemann2005-07-071-21/+34
| | | | | | | | | | | | transform is applied twice; do not delete document.transformer in publish_doctree (Martin, this may be important for the pickle writer -- you may need to delete document.transformer); regenerate reporter object unconditionally; do so in publish_from_doctree, not the doctree reader; added tests; I will post about all that on Docutils-develop in one or two days git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3663 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* better wrappinggoodger2005-07-031-2/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3650 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* deactivated _stylesheet_required for programmatic use; improved documentationwiemann2005-06-301-0/+6
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3642 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fixed bug with setting the writer in the publisher from doctree.blais2005-06-301-1/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3641 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* docstring update & parameter indent fixgoodger2005-06-291-9/+12
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3636 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* updated to support changes in revisions 3626-; revised ↵goodger2005-06-291-18/+14
| | | | | | ``publish_from_doctree`` API for consistency git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3632 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* do not double apply default transforms in publish_from_doctree;wiemann2005-06-271-0/+2
| | | | | | this does not look very clean... and there are still no tests which cover that behavior git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3614 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Pythonicized kwargs; further beautified --dump-transformsgoodger2005-06-271-1/+6
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3608 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added assert to get a helpful error message when passing thingswiemann2005-06-271-0/+6
| | | | | | like "writer='html'" to publish_* git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3606 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* beautified --dump-transforms outputwiemann2005-06-271-1/+1
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3605 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* moved Dummy reader and parser to readers/dummy.py and parsers/dummy.py, resp.;wiemann2005-06-271-38/+8
| | | | | | removed "restructuredtext" default for parser_name when initializing a reader git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3594 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* in DummyReader.read: restore doctree.reporter if necessary;wiemann2005-06-271-0/+4
| | | | | | | | otherwise things get a bit more complicated for pickling applications because new_reporter requires a fully set-up settings object, which is most conveniently created by the publish_* functions git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3593 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* fixed some docstringswiemann2005-06-271-2/+2
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3592 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* do not set reporter=None -- pickling is not the only use case;wiemann2005-06-271-18/+7
| | | | | | added documentation about doctree.settings object git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3591 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* make sure the Writer transforms get applied when calling publish_from_doctree;wiemann2005-06-271-17/+22
| | | | | | | | keep correct source_path; set correct doctree.settings object; I implemented all this blindly, without proper testing git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3590 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* publish_doctree now returns only the doctree, not an empty (useless)wiemann2005-06-261-49/+45
| | | | | | | "parts" dictionary; polished git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3587 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* oh, publish_doctree was not a duplicate... 8-)wiemann2005-06-261-6/+49
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3586 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* removed duplicate publish_doctree method;wiemann2005-06-261-54/+10
| | | | | | renamed publish_from_doctree to publish_doctree git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3585 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* removed unused "document" class variable of standalone and dummy readerwiemann2005-06-261-2/+0
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3583 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* polishedwiemann2005-06-261-28/+14
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3582 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* merge trunk/docutils@3525 branches/blais_interrupt_render/docutils@HEAD ↵wiemann2005-06-261-1/+131
| | | | | | trunk/docutils git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3581 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added Publisher.document object attribute, for direct access to the doctreegoodger2005-06-201-21/+24
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3520 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* docutils.__version_details__ renamed from .__version_suffix__goodger2005-06-011-3/+4
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3417 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* replaced references to the mailing lists with references to the newwiemann2005-05-281-1/+2
| | | | | | "mailing-lists" document git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3396 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* enable --dump-* options when --traceback specified; allows for easier debugginggoodger2005-02-261-0/+3
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2987 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* re-re-fixed encoding error message, cleanupwiemann2004-07-251-39/+30
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2455 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Replace version number sniffing with specific features sniffing.cben2004-07-251-7/+19
| | | | | | | | | | | | Also fix 2 bugs in `report_UnicodeError`: * Print the current encoding (was a ``%s``). * Don't crash before Python 2.3 where `UnicodeError` objects had no ``object`` or ``encoding`` attributes. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2450 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* xmlcharrefreplace backportwiemann2004-07-241-10/+10
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2448 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* extracted ``publish_programmatically`` settings code to ↵goodger2004-06-271-63/+129
| | | | | | ``Publisher.process_programmatic_settings``; updated docstrings git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2393 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Extracted common code from publish_file, publish_string, and publish_parts, ↵goodger2004-06-251-116/+72
| | | | | | into new publish_programmatically. In Publisher.publish, disabled ``settings_overrides`` when ``settings`` is supplied; redundant. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2384 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* return encoded string results from publish_* convenience functionsgoodger2004-06-211-7/+11
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2347 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Enabled traceback (exception propagation) by default in programmatic ↵goodger2004-06-031-1/+7
| | | | | | convenience functions. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2211 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Renamed "enable_exit" parameter of convenience functions to "enable_exit_status"goodger2004-06-031-15/+17
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2208 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* refactored: simplified Publisher.publish (exception handling & debug dumps)goodger2004-06-011-31/+27
| | | | git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2154 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* change to UnicodeError, which exists in Python 2.1 & 2.2 (UnicodeEncodeError ↵goodger2004-05-171-3/+3
| | | | | | is new in 2.3) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2118 929543f6-e4f2-0310-98a6-ba3bd3dd1d04