Skip to content

Commit 3154487

Browse files
xldrkpmirguest
authored andcommitted
Update docs
Signed-off-by: Axel Dürkop <[email protected]> Signed-off-by: Tao Lin <[email protected]>
1 parent b8f9158 commit 3154487

File tree

1 file changed

+34
-28
lines changed

1 file changed

+34
-28
lines changed

README.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,50 @@ For more background, see the initial [discussion](https://github.com/hackmdio/co
77
*There is an alternative, TypeScript-based CodiMD CLI for `hackmdio/codimd` maintained by the HackMD team here: https://github.com/hackmdio/codimd-cli.*
88
*(it may or may not be compatible with the `hedgedoc/hedgedoc` server)*
99

10-
## Install
10+
## Installation
1111

12-
Dependencies:
12+
### Dependencies
1313

1414
- A HedgeDoc server running somewhere
1515
- `curl` (install via `apt install curl` or `brew install curl` on Mac)
1616
- `wget` (install via `apt install wget` or `brew install wget` on Mac)
1717
- `jq` (install via `apt install jq` or `brew install jq` on Mac)
1818

19-
```bash
20-
git clone https://github.com/hedgedoc/cli
21-
cd cli/bin
22-
# optionally symlink the hedgedoc script somewhere into your $PATH
23-
# might need admin rights (sudo)
24-
ln -s $PWD/hedgedoc /usr/local/bin/hedgedoc
25-
26-
# check if the new command exists. You should see the documentation
27-
hedgedoc
28-
29-
# set HEDGEDOC_SERVER environment variable to your server's URL
30-
# it defaults to http://127.0.0.1:3000
31-
# do this in .profile and/or .bashrc
32-
export HEDGEDOC_SERVER='https://hedgedoc.example.com'
33-
# log out and in again to the terminal to read the new variable
34-
35-
# Test by creating a new note with FREELY access, no login required
36-
# You will receive the generated hash for the document
37-
# Caution: You won't have the right to delete the new document!
38-
echo "# HedgeDoc!" > test.md
39-
hedgedoc import test.md
40-
41-
# check for the document in the browser by concatenating the
42-
# address of your server and the hash
43-
```
19+
Clone the repository.
20+
21+
$ git clone https://github.com/hedgedoc/cli
22+
23+
Enter the folder with the script.
24+
25+
$ cd cli/bin
26+
27+
Optionally symlink the hedgedoc script somewhere into your $PATH to make it globally accessible. Otherwise you will have to provide the path to the script manually. This command might need admin rights (sudo)!
28+
29+
$ ln -s $PWD/hedgedoc /usr/local/bin/hedgedoc
30+
31+
Check if the new command exists. You should see the documentation
32+
33+
$ hedgedoc
34+
35+
Set `HEDGEDOC_SERVER` environment variable to your server's URL. It defaults to `http://127.0.0.1:3000` Do this once on the command line or persist it in `.profile` and/or `.bashrc`.
36+
37+
$ export HEDGEDOC_SERVER='https://hedgedoc.example.com'
38+
39+
Log out and in again to the terminal to read the new variable.
40+
41+
Test your configuration by creating a new note with FREELY access and no login required. You will receive the generated hash for the document like `3jXcabSfSNesbH6KT72ieg`.
42+
43+
**Caution: You won't have the right to delete the new document if not authenticated!**
44+
45+
$ echo "# HedgeDoc!" > test.md
46+
$ hedgedoc import test.md
47+
48+
Check for the document in the browser by concatenating the
49+
address of your server and the hash.
4450

4551
## Documentation
4652

47-
It's not necessary to authenticate against the server in order to use `hedgedoc-cli`. But without authentication you won't have access to the non-FREELY documents and everything that's accessible behind the login.
53+
It's not necessary to authenticate against the server in order to make use of `hedgedoc-cli`. But without authentication you won't have access to the non-FREELY documents and everything that's accessible behind the login.
4854

4955
### Variants of authentication
5056

0 commit comments

Comments
 (0)