🏡 index : github.com/captn3m0/outliner.git

author Nemo <me@captnemo.in> 2020-04-26 6:18:20.0 +05:30:00
committer Nemo <me@captnemo.in> 2020-04-26 6:19:43.0 +05:30:00
commit
6df57d97cc02eca510a96b93239259319ebe370c [patch]
tree
242a308a9e7c84ddba9cfbe66f645a900914cb74
parent
16e5ea504aebc0afbd90b2276df8b93e0e57edd4
download
6df57d97cc02eca510a96b93239259319ebe370c.tar.gz

Version Bump (1.0.0)



Diff

 CHANGELOG.md            | 11 +++++++++++
 README.md               | 39 ++++++++++++++++++++++++++-------------
 lib/outliner/version.rb |  2 +-
 3 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index f53f63a..7559596 100644
--- a/CHANGELOG.md
+++ a/CHANGELOG.md
@@ -7,6 +7,17 @@

## [Unreleased]

## 1.0.0 - 2020-04-26

### Changed

- Changes `push` to `sync`.

### Added

- `sync` now actually syncs the git repository, and maintains history.


## 0.2.2 - 2019-08-14

- Adds a `push` command (See #2)
diff --git a/README.md b/README.md
index f72a1bc..373eb4f 100644
--- a/README.md
+++ a/README.md
@@ -1,4 +1,4 @@
# 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.

@@ -60,11 +60,16 @@

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 \

@@ -73,35 +78,33 @@

### 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

### Push
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: Push is currently only available as a Docker Command
Note: Sync is currently only available as a Docker Command

```bash

docker run --env OUTLINE_BASE_URI="https://kb.example.com" \
           --env OUTLINE_TOKEN="PUT YOUR TOKEN HERE" \

           --env OUTLINE_TOKEN="PUT YOUR TOKEN HERE" \

           --env GIT_BRANCH=outline \

           --env GIT_REMOTE_URL=git@example.com:org/outline.backup.git

docker run --env-file .env
           --volume /etc/ssh/private.key:/root/.ssh/id_rsa

           captn3m0/outliner \

           push

           sync

```


#### Limitations

- Images are currently not imported. Host them externally for this to work.
- Only `.md` files are currently supported
- `push` doesn't sync file-history, but is meant to push a one-time backup to Git.
- `StrictHostKeyChecking` is currently disabled for `push`, please only run this in trusted networks.
- [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

diff --git a/lib/outliner/version.rb b/lib/outliner/version.rb
index 536823c..7e514b1 100644
--- a/lib/outliner/version.rb
+++ a/lib/outliner/version.rb
@@ -1,3 +1,3 @@
module Outliner
  VERSION = "0.2.2"
  VERSION = "1.0.0"
end