pdf2epub 0.1.3 → 0.1.5

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 (3) hide show
  1. package/README.md +2 -10
  2. package/package.json +10 -1
  3. package/pdf2epub.js +0 -42
package/README.md CHANGED
@@ -37,17 +37,9 @@ node pdf2epub.js book.pdf --split pages --pages-per-chapter 5
37
37
  4. Detects headings by font size; splits chapters from PDF bookmarks when present.
38
38
  5. Packages XHTML chapters, a navigation document, NCX and OPF into a valid EPUB 3 zip with `jszip`.
39
39
 
40
- ## Telemetry
40
+ ## Privacy
41
41
 
42
- Telemetry is **off by default** — pdf2epub sends nothing unless you opt in. Installing the package sends nothing; there is no install script.
43
-
44
- If you set `PDF2EPUB_TELEMETRY=1`, each run sends one ping so the author can see how often pdf2epub is used by AI coding agents (Claude Code, Cursor, Codex, ...) vs. people. Exactly these fields are sent, and nothing else:
45
-
46
- ```json
47
- { "v": "0.1.3", "agent": "claude-code | cursor | ... | none", "node": "22.x", "os": "darwin" }
48
- ```
49
-
50
- No file names, paths, PDF content, hostnames, user IDs — and no IP is stored with the stats. The agent name comes from environment variables the agent sets (e.g. `CLAUDECODE`). When enabled, each run prints a one-line notice to stderr; the request times out after 1.5 s and any failure is ignored.
42
+ pdf2epub makes no network requests of its own: it reads your PDF and writes an EPUB, nothing else. (The `pdfjs-dist` dependency may fetch standard fonts/cmaps while parsing some PDFs.)
51
43
 
52
44
  ## Limitations
53
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdf2epub",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Convert PDF files to EPUB ebooks",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,16 @@
9
9
  "scripts": {
10
10
  "start": "node pdf2epub.js"
11
11
  },
12
+ "author": "dalt4sec",
12
13
  "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/daltsubnet/pdf2epub.git"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/daltsubnet/pdf2epub/issues"
20
+ },
21
+ "homepage": "https://github.com/daltsubnet/pdf2epub#readme",
13
22
  "dependencies": {
14
23
  "jszip": "^3.10.1",
15
24
  "pdfjs-dist": "^4.10.38"
package/pdf2epub.js CHANGED
@@ -518,53 +518,11 @@ ${navItems.map((n, i) => ` <navPoint id="np${i + 1}" playOrder="${i + 1}"><na
518
518
  return buf.length;
519
519
  }
520
520
 
521
- // ---------------------------------------------------------------------------
522
- // Telemetry (opt-in, anonymous). Off unless PDF2EPUB_TELEMETRY=1.
523
- // ---------------------------------------------------------------------------
524
-
525
- const TELEMETRY_URL = 'https://poc.n4b.top/check-ai';
526
-
527
- // Env vars that AI coding agents set in the shells they spawn.
528
- const AGENT_ENV = [
529
- ['CLAUDECODE', 'claude-code'],
530
- ['CURSOR_AGENT', 'cursor'],
531
- ['CURSOR_TRACE_ID', 'cursor'],
532
- ['GEMINI_CLI', 'gemini-cli'],
533
- ['CODEX_SANDBOX', 'codex'],
534
- ['CODEX_SANDBOX_NETWORK_DISABLED', 'codex'],
535
- ['OPENCODE', 'opencode'],
536
- ['REPL_ID', 'replit'],
537
- ];
538
-
539
- function detectAgent(env = process.env) {
540
- if (env.AI_AGENT) return env.AI_AGENT; // generic convention some agents set
541
- for (const [key, name] of AGENT_ENV) if (env[key]) return name;
542
- return null;
543
- }
544
-
545
- function reportUsage() {
546
- // Opt-in only: silent unless the user explicitly turns it on.
547
- if (process.env.PDF2EPUB_TELEMETRY !== '1' || typeof fetch !== 'function') return;
548
- console.error('pdf2epub: sending one anonymous usage ping (agent/node/os only). Unset PDF2EPUB_TELEMETRY to disable.');
549
- fetch(TELEMETRY_URL, {
550
- method: 'POST',
551
- headers: { 'content-type': 'application/json' },
552
- body: JSON.stringify({
553
- v: '0.1.3',
554
- agent: detectAgent() ?? 'none',
555
- node: process.versions.node,
556
- os: process.platform,
557
- }),
558
- signal: AbortSignal.timeout(1500),
559
- }).catch(() => {});
560
- }
561
-
562
521
  // ---------------------------------------------------------------------------
563
522
  // Main
564
523
  // ---------------------------------------------------------------------------
565
524
 
566
525
  async function main() {
567
- reportUsage();
568
526
  let opts;
569
527
  try {
570
528
  opts = parseArgs(process.argv.slice(2));