waraq 0.0.0-stage → 0.2.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.
- package/LICENSE +26 -0
- package/README.md +200 -2
- package/agent/skills/waraq/SKILL.md +88 -0
- package/agent/skills/waraq/references/kindle.md +25 -0
- package/agent/skills/waraq/references/models-and-cost.md +43 -0
- package/agent/skills/waraq/references/quran-review.md +47 -0
- package/agent/skills/waraq/references/rights.md +15 -0
- package/agent/skills/waraq/references/structure-fixes.md +41 -0
- package/assets/body-amiri.css +3 -0
- package/assets/body-nastaliq.css +2 -0
- package/assets/epub.css +29 -0
- package/assets/fonts/Amiri-Bold.ttf +0 -0
- package/assets/fonts/Amiri-OFL.txt +94 -0
- package/assets/fonts/Amiri-Regular.ttf +0 -0
- package/assets/fonts/NotoNastaliqUrdu-OFL.txt +93 -0
- package/assets/fonts/NotoNastaliqUrdu-Regular.ttf +0 -0
- package/assets/fonts-ar.css +6 -0
- package/assets/fonts-ur-naskh.css +5 -0
- package/assets/fonts-ur.css +5 -0
- package/assets/logo-readme.png +0 -0
- package/dist/waraq.mjs +330 -0
- package/package.json +55 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
waraq
|
|
2
|
+
Copyright (c) 2026 Muhammad Ahsan Ayaz. All rights reserved.
|
|
3
|
+
|
|
4
|
+
waraq is free to use. You may install it and use it, for any purpose, at no cost.
|
|
5
|
+
|
|
6
|
+
You may not:
|
|
7
|
+
- copy, redistribute, sell or sublicense the software or any part of it;
|
|
8
|
+
- modify it, or make works derived from it;
|
|
9
|
+
- decompile, de-minify or otherwise reverse engineer it, except where the law
|
|
10
|
+
allows this despite this license.
|
|
11
|
+
|
|
12
|
+
The agent skill files under agent/ may be copied into your own agent's
|
|
13
|
+
configuration folders (which `waraq setup-agent` does for you) for use with
|
|
14
|
+
waraq.
|
|
15
|
+
|
|
16
|
+
The fonts under assets/fonts are not covered by this license. They are
|
|
17
|
+
distributed under the SIL Open Font License 1.1; see the OFL files next to
|
|
18
|
+
them.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE
|
|
24
|
+
USE OF THE SOFTWARE OR OF THE BOOKS IT PRODUCES.
|
|
25
|
+
|
|
26
|
+
You are responsible for having the right to convert the books you convert.
|
package/README.md
CHANGED
|
@@ -1,3 +1,201 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/npm/waraq/assets/logo-readme.png" alt="waraq (ورق) logo" width="240" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# waraq
|
|
6
|
+
|
|
7
|
+
Turn a scanned Urdu, Arabic or English book into an EPUB that reflows on your e-reader.
|
|
8
|
+
|
|
9
|
+
If you read Islamic or Urdu books, you probably have a folder of scanned PDFs...where every page is a photo of paper. On a Kindle that means pinch, zoom, scroll, repeat. Calibre and pandoc can't help here, because there is no text inside the file to convert. They wrap the page images and hand them back to you.
|
|
10
|
+
|
|
11
|
+
I couldn't find a tool that does this properly for Urdu and Arabic..so I built one.
|
|
12
|
+
|
|
13
|
+
waraq (ورق, "leaf" or "page") has a vision model read each page into structured data, and then builds the book with ordinary, deterministic code:
|
|
14
|
+
|
|
15
|
+
`scan → page images → transcription → chapters you can edit → EPUB`
|
|
16
|
+
|
|
17
|
+
Only the transcription step uses a model. Everything after it is plain code you can rerun for free.
|
|
18
|
+
|
|
19
|
+
And it is made to be driven by your AI agent. A scan always needs judgement calls...is this heading a chapter, does this verse match the scan, which photo is the cover. Those are exactly what Claude Code, Codex or Antigravity are good at, and plain scripts aren't. So waraq ships a skill for your agent, and every command speaks JSON.
|
|
20
|
+
|
|
21
|
+
## What you get
|
|
22
|
+
|
|
23
|
+
- Text that reflows, right to left for Urdu and Arabic. Urdu books embed Amiri; Noto Nastaliq Urdu on request, see below
|
|
24
|
+
- Footnotes linked to their references
|
|
25
|
+
- Paragraphs joined back together across page breaks
|
|
26
|
+
- Figures cropped out of the page and placed in the text
|
|
27
|
+
- Chapters as Markdown files, so you can fix anything by hand
|
|
28
|
+
- A `review.html` that puts every scan next to its transcription
|
|
29
|
+
- Program code and prompt templates kept as code, line breaks and indentation intact
|
|
30
|
+
- Quran verses checked against the canonical text, see below
|
|
31
|
+
- An EPUB that is checked with epubcheck before the build is called done
|
|
32
|
+
- An AZW3 for Kindle with real page numbers, taken from the printed ones
|
|
33
|
+
|
|
34
|
+
## Where it is right now
|
|
35
|
+
|
|
36
|
+
Pre-1.0 and honest about it. This is what I have actually run:
|
|
37
|
+
|
|
38
|
+
- One full English book with Arabic quotations...239 pages, 31 chapters, about 62,000 words. It passes epubcheck and reads fine on my Kindle, boxed quotations, footnotes and Arabic lines included.
|
|
39
|
+
- Two full tafsir sets, i.e. English with a lot of Arabic: Tafsir Ibn Kathir in 10 volumes (6,610 pages) and Tafseer as-Sa'di in 10 volumes (4,703 pages). All 20 are on my Kindle.
|
|
40
|
+
- Three books that already had a text layer: a 742-page algorithms textbook with maths and C code, a 482-page book on AI agents that is half Python and prompt templates, and a 113-page card deck. waraq ignores the text layer and reads the page like any other scan, which is slower than copying the text but keeps the layout.
|
|
41
|
+
- 12 pages of a 1914 Urdu grammar. Hand-written Nastaliq lithograph, faint in places, i.e. about as hard as these scans get. The page I compared by eye matched the scan, with the old spellings kept as printed.
|
|
42
|
+
- Kindle and embedded fonts, tested on my Paperwhite: Nastaliq came out as isolated letters and digits on a blank page. Amiri shaped Urdu body text fine. Amiri and Noto Naskh Arabic both failed on Quran verses with harakat inside an English book, while Kindle's own Arabic font rendered them correctly. So `fonts: auto` (the default) embeds Amiri for an Urdu-language book and nothing else. `fonts: naskh`, `fonts: nastaliq` and `fonts: none` override it in `book.yaml`.
|
|
43
|
+
- On Kindle, the end-of-ayah sign cannot hold a number: you get an empty circle with the digits beside it. waraq writes ayah numbers as (١٢) instead.
|
|
44
|
+
- Only the `claude-cli` and `antigravity-cli` providers have been run for real. `anthropic`, `gemini` and `openai-compatible` are covered by tests only.
|
|
45
|
+
- Tables and figure captions don't carry a language tag yet, so an Urdu table inside an English book loses its font.
|
|
46
|
+
- Figure boxes from the model are approximate. A line of body text that lands inside the box is trimmed off again when it is clearly a text line; a wordmark under a small logo can get trimmed with it.
|
|
47
|
+
- A word that is split across two pages gets rejoined without its hyphen. That is right for "inde-fatigable" and wrong for "Afrikaans-speaking". You get a warning for every one of them.
|
|
48
|
+
|
|
49
|
+
## Requirements
|
|
50
|
+
|
|
51
|
+
- Node 24 or later
|
|
52
|
+
- `pdftoppm` (poppler): `sudo apt install poppler-utils` or `brew install poppler`
|
|
53
|
+
- `pandoc`: `sudo apt install pandoc` or `brew install pandoc`
|
|
54
|
+
- `epubcheck` (optional, validates the result): `sudo apt install epubcheck` or `brew install epubcheck`
|
|
55
|
+
- A vision model...an API key, or a signed-in `claude` or `agy` CLI. See Providers below.
|
|
56
|
+
- Calibre (optional, for `waraq kindle`): https://calibre-ebook.com/download
|
|
57
|
+
|
|
58
|
+
`waraq doctor` checks all of these for you.
|
|
59
|
+
|
|
60
|
+
## Use
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm i -g waraq
|
|
64
|
+
waraq doctor # what is installed, what is missing, and how to get it
|
|
65
|
+
waraq setup-agent # installs the waraq skill for Claude Code, Codex, Copilot, Cursor and Antigravity
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then open your agent in the folder with the PDF and ask it:
|
|
69
|
+
|
|
70
|
+
> Convert book.pdf into a Kindle book with waraq.
|
|
71
|
+
|
|
72
|
+
It runs a 12-page slice first and tells you the cost before doing the whole book. It checks the Quran verses, fixes the chapters, reviews the pages against the scans, and gives you an AZW3 with page numbers.
|
|
73
|
+
|
|
74
|
+
I tested exactly that with a fresh agent that knew nothing about waraq except the skill...on a 68-page 1892 dissertation full of Arabic quotations. It got to a valid Kindle book on its own. Every place it got stuck went back into waraq or into the skill.
|
|
75
|
+
|
|
76
|
+
### By hand
|
|
77
|
+
|
|
78
|
+
The same steps, if you'd rather drive it yourself:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
waraq init book.pdf --lang ur # makes ./book/, rasterizes the pages
|
|
82
|
+
cd book
|
|
83
|
+
waraq transcribe --pages 1-12 # try a slice first; prints token use and an estimate for the whole book
|
|
84
|
+
waraq transcribe # the rest; finished pages are cached and cost nothing to rerun
|
|
85
|
+
waraq quran check # if the book quotes the Quran
|
|
86
|
+
waraq assemble # writes chapters/*.md, images/, book.yaml, review.html
|
|
87
|
+
waraq status # where the book stands, and the next command
|
|
88
|
+
waraq build # writes book.epub
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Or in one step: `waraq convert book.pdf --lang ur`. Fixes go through `waraq page set`, `waraq headings set` and `waraq quran set`, which check every change and log it in `edits.json`. Add `--json` to any command for machine-readable output.
|
|
92
|
+
|
|
93
|
+
To get it on a Kindle:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
waraq kindle # <title>.azw3 and <title>.apnx, with Calibre
|
|
97
|
+
waraq kindle --to /media/$USER/Kindle/documents # and copies both onto the Kindle
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Why not just Send to Kindle..it strips embedded fonts (no "Publisher font" entry appears) and shows locations, not page numbers. A sideloaded AZW3 keeps the fonts, and the `.apnx` file next to it gives you page numbers that match the printed book. Copying an EPUB over USB does not work; Kindle ignores it.
|
|
101
|
+
|
|
102
|
+
## Check the transcription
|
|
103
|
+
|
|
104
|
+
This is the part I'd ask you not to skip.
|
|
105
|
+
|
|
106
|
+
A language model can "correct" a passage toward the version it remembers. For Quran verses, hadith and quotations that is a real risk. The prompt forbids it, the model lists whatever it was unsure about, and `review.html` highlights every block that contains Arabic or Urdu...but the check is yours to make. Read the highlighted blocks against the scan before you share a book with anyone.
|
|
107
|
+
|
|
108
|
+
For scale: on the 239-page book the model flagged 269 readings it was unsure about, and 21 footnotes had no reference mark it could find on the page. Nothing is dropped silently, but somebody has to look.
|
|
109
|
+
|
|
110
|
+
## Providers
|
|
111
|
+
|
|
112
|
+
Choose with `--provider` on `waraq init` or `waraq convert`. The choice is stored in `waraq.json`.
|
|
113
|
+
|
|
114
|
+
| Provider | Needs | Default model |
|
|
115
|
+
|---|---|---|
|
|
116
|
+
| `anthropic` (default) | `ANTHROPIC_API_KEY` | `claude-fable-5-1` |
|
|
117
|
+
| `claude-cli` | the `claude` CLI, signed in | `claude-fable-5-1` |
|
|
118
|
+
| `antigravity-cli` | the `agy` CLI, signed in | `gemini-3.1-pro-high` |
|
|
119
|
+
| `gemini` | `GEMINI_API_KEY` | none, pass `--model` |
|
|
120
|
+
| `openai-compatible` | `OPENAI_API_KEY`, optional `WARAQ_OPENAI_BASE_URL` | none, pass `--model` |
|
|
121
|
+
|
|
122
|
+
The two CLI providers use the CLI's own login, so no API key is needed. Each page is one CLI run, and the CLI adds its own system prompt to every run, so token counts are higher than with a direct API key. The 239-page book took about 3.67M input and 300k output tokens through the `claude` CLI.
|
|
123
|
+
|
|
124
|
+
`openai-compatible` works with any server that has an OpenAI-style `/chat/completions` endpoint and accepts images, for example Ollama:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
export WARAQ_OPENAI_BASE_URL=http://localhost:11434/v1
|
|
128
|
+
waraq init book.pdf --provider openai-compatible --model <model-id>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Model, image size limit, output limit and concurrency can be changed in `waraq.json`.
|
|
132
|
+
|
|
133
|
+
Which model..for clean print, Sonnet is enough and two to three times faster. I compared it with Opus on 12 tafsir pages: the English matched about 98%, each model got one word wrong that the other got right, and neither added a word to a verse. Where Arabic is mostly Quran, `quran-check` corrects the verses either way. I'd keep the larger model for hadith, which nothing can check afterwards.
|
|
134
|
+
|
|
135
|
+
### When a provider refuses a page
|
|
136
|
+
|
|
137
|
+
It happens. On that same book, 2 of the 239 pages were blocked by Claude's output filter...ordinary pages, as far as I could tell. You can send only those pages to another provider for one run:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
waraq transcribe --pages 16,188 --provider antigravity-cli
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Pages written this way are kept by later runs. Delete `pages/NNNN.json` to transcribe a page again.
|
|
144
|
+
|
|
145
|
+
To make this automatic, name a fallback in `waraq.json`; a page the main provider refuses goes straight to it:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
"fallback": { "provider": "antigravity-cli", "model": "gemini-3.1-pro-high" }
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
One caveat I'd rather say out loud: `antigravity-cli` runs the `agy` agent without a tool restriction, because I couldn't find a read-only mode that still returned correct output. `claude-cli` is limited to reading the page image.
|
|
152
|
+
|
|
153
|
+
## Quran verses: checked against the canonical text
|
|
154
|
+
|
|
155
|
+
A tafsir is mostly Quran verses and hadith in Arabic, and a model reading small print can "complete" a verse from memory. For the verses there is a fix that needs no model at all:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
waraq quran-check # after transcribe, before assemble
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
It downloads the Tanzil Uthmani text once (to `~/.cache/waraq`), compares every Arabic quotation with it, and rewrites the ones that match with the canonical wording, harakat included. Whatever is printed around the verse stays as printed: brackets, an ayah number carried over from the previous page, the "(سورة …)" reference. If a real word sits outside the matched verse, the quotation is not rewritten and goes to the report instead.
|
|
162
|
+
|
|
163
|
+
It also checks Arabic quoted inside English sentences and footnotes, not only verse blocks. Whatever it leaves for a person shows up in `waraq quran review`, with the scan to open next to each item.
|
|
164
|
+
|
|
165
|
+
Across all 20 tafsir volumes: 23,434 quotations matched and were rewritten. 138 matched only in part; those stay as printed and are listed in the report. About 3,200 matched nothing, nearly all of them hadith. The report is in `quran-check.json`. Hadith cannot be checked this way; there is no canonical text to check against.
|
|
166
|
+
|
|
167
|
+
One thing I'd rather say out loud. An earlier version rewrote the whole block with only the matched span. Anything outside it was dropped, and on 20 blocks that was real verse text, for example everything after the 15th ayah of a long passage. An audit of every volume caught it, and the fix keeps everything outside the span. If you ran an older version, run `waraq quran-check` again: it starts over from the original transcription.
|
|
168
|
+
|
|
169
|
+
## Which books should you convert?
|
|
170
|
+
|
|
171
|
+
waraq is a format converter. It can't know where your PDF came from, and I'm not going to pretend it can. So this part is on you..and this is how I think about it for my own shelf:
|
|
172
|
+
|
|
173
|
+
- **Public domain** (old Urdu classics, anything published before 1929): convert it, share it.
|
|
174
|
+
- **Published for free distribution.** A lot of dawah literature carries an explicit permission to reproduce. Check the copyright page of the book in your hand, keep that page in the EPUB, and then convert and share.
|
|
175
|
+
- **A book you own in print**, where the PDF is a convenience scan: convert it for your own reading. Don't pass the EPUB around.
|
|
176
|
+
- **An in-copyright book you didn't pay for:** converting it doesn't make it yours. If a legal edition exists, buy that. If the book is out of print and can't be bought anywhere, that is a grey area and a personal call.
|
|
177
|
+
|
|
178
|
+
The line I hold for myself...I don't distribute EPUBs made from the last two. A clean, reflowable EPUB is a much better pirated copy than a blurry scan, and the people who lose out are authors and small publishers.
|
|
179
|
+
|
|
180
|
+
A few things in the tool follow from this:
|
|
181
|
+
|
|
182
|
+
- `book.yaml` has `rights` and `source` fields. Fill them in; they are written into the EPUB metadata, so the book carries where it came from.
|
|
183
|
+
- The copyright page of the original is transcribed like any other page. Leave it in.
|
|
184
|
+
- There is no "download this book for me" feature, and there won't be one.
|
|
185
|
+
- Every page is sent to the model provider you chose. For a book that is still in copyright, that is one more copy leaving your machine.
|
|
186
|
+
|
|
187
|
+
I'm not a lawyer, and copyright law differs from country to country.
|
|
188
|
+
|
|
189
|
+
## What it does not do
|
|
190
|
+
|
|
191
|
+
MOBI output (use `waraq kindle`), PDF output, and local OCR without a model. A PDF that already has a text layer is read like a scan; waraq does not use the text layer.
|
|
192
|
+
|
|
193
|
+
## Disclosure
|
|
194
|
+
|
|
195
|
+
I architected waraq and made the decisions; Claude Code did most of the typing. The two CLI providers exist because that is how I ran it myself, on my own subscriptions.
|
|
196
|
+
|
|
197
|
+
## License
|
|
198
|
+
|
|
199
|
+
Free to use, not open source: you can use waraq for anything, but not redistribute or modify it. See `LICENSE`. The bundled fonts (Amiri, Noto Nastaliq Urdu) are under the SIL Open Font License 1.1.
|
|
200
|
+
|
|
201
|
+
Looking forward for folks to try it on their own shelves :)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: waraq
|
|
3
|
+
description: Converts scanned or image-only PDF books (Urdu, Arabic, English) into reflowable EPUB and Kindle AZW3 with the waraq CLI, including checking Quran verses against the canonical text. Use when the user wants to turn a PDF book into an ebook, fix or finish a waraq conversion, check the Arabic in a converted book, or put a book on a Kindle.
|
|
4
|
+
license: Proprietary. Free to use; see LICENSE in the waraq package.
|
|
5
|
+
compatibility: Needs the waraq CLI (npm i -g waraq), Node 24+, poppler (pdftoppm) and pandoc. Calibre for Kindle output. A signed-in claude or agy CLI, or an API key, for transcription.
|
|
6
|
+
metadata:
|
|
7
|
+
version: "0.2.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Converting a book with waraq
|
|
11
|
+
|
|
12
|
+
waraq does the mechanical work: page images, transcription by a vision model, assembly, EPUB, Kindle. You make the judgement calls a script cannot: whether a heading is a chapter, whether a verse matches the scan, what the cover is. Every change goes through a waraq command, never a hand edit of the JSON files.
|
|
13
|
+
|
|
14
|
+
Add `--json` to any command when you need to read the result: one envelope `{ok, data}` or `{ok: false, error: {code, message, hint}}` on stdout. Exit codes: 0 ok, 1 error, 2 usage, 3 missing program, 4 pages failed, 5 epubcheck failed. Follow the `hint` of an error.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
Copy this checklist and tick it off:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
- [ ] 1. waraq doctor
|
|
22
|
+
- [ ] 2. waraq init <book.pdf> --lang <en|ur|ar> [--provider ...] [--model ...]
|
|
23
|
+
- [ ] 3. Trial slice: waraq transcribe --pages 1-12, then tell the user the cost estimate
|
|
24
|
+
- [ ] 4. User agreed: waraq transcribe (repeat until no pages fail)
|
|
25
|
+
- [ ] 5. If the book has Arabic: waraq quran check, then review (see below)
|
|
26
|
+
- [ ] 6. waraq assemble, then read the warnings and review.html
|
|
27
|
+
- [ ] 7. Fix structure: waraq headings, waraq page show / page set
|
|
28
|
+
- [ ] 8. Fill in book.yaml (title, authors, cover, rights, source)
|
|
29
|
+
- [ ] 9. waraq build
|
|
30
|
+
- [ ] 10. waraq kindle [--to <Kindle documents folder>]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`waraq status` tells you where a project stands and gives the next command. Use it whenever you pick up a project.
|
|
34
|
+
|
|
35
|
+
### 1. Doctor
|
|
36
|
+
|
|
37
|
+
Run `waraq doctor`. If it reports a problem, tell the user what to install, and stop.
|
|
38
|
+
|
|
39
|
+
### 2. Init
|
|
40
|
+
|
|
41
|
+
- `--lang` is the main language of the book: `ur` for an Urdu book, `ar` for Arabic, `en` for English, even when the English has Arabic quotations.
|
|
42
|
+
- Provider: `claude-cli` or `antigravity-cli` when the user has those CLIs signed in; otherwise an API key provider. When a second CLI is installed, init sets it as the fallback for pages the first refuses. Do not turn that off.
|
|
43
|
+
- Model: see [references/models-and-cost.md](references/models-and-cost.md). For clean print in English, use `--model claude-sonnet-5-5`. When Arabic or Urdu is on most pages, the print is small or faint, or the book quotes hadith, use `--model claude-opus-5-5`.
|
|
44
|
+
- A large scan that holds several volumes: `--pages 697-1320` rasterizes one volume.
|
|
45
|
+
- init makes the project in a new folder (`./book` for `book.pdf`; `--out` to choose). Run the rest of the commands there, or pass `--project <dir>`.
|
|
46
|
+
|
|
47
|
+
### 3–4. Transcribe
|
|
48
|
+
|
|
49
|
+
- If Arabic or Urdu lines show up on more than about a third of the slice pages and you started on Sonnet, switch: `waraq transcribe --model claude-opus-5-5` for the rest. Pages written that way are kept.
|
|
50
|
+
- Always run a trial slice first and report the estimate (`estimate for all N pages`). A full book costs millions of tokens. Ask the user before you transcribe the rest.
|
|
51
|
+
- Transcription is cached per page; rerunning `waraq transcribe` only does missing or failed pages. Exit code 4 means some pages failed: run it again.
|
|
52
|
+
- A page that both providers refuse: retry it alone with `waraq transcribe --pages N --provider <other>`.
|
|
53
|
+
|
|
54
|
+
### 5. Quran verses
|
|
55
|
+
|
|
56
|
+
Only for books with Arabic quotations. Run `waraq quran check`. It checks whole Arabic blocks, and Arabic quoted inside English paragraphs and footnotes (each inline quotation is a numbered `span`). It rewrites every quotation that matches the canonical Tanzil text and leaves the rest for you. Then follow [references/quran-review.md](references/quran-review.md) for every item in `waraq quran review`.
|
|
57
|
+
|
|
58
|
+
### 6–7. Assemble and fix structure
|
|
59
|
+
|
|
60
|
+
Run `waraq assemble`. On the first run it writes chapters, images, `book.yaml` and `review.html`. After that, use `waraq assemble --force` to rebuild the chapters from the pages; it does not touch `book.yaml`.
|
|
61
|
+
|
|
62
|
+
Then:
|
|
63
|
+
|
|
64
|
+
1. Read every warning. Heading demotions, removed watermarks, footnotes without a reference and joined hyphenated words are all listed there.
|
|
65
|
+
2. Run `waraq headings`. Each level-1 heading becomes a chapter. Fix what is wrong with `waraq headings set <page> <block> <level>`.
|
|
66
|
+
3. Open `review.html` and compare pages with their scans: every page with an `uncertain` entry that matters for meaning, every title or contents page, and at least one page in ten elsewhere. If the book is about its Arabic, check every Arabic-heavy page. Fix a misread with `waraq page show <n>`, then `waraq page set <n> <block> --text-file <file>`. Write the text to a file first: that is safer than shell quoting, above all for Arabic.
|
|
67
|
+
4. Run `waraq assemble --force` after page edits.
|
|
68
|
+
|
|
69
|
+
Details and common cases: [references/structure-fixes.md](references/structure-fixes.md).
|
|
70
|
+
|
|
71
|
+
### 8. book.yaml
|
|
72
|
+
|
|
73
|
+
`book.yaml` is the one file you edit directly. Check `title`, `authors` and `cover`. waraq guesses the cover from a photo of the book in the first pages; if there is no cover, leave the field out. For `source`, give where the PDF came from (for example an archive.org URL). For `rights`, state only what you can support: "Public domain (first published 1892)" when the book itself shows a publication date before 1929. Otherwise ask the user or leave it empty. See [references/rights.md](references/rights.md).
|
|
74
|
+
|
|
75
|
+
### 9–10. Build and Kindle
|
|
76
|
+
|
|
77
|
+
- `waraq build` validates with epubcheck. Exit code 5 means fix what it names, then build again.
|
|
78
|
+
- `waraq kindle` writes `<title>.azw3` and `<title>.apnx` (page numbers). `--to <folder>` copies both to a Kindle's `documents` folder. See [references/kindle.md](references/kindle.md).
|
|
79
|
+
|
|
80
|
+
## Rules
|
|
81
|
+
|
|
82
|
+
- **Never write a Quran verse yourself, from memory or by typing.** Use `waraq quran set`, which writes canonical text only. For other Arabic (hadith, poetry, a misread word), change as little as you can: copy the correct letters from the existing text or from `quran canon` output, and say in `--note` what you changed and why.
|
|
83
|
+
- **Never "correct" a variant reading** (qira'at). If the scan prints a reading that differs from Hafs, leave it and note it as `variant`.
|
|
84
|
+
- **Hadith cannot be checked against a canonical text.** Compare it with the scan only.
|
|
85
|
+
- **Ask before spending:** report the slice estimate before transcribing a whole book.
|
|
86
|
+
- **Keep the copyright page** of the original in the book.
|
|
87
|
+
- **Change pages only through waraq commands,** so every change is validated and logged in `edits.json`.
|
|
88
|
+
- **Report honestly:** what you checked, what you could not check, and what is left for the user.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Kindle
|
|
2
|
+
|
|
3
|
+
`waraq kindle` writes two files:
|
|
4
|
+
|
|
5
|
+
- `<title>.azw3`, made with Calibre from book.epub;
|
|
6
|
+
- `<title>.apnx`, the page numbers, taken from the printed page numbers.
|
|
7
|
+
|
|
8
|
+
`--to <documents folder>` copies the book there, and the page-number file into `<title>.sdr/` beside it. That is where the Kindle looks for it. The user reopens the book to see page numbers.
|
|
9
|
+
|
|
10
|
+
What we learned on a Paperwhite:
|
|
11
|
+
|
|
12
|
+
- **Send to Kindle** (email or app) strips embedded fonts and gives no page numbers. A sideloaded AZW3 keeps both.
|
|
13
|
+
- **Copying an EPUB over USB does not work.** Kindle ignores it.
|
|
14
|
+
- **Kindle cannot shape Nastaliq.** Urdu books embed Amiri (Naskh) by default (`fonts: auto`).
|
|
15
|
+
- **Embedded Arabic fonts fail on Quran verses with harakat inside an English book.** Kindle's own font renders them correctly, so English books embed no font. Tell the user to read with Bookerly or another Amazon font, not "Publisher font".
|
|
16
|
+
- **Ayah numbers are written `(١٢)`**, because Kindle cannot draw digits inside .
|
|
17
|
+
|
|
18
|
+
## Finding the Kindle's documents folder
|
|
19
|
+
|
|
20
|
+
| System | Path |
|
|
21
|
+
|---|---|
|
|
22
|
+
| Linux | `/media/$USER/Kindle/documents` |
|
|
23
|
+
| macOS | `/Volumes/Kindle/documents` |
|
|
24
|
+
| Windows | `<drive>:\documents` |
|
|
25
|
+
| WSL | the drive may not be mounted; copy with `powershell.exe Copy-Item` instead |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Models, cost and refusals
|
|
2
|
+
|
|
3
|
+
## Which model
|
|
4
|
+
|
|
5
|
+
Measured on real books:
|
|
6
|
+
|
|
7
|
+
| Book | Model | Tokens per page (in / out) |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| English with Arabic quotations, scanned | Opus | about 15k / 1.5k |
|
|
10
|
+
| Clean printed English, code, maths | Sonnet | about 15k / 1.4k |
|
|
11
|
+
|
|
12
|
+
The CLI providers add their own system prompt to every page, so they use more tokens than an API key.
|
|
13
|
+
|
|
14
|
+
- **Sonnet:** clean print, English. Comparing it with Opus on 12 tafsir pages:
|
|
15
|
+
- the English matched about 98%;
|
|
16
|
+
- each model got one word right that the other got wrong;
|
|
17
|
+
- neither added a word to a verse;
|
|
18
|
+
- Sonnet was 2–3 times faster.
|
|
19
|
+
- **Opus:** small or faint print, Urdu Nastaliq, Arabic-heavy pages, and hadith. Nothing can check hadith afterwards.
|
|
20
|
+
- **Quran verses** are corrected by `waraq quran check` with either model.
|
|
21
|
+
|
|
22
|
+
Model ids:
|
|
23
|
+
|
|
24
|
+
| Provider | Model ids |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `claude-cli` and `anthropic` | `claude-sonnet-5-5` (Sonnet), `claude-opus-5-5` (Opus); the default is `claude-fable-5-1` |
|
|
27
|
+
| `antigravity-cli` | `gemini-3.1-pro-high` |
|
|
28
|
+
|
|
29
|
+
Use the full id, not an alias, so the result is reproducible.
|
|
30
|
+
|
|
31
|
+
Pass `--model` on `init`, or `--provider` / `--model` on one `transcribe` run.
|
|
32
|
+
|
|
33
|
+
## Cost
|
|
34
|
+
|
|
35
|
+
Always run a trial slice (`--pages 1-12`), then quote the estimate it prints for the whole book. A 500-page book is roughly 7–8M input tokens. Ask the user before you go on.
|
|
36
|
+
|
|
37
|
+
## Refusals
|
|
38
|
+
|
|
39
|
+
About 2% of pages are refused by a provider's output filter, ordinary pages included. The fallback in `waraq.json` takes them over automatically; `init` sets it when a second CLI is installed. Pages written by a different provider are pinned, so later runs keep them.
|
|
40
|
+
|
|
41
|
+
## Speed and memory
|
|
42
|
+
|
|
43
|
+
Each CLI page is one process, and `concurrency` in `waraq.json` (default 4) sets how many run at once. About 12 parallel CLI processes ran comfortably in 7.5 GB of RAM. To run several books at once, lower the concurrency of each.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Reviewing Quran quotations
|
|
2
|
+
|
|
3
|
+
`waraq quran check` compares every Arabic quotation with the Tanzil Uthmani text:
|
|
4
|
+
|
|
5
|
+
| Status | Meaning | What the check did |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| exact | Every word found, spelled the same | Rewrote it with canonical text |
|
|
8
|
+
| fuzzy | Every word found, a letter or two differs | Rewrote it, and listed it |
|
|
9
|
+
| partial | Most words found, but not cleanly | Left it as transcribed, for you to review |
|
|
10
|
+
| unmatched | Not found | Left it. Usually hadith, a dua, or a title |
|
|
11
|
+
| short | One or two words | Left it |
|
|
12
|
+
|
|
13
|
+
Text printed around a verse stays as printed: brackets ﴿ ﴾, an ayah number carried over from the previous page, ۞, and the reference "(سورة البقرة: ١٣)".
|
|
14
|
+
|
|
15
|
+
## Procedure for each item in `waraq quran review`
|
|
16
|
+
|
|
17
|
+
Items with a `span` are Arabic quoted inside an English paragraph or footnote. Pass `--span <n>` to `quran set` and `quran note` for them.
|
|
18
|
+
|
|
19
|
+
1. **Open the scan.** It is the `scan` path in the review list; read the image. Every item, no exceptions. The list is sorted by page, so open each page once and decide all of its items.
|
|
20
|
+
2. Look at what the page prints, then decide:
|
|
21
|
+
- **set**: it is a Quran passage and the transcription is wrong or incomplete. Run `waraq quran set <page> <block> <ref>`.
|
|
22
|
+
- For a verse that starts on the previous page, add `--from <word>`: the number of the first printed word, as listed by `waraq quran canon <ref>`. Pause marks belong to their word and ayah numbers are not words.
|
|
23
|
+
- For one that runs onto the next page, add `--to <word>`.
|
|
24
|
+
- Use `--dry-run` first and compare its output with the scan.
|
|
25
|
+
- **variant**: the scan prints a recognised reading that differs from Hafs. Leave the text, and run `waraq quran note <page> <block> variant --note "..."`.
|
|
26
|
+
- **hadith**, or **other** for a dua, a title or a label: leave it, and note it.
|
|
27
|
+
- **ok**: the transcription already matches the scan.
|
|
28
|
+
- **unsure**: you cannot tell. Leave it, note it, and tell the user.
|
|
29
|
+
3. Every item gets a decision (`set` notes itself), so `waraq quran review` shows how many are still open.
|
|
30
|
+
|
|
31
|
+
Also look at the fuzzy rewrites: `waraq quran review --status fuzzy`. Check each against its scan when there are few; when there are many, check at least ten. A fuzzy match is usually a misread letter, but it can be a variant reading that the check made Hafs.
|
|
32
|
+
|
|
33
|
+
## Known traps
|
|
34
|
+
|
|
35
|
+
- **An abridged quotation**, ending in "…" or the printed "الخ" (etc.): note it `ok` and leave it. `quran set` would fill in the rest of the verse.
|
|
36
|
+
- **Printed wording that differs from Hafs** but is not a variant you can name (one word changed, say): leave it as printed, note it `unsure` with the difference, and list it for the user. It may be the author's slip or an older edition; it is not yours to correct either way.
|
|
37
|
+
- **Older European books number verses differently** (Flügel numbering: 18:47 where Hafs has 18:49). waraq reports Hafs numbers; leave the printed references alone.
|
|
38
|
+
- **A quotation split by a footnote mark** becomes two spans. Set each span to its own words with `--from` and `--to`, or the text appears twice.
|
|
39
|
+
- **`--span` with a block's words:** if `quran set --span` refuses because of words not in the verse, check with `--dry-run` that only that span changes, then use `--force`.
|
|
40
|
+
|
|
41
|
+
- **An old book may spell a verse in an older orthography,** without the Uthmani marks. A matched verse is rewritten in the canonical Uthmani text anyway: that is the point of the check. Tell the user if the book is about the spelling itself. In that case they may prefer `waraq convert --no-quran-check`.
|
|
42
|
+
|
|
43
|
+
- **A block that is a hadith quoting a verse.** `quran set` refuses it, because it would delete the hadith. Fix only the verse words with `waraq page set --text-file`, copying them from `waraq quran canon` output.
|
|
44
|
+
- **The basmala printed above a surah is not part of its first ayah.** `canon` already leaves it out.
|
|
45
|
+
- **Ayah numbers are written `(١٢)`**, not ١٢. Kindle cannot draw digits inside .
|
|
46
|
+
- **A passage longer than 15 ayahs is fine.** Check that the printed range and the ref agree.
|
|
47
|
+
- **Variant readings seen in printed tafsirs** include 2:127, 2:210, 2:213, 11:46, 12:76, 14:46, 17:23, 18:77-80 and 39:53. That list is not complete. Judge by the scan.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Which books, and what to tell the user
|
|
2
|
+
|
|
3
|
+
waraq is a format converter. It cannot know where a PDF came from. Apply this, and say it plainly when it matters:
|
|
4
|
+
|
|
5
|
+
- **Public domain** (for example, published before 1929): convert it and share it.
|
|
6
|
+
- **Published for free distribution** (many dawah books say so on their copyright page): convert it, keep that page, and sharing is fine.
|
|
7
|
+
- **A book the user owns in print:** convert it for their own reading. They should not pass the EPUB around.
|
|
8
|
+
- **An in-copyright book they did not pay for:** converting it does not make it theirs. If a legal edition exists, point them to it.
|
|
9
|
+
|
|
10
|
+
In practice:
|
|
11
|
+
|
|
12
|
+
- Fill `rights` and `source` in `book.yaml` from what the book says, or ask the user. Never invent a rights statement.
|
|
13
|
+
- Keep the copyright page of the original in the book.
|
|
14
|
+
- waraq has no "download a book" feature. Do not find or download books for the user.
|
|
15
|
+
- Every page is sent to the model provider the user chose. For a book still in copyright, that is one more copy leaving their machine. Mention it if the user seems unaware.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Fixing structure
|
|
2
|
+
|
|
3
|
+
## Chapters
|
|
4
|
+
|
|
5
|
+
Each level-1 heading becomes a chapter. `waraq assemble` already turns these into level 2:
|
|
6
|
+
|
|
7
|
+
- numbered sections ("2.5 …");
|
|
8
|
+
- index letters;
|
|
9
|
+
- a heading that appears in three or more separate places ("References", "Key Takeaways");
|
|
10
|
+
- table-of-contents lines whose chapter comes later;
|
|
11
|
+
- the book title printed again on an inner title page.
|
|
12
|
+
|
|
13
|
+
`waraq headings` lists every level-1 heading, with the level assemble will use and why (`auto` or `hand`).
|
|
14
|
+
|
|
15
|
+
What to fix by hand:
|
|
16
|
+
|
|
17
|
+
- **A real chapter demoted.** For example, the closing "Conclusion" of a book that has one after every chapter: `waraq headings set <page> <block> 1`.
|
|
18
|
+
- **A false chapter that is left**, such as a title-page line ("ALLAH", "VOLUME 1"), a section heading the model guessed wrong, or "Notes": `waraq headings set <page> <block> 2`.
|
|
19
|
+
- **A chapter title with its number on a separate line.** Set the number block's text to the full title with `page set`, and delete the other block with `page set --delete`. Deleting moves later blocks up one index, so run `page show` again before the next edit on that page.
|
|
20
|
+
|
|
21
|
+
Run `waraq assemble --force` after changes, then `waraq headings` again.
|
|
22
|
+
|
|
23
|
+
## Text
|
|
24
|
+
|
|
25
|
+
- **Misread words.** Check every page marked uncertain in review.html against its scan, then `waraq page set <n> <block> --text-file f`.
|
|
26
|
+
- **Watermarks.** assemble removes a bare web address, or a "Downloaded from …" line, that appears on 3 or more pages. Delete any other site footer with `page set --delete`.
|
|
27
|
+
- **Code** is kept as code blocks with their line breaks. Check that indentation survived on one or two pages.
|
|
28
|
+
- **Maths** is written as plain Unicode (n², ∑, ⌈x⌉), not LaTeX.
|
|
29
|
+
|
|
30
|
+
- **A footnote mark with no footnote** (`^3^` in the text, with an assemble warning "has no footnote") comes from a mark the model saw but whose note it did not find. Look at the scan. Remove the mark with `page set`, or leave it if the note is on another page.
|
|
31
|
+
- **Library stamps, call numbers and handwriting** on scans are not part of the book. Delete them with `page set --delete`. Keep printed seals and title pages.
|
|
32
|
+
- **Hebrew, Greek and other scripts** are tagged as English. waraq has no tag for them; leave them.
|
|
33
|
+
|
|
34
|
+
## Figures
|
|
35
|
+
|
|
36
|
+
- An ornament line becomes a plain rule (`* * *`): a thin band, or a wide band the model calls decorative.
|
|
37
|
+
- A figure whose crop takes in body text is cut back automatically when the text sits at its edge. If a crop still holds text, edit the figure's description with `page set` (it replaces the alt text), or leave it and tell the user.
|
|
38
|
+
|
|
39
|
+
## Cover
|
|
40
|
+
|
|
41
|
+
`book.yaml` `cover:` can be `pages/NNNN.png` (a whole scan) or `images/pNNNN-k.png` (a cropped figure). waraq picks a photo of the front cover from the first 8 scans. It skips a back cover, a spine or a dust-jacket spread. If the guess is wrong, set it by hand.
|
package/assets/epub.css
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
body { font-family: Georgia, "Times New Roman", serif; line-height: 1.6; }
|
|
2
|
+
|
|
3
|
+
h1, h2, h3 { font-family: Arial, Helvetica, sans-serif; line-height: 1.25; margin: 1.5em 0 0.5em; page-break-after: avoid; }
|
|
4
|
+
h1 { font-size: 1.7em; text-align: center; page-break-before: always; }
|
|
5
|
+
h2 { font-size: 1.3em; }
|
|
6
|
+
h3 { font-size: 1.1em; }
|
|
7
|
+
|
|
8
|
+
p { margin: 0 0 0.9em; }
|
|
9
|
+
|
|
10
|
+
/* Boxed quotations, as in the printed books. */
|
|
11
|
+
blockquote { margin: 1em 0; padding: 0.6em 1em; border: 1px solid #555; }
|
|
12
|
+
blockquote p:last-child { margin-bottom: 0; }
|
|
13
|
+
|
|
14
|
+
figure { margin: 1.2em 0; text-align: center; page-break-inside: avoid; }
|
|
15
|
+
img { max-width: 100%; height: auto; }
|
|
16
|
+
figcaption { font-size: 0.9em; font-style: italic; }
|
|
17
|
+
|
|
18
|
+
table { border-collapse: collapse; margin: 1em 0; width: 100%; }
|
|
19
|
+
th, td { border: 1px solid #999; padding: 0.3em 0.5em; }
|
|
20
|
+
|
|
21
|
+
.footnotes { font-size: 0.9em; }
|
|
22
|
+
|
|
23
|
+
/* Code keeps its line breaks; long lines wrap rather than run off a small screen. */
|
|
24
|
+
pre { font-family: "Courier New", Courier, monospace; font-size: 0.8em; line-height: 1.35; white-space: pre-wrap; margin: 1em 0; padding: 0.5em; border-left: 3px solid #999; text-align: left; }
|
|
25
|
+
code { font-family: "Courier New", Courier, monospace; }
|
|
26
|
+
|
|
27
|
+
/* Direction comes from the dir attribute: EPUB forbids the CSS direction property. */
|
|
28
|
+
[dir="rtl"] { text-align: right; }
|
|
29
|
+
[dir="ltr"] { text-align: left; }
|
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Copyright 2010-2022 The Amiri Project Authors (https://github.com/aliftype/amiri).
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
94
|
+
|
|
Binary file
|