From 7c7cf2000385f06d9f9cb0d7182fd16cdf7f8113 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Sat, 14 Dec 2019 21:28:06 +0100 Subject: [PATCH 1/3] Update search instructions --- source/installation/config.html.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/installation/config.html.md b/source/installation/config.html.md index bb57510..303179d 100644 --- a/source/installation/config.html.md +++ b/source/installation/config.html.md @@ -57,17 +57,17 @@ plm migration run Migrations should be run after each update. When in doubt, run them. -After that, you'll need to setup your instance, and the admin's account. +You will also need to initialise search index: ``` -plm instance new -plm users new --admin +plm search init ``` -You will also need to initialise search index +After that, you'll need to setup your instance, and the admin's account. ``` -plm search init +plm instance new +plm users new --admin ``` For more information about these commands, and the arguments you can give them, From 4ad57454844dafe2bd2b1566c0d4085fadbd47b6 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Mon, 16 Dec 2019 21:59:10 +0100 Subject: [PATCH 2/3] Update everything before the release. I proofread all the pages and updated was needed to be updated. --- source/CLI.html.md | 34 +++-- source/api.yaml | 137 +++++++++++++++++--- source/installation/deps/rust.html.md | 4 +- source/installation/with/docker.html.md | 2 +- source/installation/with/prebuilt.html.md | 2 +- source/installation/with/snap.html.md | 8 +- source/organization/contributors.html.md | 2 - source/organization/release-process.html.md | 1 + 8 files changed, 156 insertions(+), 34 deletions(-) diff --git a/source/CLI.html.md b/source/CLI.html.md index 4393ffb..a60bd3d 100644 --- a/source/CLI.html.md +++ b/source/CLI.html.md @@ -5,6 +5,8 @@ summary: 'plm is a little CLI tool that can help you to manage your instance fro command line if you are admin of an instance.' --- +You can see these help messages with `plm --help` or `plm COMMAND --help` (where `COMMAND` is the specific subcommand you are interested in). + If any required argument is ommitted, you will be asked to input manually. ## `plm instance` @@ -55,13 +57,28 @@ plm users new --admin -n 'kate' -N 'Kate' --bio "I'm Kate." --email 'kate@plu.me - `--password`, `-p`: the password of the user. You probably want to use this option in shell scipts only, since if you don't specify it, the prompt won't show your password. - `--admin`, `-a`: makes the user an admin of the instance. Optional, off by default. +### `plm users reset-password` + +Resets user password. + +**Example:** + +```bash +plm users reset-password -u 'alice' -p 'top_secret' +``` + +**Arguments:** + +- `--user`, `-p`: the username of the person which will have their password reset (no `@` before, not the display name). +- `--password`, `-p`: the new password of the user. You probably want to use this option in shell scipts only, since if you don't specify it, the prompt won't show your password. + ## `plm search` -Manage full text search index. +Manage search index. ### `plm search init` -Initialize the search index. +Initialize Plume's internal search engine. **Example:** @@ -71,12 +88,11 @@ plm search init -p Plume **Arguments:** -- `--path`, `-n`: path to plume working directory. -- `--force`, `-f`: override any already existing search index. +- `--path`, `-p`: path to Plume's working directory. ### `plm search refill` -Refill the search index. +Regenerates the search index. **Example:** @@ -86,7 +102,7 @@ plm search refill -p Plume **Arguments:** -- `--path`, `-n`: path to plume working directory. +- `--path`, `-p`: path to Plume's working directory. ### `plm search unlock` @@ -101,7 +117,7 @@ plm search unlock -p Plume **Arguments:** -- `--path`, `-n`: path to plume working directory. +- `--path`, `-n`: path to Plume's working directory. ## `plm migration` @@ -119,7 +135,7 @@ plm migration run -p Plume **Arguments:** -- `--path`, `-p`: path to Plume working directory. +- `--path`, `-p`: path to Plume's working directory. ### `plm migration redo` @@ -133,4 +149,4 @@ plm migration redo -p Plume **Arguments:** -- `--path`, `-p`: path to Plume working directory. +- `--path`, `-p`: path to Plume's working directory. diff --git a/source/api.yaml b/source/api.yaml index 06c77a3..f2672e6 100644 --- a/source/api.yaml +++ b/source/api.yaml @@ -25,40 +25,145 @@ paths: The post exists, but you don't have the rights to fetch it (it is probably a private draft) '404': The post was not found + delete: + Deletes the post corresponding to this ID. /posts/: get: description: List posts. + parameters: + - name: title + in: path + description: Only list article with this specific title + required: false + schema: + type: string + - name: subtitle + in: path + description: Only list article with this specific subtitle + required: false + schema: + type: string + - name: content + in: path + description: Only list article with this specific content (in HTML) + required: false + schema: + type: string + post: + description: + Creates a new post. + requestBody: + content: + 'application/json': + schema: + properties: + title: + description: The title of the new article. + type: string + subtitle: + description: The subtitle of the new article. + type: string + source: + description: The markdown source of the new article. + type: string + blog_id: + description: The ID of the blog in which to publish the new article. + type: integer + published: + description: false if this article is a draft, true if it is published. + type: bool + creation_date: + description: The publication of this article. Past dates will work, but not futures ones. Defaults to the current date. The expected format is %Y-%m-%d. + type: string + license: + description: The license of the article. Omit this field to use the default one for this instance. Leave it empty to reserve all rights. + type: string + tags: + description: The tags for the new article. + type: array + cover_id: + description: The ID of the cover image. + type: integer + required: + - title + - description + - author definitions: App: - type: "object" + type: object properties: name: - type: "string" + description: The name of the app. + type: string example: "My app" website: - type: "string" + description: The website of the app. + type: string example: "https://my.app" client_id: - type: "string" - example: "My app" + description: A unique identifier for the app. + type: string + example: "abcdef0123456789" client_secret: - type: "string" - example: "My app" + description: The secret token associated to this app. It will be used to get individual authentication tokens for each user of the app. + type: string + example: "abcdef0123456789" Post: - type: "object" + type: object properties: + id: + description: The internal ID of the post. + type: integer + example: 3 title: - type: "string" + description: The title of the post. + type: string example: "Hello, world!" - id: - type: "integer" - format: "int64" - example: 42 subtitle: - type: "string" + description: The subtitle of the post. + type: string example: "My first post." content: - type: "string" - format: "

This is my first post. Thanks for reading.

" + description: The content of the post, rendered as HTML. + type: string + format: "

This is my first post. Thanks for reading.

" + source: + description: The markdown source of the post. + type: string + example: "This is my first **post**. Thanks for reading." + authors: + description: The FQNs of the authors of this post. + type: array + example: + - "alice" + - "bob@plume.one" + blog_id: + description: The ID of the blog in which this article was published. + type: integer + example: 12 + published: + description: true if the article is published, false if it is still a draft. + type: bool + example: true + creation_date: + description: The publication date. + type: string + example: "2019-12-16" + license: + description: The license of this post. + type: string + example: "CC-BY-SA" + tags: + description: The tags of this post. + type: array + example: + - Plume + - REST + - API + - JSON + cover_id: + description: The ID of the media used as cover for this article. + type: integer + example: 42 diff --git a/source/installation/deps/rust.html.md b/source/installation/deps/rust.html.md index 7420c9c..ec5707a 100644 --- a/source/installation/deps/rust.html.md +++ b/source/installation/deps/rust.html.md @@ -2,7 +2,7 @@ title: Installing Rust & Cargo --- -TODO: instructions to choose the correct nightly directly? + Rust and Cargo use a special installer called *RustUp* that let's you manage various versions of these two programs in parallel. @@ -41,4 +41,4 @@ You can check that everything is correctly installed with `rustc --version` and We can now compile Plume's source code. -Compiling Plume \ No newline at end of file +Compiling Plume diff --git a/source/installation/with/docker.html.md b/source/installation/with/docker.html.md index 45d00a5..24649c4 100644 --- a/source/installation/with/docker.html.md +++ b/source/installation/with/docker.html.md @@ -42,9 +42,9 @@ docker-compose up -d postgres docker-compose run --rm plume plm migration run # Setup your instance +docker-compose run --rm plume plm search init docker-compose run --rm plume plm instance new -d 'domain.name' -n 'instance name' -l 'default licence' docker-compose run --rm plume plm users new -n 'admin' -N 'name' -b 'bio' -e 'admin@domain.name' -p 'pass' --admin -docker-compose run --rm plume plm search init # Launch your instance for good docker-compose up -d diff --git a/source/installation/with/prebuilt.html.md b/source/installation/with/prebuilt.html.md index 18e2ea2..10c4317 100644 --- a/source/installation/with/prebuilt.html.md +++ b/source/installation/with/prebuilt.html.md @@ -9,7 +9,7 @@ You will need to have `wget` installed for this method to work. To download and install the latest release, first define the following variables in your shell: -- `PLUME_VERSION`: the Plume version to install. The latest is `0.3.0-alpha-2`. +- `PLUME_VERSION`: the Plume version to install. The latest is `0.4.0-alpha-4`. - `PLUME_DB`: the database backend to use. Either `postgres` or `sqlite`. Then run these commands: diff --git a/source/installation/with/snap.html.md b/source/installation/with/snap.html.md index 033c565..d9a94c7 100644 --- a/source/installation/with/snap.html.md +++ b/source/installation/with/snap.html.md @@ -19,9 +19,11 @@ followed by `sudo snap set plume enabled=true`. This sets the base snap configuration; now you must configure your instance: -`sudo plume.plm instance new -d 'domain.name' -n 'instance name' -l 'default licence'` -`sudo plume.plm users new -n 'admin' -N 'name' -b 'bio' -e 'admin@domain.name' -p 'pass' --admin` -`sudo plume.plm search init` +```bash +sudo plume.plm search init +sudo plume.plm instance new -d 'domain.name' -n 'instance name' -l 'default licence' +sudo plume.plm users new -n 'admin' -N 'name' -b 'bio' -e 'admin@domain.name' -p 'pass' --admin +``` And that's it! You can now setup a reverse-proxy to access Plume from other machines than your server (which is probably what you want 😁). diff --git a/source/organization/contributors.html.md b/source/organization/contributors.html.md index 4cc4181..2e830bc 100644 --- a/source/organization/contributors.html.md +++ b/source/organization/contributors.html.md @@ -70,5 +70,3 @@ Skills: You can either [do it by yourself](https://github.com/Plume-org/docs/edit/master/source/organization/contributors.html.md) if you have a GitHub account, or give Ana all the required informations and she will add you (see above for contact information). - -Please keep the list alphabetically ordered. diff --git a/source/organization/release-process.html.md b/source/organization/release-process.html.md index 77e50d4..998ef96 100644 --- a/source/organization/release-process.html.md +++ b/source/organization/release-process.html.md @@ -8,6 +8,7 @@ summary: 'What we do between each releases' Plume follows semantic versionning. The 0.x series is for alpha versions. The `x` doesn't actually correspond to the alpha number, because `0.1.0` was before the first release, and `0.2.0` was the first alpha. +This has been fixed with the fourth alpha, which is the `0.4.0` version, by skipping the third alpha. Beta versions or pre-release uses the `-rcX` suffix, where `X` is the number of the release canditate. From 83d0a6403d3ed6b42660c8d10f74cb9b3e693865 Mon Sep 17 00:00:00 2001 From: Ana Gelez Date: Mon, 16 Dec 2019 22:26:24 +0100 Subject: [PATCH 3/3] -n have been renamed -p Co-Authored-By: fdb-hiroshima <35889323+fdb-hiroshima@users.noreply.github.com> --- source/CLI.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/CLI.html.md b/source/CLI.html.md index a60bd3d..71a9c1a 100644 --- a/source/CLI.html.md +++ b/source/CLI.html.md @@ -117,7 +117,7 @@ plm search unlock -p Plume **Arguments:** -- `--path`, `-n`: path to Plume's working directory. +- `--path`, `-p`: path to Plume's working directory. ## `plm migration`