| 1 |
Config file format |
| 2 |
================== |
| 3 |
|
| 4 |
Includes |
| 5 |
-------- |
| 6 |
|
| 7 |
:mod:`~datalad.config` enhances class:`~ConfigParser.SafeConfigParser` |
| 8 |
to also support includes. It makes it possible to specify within the |
| 9 |
`INCLUDES` section of the config file which other config file should |
| 10 |
be considered before or after a currently read config file:: |
| 11 |
|
| 12 |
[INCLUDES] |
| 13 |
before = defaults.cfg |
| 14 |
after = customizations.cfg |
| 15 |
|
| 16 |
[DEFAULTS] |
| 17 |
.... |
| 18 |
|
| 19 |
Sections |
| 20 |
-------- |
| 21 |
|
| 22 |
Download section |
| 23 |
~~~~~~~~~~~~~~~~ |
| 24 |
|
| 25 |
It is the only type of a section at this point. It specifies a single |
| 26 |
resource which crawl/monitor and fetch specified content to be |
| 27 |
deposited into the git/git-annex repository. Following fields are |
| 28 |
known and could either be specified in the specific section or in |
| 29 |
`DEFAULT` section to be reused across different sections |
| 30 |
|
| 31 |
mode |
| 32 |
Could be `download`, `fast` or `relaxed`. In `download` mode files |
| 33 |
are downloaded, and added to the git-annex, thus based on a checksum |
| 34 |
backend. `fast` and `relaxed` modes correspond to the modes of `git |
| 35 |
annex addurl` |
| 36 |
incoming |
| 37 |
Path to the `incoming` repository -- where everything gets initially |
| 38 |
imported, e.g. original archives. If no archives to be extracted, |
| 39 |
it usually then matches with `public`. Original idea for such a |
| 40 |
separation was to cover the cases where incoming materials |
| 41 |
(archives) might contain some non-distributable materials which |
| 42 |
should be stripped before being placed into `public` repository |
| 43 |
public |
| 44 |
Path to the `public` repository which is the target repository to be |
| 45 |
shared |
| 46 |
description |
| 47 |
Textual description to be placed under :file:`.git/description` |
| 48 |
include_href |
| 49 |
Regular expression to specify which URLs, pointed to by HTML `<A>` |
| 50 |
should be considered to be added to the repository |
| 51 |
include_href_a |
| 52 |
Regular expression to specify which links with matching text should |
| 53 |
be considered |
| 54 |
exclude_href, exclude_href_a |
| 55 |
Similar setups to specify which ones to exclude (e.g. if `include_href=.*`) |
| 56 |
recurse |
| 57 |
Regular expression to specify which URLs to consider for further |
| 58 |
traversal while crawling the website |
| 59 |
|
| 60 |
TODO. Some additional documentation is currently within |
| 61 |
:meth:`datalad.config.EnhancedConfigParser.get_default` |