From Salix OS
Jump to: navigation, search



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


Sources tarballs and Slackware packages can be found there:

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

 $ git clone


 pkgtxt2db [options]


   -h, --help
   	Simple help
       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.
  	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.


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 ;)