diff --git a/README.md b/README.md index e7cb9d97..03b2f3f3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,19 @@ A tool to help with reading and analyzing the Gray Paper. -# Updating available versions of the gray paper. +# Related repositories +- Gray Paper Reader community notes [graypaper-notes](https://github.com/fluffylabs/graypaper-notes). +- Gray Paper Archive [graypaper-archive](https://github.com/fluffylabs/graypaper-archive). + +# Tooling + +- [matrix-bot](./tools/matrix-bot) - Listens to Matrix channel messages and + collects the ones containing GP Reader links. These messages can later be + turned into notes JSON file. +- [links-check](./tools/links-check) - Scan a set of files for GP Reader links + and check their versions or generate notes JSON file. + +# Updating available versions of the Gray Paper Gray Paper versions are stored in [a separate repository](https://github.com/fluffylabs/graypaper-archive), added as a git submodule. diff --git a/tools/links-check/README.md b/tools/links-check/README.md index cb7986de..77d10dbb 100644 --- a/tools/links-check/README.md +++ b/tools/links-check/README.md @@ -1,7 +1,7 @@ # Gray Paper Reader - Links Checker This CLI tool allows you to scan files passed as parameters -in a lookout for links to Gray Paper (GP) Reader. +in a lookout for links to the Gray Paper (GP) Reader. Each of these links is then evaluated: @@ -9,7 +9,13 @@ Each of these links is then evaluated: 2. If not, we propose an updated link. 3. We indicate if the updated link is most likely broken due to changes in the GP. -## Usage +On top of that, the tool is able to: +- automatically update the links to recent version (`--write`) +- generate a JSON file that can be imported to Gray Paper Reader + (or used as remote notes source) containing notes with filenames with the links + (`--generate-notes`) + +## Quick Start ```bash npx @fluffylabs/links-check ./path-to-my-project/**/*.ts @@ -43,3 +49,25 @@ scanning 3703: 405.271ms ⚠️ Yet there are 57 outdated links. See above. ``` +## Options + +``` +Usage: gp-links-check [options] + +Arguments: + paths Paths of files to be scanned. Supports glob patterns. + +Options: + --ignore-file Path to a file containing patterns to ignore. Gitignore + format applies. Patterns are resolved according to current + working directory. + --fail-on-broken Exit with an error code when broken links are detected. + --version Commit hash of specific version to update to (instead of + latest). + --write Modify the files and update reader links to + requested/lastest versions. + --fix Alias for --write. + --generate-notes Generate notes for the Gray Paper Reader. + --generate-notes-label