Something that’s always important to me is efficiency. I’m a weird mix of lazy and hardworking. I’ll spend 10 hours coding up something that will save me days of work later, mostly because I get bored of having to do the same steps over and over again. I post a lot of pictures here on LumberJocks, and my method is usually to pop off a tab with Flickr in it, move that new window to a separate monitor, then in my new post back in the first window type !()!: on its own line wherever I want an image. It’s become complete muscle memory to type that, and I fire it off like it’s a single character. Then I click in the address bar of the image page on Flickr that I want to link to, then middle-click after the : in the image link. That’s a Linux trick (actually part of Gnome and the window management system, though not important for our purposes here, other than to say that it’s nice to be able to select something, then just middle-click in a text area to paste it – no need for dragging, or copy/paste). Then I’d click on the image and drag it to the space between the first ! and the ( to drop the address to the actual image. Then I’d type the title-text between the ( and ). That’s the text that pops up when you roll over an image.
This was sort of okay, though a bit of a hassle for posts with a dozen images or so. Too, Flickr just recently changed their system – and there’s no way to change it back the way it was that I can find – such that dragging the image to try to easily drop its address in the right spot in my posts just draws a box over said image, which then pops up a thing asking if I want to write a note in that box or tell it which person I’m framing (a new feature, similar to Facebook’s person tagging ability). This means I actually need to click “ALL SIZES” above the image, then click on “medium” on the next page, then drag that image over into my post, then go back 2 pages to where I was. I have that sorted down to mouse gestures. I right-click on the “ALL SIZES” link, drag down and release, and that opens the link in a background tab. Then I click on that tab and click the “medium” size link, drag that over, then use the right-click, drag down and right mouse gesture to close that new tab, leaving me back where I was. Extra hassle! Gestures make it easier. Linux’s little tricks make it easier, but I must have posted hundreds of images here by now. I’m tired of going through these motions. I wanted something that would just give me the entire link I type here, except for the title text in the ()s, which I obviously would have to make up on the spot still.
Anyway, now it works. It puts a properly formulated bit of LJs image code right under the image. I just triple-click on it to select the entire line, then middle-click where I want it in my post in the other window, and it inserts it. To finish, I just type in the title-text inside the ()s and move on. Here’s what I see (the text just under the image is what my script added):
The funny part is that I just embedded that image with a similar link grabbed from under that image on Flickr :)
If you have Greasemonkey installed and operational, you can click on the link here to the script and it’ll ask if you want to install it. If you don’t have it installed, you’ll probably just see the text of the .js file itself in your window, or it’ll just ask if you want to save the file. There’s not much to the script, only to the battle to figure out what small amount of code would solve the problem.
I used the script extensively in my last post, and I’m happy to report that it greatly sped me up.
-- Gary, Los Angeles, video game animator