All configs will have 2 main top-level keys with mandatory sub-keys as follows:
{
"from": {
"system": "pocket|txt|url"
},
"to": {
"mode": "local|remote",
"system": "dropbox|local"
},
}
If there are multiple articles the user would like to convert, a key, called articles
must be present:
{
"from": {
"system": "pocket|txt|url"
},
"to": {
"mode": "local|remote",
"system": "dropbox|{more_coming_soon}"
},
"articles": {}
}
Following, we have the system to system specific keys.
MANDATORY KEYS: every dot means one level deeper
from
.system
- always required in order for Epubify to process the datato
.mode
- this is a mandatory key in order for the application to decide how to do the processing of the book. This is also because if you have dropbox synced locally on your computer, you may still say local and have the application saved to a path that leads to your local dropbox synced folder where your eBook reader is syncing from. For example I have the following path:/home/{user_id}/dropbox/apps/Dropbox PocketBook/articles/
location. In this case, my mode will be set to "local" andto
.system
will be completely skipped from the config. Seepocket_to_local.json
config.
OPTIONAL KEYS: every dot means one level deeper
to
.filePath
can be added if you wish to save the epub files to a location, different than the defaultepubify/books/
folder. The path should be a full path, for example/home/{userid}/Desktop/books/
and should be an already existing directory. We currently do not create the directory if it doesn't exist and the processing will fail. This will be fixed soon.
NB! The path must NOT have a slash at the end, e.g. path/to/directory
instead of path/to/directory/
and must NOT include a filename, only the directory where the files will be saved.
to
.author
- if no author is provided, the default valueepubify
will be assigned as author.to
.system
- required only when themode
is set toremote
. The options that can be assigned to it are:dropbox
- save to dropbox (currently in development)- more coming soon
saveMode
- add this option inside theto
block to tell Dropbox to save in mode eitheroverwrite
orappend
credsFileName
: When the target system isdropbox
, then this key will serve to give the path to the credentials file for dropbox. You can skip this key, if you create a file called 'api_keys.json' and make it look like below, put the file inepubify/systems/vault/
directory and it will be fine.
{
"dropbox": {
"token": "xxxxxxx",
"app_key": "xxxxxxx",
"app_secret": "xxxxxxx"
}
}
To generate your key, go to you App Console and follow the instructions:
Click "Create app":
1. Choose an API: "Dropbox API"
2. Choose the type of access you need
a) App folder: Select this if you want Epubify to access only a specific folder in your dropbox
b) Full Dropbox: Epubify will be able to save anywhere on your dropbox
3. Name your app: "epubify"
{
"from": {
"system": "pocket"
},
"to": {
"mode": "remote",
"filePath": "/Apps/Pocketbook/articles",
"system": "dropbox",
"saveMode": "overwrite"
},
"credsFileName": "my_keys.json"
}