diff options
Diffstat (limited to 'README.org')
-rw-r--r-- | README.org | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/README.org b/README.org new file mode 100644 index 0000000..c9b8bdc --- /dev/null +++ b/README.org @@ -0,0 +1,102 @@ +#+title FSD import utility + +=fsd= is a command line utility to download, import and export debian +packages for importing into the [[https://directory.fsf.org][Free Software Directory]]. It is a +Haskell rewrite of [[https://savannah.gnu.org/p/directory][directory]]. + +* Install +To install, run + +#+begin_src sh +cabal install +#+end_src + +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 + +#+begin_src sh +fsd init +#+end_src + +to initialise a database, and + +#+begin_src sh +fsd get all && fsd import all +#+end_src + +to download and import all the index files (sources, packages, +translations). + +Next, download the changelog and copyright files: + +#+begin_src sh +fsd get changelog && fsd get copyright +#+end_src + +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: + +#+begin_src sh +fsd import changelog && fsd import copyright +#+end_src + +Check approximately what packages are exportable by running + +#+begin_src sh +fsd list +#+end_src + +And finally, it is time to export to wiki files: + +#+begin_src sh +fsd export +#+end_src + +it will write all files in =./wiki= directory. + +* General usage + +To get help, run the command with --help: + +#+begin_src sh +fsd --help +#+end_src + +and it should output: + +#+begin_example +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 +#+end_example |