See https://dialog.friebes.info/
- Create a MongoDB Atlas account
- Install XP runners and Composer.
First, create the import user:
$ echo -n "secret-password-here" | sha256sum
4323135e32ac4...
# Copy the connection URI from MongoDB Atlas
$ mongosh mongodb+srv:https://[USER]:[PASSWORD]@[PROJECT].[ORG].mongodb.net
$ use dialog
$ db.users.insert({handle: "import", pass: "4323135e32ac4..."});
# ...
Store the connection string in a configuration file named config.ini:
[mongo]
uri=mongodb+srv:https://[USER]:[PASSWORD]@[PROJECT].[ORG].mongodb.net/?readPreference=nearest
Then, run composer to install PHP and JavaScript dependencies.
$ composer up
# ...
Now, Dialog can be run locally.
$ xp serve
# ...
Open https://localhost:8080/ to see the empty page
Next, we'll import some pictures:
$ xp import import-target/ https://import:pass@localhost:8080/api
# ...
Expects the following directory structure:
import-target
|- content.md
|- image-1.jpg
|- image-2.jpg
`- image-(n).jpg
Expects the following directory structure:
import-target
|- journey.md
|- part-1
| |- content.md
| |- image-1.jpg
| `- image-2.jpg
|- part-2
| |- content.md
| |- image-1.jpg
| `- image-2.jpg
`- part-(n)