@sqiu123/diff 0.0.1 → 0.0.2
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/README.md +23 -14
- package/dist-cli/cli.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
- **[jsPDF](https://github.com/parallax/jsPDF)** - PDF generation for exports
|
|
43
43
|
- **[diff](https://github.com/kpdecker/jsdiff)** - Text comparison algorithm
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## 🌐 Usage (Web App)
|
|
46
46
|
|
|
47
47
|
1. Visit **[diff.sqiu.dev](https://diff.sqiu.dev)**
|
|
48
48
|
2. Upload or drag your **original PDF**
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
5. Switch between view modes as needed
|
|
52
52
|
6. Export results to PDF if desired
|
|
53
53
|
|
|
54
|
-
##
|
|
54
|
+
## 💻 Usage (CLI)
|
|
55
55
|
|
|
56
56
|
Compare PDFs directly from your terminal with zero installation:
|
|
57
57
|
|
|
@@ -85,11 +85,31 @@ npx pdf-diff --interactive
|
|
|
85
85
|
| `-t, --threshold <float>` | Change percentage threshold for failure | - |
|
|
86
86
|
| `-i, --interactive` | Interactive mode with guided prompts | - |
|
|
87
87
|
|
|
88
|
+
## 🐳 Self Hosting (Docker)
|
|
89
|
+
You can easily deploy your own private instance using Docker Compose:
|
|
90
|
+
```
|
|
91
|
+
services:
|
|
92
|
+
pdf-diff:
|
|
93
|
+
image: qiu321/pdf-diff:latest
|
|
94
|
+
container_name: pdf-diff
|
|
95
|
+
restart: unless-stopped
|
|
96
|
+
ports:
|
|
97
|
+
- "8085:80"
|
|
98
|
+
```
|
|
99
|
+
or by running the following line:
|
|
100
|
+
```
|
|
101
|
+
docker run -d \
|
|
102
|
+
--name pdf-diff \
|
|
103
|
+
-p 8085:80 \
|
|
104
|
+
--restart unless-stopped \
|
|
105
|
+
qiu321/pdf-diff:latest
|
|
106
|
+
```
|
|
107
|
+
|
|
88
108
|
## 🚀 Development
|
|
89
109
|
|
|
90
110
|
```bash
|
|
91
111
|
# Clone the repository
|
|
92
|
-
git clone https://github.com/
|
|
112
|
+
git clone https://github.com/qiu2025/pdf-diff.git
|
|
93
113
|
cd pdf-diff
|
|
94
114
|
|
|
95
115
|
# Install dependencies
|
|
@@ -107,14 +127,3 @@ npm run preview
|
|
|
107
127
|
# Run linter
|
|
108
128
|
npm run lint
|
|
109
129
|
```
|
|
110
|
-
|
|
111
|
-
## 📄 License
|
|
112
|
-
|
|
113
|
-
MIT License - See [LICENSE](LICENSE) for details.
|
|
114
|
-
|
|
115
|
-
## 👨💻 Author
|
|
116
|
-
|
|
117
|
-
**James Montemagno**
|
|
118
|
-
- Website: [montemagno.com](https://montemagno.com)
|
|
119
|
-
- GitHub: [@jamesmontemagno](https://github.com/jamesmontemagno)
|
|
120
|
-
- Twitter: [@JamesMontemagno](https://twitter.com/JamesMontemagno)
|
package/dist-cli/cli.mjs
CHANGED
|
@@ -474,7 +474,7 @@ function generateHtmlReport(data) {
|
|
|
474
474
|
</section>
|
|
475
475
|
|
|
476
476
|
<footer>
|
|
477
|
-
Generated by <a href="https://
|
|
477
|
+
Generated by <a href="https://diff.sqiu.dev" target="_blank" rel="noopener noreferrer">PDF Diff</a>
|
|
478
478
|
</footer>
|
|
479
479
|
</div>
|
|
480
480
|
</body>
|
|
@@ -749,7 +749,7 @@ Examples:
|
|
|
749
749
|
$ npx pdf-diff original.pdf modified.pdf --fail-on-diff
|
|
750
750
|
$ npx pdf-diff --interactive
|
|
751
751
|
|
|
752
|
-
For more information, visit: https://
|
|
752
|
+
For more information, visit: https://diff.sqiu.dev
|
|
753
753
|
`);
|
|
754
754
|
program.parse();
|
|
755
755
|
const args = program.args;
|