From dkuhlman at cutter.rexx.com Tue Jul 2 10:31:56 2002 From: dkuhlman at cutter.rexx.com (Dave Kuhlman) Date: Mon, 1 Jul 2002 17:31:56 -0700 Subject: [albatross-users] How-to doc for Albatross In-Reply-To: ; from djc@object-craft.com.au on Fri, Jun 28, 2002 at 11:22:17AM +1000 References: <20020618173140.A84176@cutter.rexx.com> <20020619011148.3B6FF38F5A@coffee.object-craft.com.au> <20020619200234.A46789@cutter.rexx.com> <20020627133647.A60095@cutter.rexx.com> Message-ID: <20020701173156.A82508@cutter.rexx.com> Attached is my How-to document on Albatross. I've converted it to the Python LaTeX2HTML format. (Whew. That was more fun than I expected.) I've run it through LaTeX2HTML, so it should be pretty clean. But, I suspect that you will still want to hack on it a bit so that it fits in with your document style. Also, If you want to pitch it back toward me with comments for some additional work, please do so. And, once again, you are welcome to use it as you see fit. - Dave K -- Dave Kuhlman dkuhlman at rexx.com http://www.rexx.com/~dkuhlman -------------- next part -------------- A non-text attachment was scrubbed... Name: alhowto.zip Type: application/x-zip-compressed Size: 6011 bytes Desc: not available URL: From gimbo at ftech.net Wed Jul 3 02:57:49 2002 From: gimbo at ftech.net (Andy Gimblett) Date: Tue, 2 Jul 2002 17:57:49 +0100 Subject: [albatross-users] Two questions (client-side production of static pages) In-Reply-To: References: <20020627152510.GA3979@andy.tynant.ftech.net> Message-ID: <20020702165749.GD13335@andy.tynant.ftech.net> Howdy, I just wanted to say thanks for the feedback on my two questions. Both of these issues are now resolved for me - nice. Regarding the first point, (output to a file) yes, the push/pop mechanism did the job perfectly. Obscure but powerful! Regarding the second point, (nested macros), this scheme suggested by Dave Cole works great for me: > master.html: > > > > Stuff stuff stuff > > Blah blah blah > > > somepage.html: > > > > > > > Foo bar, foo bar, foo bar... > > I just had to modify my "site builder" scripts to read in all the templates from a certain directory, rather than just master.html (so it picks up sidebar-with-bells-on.html, etc.) - so now I have one directory of "utility" templates, seperate from the rest of my templates. Many thanks, Andy -- Andy Gimblett - Programmer - Frontier Internet Services Limited Tel: 029 20 820 044 Fax: 029 20 820 035 http://www.frontier.net.uk/ Statements made are at all times subject to Frontier's Terms and Conditions of Business, which are available upon request. From andrewm at object-craft.com.au Wed Jul 3 10:10:30 2002 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Wed, 03 Jul 2002 10:10:30 +1000 Subject: [albatross-users] Two questions (client-side production of static pages) In-Reply-To: Your message of "Tue, 02 Jul 2002 17:57:49 +0100." <20020702165749.GD13335@andy.tynant.ftech.net> Message-ID: <20020703001030.F0FCD38F5A@coffee.object-craft.com.au> >Regarding the second point, (nested macros), this scheme suggested by >Dave Cole works great for me: > >> master.html: >> >> >> >> Stuff stuff stuff >> >> Blah blah blah >> >> >> somepage.html: >> >> >> >> >> >> >> Foo bar, foo bar, foo bar... >> >> > >I just had to modify my "site builder" scripts to read in all the >templates from a certain directory, rather than just master.html (so >it picks up sidebar-with-bells-on.html, etc.) - so now I have one >directory of "utility" templates, seperate from the rest of my >templates. Yes, currently my script does a load_templates() and to_html() on all the files in a "templates" sub-directory, before processing the directory itself. Looking at the internals of Albatross, however, I realised that it would be possible, with a small change, to register the macros at load time; this allows you to first load_template() all the files in a directory, without caring if they contain macros or not, then do the to_html() on each. It also means, within a given file, that you can use a template before it is defined. The downside is that you have a whole directory worth of template objects in memory at a time, rather than just one file and associated macros. Dave also thinks this is reasonable, so it should appear in the next Albatross release. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From andrewm at object-craft.com.au Wed Jul 3 16:41:20 2002 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Wed, 03 Jul 2002 16:41:20 +1000 Subject: [albatross-users] How-to doc for Albatross In-Reply-To: Your message of "Mon, 01 Jul 2002 17:31:56 MST." <20020701173156.A82508@cutter.rexx.com> Message-ID: <20020703064120.6057838F5A@coffee.object-craft.com.au> >Attached is my How-to document on Albatross. I've finally had a look - very nice! >I've converted it to the Python LaTeX2HTML format. (Whew. That >was more fun than I expected.) I've run it through LaTeX2HTML, so >it should be pretty clean. But, I suspect that you will still want >to hack on it a bit so that it fits in with your document style. >Also, If you want to pitch it back toward me with comments for some >additional work, please do so. The style would be the standard python style, which we use for the Albatross doco. I suspect this is derived from files in the Python source distribution - Dave will know. >And, once again, you are welcome to use it as you see fit. I imagine we'll put a link to it off the Albatross page with an approriate credit. Thanks again. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From djc at object-craft.com.au Wed Jul 3 21:40:18 2002 From: djc at object-craft.com.au (Dave Cole) Date: 03 Jul 2002 21:40:18 +1000 Subject: [albatross-users] How-to doc for Albatross In-Reply-To: <20020703064120.6057838F5A@coffee.object-craft.com.au> References: <20020703064120.6057838F5A@coffee.object-craft.com.au> Message-ID: >>>>> "Andrew" == Andrew McNamara writes: >> Attached is my How-to document on Albatross. Andrew> I've finally had a look - very nice! >> I've converted it to the Python LaTeX2HTML format. (Whew. That >> was more fun than I expected.) I've run it through LaTeX2HTML, so >> it should be pretty clean. But, I suspect that you will still want >> to hack on it a bit so that it fits in with your document style. >> Also, If you want to pitch it back toward me with comments for some >> additional work, please do so. Andrew> The style would be the standard python style, which we use for Andrew> the Albatross doco. I suspect this is derived from files in Andrew> the Python source distribution - Dave will know. The most excellent work done by the heroes who made Python documentation look so good should not be wasted :-) Download the Python source distribution and unpack it somewhere. By doing something like the following in a Makefile you too can have cool Python documentation: Make sure that you alter PYTHON_SRC to point at the top level directory where you unpacked the Python source. - Makefile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PYTHON_SRC = ${HOME}/download/Python-2.2 MKHOWTO = $(PYTHON_SRC)/Doc/tools/mkhowto PAPER = a4 DOCFILES = mydoc.tex a-file.tex b-file.tex c-file.tex all: pdf pdf: $(DOCFILES) $(MKHOWTO) --pdf --$(PAPER) mydoc.tex html: $(DOCFILES) $(MKHOWTO) --image-type png --html mydoc.tex mkdir -p mydoc/icons cp $(PYTHON_SRC)/Doc/html/icons/* mydoc/icons/ # the iconserver option of mkhowto is broken since it writes # it to the end if the init_file where they aren't useful anymore, # so we work around it: for f in `find mydoc -type f`; do \ cat $$f | sed s/\.\.\\/icons/icons/g > $${f}2; \ mv $${f}2 $$f; \ done -rm mydoc/mydoc2 -rm mydoc/icons/icons2 -rm -f mydoc/images.* -rm -f mydoc/*.old - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> And, once again, you are welcome to use it as you see fit. Andrew> I imagine we'll put a link to it off the Albatross page with Andrew> an approriate credit. Andrew> Thanks again. Seconded. - Dave -- http://www.object-craft.com.au From dkuhlman at cutter.rexx.com Fri Jul 5 10:05:20 2002 From: dkuhlman at cutter.rexx.com (Dave Kuhlman) Date: Thu, 4 Jul 2002 17:05:20 -0700 Subject: [albatross-users] An application generator for Albatross - preliminary work In-Reply-To: ; from djc@object-craft.com.au on Wed, Jul 03, 2002 at 09:40:18PM +1000 References: <20020703064120.6057838F5A@coffee.object-craft.com.au> Message-ID: <20020704170519.A91043@cutter.rexx.com> Attached is support I've been working on to enable developers to generate Albatross applications from an application description. Actually, the application description is an XML document that contains a specification of an FSM (finite state machine). Here is a bit of rational, or, Why I'm doing this -- I believe that business analysts (those who design and manage applications, but who are not programmers) want to produce Web applications or Web services from an application specification. In the Web services world, they are busily at work defining a variety of PMLs (process markup languages), for example WSFL, WSCI, XLANG, UML, etc. I believe that some of the content of a PML can be mapped onto or translated into an FSM and then into an Albatross application in two stages: PML --> FSM --> Albatross application What is attached is an attempt at the 2nd stage of this translation. You will need to install PyXML in order generate an application. However, if you only want to look at samples of the files generated, I've generated a few. Look in the sub-directories appgen/TestObject and appgen/TestModular. The attachment contains documentation generated with the Python LaTex2HTML tool-set. (Give someone a powerful tool and they become dangerous. Heh, heh. Heh, heh.) I've included a text version below. I'm very interested in any ideas, comments, and suggestions. - Dave K An Application Generator for Albatross ---------------------------------------------------------------------- An Application Generator for Albatross Dave Kuhlman E-mail: dkuhlman at rexx.com Release 1.0 July 2, 2002 Front Matter Abstract: This document describes the use of fsmlib to generate skeleton Albatross applications. fsmlib can take an XML representation of an FSM (finite state machine) and generate an Albatross application containing a page for each state in the FSM. Both Python code and HTML Albatross template files are generated. Contents * Front Matter * 1 Introduction - What It Does * 2 How-to Use it * 2.1 Commands * 2.2 Options * 3 Input - Defining the FSM XML Document * 3.1 Element fsm * 3.2 Element endstatenames * 3.3 Element state * 3.4 Element transition * 3.5 Element inputs * License, See also, Etc. * About this document ... 1 Introduction - What It Does fsmlib generates the skeleton of an Albatross application. It takes an XML document that describes the pages in the application. The XML input document describes an FSM (finite state machine). The XML FSM document a list of states. Each state in the FSM describes a page in the application. Each state in the FSM (or page in the application) contains a list of transitions. Each transition specifies (1) a target state (page) and (2) the conditions (a button to be pressed and input items to be entered) that must occur in order to go-to that target state (page). For each state in the FSM fsmlib generates Python code and (optionally) an HTML template file for one page in the application. For each transition, fsmlib generates Python code to activate that transition. In particular, for each transition, Python code is generated to test for the button and to test the values of the specified input items. The XML input document is described in detail in the section ``Defining the FSM XML Document''3. 2 How-to Use it The ability to load an FSM document and generate an Albatross application from it are in module fsmlib. A Python script (runAppGen.py) is provided as a harness to call the application generation functionality in fsmlib. Here is the help message for runAppGen.py: Usage: python testGen.py [