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
# log out and in again to the terminal to read the new variable
27
34
28
-
# Test by creating a new note
29
-
hedgedoc login --email
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
30
39
hedgedoc import test.md
31
-
```
32
-
33
-
## Documentation
34
40
35
-
### Create/import a new note
36
-
```bash
37
-
$ hedgedoc import <input_path> [note_id] # takes a local path to a text file, and an optional note id for the new note
38
-
qhmNmwmxSmK1H2oJmkKBQQ # returns <note_id> on success
41
+
# check for the document in the browser by concatenating the
42
+
# address of your server and the hash
39
43
```
40
44
41
-
You can open the new note on the server by going to `$HEDGEDOC_SERVER/<note_id>`.
45
+
## Documentation
42
46
43
-
The optional `note_id` is only available on servers with `allowFreeURL`
44
-
enabled.
45
-
Check the [documentation](https://docs.hedgedoc.org/configuration/#users-and-privileges)
46
-
for more information.
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.
47
48
48
-
### Publish an existing note
49
+
### Variants of authentication
49
50
50
-
```bash
51
-
$ hedgedoc publish qhmNmwmxSmK1H2oJmkKBQQ # takes a <note_id>
52
-
S1ok9no3f # returns public note id
53
-
```
54
-
You can open the published note on the server by going to `$HEDGEDOC_SERVER/s/<public_note_id>`.
51
+
#### Authenticate with cookie
55
52
56
-
### Export an existing note
53
+
Authentication with a cookie is so far the only way if you login with GitLab and the like. Use browser extensions like [Get cookies.txt](https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid) to store the cookie in `key.conf`.
57
54
58
-
```bash
59
-
$ hedgedoc export --pdf qhmNmwmxSmK1H2oJmkKBQQ # takes a <note_id>, outputs to <note_id>.pdf by default
60
-
$ hedgedoc export --md qhmNmwmxSmK1H2oJmkKBQQ my_note.md # or you can specify an output path explicitly
0 commit comments