README.md in outliner-0.2.0 vs README.md in outliner-1.0.0

- old
+ new

@@ -1,6 +1,6 @@ -# Outliner [![Gem Version](https://badge.fury.io/rb/outliner.svg)](https://badge.fury.io/rb/outliner) [![](https://images.microbadger.com/badges/version/captn3m0/outliner:v0.2.0.svg)](https://microbadger.com/images/captn3m0/outliner:v0.2.0 'Get your own version badge on microbadger.com') [![](https://images.microbadger.com/badges/version/captn3m0/outliner:latest.svg)](https://microbadger.com/images/captn3m0/outliner:latest 'Get your own version badge on microbadger.com') +# Outliner [![Gem Version](https://badge.fury.io/rb/outliner.svg)](https://badge.fury.io/rb/outliner) [![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/captn3m0/outliner)](https://hub.docker.com/r/captn3m0/outliner) [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/captn3m0/outliner)](https://hub.docker.com/r/captn3m0/outliner) [![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/captn3m0/outliner)](https://hub.docker.com/r/captn3m0/outliner) A simple HTTParty based wrapper for the [Outline API](https://www.getoutline.com/developers). It also offers a one-line import option to let you migrate an existing set of Markdown files to Outline. For quickly running export/import commands, you can use the Docker Image as well. ## Installation @@ -58,34 +58,54 @@ ## Docker You can use the pre-built docker image to run the above commands as well. See the following commands for examples: +### Setup + +Copy the `env.sample` file to `.env` and update the values there. + ### Export +Downloads all collections from Outline, and exports them as nested markdown files inside the given directory (`/data` inside the container, mount it accordingly.) + ```bash -docker run --env OUTLINE_BASE_URI="https://kb.example.com" \ - --env OUTLINE_TOKEN="PUT YOUR TOKEN HERE" \ +docker run --env-file .env --volume /tmp:/data \ captn3m0/outliner \ export \ /data ``` ### Import +Imports all markdown documents in a directory to a named Collection on outline. Creates the collection if it doesn't exist. + ```bash -docker run --env OUTLINE_BASE_URI="https://kb.example.com" \ - --env OUTLINE_TOKEN="PUT YOUR TOKEN HERE" \ +docker run --env-file .env --volume /path/to/wiki:/data \ captn3m0/outliner \ - import "/data" "Archive" + import /data "Archive" ``` +### Sync + +Does a export from Outline, and pushes the corresponding result to the Git repository. Currenly does a force-push to the repository. Use with care. + +Note: Sync is currently only available as a Docker Command + +```bash +docker run --env-file .env + --volume /etc/ssh/private.key:/root/.ssh/id_rsa + captn3m0/outliner \ + sync +``` + #### Limitations -- Images are currently not imported. Host them externally for this to work. -- Only `.md` files are currently supported +- [import] Images are currently not imported. Host them externally for this to work. +- [import] Only `.md` files are currently supported +- [docker] `StrictHostKeyChecking` is currently disabled for `push`, please only run this in trusted networks. ## Development After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.