Skip to content

Commit 7241f59

Browse files
tomusdrwDrEverr
andauthored
Update readme (#172)
* Update readme * Update main readme. * Update tools/links-check/README.md Co-authored-by: Mewa <ms1997sokol@gmail.com> --------- Co-authored-by: Mewa <ms1997sokol@gmail.com>
1 parent c48c3c0 commit 7241f59

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@
55

66
A tool to help with reading and analyzing the Gray Paper.
77

8-
# Updating available versions of the gray paper.
8+
# Related repositories
9+
- Gray Paper Reader community notes [graypaper-notes](https://github.com/fluffylabs/graypaper-notes).
10+
- Gray Paper Archive [graypaper-archive](https://github.com/fluffylabs/graypaper-archive).
11+
12+
# Tooling
13+
14+
- [matrix-bot](./tools/matrix-bot) - Listens to Matrix channel messages and
15+
collects the ones containing GP Reader links. These messages can later be
16+
turned into notes JSON file.
17+
- [links-check](./tools/links-check) - Scan a set of files for GP Reader links
18+
and check their versions or generate notes JSON file.
19+
20+
# Updating available versions of the Gray Paper
921

1022
Gray Paper versions are stored in [a separate repository](https://github.com/fluffylabs/graypaper-archive),
1123
added as a git submodule.

tools/links-check/README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# Gray Paper Reader - Links Checker
22

33
This CLI tool allows you to scan files passed as parameters
4-
in a lookout for links to Gray Paper (GP) Reader.
4+
in a lookout for links to the Gray Paper (GP) Reader.
55

66
Each of these links is then evaluated:
77

88
1. We check if the links points to the latest version of the GP.
99
2. If not, we propose an updated link.
1010
3. We indicate if the updated link is most likely broken due to changes in the GP.
1111

12-
## Usage
12+
On top of that, the tool is able to:
13+
- automatically update the links to recent version (`--write`)
14+
- generate a JSON file that can be imported to Gray Paper Reader
15+
(or used as remote notes source) containing notes with filenames with the links
16+
(`--generate-notes`)
17+
18+
## Quick Start
1319

1420
```bash
1521
npx @fluffylabs/links-check ./path-to-my-project/**/*.ts
@@ -43,3 +49,25 @@ scanning 3703: 405.271ms
4349
⚠️ Yet there are 57 outdated links. See above.
4450
```
4551

52+
## Options
53+
54+
```
55+
Usage: gp-links-check [options] <paths...>
56+
57+
Arguments:
58+
paths Paths of files to be scanned. Supports glob patterns.
59+
60+
Options:
61+
--ignore-file <path> Path to a file containing patterns to ignore. Gitignore
62+
format applies. Patterns are resolved according to current
63+
working directory.
64+
--fail-on-broken Exit with an error code when broken links are detected.
65+
--version <name> Commit hash of specific version to update to (instead of
66+
latest).
67+
--write Modify the files and update reader links to
68+
requested/lastest versions.
69+
--fix Alias for --write.
70+
--generate-notes <file.json> Generate notes for the Gray Paper Reader.
71+
--generate-notes-label <label> Label assigned to all generated notes.
72+
-h, --help display help for command
73+
```

0 commit comments

Comments
 (0)