Merry Christmas
Permalink - Comments - Tags: Art?
WTF is PC Load Letter?!
Permalink - Comments - Tags: Misc
How I got more pages from my sitemap into the Google index
N.B. Disclaimer: For SEO types this might all seem very obvious, but I thought someone might find it interesting.
Wow! In July this year I tweeted that I was working on improving the number of URLs I had in the index:
Working on getting more urls in my sitemap into the index. Currently at 308 of 1804 links. Hoping todays changes will improve that ratio.
Just checked my Webmaster tools and discovered of the 1885 pages on my site today, 1790 are in the index. So what did I do?
You have to be careful with Monetization
I have an Amazon affiliate account and when I was building my World War Two timeline project it seemed like a good idea, in addition to linking to Wikipedia articles, to link to Amazon search results for the title of each data point (using my affiliate link of course).
For something like my entry on D-Day, this kinda worked. You got a link that looked something like this:
This makes sense right? I have to monetize this thing somehow and maybe people want to buy a book about this topic they have clicked on? It turns out very few people actually did that and in the end it was just adding a distracting link to my content.
The cartoon caricature of the Googlebot in my head saw those pages of affiliate links and frowned, so I removed them (This is the reason that in my head the Googlebot is an enthusiastic labrador puppy).
Since then I have built iPhone and Android apps to provide new ways of getting to my content and found that is a much more effective way of monetizing my work.
Spammy user profiles
Every now and then a medical supplies peddler or enthusiastic pornographer will find their way to my user signup page. Their profile descriptions are often entertaining, but perhaps something of a red flag for the G-rated Googlebot. To prevent their potentially nasty content from affecting my page rank, I use robots.txt to hide those pages until I have time to nuke them.
Disallow: /user.php
Titles, Titles, Titles
Thanks to the HTML suggestions section in the Webmaster tools I noticed that I had lots of duplicate titles for my content. Each historical data point page was using the generic "World War Two Timeline Project" title instead of a title that summarised the information on the page. It was a very simple change to update these pages to render a more appropriate title and suddenly the number of duplicates for my site dropped dramatically.
Static pages for map popups
This one is actually still a work in progress.
I have lots (1128) of Info Windows on my Patrick O'Brian Mapping Project containing content that should be searchable by Google but currently aren't.
My first attempt at solving this problem was to create a whole pile of static pages that were chained together (with next and previous links) in a giant linked list. I think the Googlebot started down my list of pages and decided it was getting mired in some pathological labyrinth and maybe it would come back another day.
I think that this is something that the Googlebot could probably figure out on its own (indexing the data from the Javascript map), so I am hoping that by the time I get around to revisting the issue, they will have worked it out. I am looking at you Chris Broadfoot ;)
Conclusions
So pretty simple and hopefully intuitive changes and it looks like they worked. I found a good way of getting into the mindset for this type of thing is to watch some of Matt Cutts' Webmaster Q&A videos. I found his even tempered, sensible explanations for the various things that Google does to improve search were enough to get me thinking about this stuff the right way.
Permalink - Comments - Tags: Development,Google
Numberline
Simple addition and subtraction questions with a numberline to pick the answer.
Permalink - Comments - Tags: Development,iPad,iPhone,App
Framerator
As I have mentioned, building my Numberline iOS app has involved lots and lots of animation frames. I have been doing my artwork in Inkscape and then generating the frames based on the content in layers. It has been ok generating the low res frames I have been using for testing as I went along, but when I realised I needed to go back to all my SVG files and re-generate all the animation frames in three resolutions (iPad, iPhone and Retina) it became obvious that I could no longer do this by hand in Inkscape (show appropriate frames, file export, type the correct frame file name, set the resolution, export ... ugh).
I'm a programmer right? So it makes sense to automate that stuff. I wrote this simple Python script to run through a whole pile of SVGs, generate temporary SVG files containing a set of pre-configured layers and then drive Inkscape on the command line to generate the animation frame.
Here is the code:
from svgfig import *
import os
import config
inkscape_location = '/Applications/Inkscape.app'
def generateFile (detail):
# load it and save it using SVG fig. This will write out elements on single lines.
svg = load(detail[0])
svg.save ("temp.svg")
# now we can mess with temp.svg using regex hackery
fileOut = open ("temp_out.svg", "wt")
fileIn = open ("temp.svg", "rt")
lines = fileIn.readlines ()
for line in lines:
# is this line a layer?
exp = "(.*style=\\\")([^\\\"]+)(\\\".*inkscape:label=\\\")([^\\\"]+)(\\\".*inkscape:groupmode=\\\"layer\\\".*)"
regexp = re.compile(exp, re.I)
match = regexp.search(line)
if (match):
layer = match.group(4)
if (layer in detail[4]):
# this is a layer we want
fileOut.write(match.group(1) + "display:inline" + match.group(3) + match.group(4) + match.group(5))
else:
# hide this layer
fileOut.write (match.group(1) + "display:none" + match.group(3) + match.group(4) + match.group(5))
else:
# otherwise just write out the line
fileOut.write (line)
fileIn.close ()
fileOut.close ()
# run our command to generate the PNG based on our temporary SVG
command = inkscape_location + '/Contents/Resources/script -without-gui -export-area-page --export-width=' \
+str(detail[2])+' -export-height='+str(detail[3])+' --export-png='+os.getcwd()+'/'+detail[1] + ' ' + os.getcwd() + '/temp_out.svg'
print (command)
os.system(command)
for detail in config.config:
generateFile (detail)
It depends on svgfig to sanitise the input and the following config file to describe the SVG files and the frames you need to generate:
# an array of tuples describing your SVG and the required output
# [0] - The SVG file in question
# [1] - The required PNG file to generate
# [2] - The width
# [3] - The height
# [4] - An array of layer numbers to show in the generated PNG
config = [
#left wobble
("monster_wobble_left.svg", "wobble_left4.PNG", 147, 201, ["Wobble3","Wobble3-bg"]),
("monster_wobble_left.svg", "[email protected]", 295, 402, ["Wobble3","Wobble3-bg"]),
("monster_wobble_left.svg", "ipad_wobble_left4.PNG", 323, 440, ["Wobble3","Wobble3-bg"]),
("monster_wobble_left.svg", "wobble_left3.PNG", 147, 201, ["Wobble2","Wobble2-bg"]),
("monster_wobble_left.svg", "[email protected]", 295, 402, ["Wobble2","Wobble2-bg"]),
("monster_wobble_left.svg", "ipad_wobble_left3.PNG", 323, 440, ["Wobble2","Wobble2-bg"]),
("monster_wobble_left.svg", "wobble_left2.PNG", 147, 201, ["Wobble1","Wobble1-bg"]),
("monster_wobble_left.svg", "[email protected]", 295, 402, ["Wobble1","Wobble1-bg"]),
("monster_wobble_left.svg", "ipad_wobble_left2.PNG", 323, 440, ["Wobble1","Wobble1-bg"]),
("monster_wobble_left.svg", "wobble_left1.PNG", 147, 201, ["standing","standing_bg"]),
("monster_wobble_left.svg", "[email protected]", 295, 402, ["standing","standing_bg"]),
("monster_wobble_left.svg", "ipad_wobble_left1.PNG", 323, 440, ["standing","standing_bg"]),
#right wobble
("monster_wobble.svg", "wobble4.PNG", 147, 201, ["Wobble3","Wobble3-bg"]),
("monster_wobble.svg", "[email protected]", 295, 402, ["Wobble3","Wobble3-bg"]),
("monster_wobble.svg", "ipad_wobble4.PNG", 323, 440, ["Wobble3","Wobble3-bg"]),
("monster_wobble.svg", "wobble3.PNG", 147, 201, ["Wobble2","Wobble2-bg"]),
("monster_wobble.svg", "[email protected]", 295, 402, ["Wobble2","Wobble2-bg"]),
("monster_wobble.svg", "ipad_wobble3.PNG", 323, 440, ["Wobble2","Wobble2-bg"]),
("monster_wobble.svg", "wobble2.PNG", 147, 201, ["Wobble1","Wobble1-bg"]),
("monster_wobble.svg", "[email protected]", 295, 402, ["Wobble1","Wobble1-bg"]),
("monster_wobble.svg", "ipad_wobble2.PNG", 323, 440, ["Wobble1","Wobble1-bg"]),
("monster_wobble.svg", "wobble1.PNG", 147, 201, ["Standing","standing_bg"]),
("monster_wobble.svg", "[email protected]", 295, 402, ["Standing","standing_bg"]),
("monster_wobble.svg", "ipad_wobble1.PNG", 323, 440, ["Standing","standing_bg"]),
]
You can find the repo on Github
Permalink - Comments - Tags: Development
[First Page] [Prev] Showing page 10 of 40 pages [Next] [Last Page]