Exporters
ortfo/db includes a plugin-like system that allows you to run shell commands at various stages of the build process.
Usage example
Running a build with the copy, ssh and cloud exporters enabled
$ ortfodb build
Using exporter copy: copy the output database file to one or more locations
Using exporter ssh: upload the database to an SSH server using scp or rsync.
Using exporter cloud: export the database to a cloud storage service using rclone.
Reusing smooth-cursorify
Reusing spotify-playlist-covers
Reusing subfeed-for-spotify
Reusing trigonometry-synth
Reusing 雨と雪
Finished compiling to database.json in 0s
Copying database to ~/projects/database.json, ~/projects/ortfo/website/public/example-database.json
Uploading database.json to ewen@ewen.works:~/www/media.ewen.works/works.json using rsync
> 1.181.355 100% 187,11MB/s 0:00:00 (xfr#1, to-chk=0/1)
Uploading database.json to googledrive:projects/database.json, with rclone
> Transferring:
> * database.json:100% /1.127Mi, 1.126Mi/s, 0s
> Transferred: 1 / 1, 100%
> Elapsed time: 3.0s
Usage
To enable and configure exporters, add an exporters
field to your ortfodb.yaml
configuration file:
...
repository: path/to/tags.yaml
exporters:
(name of the exporter):
exporter-specific configuration...
# available to all exporters.
# shows more logs about the exporter, useful for debugging
verbose: true
Example
Here's an example configuration for the FTP exporter
exporters:
ftp:
host: example.com
user: username
password: password
path: /path/to/remote/folder
Built-in exporters
WARNING
For now, most of the built-in exporters do not work on Windows
Uploading
Most built-in exporters provide functionnality to upload the generated database.json file in various ways. See Uploading with exporters
Static site generators
ortfo/db provides exporters to more conviently build your portfolio using some of the most popular static site generators. See Static site generators
Exporting to other formats
ortfo/db ships with a rudimentary SQL exporter to fill up a "real" database
Other things
See Other exporters.
Running your own commands
If you don't want to write (and maybe publish) your own exporter, you can directly declare one in your configuration file by using the Custom exporter
Creating an exporter
See the development guide for more information on how to create your own exporter.