DL-101-182-101 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. $ datalad catalog --help
  2. Usage: datalad catalog [-h] [--version]
  3. Generate a user-friendly web-based data catalog from structured
  4. metadata.
  5. ``datalad catalog`` can be used to ``-create`` a new catalog,
  6. ``-add`` and ``-remove`` metadata entries to/from an existing catalog,
  7. start a local http server to ``-serve`` an existing catalog locally.
  8. It can also ``-validate`` a metadata entry (validation is also
  9. performed implicitly when adding), ``-set`` dataset properties
  10. such as the ``home`` page to be shown by default, and ``-get``
  11. dataset properties such as the ``config``, specific ``metadata``,
  12. or the ``home`` page.
  13. Metadata can be provided to DataLad Catalog from any number of
  14. arbitrary metadata sources, as an aggregated set or as individual
  15. metadata items. DataLad Catalog has a dedicated schema (using the
  16. JSON Schema vocabulary) against which incoming metadata items are
  17. validated. This schema allows for standard metadata fields as one
  18. would expect for datasets of any kind (such as name, doi, url,
  19. description, license, authors, and more), as well as fields that
  20. support identification, versioning, dataset context and linkage,
  21. and file tree specification.
  22. The output is a set of structured metadata files, as well as a
  23. Vue.js-based browser interface that understands how to render this
  24. metadata in the browser. These can be hosted on a platform of
  25. choice as a static webpage.
  26. Note: in the catalog website, each dataset entry is displayed
  27. under ``<main page>/#/dataset/<dataset_id>/<dataset_version>``.
  28. By default, the main page of the catalog will display a 404 error,
  29. unless the default dataset is configured with ``datalad catalog-set
  30. home``.
  31. *Examples*
  32. CREATE a new catalog from scratch::
  33. % datalad catalog-create -c /tmp/my-cat
  34. ADD metadata to an existing catalog::
  35. % datalad catalog-add -c /tmp/my-cat -m path/to/metadata.jsonl
  36. SET a property of an existing catalog, such as the home page of an
  37. existing catalog - i.e. the first dataset displayed when navigating to
  38. the root URL of the catalog::
  39. % datalad catalog-set -c /tmp/my-cat -i abcd -v 1234 home
  40. SERVE the content of the catalog via a local HTTP server at
  41. http://localhost:8001::
  42. % datalad catalog-serve -c /tmp/my-cat -p 8001
  43. VALIDATE metadata against a catalog schema without adding it to the
  44. catalog::
  45. % datalad catalog-validate -c /tmp/my-cat/-m path/to/metadata.jsonl'
  46. GET a property of an existing catalog, such as the catalog
  47. configuration::
  48. % datalad catalog-get -c /tmp/my-cat/ config
  49. REMOVE a specific metadata record from an existing catalog::
  50. % datalad catalog-remove -c /tmp/my-cat -i efgh -v 5678
  51. TRANSLATE a metalad-extracted metadata item from a particular source
  52. structure into the catalog schema. A dedicated translator should be
  53. provided and exposed as an entry point (e.g. via a DataLad extension)
  54. as part of the 'datalad.metadata.translators' group.::
  55. % datalad catalog-translate -c /tmp/my-cat -m path/to/metadata.jsonl
  56. RUN A WORKFLOW for recursive metadata extraction (using datalad-
  57. metalad), translating metadata to the catalog schema, and adding the
  58. translated metadata to a new catalog::
  59. % datalad catalog-workflow -t new -c /tmp/my-cat -d path/to/superdataset -e metalad_core
  60. RUN A WORKFLOW for updating a catalog after registering a subdataset
  61. to the superdataset which the catalog represents. This workflow
  62. includes extraction (using datalad-metalad), translating metadata to
  63. the catalog schema, and adding the translated metadata to the existing
  64. catalog.::
  65. % datalad catalog-workflow -t new -c /tmp/my-cat -d path/to/superdataset -s path/to/subdataset -e metalad_core
  66. optional arguments:
  67. -h, --help, --help-np
  68. show this help message. --help-np forcefully disables
  69. the use of a pager for displaying the help message
  70. --version show the module and its version which provides the
  71. command