File: dctrl2xml.xml

package info (click to toggle)
dctrl2xml 0.24
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 184 kB
  • sloc: xml: 320; python: 304; makefile: 34; sh: 11
file content (203 lines) | stat: -rw-r--r-- 6,417 bytes parent folder | download | duplicates (3)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"file:///usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd" [

  <!ENTITY dhfirstname "<firstname>Frank</firstname>">
  <!ENTITY dhsurname   "<surname>Thomas</surname>">
  <!ENTITY dhusername  "Frank S. Thomas">
  <!ENTITY dhemail     "<email>fst@debian.org</email>">
  <!ENTITY dhpackage   "dctrl2xml">
  <!ENTITY dhcommand   "<command>dctrl2xml</command>">
  <!ENTITY dhdate      "<date>20 August 2010</date>">

  <!ENTITY debian      "<productname>Debian</productname>">
  <!ENTITY gnu         "<acronym>GNU</acronym>">
]>

<!--
  This is the manual page for dctrl2xml.

  This file is licensed under the terms of the GNU General Public License,
  Version 3 or any later version published by the Free Software Foundation.

  Copyright © 2005, 2007-2008, 2010 Frank S. Thomas <fst@debian.org>
-->

<refentry>
  <refentryinfo>
    <address>
      &dhemail;
    </address>
    <author>
      &dhfirstname;
      &dhsurname;  
    </author>
    <copyright>
      <year>2005</year>
      <year>2007</year>
      <year>2008</year>
      <year>2010</year>
      <holder>&dhusername;</holder>
    </copyright>
    &dhdate;
  </refentryinfo>

  <refmeta>
    <refentrytitle>dctrl2xml</refentrytitle>
    <manvolume>1</manvolume>
  </refmeta>

  <refnamediv>
    <refname>dctrl2xml</refname>
    <refpurpose>Debian control data to XML converter</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      &dhcommand;
      <group>
        <arg>-x</arg>
        <arg>-j</arg>
      </group>
      <group>
        <arg>-f <replaceable>FILE</replaceable></arg>
      </group>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>DESCRIPTION</title>
    <para>&dhcommand; is a tool that converts Debian control data into an XML
      representation. It can be used to convert data which is normally found
      in debian/control, .changes, .dsc, Packages, Sources, and similar files
      to XML. </para>
    <para>For most fields &dhcommand; just uses the field name as element name
      and the field data as element content. For other fields, such as package
      interrelationship fields (Depends, Build-Depends, etc.) or the Files
      field in .changes or Sources files, &dhcommand; additionally parses
      their field data to represent it in a more fine-structured form.</para>
  </refsect1>

  <refsect1>
    <title>OPTIONS</title>
    <para>For a full summary of options, run &dhcommand;
      <option>--help</option>.</para>

    <variablelist>
      <varlistentry>
        <term><option>--version</option></term>
        <listitem>
          <para>Show dctrl2xml's version number.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-h</option>, <option>--help</option></term>
        <listitem>
          <para>Show help about options.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-f <replaceable>FILE</replaceable></option>,
          <option>--file=<replaceable>FILE</replaceable></option></term>
        <listitem>
          <para>Read Debian control data from file
            <replaceable>FILE</replaceable> instead of standard input.
            <replaceable>FILE</replaceable> can be either a plain text file or
            a gzip, bzip2 or ZIP file.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-x</option>, <option>--xml</option></term>
        <listitem>
          <para>Output Debian control data as XML (default).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-j</option>, <option>--json</option></term>
        <listitem>
          <para>Output Debian control data as JSON.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>EXAMPLES</title>
    <variablelist>
      <varlistentry>
        <term>
          <userinput>dctrl2xml -f /var/lib/dpkg/available</userinput>
        </term>
        <listitem>
          <para>Convert the whole 
            <citerefentry>
              <refentrytitle>dpkg</refentrytitle>
              <manvolnum>1</manvolnum>
            </citerefentry> available file to XML and print it to standard
            output. This is a typical stress test for &dhcommand;.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <userinput>apt-cache show hello build-essential |
            dctrl2xml</userinput>
        </term>
        <listitem>
          <para>Convert the package records of the hello and build-essential
            packages to XML and print it to standard output. This is an
            example of how &dhcommand; can be used in pipes where it reads the
            control data from standard input.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <userinput>apt-cache showsrc hello | dctrl2xml | xmllint
            --format -</userinput>
        </term>
        <listitem>
          <para>This is similar to the above example, except that the
            <citerefentry>
              <refentrytitle>xmllint</refentrytitle>
              <manvolnum>1</manvolnum>
            </citerefentry> tool (which is in the libxml2-utils Debian
            package) is used to reformat and reindent &dhcommand;'s output to
            make it more human readable and that the source package records of
            the hello package are used.</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <userinput>apt-cache showsrc hello | dctrl2xml -j</userinput>
        </term>
        <listitem>
          <para>In this example hello's source package record is printed as
            JSON instead of XML.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
        <refentrytitle>deb-control</refentrytitle>
        <manvolnum>5</manvolnum>
      </citerefentry>
      <!--
        http://lists.debian.org/debian-mentors/2005/01/msg00058.html
        http://lists.debian.org/debian-mentors/2006/09/msg00089.html
      -->
    </para>
  </refsect1>

  <refsect1>
    <title>AUTHOR</title>
    <para>Written by &dhusername; &dhemail;.</para>
  </refsect1>

</refentry>