I’ve got a number of my code projects on github mainly as a place just to have the code, and some documentation too. Most of them are the SPLOT wordpress stuff I have done this year Besides, it’s the thing to do.
That said, they see as far as I can see little activity besides me. That’s okay. And I honestly float at maybe about a 35% understanding of working in git. Mostly I sync through the desktop app.
My more significant (and remember that is relative) project there is the flickr cc attribution helper – this is something I made totally for me to make getting a flickr image and written/linked attribution statement done as a one click copy/paste, mainly for blogging purposes. It started as a browser script totally dependent on Yahoo’s formatting of the flickr photo page layouts hosted in userscripts.
It was held together with old duct tape and bobby pins.
In March 2014 I managed to come up with the current design, totally independent of the Yahoo page layouts, and 100% hosted in github pages.
The way it works is this:
- While viewing a flickr image, you click a bookmarklet link.
- The script merely grabs the photo ID from the flickr URL — for example, for this photo
https://www.flickr.com/photos/cogdog/8188824613it’s unique flickr id is the last part
8188824613. With that info, you can use the flickr API to find all the other info about the photo. It then sends this to an html file on my github site, with that ID as a parameter, and some other info like the desired size for use in generating the HTMO to show the image e.g.
My initial version more or less wrote the attribution for including the image in the HTML format I used on my blog. When I updated my theme, I saw that the tool would be better if it generated the attribution HTML in the form that would include the WordPress caption HTML. In doing this, a small light bulb went off- I could have a number of variations of the HTML page on my github site that does the work, and each one could generate a different format of attribution output. So I made a second option for a WordPress specific attribution generator.
But it gets better- John Johnston forked my code and created yet a third flavor this is one that actually puts the attribution text into the photo.
What this means is that anyone can submit a pull request to create other types of attribution styles.
And that just happened the other day, in fact, it was while I was on a plane flying to Puerto Rico, and before the free Jet Blue wifi gave out as it went over the ocean, I saw a message from Glen Smith, that he had created a new one to generate flickr cc attribution in Markdown.
This is pretty cool, because it opens up the tool to be used for people running github hosted static sites. How?
Well you go to the site that creates the bookmarklet tool for you http://cogdog.github.io/flickr-cc-helper/
The first menu lets you choose the size of flickr image used when you do the full attribution that includes the image.
The second menu let’s you choose the new Markdown method.
With each change of these menus, the code for the bookmarklet changes. Then you just drag the link from the blue button looking thing to your browser toolbar.
Now find the image you want to use in flickr, let’s say a certain name of Puerto Rican Beer (here embedded with my WordPress cc attribution helper tool)
but the new tool generates a cut and paste code in Markdown!
I can click the top attribution, it automatically highlights, and I can do a command-C to copy. Then I jump over to a place I can write in Markdown, paste, and there ya go:
Thanks Glen Smith for adding to my code.
They fork me! They really really fork me.
Top / Featured Image credit: flickr photo by ?keaggy.com http://flickr.com/photos/bk/12419547923 shared under a Creative Commons (BY-NC-SA) license
The post "They Fork Me, They Really Really Fork Me (CC Attribution Helper Now With Markdown)" was originally cracked open and scrambled from a rotten egg at CogDogBlog (https://cogdogblog.com/2015/10/they-fork-me/) on October 15, 2015.