In the /log reader, I'm using pathnames to infer the content-types, and schemas, of data-files stored in dats. It will assume that files which match against /log/*.txt
are text/plain files which should be listed in this application's feed.
My thinking is, this is a 1) convenient 2) simple and 3) descriptive-enough way to handle data meta-information. It's more convenient than writing out explicit metadata in the dat.json file, and it's also easy to write path-matching rules for (using unix path-globs).
Some example duck-typing rules:
-
/dat.json
- the dat metadata file -
/favicon.{ico,png,jpg,jpeg}
- favicon for the dat -
/log/*.txt
- blog posts about the archive -
/photos/*/*.{png,jpg,jpeg}
- photo album pics -
/photos/*/album.json
- metadata file about a photo album
Might work, might not.