Catalog.txt
From CONTENTdm Users Wiki
- The title of this article should be catalog.txt. The initial letter is capitalized and an underscore is substituted or omitted because of technical restrictions.
[edit] purpose
catalog.txt is the master list of all collections that exist on your server.
[edit] format
preamble (this is optional, except for maybe the first line)
>CATALOG # # 1. This is the catalog file for CONTENTdm #
each collection gets a single line with three elements separated by tabs (two tabs between the alias and the name, one tab between the name and the path).
/collectionalias^I^IName of Collection^I/path/to/collection/directory
an example catalog.txt displayed with cat -vet to show white space
>CATALOG$ $ #$ # 1. This is the catalog file for CONTENTdm$ #$ $ /dce^I^IDublic Core Elements^I/data/collections/dce$ /jkt^I^IThe Fabulous Collection of Josh Kline^I/data/collections/jkt$ /stc^I^ISenior Theses From The Claremont Colleges^I/data/collections/stc$ /met^I^IMike Emery^I/data/collections/met$ /coc^I^ICCDL Collections^I/data/collections/coc$
^I represents a tab character.
Line endings are UNIX style: $ represents a line feed (\n).
[edit] notes
- You cannot move catalog.txt to another directory because the path to is is hard coded into the compiled CONTENTdm programs.
- You cannot use a symlink in place of catalog.txt because CONTENTdm deletes and recreates it to make edits.
- The previous version is stored in
catalog.txt.old - see preventing remote access to catalog.txt
- due to its simple format you can easily write a collection creation script
- catalog.txt is parsed by the API functions dmGetCollectionList and dmGetCollectionParameters in DMSystem.php

