How leone25/sanoma-downloader works
Sanoma-downloader is a command-line tool that authenticates to Sanoma, lets the user choose a book, downloads its page archive, converts the extracted SVG pages to PDFs with Inkscape, and merges them into one output PDF. The runtime is entirely in index.js; the graph separates its workflow stages by responsibility. Source inspection is limited to that file, so undocumented service behavior and internal API details are omitted.
Main entry points: index.js Account authentication
Components 15
CLI and selection
- CLI options and prompts
index.js - Book selection
index.js
Sanoma acquisition
- Account authentication
index.js - Book catalog fetch
index.js - Archive download
index.js - Temporary workspace
index.js
PDF production
- Page extraction
index.js - Extracted SVG pages
index.js - Page conversion
index.js - PDF page merging
index.js - PDF output
index.js - Workspace cleanup
index.js
Other components
- User
- Sanoma API
- Inkscape
Connections 18
- User → CLI options and prompts: provides options
- CLI options and prompts → Account authentication: requests login
- Account authentication → Sanoma API: posts credentials
- Account authentication → Book catalog fetch: passes token
- Book catalog fetch → Sanoma API: fetches books
- Book catalog fetch → Book selection: provides book list
- User → Book selection: chooses book
- Book selection → Archive download: selects archive
- Archive download → Sanoma API: fetches archive
- Archive download → Temporary workspace: writes ZIP
- Temporary workspace → Page extraction: reads ZIP
- Page extraction → Extracted SVG pages: writes SVG pages
- Extracted SVG pages → Page conversion: supplies page files
- Page conversion → Inkscape: converts pages
- Page conversion → PDF page merging: writes page PDFs
- PDF page merging → PDF output: saves merged PDF
- PDF page merging → Workspace cleanup: finishes output
- Workspace cleanup → Temporary workspace: removes workspace