|
@@ -136,6 +136,64 @@ The entire site must be generated every time resources are created or updated.
|
|
This is usually very fast, but on large archives it can take a while. This is
|
|
This is usually very fast, but on large archives it can take a while. This is
|
|
the downside of static website: they are static.
|
|
the downside of static website: they are static.
|
|
|
|
|
|
|
|
+## Functionality
|
|
|
|
+
|
|
|
|
+### CLI
|
|
|
|
+
|
|
|
|
+Pocket Archive can be managed via a command line interface (CLI) when
|
|
|
|
+installed locally (e.g. via Luarocks).
|
|
|
|
+
|
|
|
|
+The `pkar` script contains several useful commands, e.g.
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+pkar init [--wipe]
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Initialize the Pocket Archive store and database at the location indicated by
|
|
|
|
+the `$PKAR_DRES` and `$PKAR_ORES` environment variables. The `--wipe` option
|
|
|
|
+deletes all preexisting data found in those directories.
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+pkar deposit <path>
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Deposit resources in the `<path>` folder. This folder must contain a
|
|
|
|
+laundry list named `pkar_submission.csv` with file paths relative to that
|
|
|
|
+folder.
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+pkar gen_site
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Generate static site at `out/html`. This includes all HTML pages, derivative
|
|
|
|
+media, thumbnails, ancillary assets, and RDF representations of all resources.
|
|
|
|
+The `html` folder can be pointed to by a static HTTP server for local testing,
|
|
|
|
+or copied to a remote HTTP server. For local testing, I have been using
|
|
|
|
+`darkhttpd` which does the job in only 55Kb. *TODO serverless deployment
|
|
|
|
+option*
|
|
|
|
+
|
|
|
|
+```
|
|
|
|
+pkar gen_rdf <id> [-f, --format <format>]
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+Generate the RDF representation of one resource. Useful for debugging and
|
|
|
|
+inspecting.
|
|
|
|
+
|
|
|
|
+More detailed information can be obtain with `pkar --help`.
|
|
|
|
+
|
|
|
|
+### Environment variables
|
|
|
|
+
|
|
|
|
+The following environment variables should be set before using Pocket Archive:
|
|
|
|
+
|
|
|
|
+- `PKAR_ROOT`: Root of Pocket Archive data. It defaults to `.`.
|
|
|
|
+- `PKAR_ORES`: Directory of opaque resources (content files). It defaults to
|
|
|
|
+ `${PKAR_ROOT}/data/ores`.
|
|
|
|
+- `PKAR_DRES`: Directory of descriptive resources (metadata). It defaults to
|
|
|
|
+ `${PKAR_ROOT}/data/dres`.
|
|
|
|
+- `PKAR_CONFIG_DIR`: configuration directory. This should be a directory
|
|
|
|
+ containing the `model` directory with the content mode configuration and
|
|
|
|
+ `app.lua` with general application configuration. It defaults to `./config`.
|
|
|
|
+
|
|
## Status
|
|
## Status
|
|
|
|
|
|
**ALPHA**. Pocket Archive is a very recent project, in fast development. Its
|
|
**ALPHA**. Pocket Archive is a very recent project, in fast development. Its
|
|
@@ -144,6 +202,14 @@ foundational library, Volksdata, has been developed as a spare-time project for
|
|
|
|
|
|
### Road map
|
|
### Road map
|
|
|
|
|
|
|
|
+The first goal is to build a working prototype, with all the basic functional
|
|
|
|
+components, even if not entirely developed or only usable in a specific
|
|
|
|
+development environment, to demonstrate the overall workflows and
|
|
|
|
+functionality.
|
|
|
|
+
|
|
|
|
+The second step is to prduce a minimum viable product, which is fully
|
|
|
|
+functional and available for use by the intended audience.
|
|
|
|
+
|
|
#### Prototype
|
|
#### Prototype
|
|
|
|
|
|
- ✓ Configuration + config parser
|
|
- ✓ Configuration + config parser
|