diff --git a/README.md b/README.md index 8eccdfe..995a945 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,31 @@ website, and as such might have some Snipette-specific features. However, you're free to use it as you like, and any contributions are welcome! +## Config + +Seance relies on some environment variables to work. You can either +set these globally, or place them in a file named `.env` in the same +directory where you are running Seance. + +The parameters are for a WebDAV server, where Seance uploads media +files, and for your Ghost API interface. The parameters to set are: + +* `WEBDAV_SERVER_URL` - location of your WebDAV server +* `WEBDAV_USERNAME` - username for signing in +* `WEBDAV_PASSWORD` - password, likewise +* `WEBDAV_UPLOADED_PATH` - path where uploaded images will be served (it + could end up being different from `WEBDAV_SERVER_URL`: say you go to + `https://myhost.com:1234/dav/[folder]` to upload, but the public sees + it as `https://media.mysite.com/[folder]`. +* `GHOST_URL` - URL of your Ghost installation +* `GHOST_VERSION` - 'v2' or 'v3' depending on which version you're using +* `GHOST_ADMIN_KEY` - 'Admi API key for Ghost' + +In case you're wondering about the WebDAV server: that's the setup we +use at Snipette. We'd like to eventually let you upload directly through +Ghost as well, but we're prioritising our setup first to get running +before we think of anything else. Pull requests are welcome! + ## Pull a post from Medium # replace the URL with an actual Medium post @@ -41,18 +66,21 @@ This will create a new folder in `./content` containing: ## Push a post to Ghost - # replace some-post with post directory - seance push content/some-post + # replace some-post with name of post directory + # seance will look in ./content/[name of post] + seance push some-post -Currently, this command does not do anything. We're working on it! +This will upload images to the specified WebDAV URL, and add the post +as a draft to Ghost. It will also try to auto-detect the author, and +set that if there's a match at the other end. ## Copy a Medium post directly to Ghost # replace the URL with an actual Medium post seance import https://medium.com/@username/some-post-abc123 -This is basically the other two commands combined, so, like the `push` -command, doesn't do anything for the second part as of now. +This is basically the other two commands combined, or will be once it's +implemented. Coming soon! ## Import a Medium user to Ghost @@ -65,6 +93,9 @@ This will output a JSON object. Copy-paste that object into a new file file via the "Labs" section. This is required becaues Ghost doesn't let you directly add users; it only lets you import them. +Seance also attempts to fetch the Medium user's profile image and upload +it via WebDAV. The JSON file will link to the WebDAV-uploaded image + # credits * Medium import/export is inspired by and depends on a modified version