I'm back in NY, after returning from Calif where I sold my house. Now it's time to get back to my real job -- writing a new blogging tool called Scripting2. To get the ball rolling, I'm going to make paragraph-level permalinks work a little beter. In their first incarnation, implemented a few years ago, a pargraph would get a unique name derived from its timestamp which was converted into a number to make the name. So if this paragraph was created at 12:28:08 PM today its name would be "p934826408.' It works, but it's pretty unsightly. In the next iteration the names were a bit nicer. As it was rendering the story it would bump a counter each time it moved to a new paragraph. So the names would be p1, p2, etc. The only problem is if I added a paragraph in the middle, all the numbers would move down and links might point to the wrong place, which defeats the purpose of having the permalinks. So now I'm doing it a better way that has less distracting names than the original approach, but won't break if paragraphs are added in the middle. When I create a new paragraph I give it a serial number. So the first paragraph in a story might get serial number 249, and the second would be 250, and so on. The corresponding names would be p249 and p250. Later if I add a paragraph between them, it could be 284. The numbers would appear to be out of sequence if you looked closely, but they would remain unique. In fact this post was written using the new system. If you're reading this on the web and not in a feed reader, try hovering over the purple pound signs at the end of each paragraph. A paragraph was added in the middle. See if you can find it! BTW, the serial numbers are reflected in the OPML that's linked into the HTML rendering and the RSS feed, so if you're writing an alternate viewer for my posts, you can use the serial numbers in generating your paragraph-level permalinks. For example, here's the OPML generated for this post. |