aboutsummaryrefslogtreecommitdiff
blob: 3a40768fca179f6a298f7461bf0539c561794b45 (plain)
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
metagen is copyright 2004,2005 Rob Cakebread, released under
the terms of the GNU Public License v2


metagen is a command line tool that writes a Gentoo metadata.xml file 
in the current working directory.

The metagen package also has a metagenerator class that can be used
from Python to create metadata.xml files easily:

    from metagen.metagenerator import MyMetadata

    metadata = MyMetadata()
    metadata.set_maintainer(["<pythonhead@gentoo.org>"], 
                            ["Rob Cakebread"], 
                            ["Maintainer description."]
                           )
    print metadata 

    * All methods use lists of strings as arguments except
      set_longdescription, which is a string

    * See meta_unittest.py for more detailed examples

    * There isn't much in the way of error checking in metagenerator.py
      Most of the sanity checking is done in metagen.py



Command line tool examples:

metagen -m

 * This takes the maintainer info from your ECHANGELOG_USER variable.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE pkgmetadata SYSTEMhttp://www.gentoo.org/dtd/metadata.dtd">
    <pkgmetadata>
            <maintainer>
                    <email>pythonhead@gentoo.org</email>
                    <name>Rob Cakebread</name>
            </maintainer>
    </pkgmetadata>


metagen -m -d "I maintain this because I'm crazy."

 * Maintainer with description of maintenance

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE pkgmetadata SYSTEMhttp://www.gentoo.org/dtd/metadata.dtd">
    <pkgmetadata>
            <maintainer>
                    <email>pythonhead@gentoo.org</email>
                    <name>Rob Cakebread</name>
                    <description>I maintain this because I'm crazy.</description>
            </maintainer>
    </pkgmetadata>


metagen -m -l "This package does X, Y, and Z."

 * Maintainer, long description

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE pkgmetadata SYSTEMhttp://www.gentoo.org/dtd/metadata.dtd">
    <pkgmetadata>
            <maintainer>
                    <email>pythonhead@gentoo.org</email>
                    <name>Rob Cakebread</name>
            </maintainer>
            <longdescription>This package does X, Y, and Z.</longdescription>
    </pkgmetadata>

metagen -m -e "jdoe@gentoo.org","tsmith@gentoo.org" -n "Jane Doe","Tom Smith" -l "This package does X, Y, and Z."

 * 3 maintainers, long description

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE pkgmetadata SYSTEMhttp://www.gentoo.org/dtd/metadata.dtd">
    <pkgmetadata>
            <maintainer>
                    <email>pythonhead@gentoo.org</email>
                    <name>Rob Cakebread</name>
            </maintainer>
            <maintainer>
                    <email>jdoe@gentoo.org</email>
                    <name>Jane Doe</name>
            </maintainer>
            <maintainer>
                    <email>tsmith@gentoo.org</email>
                    <name>Tom Smith</name>
            </maintainer>
            <longdescription>This package does X, Y, and Z.</longdescription>
    </pkgmetadata>