File: syntaxhighlight.docbook

package info (click to toggle)
python-odf 1.3.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,356 kB
  • ctags: 1,902
  • sloc: python: 21,654; makefile: 352; sh: 10; xml: 2
file content (72 lines) | stat: -rw-r--r-- 2,132 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<refentry id="syntaxhighlight">
  <refentryinfo>
    <productname>odfpy</productname>
    <author>
      <firstname>Søren</firstname>
      <surname>Roug</surname>
      <contrib>Original author</contrib>
    </author>
  </refentryinfo>
  <refmeta>
    <refentrytitle>syntaxhighlight</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="manual">User commands</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>syntaxhighlight</refname>
    <refpurpose>Create OpenDocument with syntax highlighted programming code</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>syntaxhighlight</command>
      <arg choice="opt">-e <replaceable>encoding</replaceable></arg>
      <arg choice="opt">-l <replaceable>language</replaceable></arg>
      <arg>
        <replaceable>inputfile</replaceable>
      </arg>
      <arg>
        <replaceable>outputfile</replaceable>
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>Description</title>
    <para>
The syntaxhighlight program will read a source code file,
format it with syntax highlighting and write an OpenDocument text file.
</para>
  </refsect1>
  <refsect1>
    <title>Options</title>
    <variablelist>
      <varlistentry>
        <term>-e <replaceable>encoding</replaceable></term>
        <listitem>
          <para>
Enter the encoding of the source file. Common encodings are: iso-8859-1,
cp1252, ascii and utf-8 (default).
</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>-l <replaceable>language</replaceable></term>
        <listitem>
          <para>
Programming language of the input file. If not specified, 
it is guessed fron the file ending.
Values can be:
Python, HTML, C, C++ and PHP.
</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
  <refsect1>
    <title>Example</title>
    <screen>
syntaxhighlight -e cp1252 -l Python example.py example.odt
</screen>
  </refsect1>
</refentry>