Blame
Date:
Sun May 10 06:03:05 2015 UTC
Message:
fixes
01
2015-05-10
f
ParsePkgtxt
02
2015-05-10
f
###########
03
2015-05-10
f
04
2015-05-10
f
A Python Class to parse a Slackware linux PACKAGES.TXT file in order to build
05
2015-05-10
f
a dictionnary with packages names as keys and packages detailed informations
06
2015-05-10
f
as values.
07
2015-05-10
f
08
2015-05-10
f
You can install it via pip:
09
2015-05-10
f
10
2015-05-10
f
.. code-block:: sh
11
2015-05-10
f
12
2015-05-10
f
pip install ParsePkgtxt
13
2015-05-10
f
14
2015-05-10
f
15
2015-05-10
f
Usage example:
16
2015-05-10
f
==============
17
2015-05-10
f
18
2015-05-10
f
.. code-block:: python
19
2015-05-10
f
20
2015-05-10
f
>>> from ParsePkgtxt import Package
21
2015-05-10
f
>>> for k, v in Package.parse(Package(), 'PACKAGES.TXT').iteritems():
22
2015-05-10
f
>>> ....print ';'.join([k,v[0],v[9])
23
2015-05-10
f
24
2015-05-10
f
25
2015-05-10
f
Output:
26
2015-05-10
f
-------
27
2015-05-10
f
28
2015-05-10
f
.. code-block::
29
2015-05-10
f
30
2015-05-10
f
package1_name;package1_version;package1_description
31
2015-05-10
f
package2_name;package2_version;package2_description
32
2015-05-10
f
...
33
2015-05-10
f
...
34
2015-05-10
f
Frédéric Galusik