You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-28Lines changed: 34 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,44 +7,50 @@ For more background, see the initial [discussion](https://github.com/hackmdio/co
7
7
*There is an alternative, TypeScript-based CodiMD CLI for `hackmdio/codimd` maintained by the HackMD team here: https://github.com/hackmdio/codimd-cli.*
8
8
*(it may or may not be compatible with the `hedgedoc/hedgedoc` server)*
9
9
10
-
## Install
10
+
## Installation
11
11
12
-
Dependencies:
12
+
### Dependencies
13
13
14
14
- A HedgeDoc server running somewhere
15
15
-`curl` (install via `apt install curl` or `brew install curl` on Mac)
16
16
-`wget` (install via `apt install wget` or `brew install wget` on Mac)
17
17
-`jq` (install via `apt install jq` or `brew install jq` on Mac)
18
18
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
# 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`.
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.
44
50
45
51
## Documentation
46
52
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.
0 commit comments