recollect

2022-07-15 12:40 UTC
  • Xyne

Metadata

Description: Keep local copies of remote files updated.
Latest Version: 2013.10.6
Source Code: src/
Architecture:
  • any
Dependencies:
  • python3
Arch Repositories:
  • [xyne-any]
  • [xyne-i686]
  • [xyne-x86_64]
AUR Page: recollect
Arch Forum Thread: 170810
Tags:

About

Recollect was written to keep local copies of remote files up-to-date. For example, the URI http://www.haskell.org/ghc/docs/latest/users_guide.pdf always links to the latest version of the GHC User Guide. To keep a local copy synchronized with the latest version, you would need to mirror this link whenever a new version is released. That is quite easy to do for a single file, but if you gradually accumulate several files that you wish to mirror, it can become very tedious to keep track of them all, especially if you move the local files around.

This is what Recollect tries to simplify. It keeps track of files and their source URIs in an SQLite database. After the initial retrieval, all files (or a selected subset) can be updated with a single command. It is also possible to find files that have moved by recursively scanning a given directory for files with matching sizes and checksums.

See the help message below for the full list of available commands.

Usage Example

Retrieve the latest version of the GHC user guide and store the metadata in a database named docs.sqlite:

$ recollect --db docs.sqlite "GHC_User_Guide.pdf" "http://www.haskell.org/ghc/docs/latest/users_guide.pdf"

Now you realize that you should have saved the guide in another directory, so move the file and relocate it with recollect:

$ mv -t /path/to/ghc/docs GHC_User_Guide.pdf
$ recollect --db docs.sqlite --search /path/to/ghc/docs
Update /home/you/some/dir/GHC_User_Guide.pdf
    to /path/to/ghc/docs/GHC_User_Guide.pdf? [Y/n]

The file is now tracked at the new location. To update just the GHC user guide:

$ recollect --db docs.sqlite update /path/to/ghc/docs/GHC_User_Guide.pdf

To update all tracked files:

$ recollect --db docs.sqlite update

Tip

Typing in the database every time is tedious. Write a wrapper script for each database that you plan to use, e.g.

#!/bin/bash
recollect --db /full/path/to/docs.sqlite "$@"
Contact
echo xyne.archlinux.org | sed 's/\./@/'
Validation
XHTML 1.0 Strict CSS level 3 Atom 1.0