Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Keep Track of your Keywords

I thought this cityscript might help people keep track of their articles. It lists various fields (you can add your own) and sorts by folder.

Create an HTML file called "keywords.html" with the following code:


<table border=1>
<tr>
<td><STRONG>Headline</STRONG></td>
<td><STRONG>File Name</STRONG> </td>
<td><STRONG>Date Filed</STRONG> </td>
<td><STRONG>Keywords</STRONG></td>
<td><STRONG>Link</STRONG></td>
</tr>

{$ foreach x in (all) SortAscendBy .link$}
<tr>
<td><B>{$x.headline$}</B></td>
<td>{$x.filename$}</td>
<td>{$x.fileddate$}</td>
<td>{$x.keywords$}</td>
<td><A href="{$x.link$}">{$x.link$}</A></td>
</tr>
{$next$}

</table>

Mark W
Saturday, February 02, 2002

Nice, I needed that I added the author too (see default authore issue from a previous topic)

<table border=1>
<tr>
<td><STRONG>Headline</STRONG></td>
<td><STRONG>File Name</STRONG> </td>
<td><STRONG>Author</STRONG> </td>
<td><STRONG>Date Filed</STRONG> </td>
<td><STRONG>Keywords</STRONG></td>
<td><STRONG>Link</STRONG></td>
</tr>

{$ foreach x in (all) SortAscendBy .link$}
<tr>
<td><B>{$x.headline$}</B></td>
<td>{$x.filename$}</td>
<td>{$x.author$}</td>
<td>{$x.fileddate$}</td>
<td>{$x.keywords$}</td>
<td><A href="{$x.link$}">{$x.link$}</A></td>
</tr>
{$next$}

</table><table border=1>
<tr>
<td><STRONG>Headline</STRONG></td>
<td><STRONG>File Name</STRONG> </td>
<td><STRONG>Author</STRONG> </td>
<td><STRONG>Date Filed</STRONG> </td>
<td><STRONG>Keywords</STRONG></td>
<td><STRONG>Link</STRONG></td>
</tr>

{$ foreach x in (all) SortAscendBy .link$}
<tr>
<td><B>{$x.headline$}</B></td>
<td>{$x.filename$}</td>
<td>{$x.author$}</td>
<td>{$x.fileddate$}</td>
<td>{$x.keywords$}</td>
<td><A href="{$x.link$}">{$x.link$}</A></td>
</tr>
{$next$}

</table>

tk
Saturday, February 02, 2002

Pardon the double copy, one is enough.

tk
Saturday, February 02, 2002

Sure, you could also change the sort to "sort by author" if you needed to.

{$ foreach x in (all) SortAscendBy .author $}

One good thing about this is you can quickly spot any discrepancies and type o's that may break your script. the difference between, say "John Doe" and "John J. Doe." Whoops, there goes your (author "John Doe") condition.

tk - you're keeping track of all these tidbits on you site right? Heh. I bet (hope) Joel is compiling them for the next release documentation.

Mark W
Saturday, February 02, 2002

I've certainly added a link to this one.

I put this script into an article so I could preview it quickly.  It helped me find a bunch of the wrong default authors.

tk
Saturday, February 02, 2002

*  Recent Topics

*  Fog Creek Home