aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/ocda/abstraction/load.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/ocda/abstraction/load.d')
-rw-r--r--src/sisudoc/ocda/abstraction/load.d34
1 files changed, 13 insertions, 21 deletions
diff --git a/src/sisudoc/ocda/abstraction/load.d b/src/sisudoc/ocda/abstraction/load.d
index ebdd1a5..ea387d1 100644
--- a/src/sisudoc/ocda/abstraction/load.d
+++ b/src/sisudoc/ocda/abstraction/load.d
@@ -50,38 +50,30 @@
module sisudoc.ocda.abstraction.load;
@safe:
/+ ↓ one way in, whatever the document is being read from
-
spine's pipeline is markup -> abstraction -> output. once the abstraction
is serialised, there is more than one thing an abstraction can be read
from, and a consumer should not have to know which it was handed:
-
+ .
.sst / .ssm + images the markup source
pod (dir) + images the same, bundled
pod .zip the same, zipped
.ssp + images the abstraction, as text
.ocda.db the abstraction, sqlite, images inside
-
- A source may also be remote. spine already takes a URL argument ending
- in .zip: it is downloaded to a temp file (downloadZipUrl in
- ocda/io_in/read_zip_pod.d, guarded by rgx_url_zip and by --allow-
- downloads) and the local path is processed in its place. The same should
- be offered for .ocda.db, which is the one other artefact that is
- self-sufficient enough to be fetched on its own: it carries its images.
- What that needs is small and is not done here:
-
- - rgx_url_zip is `^https?://...[.]zip$`; a sibling pattern for
- `[.]ocda[.]db$`, or one pattern covering both
- - the same download path, which is already generic apart from that
- regex, and the same temp-file cleanup
- - dispatch, which this module already does once the file is local
-
- A .ssp URL would want its images too, so it is a pod or a database that
- travels, not a .ssp on its own.
-
+ .
+ A source may also be remote. A URL ending in .zip or in .ocda.db is
+ downloaded to a temp file (downloadSourceUrl in
+ ocda/io_in/read_zip_pod.d, guarded by rgx_url_source and by
+ --allow-downloads) and the local path is processed in its place.
+
+ Those two travel because each is self-sufficient: a pod holds its
+ source and images, a .ocda.db holds its abstraction and images. A .ssp
+ does not, describing its images by name and digest without carrying
+ them, so it would arrive without them and is not fetched.
+ .
This module names those sources, tells them apart, and loads the two
that are self-describing artefacts, returning the value the parser
produces.
-
+ .
The three source forms are deliberately *not* loaded here. They are the
parser's job (sisudoc.ocda.meta.metadoc, spineAbstraction), and it needs
the environment, the options and the configuration that spine.d