aboutsummaryrefslogtreecommitdiff
FSD import utility

FSD import utility

fsd is a command line utility to download, import and export debian packages for importing into the Free Software Directory. It is a Haskell rewrite of directory.

Install

To install, run

cabal install

This will install the binary to ~/.cabal/bin - make sure it's in your $PATH.

Quickstart

To start, create and cd into a directory for the database and downloaded files, then run

fsd init

to initialise a database, and

fsd get all && fsd import all

to download and import all the index files (sources, packages, translations).

Next, download the changelog and copyright files:

fsd get changelog && fsd get copyright

This may take hours, but the downloading is async, so you can start importing them already, or if you want, you can wait until all wget processes are finished first.

Import the changelog and copyright files:

fsd import changelog && fsd import copyright

Check approximately what packages are exportable by running

fsd list

And finally, it is time to export to wiki files:

fsd export

it will write all files in ./wiki directory.

General usage

To get help, run the command with –help:

fsd --help

and it should output:

fsd - a tool to import from Debian and export to FSD entries.

Usage: fsd [-d|--database DATABASE] [-m|--dist-dir DISTDIR] 
           [-n|--nworkers NWORKERS] [-e|--export-dir EXPORTDIR] COMMAND

  FSD import script

Available options:
  -d,--database DATABASE   Database store of imported package info.
                           (default: "./directory.db")
  -m,--dist-dir DISTDIR    Root directory to files downloaded from debian.
                           (default: "./distfiles")
  -n,--nworkers NWORKERS   Number of wget workers for downloading changelog and
                           copyright files. (default: 4)
  -e,--export-dir EXPORTDIR
                           Directory to place the exported .wiki files.
                           (default: "./wiki")
  -h,--help                Show this help text

Available commands:
  init                     Initilise database
  get                      Download index and metadata files.
  import                   Import package info from local index and metadata
                           files.
  export                   Export packages to .wiki files.
  list                     List imported packages

Contact and copyright

  • For any issues email mailto:id@ypei.org.
  • Copyright (C) 2022 Yuchen Pei.
  • Licensed under AGPLv3+.