lapwat / recatchable Goto Github PK
View Code? Open in Web Editor NEWTurn a site into a book. Download a whole website and upload it to your reMarkable.
Home Page: https://papeer.tech
Turn a site into a book. Download a whole website and upload it to your reMarkable.
Home Page: https://papeer.tech
Very cool project!! I installed and successfully ran your test command. Then I tried to use this to scrape some recipes, and I get the below error... Any help is appreciated!
./index.js -b https://www.halfbakedharvest.com -h /category/recipes -s .recipe-block
Found 12 pages in the table of content
Downloading Recipes Index - Half Baked Harvest...
(node:39739) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 23.200.237.230:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:39739) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:39739) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hi! I think I'm using it correctly with the selector, but I ran into the following issue (similar to the previous issue).. Thanks!
(base) briankaemingk@brians-MacBook-Pro reCatchable % ./index.js -h https://tldp.org/HOWTO/Software-Building-HOWTO.html -s 'a[name*="toc"]'
Found 17 pages in the table of content.
Downloading Building and Installing Software Packages for Linux...
(node:14981) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL:
at onParseError (internal/url.js:258:9)
at new URL (internal/url.js:334:5)
at Object.urlFilter (/Users/briankaemingk/Documents/reCatchable/utils/scraper.js:58:13)
at Scraper.requestResource (/Users/briankaemingk/Documents/reCatchable/node_modules/website-scraper/lib/scraper.js:204:47)
at tryCatcher (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/util.js:16:23)
at MappingPromiseArray._promiseFulfilled (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:68:38)
at MappingPromiseArray.PromiseArray._iterate (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:115:31)
at MappingPromiseArray.init (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:79:10)
at MappingPromiseArray._asyncInit (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:37:10)
at _drainQueueStep (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:461:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14981) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 18)
(node:14981) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(base) briankaemingk@brians-MacBook-Pro reCatchable %
(base) briankaemingk@brians-MacBook-Pro reCatchable %
(base) briankaemingk@brians-MacBook-Pro reCatchable %
(base) briankaemingk@brians-MacBook-Pro reCatchable % ./index.js -h https://tldp.org/HOWTO/Software-Building-HOWTO.html -s 'a[name*="toc"]'
Found 17 pages in the table of content.
Downloading Building and Installing Software Packages for Linux...
(node:15024) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL:
at onParseError (internal/url.js:258:9)
at new URL (internal/url.js:334:5)
at Object.urlFilter (/Users/briankaemingk/Documents/reCatchable/utils/scraper.js:58:13)
at Scraper.requestResource (/Users/briankaemingk/Documents/reCatchable/node_modules/website-scraper/lib/scraper.js:204:47)
at tryCatcher (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/util.js:16:23)
at MappingPromiseArray._promiseFulfilled (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:68:38)
at MappingPromiseArray.PromiseArray._iterate (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:115:31)
at MappingPromiseArray.init (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/promise_array.js:79:10)
at MappingPromiseArray._asyncInit (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/map.js:37:10)
at _drainQueueStep (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/briankaemingk/Documents/reCatchable/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:461:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:15024) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 18)
(node:15024) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
This tool is cool! I'm running into an issue when trying to upload though. Any ideas?
λ: ./index.js -h https://vitalik.ca/ -u
No selector specified, inserting home page only.
Found 1 pages in the table of content.
Downloading Vitalik Buterin's website ...
Extracting clean content from HTML sources...
+ Page 1: Vitalik Buterin's website
Creating book...
Zipping temp dir to Vitalik Buterin's website .epub
Done zipping, clearing temp dir...
+ Book saved to Vitalik Buterin's website .epub
Token not found in (/*repo location*/)/recatchable/remarkable.token. Initiating connection process...
Enter one-time code displayed at https://my.remarkable.com/connect/desktop: (/*remarkable code*/)
Attempting connection...
Could not upload book, book name may already exists. HTTPError: Response code 400 (Bad Request)
at Request.<anonymous> (/(/*repo location*/)/recatchable/node_modules/got/dist/source/as-promise/index.js:117:42)
at processTicksAndRejections (node:internal/process/task_queues:94:5) {
code: undefined,
timings: {
start: 1614973418850,
socket: 1614973418850,
lookup: 1614973418851,
connect: 1614973418862,
secureConnect: 1614973418902,
upload: 1614973418902,
response: 1614973419636,
end: 1614973419636,
error: undefined,
abort: undefined,
phases: {
wait: 0,
dns: 1,
tcp: 11,
tls: 40,
request: 0,
firstByte: 734,
download: 0,
total: 786
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.