Created
July 15, 2015 01:44
-
-
Save derekr/0614c96a5d21857abf6c to your computer and use it in GitHub Desktop.
unarchived instapaper videos
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
var fs = require('fs') | |
var csv = require('csv-parser') | |
var map = require('map-stream') | |
fs.createReadStream(__dirname + '/instapaper-export.csv') | |
.pipe(csv()) | |
.pipe(map(function (data, cb) { | |
if ( | |
data.Folder !== 'Archive' && | |
data.URL.indexOf('youtube') === -1 && | |
data.URL.indexOf('vimeo') === -1 | |
) { | |
return cb() | |
} | |
// console.dir(data) | |
var str = '<p><strong>' + data.Title.trim() + '</strong><br />' + | |
'<a href="' + data.URL + '">' + data.URL + '</a></p>' | |
return cb(null, str) | |
})) | |
.pipe(process.stdout) |
Author
derekr
commented
Jul 15, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment