|
1 | 1 | # Gray Paper Reader - Links Checker |
2 | 2 |
|
3 | 3 | 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. |
5 | 5 |
|
6 | 6 | Each of these links is then evaluated: |
7 | 7 |
|
8 | 8 | 1. We check if the links points to the latest version of the GP. |
9 | 9 | 2. If not, we propose an updated link. |
10 | 10 | 3. We indicate if the updated link is most likely broken due to changes in the GP. |
11 | 11 |
|
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 |
13 | 19 |
|
14 | 20 | ```bash |
15 | 21 | npx @fluffylabs/links-check ./path-to-my-project/**/*.ts |
@@ -43,3 +49,25 @@ scanning 3703: 405.271ms |
43 | 49 | ⚠️ Yet there are 57 outdated links. See above. |
44 | 50 | ``` |
45 | 51 |
|
| 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