Difference between revisions of "Pkgtxt2db"

From Salix OS
Jump to: navigation, search
(change svn link to the new git one)
(updated)
Line 1: Line 1:
=Description=
+
= Description =
 +
 
 
Pkgtxt2db is a utility for Slackware and Slackware based operating system only.
 
Pkgtxt2db is a utility for Slackware and Slackware based operating system only.
  
Line 7: Line 8:
 
*CSV
 
*CSV
 
*JSON
 
*JSON
 +
*SQLite
 +
*XML
  
 
+
= Download =
=Download=
+
 
Sources tarballs and Slackware packages can be found there:
 
Sources tarballs and Slackware packages can be found there:
 
http://people.salixos.org/fredg/packages/Pkgtxt2db/
 
http://people.salixos.org/fredg/packages/Pkgtxt2db/
Line 16: Line 18:
 
   $ git clone ssh://git@github.com:fredg/pkgtxt2db.git
 
   $ git clone ssh://git@github.com:fredg/pkgtxt2db.git
  
=USAGE=
+
 
 +
= Usage =
 +
 
 
   pkgtxt2db [options]
 
   pkgtxt2db [options]
  
 
Options:
 
Options:
-c | --csv convert PACKAGES.TXT to a CSV DB
+
    -h, --help
-j | --json convert PACKAGES.TXT to a JSON DB
+
    Simple help
-t | --target use with -c or -j, choose slackware or salix
+
    --version
-r | --release use with -t, choose the release
+
        Print pkgtxt2db version
 +
    -u, --update
 +
        It will fetch and download a new PACKAGES.TXT from your choosen repository.
 +
    -t, --target
 +
        Choose between slackware or salix repositories.
 +
    --repo
 +
  Choose the arch repository, it can be i486 or x86_64
 +
    -r, --release
 +
        Choose the slackware or salix release. It can be: current (if exist), 14.0, 13.37, ..., 13.0
 +
    -e, --expa
 +
        Choose between the patches or extra Slackware repository
 +
    -c, --convert
 +
        Choose your database format, it can be:
 +
        - csv  : Convert PACKAGES.TXT to a CSV database
 +
                - json  : Convert PACKAGES.TXT to a JSON database
 +
                - sqlite: Convert PACKAGES.TXT to a SQLITE database
 +
                - xml  : Convert PACKAGES.TXT to a XML database
 +
    -o, --output
 +
        Choose the name of the output file.  If none is choosen, packages will be used.
  
--target is to choose between Salix or Slackware repository.
 
It can be:
 
* salix32: salix i486 repository
 
* salix64: salix x86_64 repository
 
* slack32: slackware i486 repository
 
* slack64: slackware x86_64 repository
 
 
--release is to choose the release
 
It can be:
 
* 13.37
 
* current (if repository exist)
 
* ...
 
 
   
 
   
 
= Examples =
 
= Examples =
  
pkgtxt2db -j -t salix32 -r 13.37
+
Here are some usages examples.
It will convert PACKAGES.TXT from the i486 salix repo to a JSON database: pkgtxt.json
+
 
 +
    pkgtxt2db -u -t slackware --repo x86_64 -r current -c json -o slack64.json
 +
   
 +
It will fetch and convert PACKAGES.TXT from the Slackware current x86_64 repository to a JSON database: slack64.json.
 +
 
 +
    pkgtxt2db -c csv
 +
 
 +
It will convert the PACKAGES.TXT found in your directory to a CSV database (; separated): packages.csv.  You can open it with libreoffice ;)
  
pkgtxt2db -c -t slack32 -r current
 
It will convert PACKAGES.TXT from the current i486 slackware repo to a CSV database, with tab separated value: pkgtxt.csv (you can open it with libreoffice if you want ;) )
 
  
  

Revision as of 08:21, 17 December 2012

Contents

Description

Pkgtxt2db is a utility for Slackware and Slackware based operating system only.

It can be use to convert PACKAGES.TXT to various database formats:

Are supported for now:

  • CSV
  • JSON
  • SQLite
  • XML

Download

Sources tarballs and Slackware packages can be found there: http://people.salixos.org/fredg/packages/Pkgtxt2db/

The source code is also available through github. You can get it with:

 $ git clone ssh://git@github.com:fredg/pkgtxt2db.git


Usage

 pkgtxt2db [options]

Options:

   -h, --help
   	Simple help
   --version
       Print pkgtxt2db version
   -u, --update
       It will fetch and download a new PACKAGES.TXT from your choosen repository.
   -t, --target
       Choose between slackware or salix repositories.
   --repo
  	Choose the arch repository, it can be i486 or x86_64
   -r, --release
       Choose the slackware or salix release. It can be: current (if exist), 14.0, 13.37, ..., 13.0
   -e, --expa
       Choose between the patches or extra Slackware repository
   -c, --convert
       Choose your database format, it can be:
       	- csv   : Convert PACKAGES.TXT to a CSV database
               - json  : Convert PACKAGES.TXT to a JSON database
               - sqlite: Convert PACKAGES.TXT to a SQLITE database
               - xml   : Convert PACKAGES.TXT to a XML database
   -o, --output
       Choose the name of the output file.  If none is choosen, packages will be used.


Examples

Here are some usages examples.

   pkgtxt2db -u -t slackware --repo x86_64 -r current -c json -o slack64.json
   

It will fetch and convert PACKAGES.TXT from the Slackware current x86_64 repository to a JSON database: slack64.json.

   pkgtxt2db -c csv

It will convert the PACKAGES.TXT found in your directory to a CSV database (; separated): packages.csv. You can open it with libreoffice ;)