aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Powers <mark@marks.kitchen>2020-12-26 10:47:56 -0600
committerMark Powers <mark@marks.kitchen>2020-12-26 10:47:56 -0600
commit20096c46ec822486d0547b30e47020523e3f29ca (patch)
treed1b6c21fcbb836522ab2b81ac4be98c7dd7b40c1
parent533943a74dce31f81211b86c49052c341cd5c9eb (diff)
Add README.md and requirements.txt
-rw-r--r--README.md53
-rw-r--r--requirements.txt2
2 files changed, 55 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4756c27
--- /dev/null
+++ b/README.md
@@ -0,0 +1,53 @@
+# wikijscmd
+## Description
+A client to use wiki.js over the command line. Supports creating, editing,
+and viewing pages, and viewing the wiki file tree.
+
+## Usage
+wikijscmd supports the following commands:
+
+### create PATH TITLE CONTENT?
+creates a page with the given page, title, and content. Content is optional,
+if none is provided, then an editor will open based on the VISUAL or EDITOR
+variable.
+
+### edit (PATH|ID)
+opens a page in the editor based on VISUAL or EDITOR variables for the given
+path or ID parameters. An ID is the integer type for the page. Path may
+optionally start with a / to indicate that an integer only path is not an ID.
+
+### single (PATH|ID)
+prints the page contents for the given path or ID parameters. An ID is the
+integer type for the page. Path may optionally start with a / to indicate that
+an integer only path is not an ID.
+
+### tree PATH\_CONTAINS?
+prints out the tree of all pages where the path contains the given parameter.
+Printed information includes the page title, ID, path.
+
+### today
+Creates a page with the path `YYYY/MM/DD` and title as the date name. For
+example, if the date is January 1, 1970, this is equivalent of running the
+command `create 1970/01/01 "Janurary 1"`.
+
+## Installation
+Clone the repository or download the source code.
+
+Install python3, and pip for python3 for your system.
+
+Install the dependencies
+`pip3 install -r requirements.txt`
+
+Create a file `config.ini` with the following information:
+```
+[wiki]
+key=YOUR_KEY_HERE
+url=YOUR_GRAPHQL_ENDPOINT_HERE
+```
+The key is provided via the admin panel under the API access tab. The URL
+for wiki.js is typically the URL of your wiki with the path `/graphql`. For
+example, if your wiki is at `wiki.example.com`, the url field should be set to
+`https://wiki.example.com/graphql`.
+
+Run `main.py` in order to use the program.
+
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..57db5b3
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+requests==2.25.1
+