Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Run a script - and leave in the magic names?

I need to do this. An analogy is that I want to consolidate a month worth of daily blog articles into a single article while leaving in the magic names that are links to images in the site. Specifically I'm working with a concert calendar. I need separate articles for each day of the current and future months but not for previous months.

I imagine doing a script that combines all the daily articles into a single page and pasting that combined page into my monthly article. But I lose the images' magic names. If I never forget to leave the images where they are, I'm OK. But I'll forget.

This goes back to the "CityDesk as blog discussion" and particulary MarkTAW's comment about running boatloads of scripts each time I publish. I add a new script each month and the preview / publish cycle is getting pretty long.

(Not a life or death matter, I'll stick the magic names back in by brute force if need be.)

tk
Tuesday, June 17, 2003

Terry,

I'm having a hard time figuring out what you want to do, and why you can't do it with cityscript today.

"I need separate articles for each day of the current and future months but not for previous months."

Okay, an article per day going in to the future, you can do this manually by creating an article per day and manipulating the condition - today+1, today+2, etc.

Maybe you can send us a link so we can see for ourselves, and what does your end result look like?

www.MarkTAW.com
Tuesday, June 17, 2003

MoveableType does this out of the box.

R C
Wednesday, June 18, 2003

I've not tried it, but can you use {$include 'filename'$} statements to build the archive file?  Would the magic name be maintained that way?

Joel Goldstick
Wednesday, June 18, 2003

Mark, this page is the one I'm talking about:
http://tk-jk.net/euphonic/

The "Euphonic recommends:" is the calendar of future events. There is an article for each day containing shows. It has a script that "(today) (after publishdate)" scrolls the shows each time I publish the site.

Then, there are a bunch of archive pages:
http://tk-jk.net/euphonic/blog/general/Archive.html

Each monthly archive article has the timewasting scripts:
(and(after 2003/05/31)(before 2003/07/01) for the June, 2003 archive. These monthy archives don't really need the script anymore.

So on July 1st, I like to run the June archive script one time and copy the resultant output to the achive page and throw away the June archive script. I combine 30 daily files into one arhive file, delete the daily files, and elminate the script. That would take me about 30 seconds if I could preserve the magic names that may have been in the daily files.

tk
Wednesday, June 18, 2003

Oh, so you just want to reduce the generation time once something's entered the archive.

Yeah that's a tricky one. I wonder if Joel on Software generates all the old archive pages (he keeps an archive of each month's articles) each time.

www.MarkTAW.com
Wednesday, June 18, 2003

If you have "permalinks," you can't dump the individual files if want to avoid broken (bookmarked) links.

I have permanlinks on that site but don't really need them and wish I hadn't put them in to begin with - from Raising Arizona, "With the benefit if hindsight, maybe it wasn't such a hot idea."

tk
Wednesday, June 18, 2003

Instead of permalinks I use this:

{$foreach x in (condition) sortDescendby .fileddate$}
<p><b><a name="{$x.filename$}"></a>{$x.headline$}</b> - {$x.fileddate$}<br>
<span class="sidebar">{$x.teaser$}</span><br>
{$x.body$}</p><hr>
{$next$}

And then link to it with this:

{$ foreach 5 x in (condition) sortDescendBy .fileddate$}
<p>$x.headline$}<BR>
<span$x.teaser$}<br>

<a href="PTMFOG0000000219#{$x.filename$}">Read More...</a>

</p>{$next$}

So the anchor ( <a href="PTMFOG0000000219#{$x.filename$}"> ) brings it to the right article, but if I got rid of the individual files, it's no big deal because nobody knows they exist anyway.

www.MarkTAW.com
Wednesday, June 18, 2003

*  Recent Topics

*  Fog Creek Home