Closed ohhdemgirls closed 2 years ago
Patches welcome!
Looking back through the commit history, it seems like short URLs are written to the HTML files because they still work if the blog has been renamed in the meantime, see https://github.com/bbolli/tumblr-utils/commit/39cade9db0ba792d155d8d3834f56aed02ed649e – so their usage prevents a kind of link rot that might be more common/likely than Tumblr's link shortener dying.
If you supply the --json
flag, both will at least be stored.
Request : Optional implementation of short URL and normal URL :)
Quoting myself:
Patches welcome!
I managed to implement it with AHK script.
^LButton:: ;Ctrl+LClick *Please use with a shortened URL link*
Critical, On
Clipboard := ""
Send, {RButton}
Sleep, 100
Send, t
Sleep, 100
req := ComObjCreate("WinHttp.WinHttpRequest.5.1")
req.Open("HEAD", Clipboard) ;Start URL expansion
req.Option(6) := False ; Disable auto redirect
req.Send()
url_origin := req.GetResponseHeader("Location")
RegExMatch(url_origin, "\d{5,}", url_edit) ;Article POST number extraction
WinActivate, ahk_class Chrome_WidgetWin_1
Run, C:\chrome.exe "https://www.tumblr.com/edit/your_tumbler_id/%url_edit%/"
Return
@superuser7777 Yes, as long as Tumblr still works a web request is all you need to resolve a short URL. A button to edit a post is a different matter - you could open a new issue if you think that's a useful feature.
Using short URLs is bad practice for preservation, should the index go offline short urls are useless. (among other issues) You should revert this change or give the option as a flag to users.
Read more about this position here, while in this case tumblr isn't a short url service I think the same applies.