app.lua 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. -- Application configuration.
  2. local ROOT = os.getenv("PKA_ROOT") or "./"
  3. return {
  4. id = {
  5. -- Length in ASCII characters of system-generated IDs.
  6. len = 16,
  7. -- Two seeds for the random ID generator.
  8. seed = {256, 512},
  9. },
  10. md = {
  11. -- Single-valued fields. TODO rely on content model cardinality.
  12. single_values = {
  13. ["dc:identifier"] = true,
  14. ["pas:contentType"] = true,
  15. ["dc:title"] = true,
  16. ["path"] = true,
  17. ["pas:sourcePath"] = true,
  18. },
  19. },
  20. fs = {
  21. -- Base path to write opaque resources.
  22. ores_path = ROOT .. "data/ores/",
  23. -- Base path of LSUP store for descriptive resources (RDF).
  24. dres_path = ROOT .. "data/dres/",
  25. -- How many bytes to read when handling files. Adjust to memory
  26. -- availability.
  27. stream_chunk_size = 1024 ^ 2, -- 1Mb
  28. },
  29. -- Namespace prefixes to populate the Pocket Archive NS map.
  30. namespace = {
  31. dc = "http://purl.org/dc/terms/",
  32. foaf = "http://xmlns.com/foaf/0.1/",
  33. pas = "http://id.pkar.knowledgetx.com/schema#",
  34. par = "urn:pkar:resource/",
  35. premis = "http://id.loc.gov/vocabulary/preservation/",
  36. rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
  37. rdfs = "http://www.w3.org/2000/01/rdf-schema#",
  38. xsd = "http://www.w3.org/2001/XMLSchema#",
  39. },
  40. -- Static and dynamic site settings.
  41. site = {
  42. title = "Pocket Archive demo site"
  43. },
  44. -- Static site generation settings.
  45. htmlgen = {
  46. out_dir = "./out/html",
  47. },
  48. }