473,386 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Script to generate static site?

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
10 2309
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
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
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
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


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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gonzalo Aguirre | last post by:
hi.. as i write on the topic, i'm programing a Bash script using the standard GNU Linux text utilities (gawk, grep, sed, and so on) that get information from SQL source (table attib, type per...
7
by: Andrew Chalk | last post by:
Is this possible? In my CGI app. I display a web page with a link (anchor). When the link is clicked I want to exectute a python script rather than go to an HTML page. Many thanks.
9
by: Fred | last post by:
Hi, I'm sure there are a bunch of them, but googling just returned full-fledged CMS that require a DBMS and generate dynamic pages. I'd just like a script that would 1. look in a directory...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
5
by: vikram | last post by:
I am developing a display web site which displays several listing and details, data is picked up from database for the lists. There is no search criteria but only pagination stuff. What i am...
3
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of...
3
by: John Kotuby | last post by:
Hey guys, In IE7 where I am tesing my Web Apps written with VB in VS 2005 I have set the IE option: "Display Notification of all script errors" to be active. Now that I have changed some...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
7
by: jeddiki | last post by:
Hi, As I am in Turkey at present, I can not see vidoes on youtube. So I have tried a few proxies but keep finding them slow or not working. So I have installed myphpProxy on my server under...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.