By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,879 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,879 IT Pros & Developers. It's quick & easy.

Script to generate static site?

P: n/a
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.
Jul 20 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Fred <fr**@acme.com> wrote in message news:<i3********************************@4ax.com>. ..
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
Jul 20 '05 #2

P: n/a
Andy Dingley wrote:
XSLT

Yet another reason to do your authoring in XHTML


So XSLT cannot be used to transform XML to HTML?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #3

P: n/a
Brian wrote:
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

Jul 20 '05 #4

P: n/a
Matthias Gutfeldt wrote:
Brian wrote:
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!


Perhaps.
The point was that a transformation is easier done when the file is
clean, valid, W3C-compliant XHTML, instead of tag-soup.


But the op was asking for a cms solution. 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? I've never played with it, so I
don't know.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #5

P: n/a


Brian wrote:

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/

Jul 20 '05 #6

P: n/a
Fred <fr**@acme.com> wrote:
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, <op**********@yahoo.ca>
Q: What do you use to remove bugs on Windows? A: Windex.
Jul 20 '05 #7

P: n/a
On Fri, 25 Jun 2004 15:32:38 GMT, Brian
<us*****@julietremblay.com.invalid> wrote:
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
Jul 20 '05 #8

P: n/a
On 25 Jun 2004 22:18:34 GMT, William Park <op**********@yahoo.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.

Thx
Fred.
Jul 20 '05 #9

P: n/a
Fred the man <fr**@acme.com> wrote:
On 25 Jun 2004 22:18:34 GMT, William Park <op**********@yahoo.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, <op**********@yahoo.ca>
Q: What do you use to remove bugs on Windows? A: Windex.
Jul 20 '05 #10

P: n/a
On 27 Jun 2004 04:06:05 GMT, William Park <op**********@yahoo.ca>
wrote:
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.
Jul 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.