summaryrefslogtreecommitdiff
path: root/docutils/frontend.py
Commit message (Collapse)AuthorAgeFilesLines
* docutils-cli.py: Read settings from standard configuration files.milde2021-10-191-3/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8858 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Change default value for the "auto_id_prefix" setting to "%".milde2021-06-181-1/+1
| | | | | | | Auto-generated IDs use the tag name as prefix. Set auto_id_prefix_ to "id" if you want unchanged auto-IDs. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8771 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Minor code and documentation cleanup.milde2021-04-081-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8676 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Provide fallbacks for parser config settings.milde2021-04-071-1/+8
| | | | | | | | | | | | | | | | | | | | | Some 3rd party applications fail with AttributeError due to missing values in the document.settings object. a) because they don't follow the requirement documented in utils.new_document: If you will use the document object with any Docutils components, you must provide their default settings as well. b) because they may provide a hard-coded set missing new settings. This should fix bug #415 and https://github.com/readthedocs/recommonmark/issues/220. See also the sphinx issue with Docutils 0.13.1 https://github.com/sphinx-doc/sphinx/issues/3951. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8671 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Documentation update.milde2020-12-011-4/+4
| | | | | | | | | Restructuring, New input, and fixed links for TODO list item "Adaptable file extensions". Update/fix some source comments. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8583 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Call correct version of 'getcwd(u)'milde2019-12-131-1/+1
| | | | | | | | This appears to have been introduced when the patch was applied. Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8439 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* trivial: Misc whitespace fixesmilde2019-08-271-1/+1
| | | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8376 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* py3: Handle 'os.getcwdu' to 'os.getcwd' renamemilde2019-08-271-1/+3
| | | | | | | | We don't need to do the reverse since none of the callers seems to care. Based on patch by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8374 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Formatting changes to facilitate integration of "py3" patchset.milde2019-08-271-3/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8367 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Handle 'ConfigParser' to 'configparser' rename.milde2019-08-261-5/+9
| | | | | | Based on a patch by Stephen Finucane. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8364 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Consistent Python 3 checks.milde2019-08-261-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8360 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* py3: Replace deprecated form of raising exceptionmilde2019-08-261-15/+10
| | | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8353 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* py3: Add aliases for removed symbolsmilde2019-08-261-0/+3
| | | | | | | | | | Add aliases for symbols that have been removed in Python 3.x, namely basestring, unicode, unichr and StandardError. Signed-off-by: Stephen Finucane <stephen@that.guru> small fixes by Günter Milde. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8348 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* py3: Switch to 'except foo as bar' syntaxmilde2019-08-261-4/+4
| | | | | | | | This is the only form supported in Python 3.x. Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8347 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Drop support for Python 3.3milde2019-08-261-1/+1
| | | | | | | | | | This doesn't involve a whole lot of changes, but references to Python 3.3 (plus some to the already removed Python 2.6) are removed and 'setup.py' is updated as necessary. Signed-off-by: Stephen Finucane <stephen@that.guru> git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8338 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Add test for __version_info__, fix output of optional __version_details__.milde2017-06-231-2/+4
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8126 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Add "smartquotes-locales" setting.milde2017-05-081-3/+39
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8068 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Unify/simplify type testing in "validate_*_list".milde2013-01-011-11/+6
| | | | | | | Circumvent the problem that the value may be "unicode" or "str" by testing for "not a list". git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7584 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix: 3598893 --stylesheet and --stylesheet-path options broken, patch ↵grubert2012-12-311-7/+5
| | | | | | partially applied git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7583 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* TODO for BUG: 3598893 --stylesheet/path brokengrubert2012-12-311-0/+6
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7582 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* fix typogrubert2012-12-311-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7580 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Use True/False for booleans. frontend.validate_ternary() returns True/False ↵milde2012-11-261-7/+5
| | | | | | or value. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7539 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New setting validators, code cleanup.milde2012-10-121-19/+55
| | | | | | (validate_comma_separated_string_list, validate_ternary) git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7526 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* math, error_reporting, and urischemes moved to the utils package. milde2012-06-251-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7464 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix [ 3481980 ] Use os.getcwdu() in make_paths_absolute().milde2012-02-031-3/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7339 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix parsing of lists from config files.milde2011-11-221-4/+6
| | | | | | | | The "strip-classes" and "strip-elements-with-classes" settings expect a list but did not convert values given in a config file - making it impossible to use them in a config file. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7224 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Work around encoding problems in Py3k. Fixes [ 3395948 ]milde2011-10-201-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7196 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix deprecation warning with Python 3.2milde2011-07-051-1/+4
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7071 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New sub-module and test suite for error reporting.milde2011-05-191-6/+7
| | | | | | | | * Code to handle encoding/decoding errors when reporting exceptions. * Test and fix error reporting with problematic locale settings. (https://bugs.gentoo.org/show_bug.cgi?id=349101) git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7037 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* fix and re-organize error printing to sys.stderrmilde2011-05-101-20/+7
| | | | | | | | | | New class docutils.io.ErrorOutput: Wrapper class for file-like error streams with failsave de- and encoding of `str`, `bytes`, `unicode` and `Exception` instances. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7030 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix 3149845 (patch by Toshio Kuratomi)milde2011-05-061-5/+5
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7029 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix: failsafe encoding of unicode strings before writing to sys.stderrmilde2011-05-061-1/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7027 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* More robust guess of input/output encoding.milde2011-05-041-4/+17
| | | | | | | | The locale encoding is stored as `frontend.locale_encoding` and used in command line parsing and `default_error_encoding` before falling back to "ascii". git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7023 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Code cleanup (removing pre 2.3 compatibility code)milde2011-05-041-6/+0
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@7022 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Handle language codes according to BCP 47 milde2010-09-171-1/+1
| | | | | | | | | | | | | (Best Current Praxis: Tags for Identifying Languages). Normalize language tags: downcase, - to _, optional subtags. E.g. Given "de-AT-1901", look for language modules "de_at_1901", "de_at", "de_1901", and "de" TODO: warn (instead of fail), if no module found. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@6423 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* fix typomilde2009-11-301-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@6205 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* filter_settings_spec() now also allows to replace option specificationsmilde2009-11-131-9/+20
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@6195 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* New function filte_settings_spec milde2009-11-111-6/+20
| | | | | | | | | Return a copy of `setting_spec` excluding the specified settings. Remove test ``if hasattr(codecs, "backslashreplace_errors")`` as this is always True for Python >= 2.3. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@6192 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Drop extras/optparse.py and extras/textwrap.py (stdlib modules since 2.3).milde2009-10-051-6/+2
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@6154 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix [ 2821266 ] --strict option works now like --halt=info.milde2009-09-171-1/+1
| | | | | | | | Use the level number (1) instead of the name ("info") as constant. The name -> level conversion is done by the validate_threshold validator not used in this option. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@6133 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Fix [ 2781629 ] support non-ASCII chars in file names.milde2009-09-101-7/+14
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@6120 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Prepare for python 3.0: minimize "types" module where possible (gbrandl).grubert2008-11-301-5/+4
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@5738 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Merged abolish-userstring-haskey r5609:5616 to trunk.strank2008-07-281-4/+4
| | | | | | Backwards compatible changes for easier transition to py3.0. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@5618 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added warking on --strip-* optionsgoodger2008-01-141-1/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@5502 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* added Python version infogoodger2008-01-141-2/+3
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@5498 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Added ``--strip-elements-with-class`` and ``--strip-class`` options ↵goodger2007-02-121-2/+27
| | | | | | (``strip_elements_with_classes`` and ``strip_classes`` settings) and ``StripClassesAndElements`` transform. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@4913 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* correct faulty setting definitions & add test; 0.4 backport candidategoodger2006-11-121-4/+2
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@4802 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* record paths of applied configuration files in _config_files runtime settinggoodger2006-11-061-2/+18
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@4798 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
* Added a kludge to allow publishing from within mod_python.blais2006-06-251-1/+13
| | | | git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@4638 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: https://svn.code.sf.net/p/docutils/code/trunk/docutils@4564 929543f6-e4f2-0310-98a6-ba3bd3dd1d04