You know about git annex addurl right? It doesn't help with the browser integration (though I bet there are existing download manager extensions you could re-use for this) but it takes care of the other use cases.
Justin, yes, I know. To use addurl, I should force myself not to click on a link to view it, but rather to copy it, paste into the command line with addurl (then it will be downloaded, and I can run a command to view it...). Not terrible, probably learnable.
Copy+Paste+Open is to much for lazy people like me;) I like the idea of a direct browser download manager integration. This would make it so much easier to find find the original source of a downloaded file when you're to lazy to write it down somewhere in the first place …
This could be even neater if Git-annex had the ability to set the download manager... Wishlist created: ?wishlist: allow configuration of downloader for addurl
I am leaving this bug open for now, as some javascript that passes the url off to the webapp is still a nice idea to build.
A solution to the webapp's url always changing could be to have a file:/// url that the webapp creates, and javascript submits to, that then passes the request off to the webapp, probably by using additional javadcript in the html file. Assuming javascript security allows this.
A less round-about method would be to have the webapp listen for links dropped into its page. You could then have the webapp open in a tab, and just drag urls there to add them to the annex.
I'm not sure if it's possible to intercept drags into a tab. Default browser behavior is certainly to redirect the tab to the url dropped into it.
If someone finds out how to do this, I will build it.
git annex addurl
right? It doesn't help with the browser integration (though I bet there are existing download manager extensions you could re-use for this) but it takes care of the other use cases.So I've just written a two-line shell script that makes FlashGot able to do this. It's available on GitHub at https://gist.github.com/andyg0808/5342434.
This could be even neater if Git-annex had the ability to set the download manager... Wishlist created: ?wishlist: allow configuration of downloader for addurl
Wishlist implemented
A full example of doing this would make a nice addition to tips ...
See Using Git-annex as a web browsing assistant.
I am leaving this bug open for now, as some javascript that passes the url off to the webapp is still a nice idea to build.
A solution to the webapp's url always changing could be to have a file:/// url that the webapp creates, and javascript submits to, that then passes the request off to the webapp, probably by using additional javadcript in the html file. Assuming javascript security allows this.
A less round-about method would be to have the webapp listen for links dropped into its page. You could then have the webapp open in a tab, and just drag urls there to add them to the annex.
I'm not sure if it's possible to intercept drags into a tab. Default browser behavior is certainly to redirect the tab to the url dropped into it.
If someone finds out how to do this, I will build it.