Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd like to have a shortcut that appends currently highlighted text, current url and timestamp to a text file on my disk. Can this be done with a bookmarklet?


I've found it really handy to just have a local Python webserver running on my workstation. Then my bookmarklets can just hit eg http://localhost:8000/cgi-bin/script.py to modify a local file or open up my notes for a certain Jira ticket or whatever else I can think of. There are security considerations with that approach though, since any random site you load can start sending requests to your local webserver.


Cannot append. Can do everything else you ask. Either will download that one text content as text file, or can put it in the clipboard, and you manually have to open it & paste it.


Perhaps if the bookmarklet opened a new url containing the text as a query parameter, and the url had a weird protocol instead of https:// — say it was snippy:// … and then you created a protocol handler on your machine for the “snippy” protocol …. And it saved the relevant query param to a file.

I can’t remember if I’ve done this before. It seems like something I’ve done.


I've done that too. I ended up just using a local webserver with some Python cgi scripts instead though. I found it more flexible and easier to remember how things worked that way.


Yes, the other easy way I have used multiple times is, bookmarklet simply sends the text via a POST request to Google Apps Script, which simply appends it to a sheet or doc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: