Skip to content

Instantly share code, notes, and snippets.

@esp10mm
esp10mm / index.js
Created July 30, 2018 04:27
text to html in PTT and Youtube description
// ==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==
@esp10mm
esp10mm / index.js
Last active February 26, 2024 09:58
epub to evernote enex based on table of content
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 () => {