HighDots Forums  

Script to generate static site?

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Script to generate static site? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fred
 
Posts: n/a

Default Script to generate static site? - 06-24-2004 , 12:47 PM






Hello,

After looking at various CMS tools, either server- (Drupal,
Pivot, etc.) or desktop-based (CityDesk, Cute Site Builder), it
occured to me that I really didn't need something that sophisticated
just to add navigation bars in each article on my site, and generate
the home page with hyperlinks to each article.

I figured all it took is a script that ...
1. takes each raw HTML article that the user has generated with the
editor of his choice (I prefere Namo's WYSIWYG editor, but it doesn't
matter),
2. extract infos on this document from the HEAD section and the
content in the BODY section,
3. run this through a template where keywords will be replaced with
the content, and
4. save the result into a full HTML page.
5. Once the articles have been generated, just build the home page to
list all those articles.

So... before I write this myself, does someone know of a good solution
to run on Windows, either as a command-line script or GUI-based?

Thank you for any tip
Fred.

Reply With Quote
  #2  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Script to generate static site? - 06-25-2004 , 05:35 AM






Fred <fred (AT) acme (DOT) com> wrote


Quote:
So... before I write this myself, does someone know of a good solution
to run on Windows, either as a command-line script or GUI-based?
XSLT

Yet another reason to do your authoring in XHTML


Reply With Quote
  #3  
Old   
Matthias Gutfeldt
 
Posts: n/a

Default Re: Script to generate static site? - 06-25-2004 , 11:39 AM



Brian wrote:
Quote:
Andy Dingley wrote:

XSLT

Yet another reason to do your authoring in XHTML


So XSLT cannot be used to transform XML to HTML?
You didn't understand what he wrote! The point was that a transformation
is easier done when the file is clean, valid, W3C-compliant XHTML,
instead of tag-soup.

Why anybody would want to use XSLT for what's essentially a simple regex
is beyond me, though. I guess I just understand this complex stuff.


Matthias



Reply With Quote
  #4  
Old   
Martin Honnen
 
Posts: n/a

Default Re: Script to generate static site? - 06-25-2004 , 02:04 PM





Brian wrote:


Quote:
It appears that XSLT would be
used to process server side content into web pages viewable to the www.
If that is the case, can XSLT transform content into HTML? Or can it
only transform e.g. XML into XHTML?
XSLT has three output modes (at least in XSLT 1.0): xml, html, and text,
so XSLT can be used to transform XML to X(HT)ML, HTML, or plain text:
http://www.w3.org/TR/xslt#output
--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
  #5  
Old   
William Park
 
Posts: n/a

Default Re: Script to generate static site? - 06-25-2004 , 06:18 PM



Fred <fred (AT) acme (DOT) com> wrote:
Quote:
Hello,

After looking at various CMS tools, either server- (Drupal,
Pivot, etc.) or desktop-based (CityDesk, Cute Site Builder), it
occured to me that I really didn't need something that sophisticated
just to add navigation bars in each article on my site, and generate
the home page with hyperlinks to each article.

I figured all it took is a script that ...
1. takes each raw HTML article that the user has generated with the
editor of his choice (I prefere Namo's WYSIWYG editor, but it doesn't
matter),
2. extract infos on this document from the HEAD section and the
content in the BODY section,
3. run this through a template where keywords will be replaced with
the content, and
4. save the result into a full HTML page.
5. Once the articles have been generated, just build the home page to
list all those articles.

So... before I write this myself, does someone know of a good solution
to run on Windows, either as a command-line script or GUI-based?

Thank you for any tip
Fred.
Any example?

--
William Park, Open Geometry Consulting, <opengeometry (AT) yahoo (DOT) ca>
Q: What do you use to remove bugs on Windows? A: Windex.


Reply With Quote
  #6  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Script to generate static site? - 06-26-2004 , 08:23 AM



On Fri, 25 Jun 2004 15:32:38 GMT, Brian
<usenet3 (AT) julietremblay (DOT) com.invalid> wrote:

Quote:
Yet another reason to do your authoring in XHTML

So XSLT cannot be used to transform XML to HTML?
Of course. But it can't be used to transform HTML that's not authored
as well-formed XML into anything.

Yesterday I worked on a static site with large numbers of
hand-authored pages (a technical book). It began as unformatted
plaintext from OCR, then I went through by hand and added XHTML markup
to it.

Most of this effort went into marking up the reference citations in a
structured manner; with <cite> and then <span class="publisher" > etc.
internally. I also had to add plenty of <a name...> anchors around the
section headings, as link targets.

Then it was time for XSLT. With two pretty simple stylesheets, I'd
extracted the table of contents and reference pages, with full links
and everything. Doing that alone saved me _hours_ of work.


Even in the simplest and most static of cases, XML & XSLT techniques
have something to offer for solving CMS problems.

--
Smert' spamionam


Reply With Quote
  #7  
Old   
Fred the man
 
Posts: n/a

Default Re: Script to generate static site? - 06-26-2004 , 07:29 PM



On 25 Jun 2004 22:18:34 GMT, William Park <opengeometry (AT) yahoo (DOT) ca>
wrote:
Quote:
Any example?
Well, since I couldn't find anything, I wrote something in PowerBasic
this afternoon :-) Just some greping around, and mixing a document
with a template before rebuilding index.html.

Thx
Fred.


Reply With Quote
  #8  
Old   
William Park
 
Posts: n/a

Default Re: Script to generate static site? - 06-27-2004 , 12:06 AM



Fred the man <fred (AT) acme (DOT) com> wrote:
Quote:
On 25 Jun 2004 22:18:34 GMT, William Park <opengeometry (AT) yahoo (DOT) ca
wrote:
Any example?

Well, since I couldn't find anything, I wrote something in PowerBasic
this afternoon :-) Just some greping around, and mixing a document
with a template before rebuilding index.html.
If PowerBasic can do it, then Bash shell certainly can. :-)
http://freshmeat.net/projects/bashdiff/
http://freshmeat.net/projects/basp/

--
William Park, Open Geometry Consulting, <opengeometry (AT) yahoo (DOT) ca>
Q: What do you use to remove bugs on Windows? A: Windex.


Reply With Quote
  #9  
Old   
Fred the man
 
Posts: n/a

Default Re: Script to generate static site? - 06-27-2004 , 08:24 AM



On 27 Jun 2004 04:06:05 GMT, William Park <opengeometry (AT) yahoo (DOT) ca>
wrote:
Quote:
If PowerBasic can do it, then Bash shell certainly can. :-)
I'm sure it does, but since I'm primarily working with Windows, I'd
rather a small EXE with no dependencies :-)

Fred.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.