This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name text to html in PTT and Youtube description | |
// @match https://www.youtube.com/* | |
// @match https://www.ptt.cc/* | |
// @author Ting Shao Kuo | |
// @license GNU GPL v3.0 or later. http://www.gnu.org/copyleft/gpl.html | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @version 1 | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const Epub = require('epub'); | |
const sanitizeHtml = require('sanitize-html'); | |
const name = process.argv[2]; | |
const main = () => { | |
let chaps = []; | |
var epub = new Epub(`./${name}.epub`); | |
epub.on('end', async () => { |