Compiled Website > To Do
Also see compiled website bugs.
To Do: High Priority §
- Change from Google to scroogle or some other search engine.
- I wonder if I should have a selector to be able to use multiple search engines in a way that's similar to my show/hide functionality. That'd be cool.
- Colour the external and internal links differently?
- I should begin this by associating a style with the different links..
- Consider CSS text resizing in the same way that it's done with styles. Remember it with a cookie.
- www.javascriptkit.com/script/script2/doctextresizer.shtml
- If done, mention it in javascript.
- Add a mouseover section link for #s0.
- A pre block should definitely deny syntax within. The backtick is especially annoying, but html is getting translated too, which is probably bad. Maybe I should have <code> do that, and then the user can code+pre or some such? I dunno, figure it out.
- Allow mixed spaces and hyphons in filenames.
- This will require a complete rethink of the way I do things. Argh.
- Decide on how I should locally store filenames. Maybe allow all characters in the filename and then roughly translate things into the .html filename. Somehow.
- Named local links.
[[actual name|displayed name]] . - Redirect pages?
-
[[new file]] needs to be modified to translate spaces and dashes and the like. - To implement section-editing I would have to store pages as both a whole and as individual sections.
- When detecting a section change, re-merge it and process it.
- When detecting a whole-page change break it back up into sections.
- Then I would generate edit links within each section (and to the left, dammit) to the section .asc files.
- A 'listings' feature like ;list: item
- Maybe just style it only with CSS and not with regular HTML markup.
- If I purge the compiled directory then I get several sets of errors while things are rebuilt. Everything goes well if I just re-run the scripting.. but I should troubleshoot all of that so that it's graceful. I think this is because of directory deletion.
- note to self: don't purge the css/ and images/ directories.
- If a .asc file is empty, delete it and the associated .html file, and recompile the other files to remove the link.
- Implement in-file comments which are not compiled and output? Could be useful, but functionality would have to be really rock-solid for security concerns. Maybe {{private text}}
- Lists of mixed-types. So an ordered list with some unordered lists within it.
- Implement a tag which will pass multiple lines through as-is, and convert HTML-brackets like < becomes <
- Maybe make it a list start and list end type thing? like <nowiki> that can work across multiple lines.
- I think I'd have to modify every feature to have it notice and skip lines with that marker.
- Have the backtick ` disallow all nested tags, and convert HTML-brackets to text-brackets like < becomes <
- Research: If I could make firefox open geany to a specific line, then I could very easily implement section-editing! I don't think Geany can do that.. ask for it. Can firefox summon up a program and pass it parameters? e.g. file:///foo/bar/bla.txt#somewhere => geany /foo/bar/bla.txt -line 5 ??
- Make automatic linking be once-per-section, separated by <h1> etc.
- I can tell when I'm in a section based on whatever current variable being populated.. I think.
- For each section, maintain an array. Blank the array when moving to a new section.
- Then for every link found only linkify it if it's not in the array. If linking it, also add it into the array.
- To achieve this, I'd have to redo or avoid using the old markup() routine. Probably abandon it and look at it later.
Image markup language §
An image markup language.
Keep the usual linking, don't treat images differently:
- hotlink: *http://example.com/example.png
- Browser-resized to some standard value and hotlinked: ?
- I hate hotlinking, but it may be important to fit things inside of my templating if there is any sort of style concern.
- Browser-resized to a specific value and hotlinked: ?
- Downloaded, cached and linked: ?
- And also display a link to the original.
- Downloaded, cached, resized to a standard value, and displayed: ?
- Downloaded, cached, resized to a specific value, and displayed: ?
To Do: Medium Priority §
- Automate the detection of new articles (just by file date) and build an RSS feed.
- view_html() should only fire if it's been x amount of time since its last update. This way I'm not constantly firing it when writing an article and constantly saving it.
- Create an 'about' page which talks about website technology
- Browser, base standards and quirks (mozilla rounded borders)
- CSS
- JavaScript
- Cookies (for remembering style changes, if any)
- When JavaScript is turned off:
- Hide the text+link for "Styles" and "Table of Contents" at the top-right
- Display the table of contents below the footer.
- Create a page which explains what JavaScript is for. Link to it.
- Create another page which explains how to enable JavaScript.
- Also promote Firefox/NoScript.
- Define an external linking language `
[[w:wikipedia link]] ` - Printable version and text-only version
- Done through the site and not by browser style CSS selection?
- Some sort of easy article renaming? Hell, I could even code something within the markup language to say
[[previous||new]] and have the document previous.asc|.html be renamed to new.asc|.html - A draft/working copy system - maybe something like _#.filename.asc -- This topic needs a lot of thought.
- User-modified articles which are accessed/stored in a way completely separate from the actual site. So for each document there's a secured official copy and a less-secured working copy.
- A commenting/forum system
- Just have links to something like forum.spiralofhope.com/article and use some other engine.
- What if an article is renamed? A spider would have to visit the forum to rename the topic, and to update the article link in the original post.
- Maybe I can even include content from the forum in some kind of magical embedding widget. That would be sweet.
- Release the code to the public
- A core component is really fugly and needs a major rewrite before the code can be released. Expect this to be done in May 2010.
- note to self: Versioning is major.minor.working. For the working number: Even numbers are beta and run fine for me so far; odd numbers are alpha and are either experimental and untested, are known to contain critical bugs or are otherwise untrusted. I don't usually put out anything experimental.
- Decide on licensing.
- Perhaps I should also have a special tag I place in pages to designate them as being held under licence 'x' or 'y' etc. This could be handled by templates, which is an existing todo item.
- creativecommons.org/
- www.opencontent.org/openpub/
- Fixme: I have no way of removing local links from within tags.
- So <nowiki>index</index> is fine
- but <nowiki>text
index text</index> will always become linked! -
text index text - Ugh, to do this I'd have to rewrite markup(), marked_yes() and marked_no()
- local linking: Allow full valid *nix filenames. But for the compiled .html filename, convert inadvisable characters to dashes or some other thing like %20.
- What are the inadvisable characters? Research.
- "Last edited" timestamp in the footer?
- With something like that, it'd be possible to generate a sitemap which shows each item and also its timestamp. That could be made sortable, or could be pre-sorted however I like. Hmm, could be useful.
- Create a for-print version that
- ... changes numbered links into anchor links to a nice list of endnotes.
- ... prepends the correct http:// etc to URLs.
- I could even tinyurl all those links automatically.
- Templating {{replacement file}} {{subst:replacement file}}
- Detect the deletion of a source file and delete the associated compiled file.
- And watch directories too.
- An XML sitemap generator (the SEO standard XML file thingy)
- I downloaded sitemap_gen.py and it works well.
- It also reveals a bunch of broken links which were relative URLs from the blog. Those need to be fixed.
- Implement a spider trap?: [2]
- Submit to more search engines, see robots.txt for some TODO items.
Syntax Highlighting §
Syntax highlighting with javascript is pretty trivially easy..
alexgorbatchev.com/wiki/SyntaxHighlighter
Use the 'pre' example: [3]
Replace my 'pre' lists with Plain
Should I consider precompiling the highlighting myself? Then I can have it done through CSS so that it can be enabled/disabled easily.
Table Markup §
A simple markup language for tables. Anything more complex should use HTML.
|cell 1|cell 2
=>
<table>
<tr><td>cell 1</td><td>cell 2</td></tr>
</table>
=>
| cell 1 | cell 2 |
To Do: Low Priority §
- A bookmark link would be cool. Unfortunately it's impossible at the moment because for a very very long time, Firefox would allow the bookmark but clicking it would load it in the sidebar and not the main browser window. Lame.
- I need to find and track the associated bug. There better be one.
- The sitemap should display sub-directories and their files.
- Is automatic index.html generation working?
- [4] Comment reply via email - I could do an interpretation of that..
- [6] Post by email - I could do an interpretation of that..
- I'd love to use Ruby/HTML Tidy
Stylesheet based on browser dimensions §
It's possible to auto-detect the browser's initial dimensions, and set the default CSS stylesheet. Something like:
<script type="text/javascript">
width = getScreenWidth();
height = getScreenHeight();
SetStyle(width, height);
</script>
I could also make a routine to re-check the browser dimensions and re-change the CSS. But that may be very annoying, or even reduce the user's browsing speed. Maybe just make a "force re-check" link which will re-run the javascript detect routine.
Something like this could even load in different sized images/thumbnails.. this might be very cool.
Link Checking/Caching §
The basic philosophy is really simple. Way too many sites go down, and this is only going to get worse over time. So to solve that, keep a local copy of any links made by any document.
archive.org may not be around forever, it may stop caching content, and it's already unreliable for quite a number of caches such as when a webmaster chooses to deny caching.
A link like example.com becomes a dual-link. One is the original, and the second is to one or more locally-cached versions.
http://example.com ([http://spiralofhope.com/c/http--example.com local cache])
All links are scanned in the document. For each link:
- Learn if the link is good or not.
- Simple 404 check? What about other codes?
- HTML redirects and permanent redirects could be quite useful to notice.
- Noticing service interruptions (e.g. a Slashdotting) is also very useful.
Link is good:
- Do not present the cached copy link prominently. Hide it completely unless a javascript unhide link is used, like I do with the table of contents.
- I don't want people needlessly checking my possibly-outdated cached version and/or wasting my bandwidth.
- Cache the first page and store it locally.
- Need to make sure the local cache has info posted prominently at the top that it's a copy, and provide a link to the original.
- Don't re-cache a page if a cache was made very recently. I need to be able to edit and re-edit a page multiple times throughout a day without hammering all the links.
- wget - but it's crap to work with, and doesn't really work.. or if it does it's not nearly robust enough for actual use.
- links
- lynx ?
- w3m
- Some sort of downloader. I've tried a bunch and they all suck. Find my various notes and include them all here.
- Snapshot a page and turn it into a PDF with midori -s
- ? Also cache any second-level links which are direct-links to media (txt, pdf, jpg, mpg, etc.)
- Need to be careful not to re-cache and overwrite a potentially valuable old copy, especially not with a 404/etc!
- Maybe keep multiple revisions of the cached document?
- Maybe do a diff to determine the level of difference. If it's really significant, then keep the previous revision.
Link is bad:
- Present the cached link more prominently, with its cache date.
- Possibly also present previous cached links.
- Display the date the link was first found to be dead.
- Maybe have some intelligence in there to determine if there is intermittent downtime. I also want to be very careful not to overwrite my cache with a spam/SEO page if a site goes down and is bought up.
Other thoughts:
- This should create a cache summary at the bottom of the page, with any notes.. like stuff which may need to be manually checked.
- If multiple pages all refer to the same document, make sure they're not all hammering the server to update that same cached file. So the cached file will have statistics/info in it to direct any cache attempts.
- Some manual markup syntax to stop a link from being cached. Maybe something simple like ]http://example.com[
Manual Lists §
I count the lines and paint the numbers myself. This will let me have broken lists:
But to do this I would have to define at least an end and probably a start. I will also need a way to communicate to the list function the number I want it to continue a list at.
#- automatically one
#- automatically two
paragraph
#- automatically three
=>
<dl>
<dd>1. automatically one</dd>
<dd>2. automatically two</dd>
<p>paragraph</p>
<dd>3. automatically three</dd>
</dl>
... or manually specifying the number:
#-3 text
#- text
#- text
#-2 text
#- text
#- text
=>
<dl>
<dd>3. text</dd>
<dd>4. text</dd>
<dd>5. text</dd>
<dd>2. text</dd>
<dd>3. text</dd>
<dd>4. text</dd>
</dl>
=>
- 3. text
- 4. text
- 5. text
- 2. text
- 3. text
- 4. text
... another problem is that it doesn't look as clean as a proper list!
A proper list would look like this:
- This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines.
However my incarnation would look like this:
- 1. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines. This is a long list which wraps around on two lines.
... to solve that, I would have to wrap the numbers in a div and shift them to the left to get the right effect.
First, a style:
div.list-number {
text-indent: -1.4em;
padding-left: 2.4em;
}
<div class="list-number">1. This is a long list which wraps around on two lines....</div>
<div class="list-number">2. This is a long list which wraps around on two lines....</div>
=>
Subdirectories §
Subdirectories are sortof supported. At this stage it's more of an afterthought from some old code. Stuff that I know won't work properly includes:
- Automatic local linking only links to its current directory.
- If I include parent and child directories, then I'd have to give link priority to the current directory.
- The sitemap doesn't include subdirectories.
