This file contains 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
var cheerio = require("cheerio"), | |
fs = require("fs"); | |
fs.readFile('bookmarks.html', "utf-8", function read(err, data) { | |
if (err) { | |
throw err; | |
} | |
var $ = cheerio.load(data); | |
$("a").each(function(index, a) { |
This file contains 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
var http = require('http'); | |
var sys = require('sys'); | |
var exec = require('child_process').exec; | |
var util = require('util'); | |
var fs = require('fs'); | |
http.createServer(function(request, response) { | |
var dummyContent = '<!doctype html><html><head><title>Test</title><meta charset="utf-8"></head><body><p>Hello world!</p></body></html>'; | |
var htmlFileName = "page.html", pdfFileName = "page.pdf"; | |