Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

reddit2html

sainathadapa10MIT0.1.1

Simple utility to convert a reddit post into simple bare-bones html page, meant for converting into a epub/mobi.

reddit, html, epub, mobi

readme

reddit2mobi

This project helps to export a reddit post into a mobi/epub via html.

Instructions

  • Install NodeJS and npm
  • Install this module using npm
    • npm install reddit2html (or)
    • npm install git://github.com/sainathadapa/reddit2mobi.git
  • Install Calibre
  • Download and run run_reddit2html.js script.
    • Pass the url of the reddit post as an argument. Optionally, pass the depth (integer) to limit the maximum depth of subtrees in the thread.
      • Usage: nodejs run_reddit2html.js url depth > out.html
  • Convert the generated html into epub/mobi using the ebook-convert from Calibre.
    • Usage: ebook-convert in.html out.mobi

Other resources

  • See the example files to see the sample generated output.
    • Example files are generated by these commands:
    • nodejs run_reddit2html.js https://www.reddit.com/r/MachineLearning/comments/2fxi6v/ama_michael_i_jordan/ 10 > example1.html
    • ebook-convert example1.html example1.mobi
    • nodejs run_reddit2html.js https://www.reddit.com/r/Android/comments/2jbt42/google_announces_android_50_lollipop 3 > example2.html
    • ebook-convert example2.html example2.mobi
  • Reddit API
  • Ebook-convert