summaryrefslogtreecommitdiff
path: root/giscanner/docmain.py
Commit message (Collapse)AuthorAgeFilesLines
* Drop all Python 2 compat codeChristoph Reiter2018-12-081-5/+0
| | | | We only support 3.4+ now.
* g-ir-doc-tool: keep mallard as the default formatChristoph Reiter2018-08-171-1/+1
| | | | | In 7f67146d8254 the FORMAT list was extended but the argparser uses the first item as default value. This broke distcheck.
* tests: depend on flake8 instead of including pep8/pyflakesChristoph Reiter2018-08-151-1/+0
| | | | | | | | | | | | | | | | g-i includes an old version of pep8 and pyflakes and uses that during "make check". It (1) doesn't catch all cases newer versions of pycodestyle/pyflakes catch and (2) doesn't test all Python files (3) doesn't work with meson. Instead of updating just remove them and depend on flake8 instead. To run the checks simply run flake8 in the root dir. This also makes it possible to run those checks when using meson and not autotools. To not get test suite failures on flake8 updates move the checks from "make check" to an extra "make check.quality" target.
* Convert FORMATS to tuple.rockon9992018-08-061-1/+1
|
* doctool: Output formatter for DevDocsPhilip Chimento2018-08-061-1/+1
| | | | | | | In order to generate HTML output that DevDocs can easily scrape and display, we add a new output format to g-ir-doc-tool (--format=devdocs). It works similarly to the Mallard output format, but generates very simple HTML instead. We add a new set of Mako templates to generate this output.
* docwriter: Option to select output formatPhilip Chimento2018-08-061-0/+3
| | | | | | | | | For generating other output formats such as DevDocs-ready HTML, we add an output format option (-f). The default output format is "mallard" which leaves the existing behaviour unchanged. We can fold the existing --write-sections-file option into the new output format option, as a new "sections" format.
* docwriter: Option to select output formatPhilip Chimento2018-05-251-4/+10
| | | | | | | | | | | For generating other output formats such as DevDocs-ready HTML, we add an output format option (-f). The default output format is "mallard" which leaves the existing behaviour unchanged. We can fold the existing --write-sections-file option into the new output format option, as a new "sections" format. Closes #134.
* Add --version option to Python based tools.Tomasz Miąsko2018-04-261-1/+4
| | | | | | | | | | | | | Version file is generated at build time and stored as _version.py. To support running uninstalled tools, a fallback version is included as well. Example output of `--version` option: ``` $ for t in g-ir-{annotation-tool,scanner,doc-tool}; do $t --version; done g-ir-annotation-tool 1.57.1 g-ir-scanner 1.57.1 g-ir-doc-tool 1.57.1 ```
* giscanner: Use unicode literals in all Python filesSimon Feltman2015-09-291-0/+1
| | | | | | | | | | | | Add unicode_literals future import which turns any string literal into a unicode string. Return unicode strings from the Python C extension module. Force writing of annotations (g-ir-annotation-tool) to output utf8 encoded data to stdout. This is an initial pass at following the "unicode sandwich" model of programming (http://nedbatchelder.com/text/unipain.html) needed for supporting Python 3. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use print as a function for Python 3 compatibilitySimon Feltman2015-09-291-0/+1
| | | | | | | Use future import "print_function" and update relevant uses of print as a function call. See: PEP 3105 https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Enable "true division" for all Python filesSimon Feltman2015-09-291-0/+1
| | | | | | | | | | Import Python 3 compatible "true division" from the future (PEP 238). This changes the Python 2 classic division which uses floor division on integers to true division. Verfied we don't actually use the division operator anywhere in the code base so this a safety for supporting both Python 2 and 3. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use absolute_import for all Python filesSimon Feltman2015-09-291-0/+2
| | | | | | Use absolute_import to ensure Python 3 compatibility of the code base. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* scanner: use open() as os.fdopen as context managersDieter Verfaillie2015-08-211-3/+2
| | | | | | Ensures files are correctly and immediately closed. https://bugzilla.gnome.org/show_bug.cgi?id=751926
* docmain: port to using argparse.Mathieu Duponchelle2015-06-171-17/+15
| | | | optparse is deprecated.
* giscanner: Add a simple automatic sections file generatorJasper St. Pierre2013-06-161-2/+13
| | | | | | | | | This is a very basic sections file generator, and isn't too smart. It's simply intended to be a base to build docs on, and will be used if the user doesn't provide a sections file when calling g-ir-doc-tool, for convenience purposes. https://bugzilla.gnome.org/show_bug.cgi?id=699856
* tests: Update misc/pep8.py to 1.4.5Dieter Verfaillie2013-05-071-0/+1
| | | | | | | | | | | | | | | | | Version in our tree is a wee bit outdated. For example, later work will introduce an utf8 encoded python source file which our old pep8.py does not yet understand (yeah, it really was *that* ancient)... Updated from: https://raw.github.com/jcrocholl/pep8/1.4.5/pep8.py Takes 552c1f1525e37a30376790151c1ba437776682c5, f941537d1c0a40f0906490ed160db6c79af572d3, 5a4afe2a77d0ff7d9fea13dd93c3304a6ca993de and a17f157e19bd6792c00321c8020dca5e5a281f45 into account... https://bugzilla.gnome.org/show_bug.cgi?id=699535
* doctool: Switch default language to CColin Walters2013-02-261-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=694593
* docmain: Create the output dir for us if it doesn't existJasper St. Pierre2013-02-151-2/+0
|
* docmain: Support an include path for GIRsJasper St. Pierre2013-02-111-0/+4
| | | | | We need this to replace the test infrastructure so it can find Utility-1.0.gir
* doctool: Rebrand mallardwriter as docwriterJasper St. Pierre2013-02-011-2/+2
| | | | | We eventually want to stop using Mallard as a documentation language. Rationale incoming when I convert all templates back to DocBook.
* giscanner: Fix make check issuesJasper St. Pierre2012-08-291-1/+1
| | | | Whoops.
* docmain: Fix error messageJasper St. Pierre2012-08-281-1/+1
|
* g-ir-doc-tool: Change the -o option to receive a directoryTomeu Vizoso2012-02-201-1/+3
|
* g-ir-doctool: Move to Mako templates for generating MallardTomeu Vizoso2012-02-171-45/+8
| | | | Also removes the docbook writer
* giscanner: Allow passing additional include dirs when parsing a girTomeu Vizoso2011-08-151-1/+8
|
* giscanner/mallardwriter: Adding experimental Mallard output to g-ir-doc-toolShaun McCance2011-08-151-7/+17
|
* g-ir-doc-tool: Add -expected test for Python docbookTomeu Vizoso2011-08-151-1/+14
|
* [docbook] Make DocBookWriter use TransformerLaszlo Pandy2011-08-111-5/+3
|
* [docbook] fix exception when there is no ctype.Laszlo Pandy2011-08-111-3/+2
|
* WIP doctoolJohan Dahlin2011-08-111-0/+66
https://bugzilla.gnome.org/show_bug.cgi?id=625494