Friday, February 8, 2019

I checked in my work for #2826. Summary of the changes (most of them in lino.modlib.uploads):

Until now an Upload could represent:

  • an uploaded file (the original meaning)
  • just an entry representing some external document to be monitored by its author, but without any uploaded file

With #2826 we add a third possibility:

  • a “library file” (i.e. a file that has been stored on some volume using some other method than uploading).

Concretely:

TODO:

  • Limit the list of selectable files of a volume. exclude patterns, glob patterns etc.

    For example for MM we would define a volume “invoices” which shows only *.pdf files being stored in a directory named “acct/{yyyy}/EKR” where {yyyy} is the accounting year.

  • Add a field broken and a data checker that verifies whether the file still exists. This can be used both for library files and for uploaded files.

  • Maybe add a field file_modified.

  • should we define an upload area for invoices? or make it configurable per journal?

  • define a volume or two in the demo fixtures

  • write test cases and update the docs

  • remove the files plugin.

  • update the change notes.

For today I did the bare minimum because I want to have it working for Monday. The book test suite has about 18 trivial failures, but I will now commit and push the changes before everything is done in order to test it on the fly in our production site.