Swac Tools

Swac Tools is a set of programs for GNU/Linux written in C++ that allows you to get the most out of Shtooka words audio collections (SWAC). At the moment, there are 4 programs:
  • swac-get which enables you to load into a SQLite3 database of audio collections.
  • swac-explore which allows you to browse the database and listen audio files.
  • swac-play a simple command line player for SWAC audio collections.
  • swac-scan a Vorbis Comment tags and Id3v2 tags scanner that enables the generation of XML indexes for SWAC audio collections.

These programs are distributed and licensed under the GNU General Public License (GPL v3). You can get last sources at this adress :

Actual version numbers are:

  • swac-get: 0.5
  • swac-explore: 0.4.1
  • swac-play 0.2
  • swac-scan 0.2

Installation from Debian/Ubuntu packages

All the programs are available on the respective distribution packages repositories

Compilation an installation from source packages

In order to compile the Swac Tools you will need the following libraries (it is added within parentheses the name of development packages under GNU/Linux Debian & Ubuntu):

  • Libxml 2 (libxml2-dev)
  • Bz2 (libbz2-dev)
  • SQLite 3 (libsqlite3-dev)

To compile swac-explore:

  • SQLite 3 (libsqlite3-dev)
  • Gtkmm (libgtkmm-2.4-dev)
  • GConfmm (libgconfmm-2.6-dev)
  • GStreamer (libgstreamer0.10-dev)

To compile swac-play:

  • SQLite 3 (libsqlite3-dev)
  • GLibmm (libglibmm-2.4-dev)
  • GStreamer (libgstreamer0.10-dev)

To compile swac-scan:

  • GLibmm (libglibmm-2.4-dev)
  • Flac++ (libflac++-dev)
  • Ogg (libogg-dev)
  • Vorbis (libvorbis-dev)
  • id3tag (libid3tag0-dev)

Compilation

Download the tarball of the software from the download page and uncompress it. Place yourself in the root directory of the project and execute:

./configure
make
sudo make install
For more information about the installation procedure, please read the INSTALL file.

Usage

Swac-get

Usage : swac-get clear|upgrade|update
        swac-get select|deselect <url|packid>
        swac-get source-select|source-deselect|source-delete <url>
        swac-get list|list-sources|list-available
        swac-get sql <query>
        swac-get [--help] [--version]

Swac-get is a simple command line program which allow the downloading and installation in
a SQlite3 of audio collections of words (SWAC). For more information, please, visit the
Shtooka Project homepage at: http://shtooka.net/.
Commands :
   clear                   clear database
   deselect <url|packid>   delete records of the package <url>|<packid> from the database
   list                    list installed packages
   list-available          list available packages
   list-sources            list source repositories
   sql <query>             execute a sql query in the database
   select <url|packid>     insert records of the package <url>|<packid> in the database
                           ex: swac-get select file:///usr/share/swac/monpaquet/
                               swac-get select http://packs.shtooka.net/monpaquet/ogg/
                               swac-get select fra-balm-voc
   source-delete <url>     delete <url> from the repositories list
   source-deselect <url>   deselect <url> from the repositories list
   source-select <url>     add <url> from the repositories list
   update                  update the list of available packages
   upgrade                 upgrade installed packages
Options :
   -t, --target <path>     set the SQlite3 database path
                               (default path is ~/.swac/swac.db)
   -v, --version           print version information and exit
   -h, --help              print this help and exit

You can for exemple get start by executing the following commands:

swac-get source-select http://packs.shtooka.net/
swac-get source-select file://usr/share/swac/
swac-get update
swac-get select chi-balm-hsk1
swac-get select fra-balm-voc
swac-get select eng-wcp-us
...

Little explanation: we first select the "http://packs.shtooka.net/" and "/usr/share/swac/" as repositories. We "update" the list of available packages. Then we can install audio collections by providing there identifier.

Swac-explore

Now you can run swac-explore!

swac-explore

Swac Explore under GNU/Linux Ubuntu
Swac Explore under GNU/Linux Ubuntu

Downloading of SWAC collections with DEBIAN packages system

If you are running under a Debian or Ubuntu distribution, you can use apt to download collections. Just add the following line in your "/etc/apt/sources.list":
deb http://deb.swac-collections.org/ binary/
Then execute the following command:
sudo apt-get update
Then you will have new available packages called "swac-<lang>-<name>". For exemple try :
sudo apt-get install swac-chi-balm-voc

Normal way to download collections

Just get the .tar package that you want from swac-collections.org.