wpu.nu

VariableNaming

Från wpu.nu

Version från den 6 juni 2021 kl. 18.11 av Simon Lundell (diskussion | bidrag) (Skapade sidan med ' # D O C U M E N T S T A N D A R D # ############### ############### # # N A M I N G # # Documents are stored as PDF with a filename of the format: # [docume...')
(skillnad) ← Äldre version | Nuvarande version (skillnad) | Nyare version → (skillnad)


  1. D O C U M E N T S T A N D A R D
  2. ############### ###############
  3. N A M I N G
  4. Documents are stored as PDF with a filename of the format:
  5. [document_md5sum].pdf
  6. Document metadata is saved as a json-file with a filename of the format:
  7. [document_md5sum].json
  8. in the same folder as it's corresponding pdf-file.
  9. Exceptions:
  10. On wiki import the file is copied to the import folder with
  11. a descriptive filename, as that is what the corresponding
  12. wiki pages will be named.
  13. On download the file is named to whatever name the file is given upon
  14. download, as a checksum cannot be calculated until the file is on disk.
  15. It is then imediately renamed according to the standard
  16. On generation the file is named with a unique name (like parent doc + pages to include)
  17. When the file has been generated, a checksum is calculated and
  18. the file is renamed.
  19. A T T R I B U T E S
  20. Some document attributes are reserved and given a defined meaning here.
  21. Other attributes can exists, but should not be passed to other programs
  22. CamelCase is used due to it being used in the wiki
  23. GENERAL
  24. Type: [interrogation, promemoria, confrontation, letter, etc]'
  25. Title: A well formatted and descriptive title that will be the base name on the wiki
  26. WikiTitle: Same as above but after wiki name formatting and folding
  27. Checksum: MD5 checksum of the corresponding PDF-file
  28. SectionCode: A code refering to the ledger
  29. InterrogationStart: Date and/or time of interrogation start or generation of document
  30. InterrogationEnd: Date and/or time of interrogation end
  31. Language: sv
  32. Interrogator: Name of interrogator
  33. Interrogated: Name of interrogated
  34. ShortSummary: A short summary displayed on the wiki
  35. Author: Name of person generating a document if not the interrogator
  36. Progress: Stage of document in wiki-terms (e.g. proofread, waiting for OCR)
  37. Notes: Notes on the document, also used for OCR errors etc
  38. Stage: The stage in the import process [OCR, waiting, downloaded, etc]
  39. Release: True if doc should be deleted in the next iteration
  40. SPIDER
  41. FoundAt: Name of the page where the download link was found
  42. FoundAtURL: The URL from which the download link was found (if any)
  43. DownloadURL: The URL from which the pdf was downloaded
  44. DownloadURLText: Text tag from the above URL
  45. DownloadDescription: A description found in association with the download URL
  46. DownloadFileName: The name of the file as downloaded
  47. IMPORT
  48. NumberOfPages: Number of pages contained in the corresponding PDF
  49. SizeHuman: PDF file size in human readable form incl units (str)
  50. SizeBytes: PDF file size in bytes (int)
  51. SlackDocShouldImportMsgTS: ID of #slack-message asking about import
  52. SlackDocShouldImportResponseTS: ID of #slack-response asking about import
  53. DERIVED
  54. PDFFilename: <checksum>.pdf
  55. JSONFilename: <checksum>.json
  56. Directory: <base_directory>/<Stage>/
  57. OCRCacheTestFile: Filename which if present should cause use of cached OCR results
  58. WikiIndex: Index:<WikiTitle>
  59. LOG
  60. list of dict
  61. log[<date>] = {text:str,...}