I am frequently downloading large files in my browser (Chrome on Mac). I'd like to be able to shut down my computer and continue the download. Currently, I halt the download, scp the incomplete file over to my RPI, copy the download URL from Chrome://downloads, ssh to my RPI and do wget -c '#url' -O 'file'. Then, next day, I scp the file over. This is kind of too complicated. Is there a simple way (plugin?) to just directly trigger the download on my RPI? Maybe Chrome talking to Chromium?
What i'm doing currently (status quo)
var h=require('http');
var wget = require('node-wget');
var url = require('url');
var server=h.createServer(function (req, res) {
setTimeout(function () {
var url_parts = url.parse(req.url, true);
var query = url_parts.query;
var u = query.u;
wget(''+u+'');
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(u+' received');
}, 100);
});
server.listen(1200);
and 'Custom right-click menu extension for chrome'
var query;
var url = "http://127.0.0.1:1200/?u=%s";
if (crmAPI.getSelection()) {
query = crmAPI.getSelection();
} else {
query = window.prompt('Please enter a search query');
}
if (query) {
window.open(url.replace(/%s/g,query), '_blank');
}