@quran.ws/tajwid-cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +23 -0
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @quran.ws/tajwid-cli
2
+
3
+ ```bash
4
+ npx @quran.ws/tajwid-cli rules qalqalah
5
+ npx @quran.ws/tajwid-cli explain madd-lazim-harfi.1
6
+ npx @quran.ws/tajwid-cli gaps
7
+ ```
8
+
9
+ The CLI does two kinds of thing.
10
+
11
+ **Asking questions about the rules** needs no Quranic text and works right
12
+ away — which rules exist, what a rule says, and which rules the notation still
13
+ cannot express.
14
+
15
+ **Annotating** needs text, which this tool does not ship and will not fetch:
16
+
17
+ ```bash
18
+ tajweed annotate --text "مَنْ تَكَلَّمَ سُوءًا"
19
+ echo "…" | tajweed annotate --format json
20
+ tajweed annotate --edition ./my-edition.json --ref 2:255 --only madd
21
+ ```
22
+
23
+ `--format` is `ansi` (default), `json`, `html` or `text` (tab-separated
24
+ positions, for piping into something else).
25
+
26
+ `tajweed verify --edition <file>` prints an edition's digest — the value an
27
+ annotation set records to say which text it describes. If the digests do not
28
+ match, the positions in that set describe different text.
29
+
30
+ ## Why an edition file
31
+
32
+ A tajweed annotation is a pair of positions into one specific string, and two
33
+ editions of the Uthmani script can read identically while differing as data.
34
+ Rather than guess which text you have, the tool takes the one you point it at.
35
+ The format is `{ id, riwayah, script, ayahs: { "1:1": "…" } }`.
36
+
37
+ MIT. The rule corpus it reads is CC BY 4.0.
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@quran.ws/tajwid-cli",
3
+ "version": "0.1.0",
4
+ "description": "Command line for the tajweed rule corpus and engine.",
5
+ "license": "MIT",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "type": "module",
10
+ "bin": { "tajweed": "./dist/index.js" },
11
+ "files": ["dist/", "README.md"],
12
+ "scripts": { "build": "tsc -p tsconfig.json" },
13
+ "dependencies": {
14
+ "@quran.ws/tajwid": "workspace:*",
15
+ "@quran.ws/tajwid-rules": "workspace:*"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/quran-ws/quran-tajweed.git",
20
+ "directory": "packages/cli"
21
+ },
22
+ "keywords": ["quran", "tajweed", "cli"]
23
+ }