walnut.js/snippets/test-mv-redirects.js

11 lines
297 B
JavaScript
Raw Permalink Normal View History

2015-02-19 06:06:56 +00:00
var redirects = require('./redirects.json');
redirects.forEach(function (r) {
var frompath = "'" + r.from.hostname + r.from.path + "'";
var topath = "'" + r.to.hostname + r.to.path.replace(/\//g, '#') + "'";
if (frompath !== topath) {
console.log("mv", frompath, " ", topath);
}
});