pygments.rb 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +40 -0
- data/README.md +3 -0
- data/lexers +0 -0
- data/lib/pygments/popen.rb +3 -2
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +2 -1
- data/vendor/pygments-main/AUTHORS +20 -1
- data/vendor/pygments-main/CHANGES +55 -3
- data/vendor/pygments-main/LICENSE +1 -1
- data/vendor/pygments-main/MANIFEST.in +1 -1
- data/vendor/pygments-main/Makefile +5 -8
- data/vendor/pygments-main/REVISION +1 -1
- data/vendor/pygments-main/doc/Makefile +153 -0
- data/vendor/pygments-main/doc/_static/favicon.ico +0 -0
- data/vendor/pygments-main/doc/_static/logo_new.png +0 -0
- data/vendor/pygments-main/doc/_static/logo_only.png +0 -0
- data/vendor/pygments-main/doc/_templates/docssidebar.html +3 -0
- data/vendor/pygments-main/doc/_templates/indexsidebar.html +25 -0
- data/vendor/pygments-main/doc/_themes/pygments14/layout.html +98 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/bodybg.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/docbg.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/listitem.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/logo.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/pocoo.png +0 -0
- data/vendor/pygments-main/doc/_themes/pygments14/static/pygments14.css_t +401 -0
- data/vendor/pygments-main/doc/_themes/pygments14/theme.conf +15 -0
- data/vendor/pygments-main/doc/conf.py +249 -0
- data/vendor/pygments-main/doc/docs/api.rst +316 -0
- data/vendor/pygments-main/doc/docs/authors.rst +4 -0
- data/vendor/pygments-main/doc/docs/changelog.rst +1 -0
- data/vendor/pygments-main/{docs/src/cmdline.txt → doc/docs/cmdline.rst} +9 -11
- data/vendor/pygments-main/{docs/src/filterdevelopment.txt → doc/docs/filterdevelopment.rst} +1 -1
- data/vendor/pygments-main/{docs/src/filters.txt → doc/docs/filters.rst} +4 -5
- data/vendor/pygments-main/{docs/src/formatterdevelopment.txt → doc/docs/formatterdevelopment.rst} +1 -1
- data/vendor/pygments-main/{docs/src/formatters.txt → doc/docs/formatters.rst} +6 -6
- data/vendor/pygments-main/doc/docs/index.rst +66 -0
- data/vendor/pygments-main/{docs/src/integrate.txt → doc/docs/integrate.rst} +3 -7
- data/vendor/pygments-main/{docs/src/java.txt → doc/docs/java.rst} +0 -0
- data/vendor/pygments-main/{docs/src/lexerdevelopment.txt → doc/docs/lexerdevelopment.rst} +13 -14
- data/vendor/pygments-main/{docs/src/lexers.txt → doc/docs/lexers.rst} +7 -5
- data/vendor/pygments-main/{docs/src/moinmoin.txt → doc/docs/moinmoin.rst} +0 -0
- data/vendor/pygments-main/{docs/src/plugins.txt → doc/docs/plugins.rst} +0 -0
- data/vendor/pygments-main/{docs/src/quickstart.txt → doc/docs/quickstart.rst} +22 -19
- data/vendor/pygments-main/{docs/src/rstdirective.txt → doc/docs/rstdirective.rst} +0 -0
- data/vendor/pygments-main/{docs/src/styles.txt → doc/docs/styles.rst} +2 -2
- data/vendor/pygments-main/{docs/src/tokens.txt → doc/docs/tokens.rst} +10 -7
- data/vendor/pygments-main/{docs/src/unicode.txt → doc/docs/unicode.rst} +8 -7
- data/vendor/pygments-main/doc/download.rst +41 -0
- data/vendor/pygments-main/doc/faq.rst +143 -0
- data/vendor/pygments-main/doc/index.rst +53 -0
- data/vendor/pygments-main/doc/languages.rst +151 -0
- data/vendor/pygments-main/doc/make.bat +190 -0
- data/vendor/pygments-main/{docs → doc}/pygmentize.1 +0 -0
- data/vendor/pygments-main/external/autopygmentize +65 -48
- data/vendor/pygments-main/external/markdown-processor.py +15 -15
- data/vendor/pygments-main/external/moin-parser.py +1 -1
- data/vendor/pygments-main/external/rst-directive.py +2 -3
- data/vendor/pygments-main/ez_setup.py +340 -234
- data/vendor/pygments-main/pygments/__init__.py +4 -4
- data/vendor/pygments-main/pygments/cmdline.py +81 -68
- data/vendor/pygments-main/pygments/console.py +1 -1
- data/vendor/pygments-main/pygments/filter.py +1 -1
- data/vendor/pygments-main/pygments/filters/__init__.py +11 -9
- data/vendor/pygments-main/pygments/formatter.py +3 -3
- data/vendor/pygments-main/pygments/formatters/__init__.py +5 -3
- data/vendor/pygments-main/pygments/formatters/_mapping.py +16 -5
- data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
- data/vendor/pygments-main/pygments/formatters/html.py +44 -26
- data/vendor/pygments-main/pygments/formatters/img.py +21 -14
- data/vendor/pygments-main/pygments/formatters/latex.py +104 -12
- data/vendor/pygments-main/pygments/formatters/other.py +53 -6
- data/vendor/pygments-main/pygments/formatters/rtf.py +30 -16
- data/vendor/pygments-main/pygments/formatters/svg.py +2 -2
- data/vendor/pygments-main/pygments/formatters/terminal.py +41 -1
- data/vendor/pygments-main/pygments/formatters/terminal256.py +2 -2
- data/vendor/pygments-main/pygments/lexer.py +59 -39
- data/vendor/pygments-main/pygments/lexers/__init__.py +38 -15
- data/vendor/pygments-main/pygments/lexers/_asybuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_clbuiltins.py +15 -15
- data/vendor/pygments-main/pygments/lexers/_cocoabuiltins.py +73 -0
- data/vendor/pygments-main/pygments/lexers/_lassobuiltins.py +11 -1
- data/vendor/pygments-main/pygments/lexers/_luabuiltins.py +14 -8
- data/vendor/pygments-main/pygments/lexers/_mapping.py +81 -30
- data/vendor/pygments-main/pygments/lexers/_openedgebuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_phpbuiltins.py +1067 -95
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +7 -7
- data/vendor/pygments-main/pygments/lexers/_robotframeworklexer.py +5 -4
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py +12 -7
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +112 -18
- data/vendor/pygments-main/pygments/lexers/_vimbuiltins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/agile.py +644 -382
- data/vendor/pygments-main/pygments/lexers/asm.py +66 -29
- data/vendor/pygments-main/pygments/lexers/compiled.py +1643 -174
- data/vendor/pygments-main/pygments/lexers/dalvik.py +27 -6
- data/vendor/pygments-main/pygments/lexers/dotnet.py +45 -33
- data/vendor/pygments-main/pygments/lexers/foxpro.py +3 -3
- data/vendor/pygments-main/pygments/lexers/functional.py +1510 -570
- data/vendor/pygments-main/pygments/lexers/graph.py +81 -0
- data/vendor/pygments-main/pygments/lexers/hdl.py +29 -30
- data/vendor/pygments-main/pygments/lexers/inferno.py +96 -0
- data/vendor/pygments-main/pygments/lexers/jvm.py +622 -207
- data/vendor/pygments-main/pygments/lexers/math.py +438 -70
- data/vendor/pygments-main/pygments/lexers/other.py +885 -171
- data/vendor/pygments-main/pygments/lexers/parsers.py +24 -24
- data/vendor/pygments-main/pygments/lexers/qbasic.py +157 -0
- data/vendor/pygments-main/pygments/lexers/rdf.py +99 -0
- data/vendor/pygments-main/pygments/lexers/shell.py +28 -25
- data/vendor/pygments-main/pygments/lexers/special.py +7 -8
- data/vendor/pygments-main/pygments/lexers/sql.py +56 -23
- data/vendor/pygments-main/pygments/lexers/templates.py +377 -59
- data/vendor/pygments-main/pygments/lexers/text.py +208 -46
- data/vendor/pygments-main/pygments/lexers/web.py +729 -264
- data/vendor/pygments-main/pygments/modeline.py +1 -1
- data/vendor/pygments-main/pygments/plugin.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +1 -1
- data/vendor/pygments-main/pygments/sphinxext.py +153 -0
- data/vendor/pygments-main/pygments/style.py +3 -2
- data/vendor/pygments-main/pygments/styles/__init__.py +5 -1
- data/vendor/pygments-main/pygments/styles/autumn.py +1 -1
- data/vendor/pygments-main/pygments/styles/borland.py +1 -1
- data/vendor/pygments-main/pygments/styles/bw.py +1 -1
- data/vendor/pygments-main/pygments/styles/colorful.py +1 -1
- data/vendor/pygments-main/pygments/styles/default.py +1 -1
- data/vendor/pygments-main/pygments/styles/emacs.py +1 -1
- data/vendor/pygments-main/pygments/styles/friendly.py +1 -1
- data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
- data/vendor/pygments-main/pygments/styles/igor.py +29 -0
- data/vendor/pygments-main/pygments/styles/manni.py +1 -1
- data/vendor/pygments-main/pygments/styles/monokai.py +4 -4
- data/vendor/pygments-main/pygments/styles/murphy.py +1 -1
- data/vendor/pygments-main/pygments/styles/native.py +1 -1
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +125 -0
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +125 -0
- data/vendor/pygments-main/pygments/styles/pastie.py +1 -1
- data/vendor/pygments-main/pygments/styles/perldoc.py +1 -1
- data/vendor/pygments-main/pygments/styles/rrt.py +1 -1
- data/vendor/pygments-main/pygments/styles/tango.py +1 -1
- data/vendor/pygments-main/pygments/styles/trac.py +1 -1
- data/vendor/pygments-main/pygments/styles/vim.py +1 -1
- data/vendor/pygments-main/pygments/styles/vs.py +1 -1
- data/vendor/pygments-main/pygments/styles/xcode.py +51 -0
- data/vendor/pygments-main/pygments/token.py +4 -1
- data/vendor/pygments-main/pygments/unistring.py +6 -5
- data/vendor/pygments-main/pygments/util.py +35 -21
- data/vendor/pygments-main/scripts/check_sources.py +28 -44
- data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +5 -4
- data/vendor/pygments-main/scripts/find_codetags.py +27 -19
- data/vendor/pygments-main/scripts/find_error.py +16 -13
- data/vendor/pygments-main/scripts/get_vimkw.py +3 -3
- data/vendor/pygments-main/scripts/vim2pygments.py +9 -7
- data/vendor/pygments-main/setup.py +19 -19
- data/vendor/pygments-main/tests/examplefiles/99_bottles_of_beer.chpl +118 -0
- data/vendor/pygments-main/tests/examplefiles/Error.pmod +38 -0
- data/vendor/pygments-main/tests/examplefiles/FakeFile.pike +360 -0
- data/vendor/pygments-main/tests/examplefiles/{ANTLRv3.g → antlr_ANTLRv3.g} +0 -0
- data/vendor/pygments-main/tests/examplefiles/clojure-weird-keywords.clj +5 -0
- data/vendor/pygments-main/tests/examplefiles/core.cljs +52 -0
- data/vendor/pygments-main/tests/examplefiles/demo.cfm +13 -1
- data/vendor/pygments-main/tests/examplefiles/demo.hbs +12 -0
- data/vendor/pygments-main/tests/examplefiles/ember.handlebars +33 -0
- data/vendor/pygments-main/tests/examplefiles/example.als +217 -0
- data/vendor/pygments-main/tests/examplefiles/example.c +1 -1
- data/vendor/pygments-main/tests/examplefiles/example.chai +6 -0
- data/vendor/pygments-main/tests/examplefiles/example.coffee +27 -0
- data/vendor/pygments-main/tests/examplefiles/example.e +124 -0
- data/vendor/pygments-main/tests/examplefiles/example.f90 +8 -0
- data/vendor/pygments-main/tests/examplefiles/example.feature +16 -0
- data/vendor/pygments-main/tests/examplefiles/example.gd +23 -0
- data/vendor/pygments-main/tests/examplefiles/example.gi +64 -0
- data/vendor/pygments-main/tests/examplefiles/example.groovy +2 -0
- data/vendor/pygments-main/tests/examplefiles/example.hs +27 -0
- data/vendor/pygments-main/tests/examplefiles/example.hx +44 -1
- data/vendor/pygments-main/tests/examplefiles/example.i6t +32 -0
- data/vendor/pygments-main/tests/examplefiles/example.i7x +45 -0
- data/vendor/pygments-main/tests/examplefiles/example.inf +374 -0
- data/vendor/pygments-main/tests/examplefiles/example.j +564 -0
- data/vendor/pygments-main/tests/examplefiles/example.java +16 -0
- data/vendor/pygments-main/tests/examplefiles/example.kal +75 -0
- data/vendor/pygments-main/tests/examplefiles/example.liquid +42 -0
- data/vendor/pygments-main/tests/examplefiles/example.ma +8 -0
- data/vendor/pygments-main/tests/examplefiles/example.mq4 +187 -0
- data/vendor/pygments-main/tests/examplefiles/example.mqh +123 -0
- data/vendor/pygments-main/tests/examplefiles/example.ni +57 -0
- data/vendor/pygments-main/tests/examplefiles/example.nix +80 -0
- data/vendor/pygments-main/tests/examplefiles/example.pp +8 -0
- data/vendor/pygments-main/tests/examplefiles/example.red +257 -0
- data/vendor/pygments-main/tests/examplefiles/example.reds +150 -0
- data/vendor/pygments-main/tests/examplefiles/example.rkt +677 -29
- data/vendor/pygments-main/tests/examplefiles/example.sh +22 -0
- data/vendor/pygments-main/tests/examplefiles/example.slim +31 -0
- data/vendor/pygments-main/tests/examplefiles/example.sls +51 -0
- data/vendor/pygments-main/tests/examplefiles/example.stan +2 -0
- data/vendor/pygments-main/tests/examplefiles/example.todotxt +9 -0
- data/vendor/pygments-main/tests/examplefiles/exampleScript.cfc +241 -0
- data/vendor/pygments-main/tests/examplefiles/exampleTag.cfc +18 -0
- data/vendor/pygments-main/tests/examplefiles/example_elixir.ex +192 -350
- data/vendor/pygments-main/tests/examplefiles/hash_syntax.rb +5 -0
- data/vendor/pygments-main/tests/examplefiles/hello.at +6 -0
- data/vendor/pygments-main/tests/examplefiles/hello.golo +5 -0
- data/vendor/pygments-main/tests/examplefiles/hello.lsl +12 -0
- data/vendor/pygments-main/tests/examplefiles/{File.hy → hybris_File.hy} +0 -0
- data/vendor/pygments-main/tests/examplefiles/{mg_sample.pro → idl_sample.pro} +0 -0
- data/vendor/pygments-main/tests/examplefiles/iex_example +23 -0
- data/vendor/pygments-main/tests/examplefiles/inet_pton6.dg +24 -24
- data/vendor/pygments-main/tests/examplefiles/language.hy +165 -0
- data/vendor/pygments-main/tests/examplefiles/limbo.b +456 -0
- data/vendor/pygments-main/tests/examplefiles/livescript-demo.ls +3 -1
- data/vendor/pygments-main/tests/examplefiles/main.cmake +2 -0
- data/vendor/pygments-main/tests/examplefiles/objc_example.m +163 -16
- data/vendor/pygments-main/tests/examplefiles/{example.p → openedge_example} +0 -0
- data/vendor/pygments-main/tests/examplefiles/pawn_example +25 -0
- data/vendor/pygments-main/tests/examplefiles/qbasic_example +2 -0
- data/vendor/pygments-main/tests/examplefiles/r6rs-comments.scm +23 -0
- data/vendor/pygments-main/tests/examplefiles/{robotframework.txt → robotframework_test.txt} +0 -0
- data/vendor/pygments-main/tests/examplefiles/rql-queries.rql +34 -0
- data/vendor/pygments-main/tests/examplefiles/scope.cirru +43 -0
- data/vendor/pygments-main/tests/examplefiles/sparql.rq +23 -0
- data/vendor/pygments-main/tests/examplefiles/test.R +37 -5
- data/vendor/pygments-main/tests/examplefiles/test.apl +26 -0
- data/vendor/pygments-main/tests/examplefiles/test.cyp +123 -0
- data/vendor/pygments-main/tests/examplefiles/test.idr +93 -0
- data/vendor/pygments-main/tests/examplefiles/test.mask +41 -0
- data/vendor/pygments-main/tests/examplefiles/test.pan +54 -0
- data/vendor/pygments-main/tests/examplefiles/test.php +3 -1
- data/vendor/pygments-main/tests/examplefiles/test.pig +148 -0
- data/vendor/pygments-main/tests/examplefiles/test.pwn +253 -0
- data/vendor/pygments-main/tests/examplefiles/test.r3 +27 -7
- data/vendor/pygments-main/tests/examplefiles/test.rsl +111 -0
- data/vendor/pygments-main/tests/examplefiles/test.swift +65 -0
- data/vendor/pygments-main/tests/examplefiles/test.zep +33 -0
- data/vendor/pygments-main/tests/examplefiles/unicode.go +10 -0
- data/vendor/pygments-main/tests/examplefiles/{test.bas → vbnet_test.bas} +0 -0
- data/vendor/pygments-main/tests/examplefiles/vctreestatus_hg +4 -0
- data/vendor/pygments-main/tests/examplefiles/vimrc +21 -0
- data/vendor/pygments-main/tests/run.py +14 -19
- data/vendor/pygments-main/tests/string_asserts.py +22 -0
- data/vendor/pygments-main/tests/test_basic_api.py +28 -14
- data/vendor/pygments-main/tests/test_cfm.py +46 -0
- data/vendor/pygments-main/tests/test_clexer.py +208 -3
- data/vendor/pygments-main/tests/test_cmdline.py +6 -5
- data/vendor/pygments-main/tests/test_examplefiles.py +30 -19
- data/vendor/pygments-main/tests/test_html_formatter.py +15 -13
- data/vendor/pygments-main/tests/test_latex_formatter.py +4 -2
- data/vendor/pygments-main/tests/test_lexers_other.py +11 -11
- data/vendor/pygments-main/tests/test_objectiveclexer.py +81 -0
- data/vendor/pygments-main/tests/test_perllexer.py +1 -1
- data/vendor/pygments-main/tests/test_qbasiclexer.py +43 -0
- data/vendor/pygments-main/tests/test_regexlexer.py +8 -1
- data/vendor/pygments-main/tests/test_rtf_formatter.py +109 -0
- data/vendor/pygments-main/tests/test_string_asserts.py +39 -0
- data/vendor/pygments-main/tests/test_token.py +3 -3
- data/vendor/pygments-main/tests/test_using_api.py +1 -1
- data/vendor/pygments-main/tests/test_util.py +1 -1
- metadata +138 -51
- data/vendor/pygments-main/docs/generate.py +0 -472
- data/vendor/pygments-main/docs/src/api.txt +0 -270
- data/vendor/pygments-main/docs/src/authors.txt +0 -5
- data/vendor/pygments-main/docs/src/changelog.txt +0 -5
- data/vendor/pygments-main/docs/src/index.txt +0 -69
- data/vendor/pygments-main/docs/src/installation.txt +0 -71
- data/vendor/pygments-main/external/rst-directive-old.py +0 -77
- data/vendor/pygments-main/scripts/reindent.py +0 -291
- data/vendor/pygments-main/tests/examplefiles/import.hs +0 -4
- data/vendor/pygments-main/tests/examplefiles/objc_example2.m +0 -24
- data/vendor/pygments-main/tests/old_run.py +0 -138
|
@@ -3,8 +3,8 @@ Unicode and Encodings
|
|
|
3
3
|
=====================
|
|
4
4
|
|
|
5
5
|
Since Pygments 0.6, all lexers use unicode strings internally. Because of that
|
|
6
|
-
you might encounter the occasional
|
|
7
|
-
wrong encoding.
|
|
6
|
+
you might encounter the occasional :exc:`UnicodeDecodeError` if you pass strings
|
|
7
|
+
with the wrong encoding.
|
|
8
8
|
|
|
9
9
|
Per default all lexers have their input encoding set to `latin1`.
|
|
10
10
|
If you pass a lexer a string object (not unicode), it tries to decode the data
|
|
@@ -39,11 +39,12 @@ Unicode string with this encoding before writing it. This is the case for
|
|
|
39
39
|
`sys.stdout`, for example. The other formatters don't have that behavior.
|
|
40
40
|
|
|
41
41
|
Another note: If you call Pygments via the command line (`pygmentize`),
|
|
42
|
-
encoding is handled differently, see
|
|
42
|
+
encoding is handled differently, see :doc:`the command line docs <cmdline>`.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
.. versionadded:: 0.7
|
|
45
|
+
The formatters now also accept an `outencoding` option which will override
|
|
46
|
+
the `encoding` option if given. This makes it possible to use a single
|
|
47
|
+
options dict with lexers and formatters, and still have different input and
|
|
48
|
+
output encodings.
|
|
48
49
|
|
|
49
50
|
.. _chardet: http://chardet.feedparser.org/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
Download and installation
|
|
2
|
+
=========================
|
|
3
|
+
|
|
4
|
+
The current release is version |version|.
|
|
5
|
+
|
|
6
|
+
Packaged versions
|
|
7
|
+
-----------------
|
|
8
|
+
|
|
9
|
+
You can download it `from the Python Package Index
|
|
10
|
+
<http://pypi.python.org/pypi/Pygments>`_. For installation of packages from
|
|
11
|
+
PyPI, we recommend `Pip <http://www.pip-installer.org>`_, which works on all
|
|
12
|
+
major platforms.
|
|
13
|
+
|
|
14
|
+
Under Linux, most distributions include a package for Pygments, usually called
|
|
15
|
+
``pygments`` or ``python-pygments``. You can install it with the package
|
|
16
|
+
manager as usual.
|
|
17
|
+
|
|
18
|
+
Development sources
|
|
19
|
+
-------------------
|
|
20
|
+
|
|
21
|
+
We're using the `Mercurial <http://selenic.com/mercurial>`_ version control
|
|
22
|
+
system. You can get the development source using this command::
|
|
23
|
+
|
|
24
|
+
hg clone http://bitbucket.org/birkenfeld/pygments-main pygments
|
|
25
|
+
|
|
26
|
+
Development takes place at `Bitbucket
|
|
27
|
+
<http://bitbucket.org/birkenfeld/pygments-main>`_, you can browse the source
|
|
28
|
+
online `here <http://bitbucket.org/birkenfeld/pygments-main/src>`_.
|
|
29
|
+
|
|
30
|
+
The latest changes in the development source code are listed in the `changelog
|
|
31
|
+
<http://bitbucket.org/birkenfeld/pygments-main/src/tip/CHANGES>`_.
|
|
32
|
+
|
|
33
|
+
.. Documentation
|
|
34
|
+
-------------
|
|
35
|
+
|
|
36
|
+
.. XXX todo
|
|
37
|
+
|
|
38
|
+
You can download the <a href="/docs/">documentation</a> either as
|
|
39
|
+
a bunch of rst files from the Mercurial repository, see above, or
|
|
40
|
+
as a tar.gz containing rendered HTML files:</p>
|
|
41
|
+
<p><a href="/docs/download/pygmentsdocs.tar.gz">pygmentsdocs.tar.gz</a></p>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
:orphan:
|
|
2
|
+
|
|
3
|
+
Pygments FAQ
|
|
4
|
+
=============
|
|
5
|
+
|
|
6
|
+
What is Pygments?
|
|
7
|
+
-----------------
|
|
8
|
+
|
|
9
|
+
Pygments is a syntax highlighting engine written in Python. That means, it will
|
|
10
|
+
take source code (or other markup) in a supported language and output a
|
|
11
|
+
processed version (in different formats) containing syntax highlighting markup.
|
|
12
|
+
|
|
13
|
+
Its features include:
|
|
14
|
+
|
|
15
|
+
* a wide range of common languages and markup formats is supported (look here
|
|
16
|
+
for a list)
|
|
17
|
+
* new languages and formats are added easily
|
|
18
|
+
* a number of output formats is available, including:
|
|
19
|
+
|
|
20
|
+
- HTML
|
|
21
|
+
- ANSI sequences (console output)
|
|
22
|
+
- LaTeX
|
|
23
|
+
- RTF
|
|
24
|
+
|
|
25
|
+
* it is usable as a command-line tool and as a library
|
|
26
|
+
* parsing and formatting is fast
|
|
27
|
+
|
|
28
|
+
Pygments is licensed under the BSD license.
|
|
29
|
+
|
|
30
|
+
Where does the name Pygments come from?
|
|
31
|
+
---------------------------------------
|
|
32
|
+
|
|
33
|
+
*Py* of course stands for Python, while *pigments* are used for coloring paint,
|
|
34
|
+
and in this case, source code!
|
|
35
|
+
|
|
36
|
+
What are the system requirements?
|
|
37
|
+
---------------------------------
|
|
38
|
+
|
|
39
|
+
Pygments only needs a standard Python install, version 2.6 or higher or version
|
|
40
|
+
3.3 or higher for Python 3. No additional libraries are needed.
|
|
41
|
+
|
|
42
|
+
How can I use Pygments?
|
|
43
|
+
-----------------------
|
|
44
|
+
|
|
45
|
+
Pygments is usable as a command-line tool as well as a library.
|
|
46
|
+
|
|
47
|
+
From the command-line, usage looks like this (assuming the pygmentize script is
|
|
48
|
+
properly installed)::
|
|
49
|
+
|
|
50
|
+
pygmentize -f html /path/to/file.py
|
|
51
|
+
|
|
52
|
+
This will print a HTML-highlighted version of /path/to/file.py to standard output.
|
|
53
|
+
|
|
54
|
+
For a complete help, please run ``pygmentize -h``.
|
|
55
|
+
|
|
56
|
+
Usage as a library is thoroughly demonstrated in the Documentation section.
|
|
57
|
+
|
|
58
|
+
How do I make a new style?
|
|
59
|
+
--------------------------
|
|
60
|
+
|
|
61
|
+
Please see the documentation on styles.
|
|
62
|
+
|
|
63
|
+
How can I report a bug or suggest a feature?
|
|
64
|
+
--------------------------------------------
|
|
65
|
+
|
|
66
|
+
Please report bugs and feature wishes in the tracker at Bitbucket.
|
|
67
|
+
|
|
68
|
+
You can also e-mail the author or use IRC, see the contact details.
|
|
69
|
+
|
|
70
|
+
I want this support for this language!
|
|
71
|
+
--------------------------------------
|
|
72
|
+
|
|
73
|
+
Instead of waiting for others to include language support, why not write it
|
|
74
|
+
yourself? All you have to know is :doc:`outlined in the docs
|
|
75
|
+
<docs/lexerdevelopment>`.
|
|
76
|
+
|
|
77
|
+
Can I use Pygments for programming language processing?
|
|
78
|
+
-------------------------------------------------------
|
|
79
|
+
|
|
80
|
+
The Pygments lexing machinery is quite powerful can be used to build lexers for
|
|
81
|
+
basically all languages. However, parsing them is not possible, though some
|
|
82
|
+
lexers go some steps in this direction in order to e.g. highlight function names
|
|
83
|
+
differently.
|
|
84
|
+
|
|
85
|
+
Also, error reporting is not the scope of Pygments. It focuses on correctly
|
|
86
|
+
highlighting syntactically valid documents, not finding and compensating errors.
|
|
87
|
+
|
|
88
|
+
Who uses Pygments?
|
|
89
|
+
------------------
|
|
90
|
+
|
|
91
|
+
This is an (incomplete) list of projects and sites known to use the Pygments highlighter.
|
|
92
|
+
|
|
93
|
+
* `Pygments API <http://pygments.appspot.com/>`_, a HTTP POST interface to Pygments
|
|
94
|
+
* `The Sphinx documentation builder <http://sphinx.pocoo.org/>`_, for embedded source examples
|
|
95
|
+
* `rst2pdf <http://code.google.com/p/rst2pdf/>`_, a reStructuredText to PDF converter
|
|
96
|
+
* `Zine <http://zine.pocoo.org/>`_, a Python blogging system
|
|
97
|
+
* `Trac <http://trac.edgewall.org/>`_, the universal project management tool
|
|
98
|
+
* `Bruce <http://r1chardj0n3s.googlepages.com/bruce>`_, a reStructuredText presentation tool
|
|
99
|
+
* `AsciiDoc <http://www.methods.co.nz/asciidoc/>`_, a text-based documentation generator
|
|
100
|
+
* `ActiveState Code <http://code.activestate.com/>`_, the Python Cookbook successor
|
|
101
|
+
* `ViewVC <http://viewvc.org/>`_, a web-based version control repository browser
|
|
102
|
+
* `BzrFruit <http://repo.or.cz/w/bzrfruit.git>`_, a Bazaar branch viewer
|
|
103
|
+
* `QBzr <http://bazaar-vcs.org/QBzr>`_, a cross-platform Qt-based GUI front end for Bazaar
|
|
104
|
+
* `BitBucket <http://bitbucket.org/>`_, a Mercurial and Git hosting site
|
|
105
|
+
* `GitHub <http://github.com/>`_, a site offering secure Git hosting and collaborative development
|
|
106
|
+
* `Review Board <http://www.review-board.org/>`_, a collaborative code reviewing tool
|
|
107
|
+
* `skeletonz <http://orangoo.com/skeletonz/>`_, a Python powered content management system
|
|
108
|
+
* `Diamanda <http://code.google.com/p/diamanda/>`_, a Django powered wiki system with support for Pygments
|
|
109
|
+
* `Progopedia <http://progopedia.ru/>`_ (`English <http://progopedia.com/>`_),
|
|
110
|
+
an encyclopedia of programming languages
|
|
111
|
+
* `Postmarkup <http://code.google.com/p/postmarkup/>`_, a BBCode to XHTML generator
|
|
112
|
+
* `Language Comparison <http://michaelsilver.us/lc>`_, a site that compares different programming languages
|
|
113
|
+
* `BPython <http://www.noiseforfree.com/bpython/>`_, a curses-based intelligent Python shell
|
|
114
|
+
* `Challenge-You! <http://challenge-you.appspot.com/>`_, a site offering programming challenges
|
|
115
|
+
* `PIDA <http://pida.co.uk/>`_, a universal IDE written in Python
|
|
116
|
+
* `PuDB <http://pypi.python.org/pypi/pudb>`_, a console Python debugger
|
|
117
|
+
* `XWiki <http://www.xwiki.org/>`_, a wiki-based development framework in Java, using Jython
|
|
118
|
+
* `roux <http://ananelson.com/software/roux/>`_, a script for running R scripts
|
|
119
|
+
and creating beautiful output including graphs
|
|
120
|
+
* `hurl <http://hurl.it/>`_, a web service for making HTTP requests
|
|
121
|
+
* `wxHTMLPygmentizer <http://colinbarnette.net/projects/wxHTMLPygmentizer>`_ is
|
|
122
|
+
a GUI utility, used to make code-colorization easier
|
|
123
|
+
* `WpPygments <http://blog.mirotin.net/?page_id=49>`_, a highlighter plugin for WordPress
|
|
124
|
+
* `LodgeIt <http://paste.pocoo.org/>`_, a pastebin with XMLRPC support and diffs
|
|
125
|
+
* `SpammCan <http://chrisarndt.de/projects/spammcan/>`_, a pastebin (demo see
|
|
126
|
+
`here <http://paste.chrisarndt.de/>`_)
|
|
127
|
+
* `WowAce.com pastes <http://www.wowace.com/paste/>`_, a pastebin
|
|
128
|
+
* `Siafoo <http://siafoo.net>`_, a tool for sharing and storing useful code and programming experience
|
|
129
|
+
* `D source <http://www.dsource.org/>`_, a community for the D programming language
|
|
130
|
+
* `dumpz.org <http://dumpz.org/>`_, a pastebin
|
|
131
|
+
* `dpaste.com <http://dpaste.com/>`_, another Django pastebin
|
|
132
|
+
* `PylonsHQ Pasties <http://pylonshq.com/pasties/new>`_, a pastebin
|
|
133
|
+
* `Django snippets <http://www.djangosnippets.org/>`_, a pastebin for Django code
|
|
134
|
+
* `Fayaa <http://www.fayaa.com/code/>`_, a Chinese pastebin
|
|
135
|
+
* `Incollo.com <http://incollo.com>`_, a free collaborative debugging tool
|
|
136
|
+
* `PasteBox <http://p.boxnet.eu/>`_, a pastebin focused on privacy
|
|
137
|
+
* `xinotes.org <http://www.xinotes.org/>`_, a site to share notes, code snippets etc.
|
|
138
|
+
* `hilite.me <http://www.hilite.me/>`_, a site to highlight code snippets
|
|
139
|
+
* `patx.me <http://patx.me/paste>`_, a pastebin
|
|
140
|
+
|
|
141
|
+
If you have a project or web site using Pygments, drop me a line, and I'll add a
|
|
142
|
+
link here.
|
|
143
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Welcome!
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
This is the home of Pygments. It is a generic syntax highlighter for general use
|
|
5
|
+
in all kinds of software such as forum systems, wikis or other applications that
|
|
6
|
+
need to prettify source code. Highlights are:
|
|
7
|
+
|
|
8
|
+
* a wide range of common languages and markup formats is supported
|
|
9
|
+
* special attention is paid to details that increase highlighting quality
|
|
10
|
+
* support for new languages and formats are added easily; most languages use a simple regex-based lexing mechanism
|
|
11
|
+
* a number of output formats is available, among them HTML, RTF, LaTeX and ANSI sequences
|
|
12
|
+
* it is usable as a command-line tool and as a library
|
|
13
|
+
* ... and it highlights even Brainf*ck!
|
|
14
|
+
|
|
15
|
+
Read more in the FAQ list or the documentation, or download the latest release.
|
|
16
|
+
|
|
17
|
+
Though Pygments has not yet won an award, we trust that you will notice it's a top quality product <wink>.
|
|
18
|
+
|
|
19
|
+
.. _contribute:
|
|
20
|
+
|
|
21
|
+
Contribute
|
|
22
|
+
----------
|
|
23
|
+
|
|
24
|
+
Like every open-source project, we are always looking for volunteers to help us
|
|
25
|
+
with programming. Python knowledge is required, but don't fear: Python is a very
|
|
26
|
+
clear and easy to learn language.
|
|
27
|
+
|
|
28
|
+
Development takes place on `Bitbucket
|
|
29
|
+
<https://bitbucket.org/birkenfeld/pygments-main>`_, where the Mercurial
|
|
30
|
+
repository, tickets and pull requests can be viewed.
|
|
31
|
+
|
|
32
|
+
Our primary communication instrument is the IRC channel **#pocoo** on the
|
|
33
|
+
Freenode network. To join it, let your IRC client connect to
|
|
34
|
+
``irc.freenode.net`` and do ``/join #pocoo``.
|
|
35
|
+
|
|
36
|
+
If you found a bug, just open a ticket in the Bitbucket tracker. Be sure to log
|
|
37
|
+
in to be notified when the issue is fixed -- development is not fast-paced as
|
|
38
|
+
the library is quite stable. You can also send an e-mail to the developers, see
|
|
39
|
+
below.
|
|
40
|
+
|
|
41
|
+
The authors
|
|
42
|
+
-----------
|
|
43
|
+
|
|
44
|
+
Pygments is maintained by **Georg Brandl**, e-mail address *georg*\ *@*\ *python.org*.
|
|
45
|
+
|
|
46
|
+
Many lexers and fixes have been contributed by **Armin Ronacher**, the rest of
|
|
47
|
+
the `Pocoo <http://dev.pocoo.org/>`_ team and **Tim Hatch**.
|
|
48
|
+
|
|
49
|
+
.. toctree::
|
|
50
|
+
:maxdepth: 1
|
|
51
|
+
:hidden:
|
|
52
|
+
|
|
53
|
+
docs/index
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
:orphan:
|
|
2
|
+
|
|
3
|
+
Supported languages
|
|
4
|
+
===================
|
|
5
|
+
|
|
6
|
+
Pygments supports an ever-growing range of languages. Watch this space...
|
|
7
|
+
|
|
8
|
+
Programming languages
|
|
9
|
+
---------------------
|
|
10
|
+
|
|
11
|
+
* ActionScript
|
|
12
|
+
* Ada
|
|
13
|
+
* ANTLR
|
|
14
|
+
* AppleScript
|
|
15
|
+
* Assembly (various)
|
|
16
|
+
* Asymptote
|
|
17
|
+
* Awk
|
|
18
|
+
* Befunge
|
|
19
|
+
* Boo
|
|
20
|
+
* BrainFuck
|
|
21
|
+
* C, C++
|
|
22
|
+
* C#
|
|
23
|
+
* Clojure
|
|
24
|
+
* CoffeeScript
|
|
25
|
+
* ColdFusion
|
|
26
|
+
* Common Lisp
|
|
27
|
+
* Coq
|
|
28
|
+
* Cryptol (incl. Literate Cryptol)
|
|
29
|
+
* `Cython <http://cython.org>`_
|
|
30
|
+
* `D <http://digitalmars.com/d>`_
|
|
31
|
+
* Dart
|
|
32
|
+
* Delphi
|
|
33
|
+
* Dylan
|
|
34
|
+
* Erlang
|
|
35
|
+
* Factor
|
|
36
|
+
* Fancy
|
|
37
|
+
* Fortran
|
|
38
|
+
* F#
|
|
39
|
+
* GAP
|
|
40
|
+
* Gherkin (Cucumber)
|
|
41
|
+
* GL shaders
|
|
42
|
+
* Groovy
|
|
43
|
+
* `Haskell <http://www.haskell.org>`_ (incl. Literate Haskell)
|
|
44
|
+
* IDL
|
|
45
|
+
* Io
|
|
46
|
+
* Java
|
|
47
|
+
* JavaScript
|
|
48
|
+
* LLVM
|
|
49
|
+
* Logtalk
|
|
50
|
+
* `Lua <http://www.lua.org>`_
|
|
51
|
+
* Matlab
|
|
52
|
+
* MiniD
|
|
53
|
+
* Modelica
|
|
54
|
+
* Modula-2
|
|
55
|
+
* MuPad
|
|
56
|
+
* Nemerle
|
|
57
|
+
* Nimrod
|
|
58
|
+
* Objective-C
|
|
59
|
+
* Objective-J
|
|
60
|
+
* Octave
|
|
61
|
+
* OCaml
|
|
62
|
+
* PHP
|
|
63
|
+
* `Perl <http://perl.org>`_
|
|
64
|
+
* PovRay
|
|
65
|
+
* PostScript
|
|
66
|
+
* PowerShell
|
|
67
|
+
* Prolog
|
|
68
|
+
* `Python <http://www.python.org>`_ 2.x and 3.x (incl. console sessions and tracebacks)
|
|
69
|
+
* `REBOL <http://www.rebol.com>`_
|
|
70
|
+
* `Red <http://www.red-lang.org>`_
|
|
71
|
+
* Redcode
|
|
72
|
+
* `Ruby <http://www.ruby-lang.org>`_ (incl. irb sessions)
|
|
73
|
+
* Rust
|
|
74
|
+
* S, S-Plus, R
|
|
75
|
+
* Scala
|
|
76
|
+
* Scheme
|
|
77
|
+
* Scilab
|
|
78
|
+
* Smalltalk
|
|
79
|
+
* SNOBOL
|
|
80
|
+
* Tcl
|
|
81
|
+
* Vala
|
|
82
|
+
* Verilog
|
|
83
|
+
* VHDL
|
|
84
|
+
* Visual Basic.NET
|
|
85
|
+
* Visual FoxPro
|
|
86
|
+
* XQuery
|
|
87
|
+
* Zephir
|
|
88
|
+
</ul>
|
|
89
|
+
|
|
90
|
+
Template languages
|
|
91
|
+
------------------
|
|
92
|
+
|
|
93
|
+
* Cheetah templates
|
|
94
|
+
* `Django <http://www.djangoproject.com>`_ / `Jinja
|
|
95
|
+
<http://jinja.pocoo.org/jinja>`_ templates
|
|
96
|
+
* ERB (Ruby templating)
|
|
97
|
+
* `Genshi <http://genshi.edgewall.org>`_ (the Trac template language)
|
|
98
|
+
* JSP (Java Server Pages)
|
|
99
|
+
* `Myghty <http://www.myghty.org>`_ (the HTML::Mason based framework)
|
|
100
|
+
* `Mako <http://www.makotemplates.org/>`_ (the Myghty successor)
|
|
101
|
+
* `Smarty <http://smarty.php.net>`_ templates (PHP templating)
|
|
102
|
+
* Tea
|
|
103
|
+
|
|
104
|
+
Other markup
|
|
105
|
+
------------
|
|
106
|
+
|
|
107
|
+
* Apache config files
|
|
108
|
+
* Bash shell scripts
|
|
109
|
+
* BBCode
|
|
110
|
+
* CMake
|
|
111
|
+
* CSS
|
|
112
|
+
* Debian control files
|
|
113
|
+
* Diff files
|
|
114
|
+
* DTD
|
|
115
|
+
* Gettext catalogs
|
|
116
|
+
* Gnuplot script
|
|
117
|
+
* Groff markup
|
|
118
|
+
* HTML
|
|
119
|
+
* HTTP sessions
|
|
120
|
+
* INI-style config files
|
|
121
|
+
* IRC logs (irssi style)
|
|
122
|
+
* Lighttpd config files
|
|
123
|
+
* Makefiles
|
|
124
|
+
* MoinMoin/Trac Wiki markup
|
|
125
|
+
* MySQL
|
|
126
|
+
* Nginx config files
|
|
127
|
+
* POV-Ray scenes
|
|
128
|
+
* Ragel
|
|
129
|
+
* Redcode
|
|
130
|
+
* ReST
|
|
131
|
+
* Robot Framework
|
|
132
|
+
* RPM spec files
|
|
133
|
+
* SQL, also MySQL, SQLite
|
|
134
|
+
* Squid configuration
|
|
135
|
+
* TeX
|
|
136
|
+
* tcsh
|
|
137
|
+
* Vim Script
|
|
138
|
+
* Windows batch files
|
|
139
|
+
* XML
|
|
140
|
+
* XSLT
|
|
141
|
+
* YAML
|
|
142
|
+
|
|
143
|
+
... that's all?
|
|
144
|
+
---------------
|
|
145
|
+
|
|
146
|
+
Well, why not write your own? Contributing to Pygments is easy and fun. Look
|
|
147
|
+
:doc:`here <docs/lexerdevelopment>` for the docs on lexer development and
|
|
148
|
+
:ref:`here <contribute>` for contact details.
|
|
149
|
+
|
|
150
|
+
Note: the languages listed here are supported in the development version. The
|
|
151
|
+
latest release may lack a few of them.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
REM Command file for Sphinx documentation
|
|
4
|
+
|
|
5
|
+
if "%SPHINXBUILD%" == "" (
|
|
6
|
+
set SPHINXBUILD=sphinx-build
|
|
7
|
+
)
|
|
8
|
+
set BUILDDIR=_build
|
|
9
|
+
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
|
|
10
|
+
set I18NSPHINXOPTS=%SPHINXOPTS% .
|
|
11
|
+
if NOT "%PAPER%" == "" (
|
|
12
|
+
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
|
13
|
+
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
if "%1" == "" goto help
|
|
17
|
+
|
|
18
|
+
if "%1" == "help" (
|
|
19
|
+
:help
|
|
20
|
+
echo.Please use `make ^<target^>` where ^<target^> is one of
|
|
21
|
+
echo. html to make standalone HTML files
|
|
22
|
+
echo. dirhtml to make HTML files named index.html in directories
|
|
23
|
+
echo. singlehtml to make a single large HTML file
|
|
24
|
+
echo. pickle to make pickle files
|
|
25
|
+
echo. json to make JSON files
|
|
26
|
+
echo. htmlhelp to make HTML files and a HTML help project
|
|
27
|
+
echo. qthelp to make HTML files and a qthelp project
|
|
28
|
+
echo. devhelp to make HTML files and a Devhelp project
|
|
29
|
+
echo. epub to make an epub
|
|
30
|
+
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
|
31
|
+
echo. text to make text files
|
|
32
|
+
echo. man to make manual pages
|
|
33
|
+
echo. texinfo to make Texinfo files
|
|
34
|
+
echo. gettext to make PO message catalogs
|
|
35
|
+
echo. changes to make an overview over all changed/added/deprecated items
|
|
36
|
+
echo. linkcheck to check all external links for integrity
|
|
37
|
+
echo. doctest to run all doctests embedded in the documentation if enabled
|
|
38
|
+
goto end
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
if "%1" == "clean" (
|
|
42
|
+
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
|
43
|
+
del /q /s %BUILDDIR%\*
|
|
44
|
+
goto end
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
if "%1" == "html" (
|
|
48
|
+
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
|
49
|
+
if errorlevel 1 exit /b 1
|
|
50
|
+
echo.
|
|
51
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
|
52
|
+
goto end
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
if "%1" == "dirhtml" (
|
|
56
|
+
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
|
57
|
+
if errorlevel 1 exit /b 1
|
|
58
|
+
echo.
|
|
59
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
|
60
|
+
goto end
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
if "%1" == "singlehtml" (
|
|
64
|
+
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
|
65
|
+
if errorlevel 1 exit /b 1
|
|
66
|
+
echo.
|
|
67
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
|
68
|
+
goto end
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
if "%1" == "pickle" (
|
|
72
|
+
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
|
73
|
+
if errorlevel 1 exit /b 1
|
|
74
|
+
echo.
|
|
75
|
+
echo.Build finished; now you can process the pickle files.
|
|
76
|
+
goto end
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
if "%1" == "json" (
|
|
80
|
+
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
|
81
|
+
if errorlevel 1 exit /b 1
|
|
82
|
+
echo.
|
|
83
|
+
echo.Build finished; now you can process the JSON files.
|
|
84
|
+
goto end
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
if "%1" == "htmlhelp" (
|
|
88
|
+
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
|
89
|
+
if errorlevel 1 exit /b 1
|
|
90
|
+
echo.
|
|
91
|
+
echo.Build finished; now you can run HTML Help Workshop with the ^
|
|
92
|
+
.hhp project file in %BUILDDIR%/htmlhelp.
|
|
93
|
+
goto end
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
if "%1" == "qthelp" (
|
|
97
|
+
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
|
98
|
+
if errorlevel 1 exit /b 1
|
|
99
|
+
echo.
|
|
100
|
+
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
|
101
|
+
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
|
102
|
+
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Pygments.qhcp
|
|
103
|
+
echo.To view the help file:
|
|
104
|
+
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Pygments.ghc
|
|
105
|
+
goto end
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
if "%1" == "devhelp" (
|
|
109
|
+
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
|
110
|
+
if errorlevel 1 exit /b 1
|
|
111
|
+
echo.
|
|
112
|
+
echo.Build finished.
|
|
113
|
+
goto end
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
if "%1" == "epub" (
|
|
117
|
+
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
|
118
|
+
if errorlevel 1 exit /b 1
|
|
119
|
+
echo.
|
|
120
|
+
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
|
121
|
+
goto end
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
if "%1" == "latex" (
|
|
125
|
+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
|
126
|
+
if errorlevel 1 exit /b 1
|
|
127
|
+
echo.
|
|
128
|
+
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
|
129
|
+
goto end
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
if "%1" == "text" (
|
|
133
|
+
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
|
134
|
+
if errorlevel 1 exit /b 1
|
|
135
|
+
echo.
|
|
136
|
+
echo.Build finished. The text files are in %BUILDDIR%/text.
|
|
137
|
+
goto end
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
if "%1" == "man" (
|
|
141
|
+
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
|
142
|
+
if errorlevel 1 exit /b 1
|
|
143
|
+
echo.
|
|
144
|
+
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
|
145
|
+
goto end
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
if "%1" == "texinfo" (
|
|
149
|
+
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
|
150
|
+
if errorlevel 1 exit /b 1
|
|
151
|
+
echo.
|
|
152
|
+
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
|
153
|
+
goto end
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
if "%1" == "gettext" (
|
|
157
|
+
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
|
158
|
+
if errorlevel 1 exit /b 1
|
|
159
|
+
echo.
|
|
160
|
+
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
|
161
|
+
goto end
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
if "%1" == "changes" (
|
|
165
|
+
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
|
166
|
+
if errorlevel 1 exit /b 1
|
|
167
|
+
echo.
|
|
168
|
+
echo.The overview file is in %BUILDDIR%/changes.
|
|
169
|
+
goto end
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
if "%1" == "linkcheck" (
|
|
173
|
+
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
|
174
|
+
if errorlevel 1 exit /b 1
|
|
175
|
+
echo.
|
|
176
|
+
echo.Link check complete; look for any errors in the above output ^
|
|
177
|
+
or in %BUILDDIR%/linkcheck/output.txt.
|
|
178
|
+
goto end
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
if "%1" == "doctest" (
|
|
182
|
+
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
|
183
|
+
if errorlevel 1 exit /b 1
|
|
184
|
+
echo.
|
|
185
|
+
echo.Testing of doctests in the sources finished, look at the ^
|
|
186
|
+
results in %BUILDDIR%/doctest/output.txt.
|
|
187
|
+
goto end
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
:end
|