treecutter.git
9 years agoxinclude: photoalbum caption and gallery
Fredrik Unger [Fri, 27 Feb 2015 09:20:19 +0000 (10:20 +0100)]
xinclude: photoalbum caption and gallery

Adding the caption listed in description. Generating
a gallery that then also can be used by the stylesheets.

9 years agositemap: adding sizecalculation
Fredrik Unger [Fri, 27 Feb 2015 09:19:23 +0000 (10:19 +0100)]
sitemap: adding sizecalculation

With large projects it is good to know the size to be uploaded.
This does not yet take into accoun the style files resources.

9 years agopage: template added instead of style
Fredrik Unger [Fri, 27 Feb 2015 09:18:27 +0000 (10:18 +0100)]
page: template added instead of style

Adding the parsed template into page instead of just the pointer to style.

9 years agopage: using lxml transform, simple docbook & image
Fredrik Unger [Fri, 27 Feb 2015 09:16:29 +0000 (10:16 +0100)]
page: using lxml transform, simple docbook & image

Switching from external call to use the internal lxml xslt transform.
Creating a class for docbook and image to separate out
docbook specific code and image specific code.

9 years agopath: adding suport for a site in a subdir
Fredrik Unger [Fri, 20 Feb 2015 14:53:39 +0000 (15:53 +0100)]
path: adding suport for a site in a subdir

This was added to support referencing css etc in a example.com/subdir
setting. Creating different sites within a site.

9 years agopath: adding support for . in directoies
Fredrik Unger [Fri, 20 Feb 2015 14:51:58 +0000 (15:51 +0100)]
path: adding support for . in directoies

This was done as directories with : were not allowed
in Windows, and switching to . caused problems with the links relying
on the index.langcode.xml format.

9 years agoconst: adding xml namespace
Fredrik Unger [Fri, 20 Feb 2015 14:47:15 +0000 (15:47 +0100)]
const: adding xml namespace

Adding the XML namespace http://www.w3.org/XML/1998/namespace

10 years agostyle: switching to xhtml5 and sass
Fredrik Unger [Fri, 7 Mar 2014 11:36:18 +0000 (12:36 +0100)]
style: switching to xhtml5 and sass

Switching the template to be a xhtml5 template and start using
sass in the css composition.
With separate template it will also be possible to do pdf print pages.

10 years agofilesystem: fixing utf-8 issues switching to jinja
Fredrik Unger [Fri, 7 Mar 2014 11:34:04 +0000 (12:34 +0100)]
filesystem: fixing utf-8 issues switching to jinja

Switching to work fully with utf-8 files also for the sitemap.txt
Switching to template engine jinja2 for better unicode support.
Templates has to be refreshed.

10 years agotrie: fixed xhtml generation
Fredrik Unger [Wed, 5 Mar 2014 18:07:19 +0000 (19:07 +0100)]
trie: fixed xhtml generation

Added missing closure of </li>.

10 years agostyle: improve the simple template address style
Fredrik Unger [Tue, 17 Dec 2013 14:32:17 +0000 (15:32 +0100)]
style: improve the simple template address style

Simple adjustments to block and whitespace to improve
address presentation.

10 years agoxinclude: added pic and latests plugins
Fredrik Unger [Tue, 17 Dec 2013 14:30:56 +0000 (15:30 +0100)]
xinclude: added pic and latests plugins

pic includes several versions of the image and scales it accordingly
latests creates a list of the latest X articles with images if availible

10 years agopage: added a warning for missing resources
Fredrik Unger [Tue, 17 Dec 2013 14:29:32 +0000 (15:29 +0100)]
page: added a warning for missing resources

When a picture or resource is missing treecutter issues a simple
warning.

10 years agoAdded subdir argument, cleaned up arg handling
Fredrik Unger [Fri, 6 Dec 2013 21:18:48 +0000 (22:18 +0100)]
Added subdir argument, cleaned up arg handling

Added the subdir argument to allow to put a treecutter site on
a deeper level than just www.example.org/ now also
www.example.org/subdir can be used.

Argument handling was changed so that sitemap gets all arguments in
its constructor as it deals the arguments at different stages.
All arguments are handed to sitemap that then distribute the needed
arguments.

11 years agopage: added ability to encrypt linktargets
Fredrik Unger [Fri, 30 Aug 2013 12:12:00 +0000 (14:12 +0200)]
page: added ability to encrypt linktargets

Links with attribute 'security'=='encrypt' will be encrypted
with gpg using symetric key. This to ease sharing of sensitive
documents.

11 years agostyle: adding a very simple style
Fredrik Unger [Thu, 29 Aug 2013 12:58:30 +0000 (14:58 +0200)]
style: adding a very simple style

Adding a simple but elegant style for websites with only articles
and no need for flashy menues or language menues

11 years agoxinclude: First attempt at a photoalbum
Fredrik Unger [Tue, 30 Jul 2013 08:27:59 +0000 (10:27 +0200)]
xinclude: First attempt at a photoalbum

11 years agomenues: Fixed non-ascii char in locale strings
Fredrik Unger [Tue, 30 Jul 2013 08:26:23 +0000 (10:26 +0200)]
menues: Fixed non-ascii char in locale strings

11 years agoREADME: added a simple readme with disclaimer
Fredrik Unger [Wed, 6 Feb 2013 12:16:20 +0000 (13:16 +0100)]
README: added a simple readme with disclaimer

License has not yet been picked. If there is any interest in the project
feedback would be interesting.

11 years agotools: fixed problem with local test
Fredrik Unger [Wed, 6 Feb 2013 10:55:46 +0000 (11:55 +0100)]
tools: fixed problem with local test

The ssh_cmd needed a host to do the command, but for local tests
a host is not availible. Test for host and if not availible run locally.
rsync does not need that check.

11 years agositemap: removing language menu namespace
Fredrik Unger [Fri, 25 Jan 2013 11:06:58 +0000 (12:06 +0100)]
sitemap: removing language menu namespace

Removing language menu generation namespace.
It is not needed as it is in html, and namespace confuses and invalidates
the html in the browser, maybe since the attributes were not namespaced.

11 years agoxml: change from amara to lxml
Fredrik Unger [Fri, 25 Jan 2013 10:32:59 +0000 (11:32 +0100)]
xml: change from amara to lxml

changed xml processing from amara to lxml, mainly due to that lxml is
more actively maintained and availible in distributions.
Some html generation was also changed to lxml, there the namespace could
cause some problems (language menu).

11 years agopage.py: added import re
Fredrik Unger [Fri, 18 Jan 2013 10:51:10 +0000 (11:51 +0100)]
page.py: added import re

import re was missing and re was used for a regular expression.

11 years agoaddress.py: changed update check of address string
Fredrik Unger [Fri, 18 Jan 2013 10:49:13 +0000 (11:49 +0100)]
address.py: changed update check of address string

If nominatim data does not exists (eg postcode is not there, but boundary or vice
versa) then the old code failed with NoneType object.
This addresses this but is not optimal.
Current tests works with the sites, so using this solution for now.

11 years agoreprepro: presents & generates a Debian repository
Fredrik Unger [Wed, 19 Dec 2012 09:46:53 +0000 (10:46 +0100)]
reprepro: presents & generates a Debian repository

Added a new script that presents and generates a Debian repository
for the selected reprepro. It generates links that then assures that
the files also gets moved to the correct location.

11 years agoaddress: geocode language, objects for mapimages
Fredrik Unger [Wed, 19 Dec 2012 09:45:28 +0000 (10:45 +0100)]
address: geocode language, objects for mapimages

Added a accept-language header to the nominatim requests.
Started to use Coord objects in mapimages, but still need more work.

11 years agositemap: comments, getcwd removed
Fredrik Unger [Wed, 19 Dec 2012 09:19:37 +0000 (10:19 +0100)]
sitemap: comments, getcwd removed

Aded more comments to the code, and removed a cwd readout.

11 years agomain: changes to time, commments
Fredrik Unger [Wed, 19 Dec 2012 09:17:28 +0000 (10:17 +0100)]
main: changes to time, commments

Changed time.time() to time() by importing from time import time
instead. Added some comments, can be improved.

11 years agoAdding table generation from simple textfile
Fredrik Unger [Thu, 22 Nov 2012 11:38:06 +0000 (12:38 +0100)]
Adding table generation from simple textfile

Original idea stems from dependencies.py in a site which organized a table
from a formated textfile. At the time just from the body of the table.
This version can have a labeled header row in the begining and entries
that are links, with or without title. Title is denoted httplink|title.
For extra text more work is needed. Can only do one word titles for now.

11 years agoFailed lookup does not fail, just do not generate Coords.
Fredrik Unger [Sun, 11 Nov 2012 19:35:07 +0000 (20:35 +0100)]
Failed lookup does not fail, just do not generate Coords.

A failed lookup used to fail with an error message. That in turn,
disturbs treecutter. Now if Coordinates are not found a Coord element
is not generated. The None values in the Address are converted to ''
or filled by a successful geocode.
Functions c and s needs refining. Empty elements are kept or
destroyed with the clean_db function.

clean_db function can clean code to become invalid xml so
use carefully. clean_db and the s/c functions will have
to be put in a docbook/lxml module at some point.

11 years agoEnable geolocation of address, adding sorting.
Fredrik Unger [Sun, 11 Nov 2012 16:11:25 +0000 (17:11 +0100)]
Enable geolocation of address, adding sorting.

Enabled addition of Organization with Address from the Location field.
This information is geocoded and if found displayed.

Sorting was added to sort event objects, change from the earlier
list of event dictionaries.
Pretty printing turne off not to preformat docbook addresses.

11 years agoCreating objects, switching to lxml, made main callable
Fredrik Unger [Fri, 9 Nov 2012 11:59:58 +0000 (12:59 +0100)]
Creating objects, switching to lxml, made main callable

Rewrote to use objects for Events and Event.
db_xml generation with lxml.
commandline callable using the __main__ setup

11 years agoContact as Person and Organization object, callable using lxml
Fredrik Unger [Fri, 9 Nov 2012 10:50:33 +0000 (11:50 +0100)]
Contact as Person and Organization object, callable using lxml

The contact processing was rewrited to objects, using lxml for
xml generation. It is also callable from the commandline.
One difficulty is with assigning vCard data to the correct object.
Ex, a telephone number to an address or person.
Currently works well enough to be used in non trivial sites.

11 years agoObjectified Coord and Address methods, made it main callable
Fredrik Unger [Fri, 9 Nov 2012 10:39:55 +0000 (11:39 +0100)]
Objectified Coord and Address methods, made it main callable

Rewrote the classes to use internal data for their methods, fixed sizing
of the png images (made the size really settable).
Geocoding does try several times with different strings before failing.
Address is also now directly callable for simple addresses, without
contact.

11 years agoRenaming calendar to events due to naming collision in vobject.
Fredrik Unger [Tue, 6 Nov 2012 14:46:36 +0000 (15:46 +0100)]
Renaming calendar to events due to naming collision in vobject.

12 years agoSwitching to ElementMaker from Element/SubElement
Fredrik Unger [Sun, 28 Oct 2012 07:22:04 +0000 (08:22 +0100)]
Switching to ElementMaker from Element/SubElement

12 years agoAdding the lxml docbook namespaces.
Fredrik Unger [Sun, 28 Oct 2012 07:13:42 +0000 (08:13 +0100)]
Adding the lxml docbook namespaces.

12 years agoRefactoring const to constants, to provide for lxml docbook namespaces.
Fredrik Unger [Sun, 28 Oct 2012 07:12:41 +0000 (08:12 +0100)]
Refactoring const to constants, to provide for lxml docbook namespaces.

12 years agoAdding an initial calendar implementation.
Fredrik Unger [Fri, 26 Oct 2012 07:05:13 +0000 (09:05 +0200)]
Adding an initial calendar implementation.

This calendar was developed in another git to begin with.
It worked for displaying a calendar from apple calendar server.
This will be a base for a rewrite.

12 years agoAdding distance calculation to the Coord class
Fredrik Unger [Fri, 26 Oct 2012 07:01:48 +0000 (09:01 +0200)]
Adding distance calculation to the Coord class

Starting to refactoring the part for plotting muliple coords.

12 years agoAdding docbook namespaces again
Fredrik Unger [Fri, 26 Oct 2012 07:00:12 +0000 (09:00 +0200)]
Adding docbook namespaces again

Refactoring later to move docbook xml generation to a helper class.

12 years agoAdding classes Address and Coord, moving functions into the classes.
Fredrik Unger [Wed, 17 Oct 2012 13:31:08 +0000 (15:31 +0200)]
Adding classes Address and Coord, moving functions into the classes.

Creating two classes to deal with Coorinates and Addresses.
An address has a coordinate but a coordinate can also be used
by it self. Some helper functions were also moved from contact
as a contact also has addresses and coordinates.

12 years agoRemoving StaticOpenStreetMap building real addresses
Fredrik Unger [Wed, 17 Oct 2012 13:28:39 +0000 (15:28 +0200)]
Removing StaticOpenStreetMap building real addresses

Instead of concentrating on OpenStreetMap we rebuild the class
to do addresses with coordinates and the occational picture if needed.

12 years agoRenaming addr to a more proper name, will be used to do all address tasks.
Fredrik Unger [Mon, 24 Sep 2012 18:17:41 +0000 (20:17 +0200)]
Renaming addr to a more proper name, will be used to do all address tasks.

12 years agoAdding fonts directory to resources.
Fredrik Unger [Mon, 4 Jun 2012 10:47:31 +0000 (12:47 +0200)]
Adding fonts directory to resources.

This is to include fonts to a site, puting the fonts in a separate
directory than the css.

12 years agoDisplay xpointer details to simplify debugging.
Fredrik Unger [Mon, 4 Jun 2012 10:45:48 +0000 (12:45 +0200)]
Display xpointer details to simplify debugging.

If there are several xincludes in a document and several
translations it is hard to find the xinclude call that failed.
Priting the xpointer helps localize the problem.

12 years agoInitial code to build static images from addresses.
Fredrik Unger [Wed, 16 May 2012 10:44:12 +0000 (12:44 +0200)]
Initial code to build static images from addresses.

This code was developed over time, for the contact.py images.
Parts of it might be replaced by pythonstructures and it migth move
to a separate package if useful.

12 years agoFixing UTF-8 encoding for the foreign texts and characters.
Fredrik Unger [Wed, 16 May 2012 10:08:02 +0000 (12:08 +0200)]
Fixing UTF-8 encoding for the foreign texts and characters.

12 years agoFixing whitespaces for the docbook address.
Fredrik Unger [Wed, 16 May 2012 10:06:53 +0000 (12:06 +0200)]
Fixing whitespaces for the docbook address.

This is just to properly format the information in the html display.
Could probably be solved elsewhere.

12 years agoSwitching to address based map generation. Divided to subroutines.
Fredrik Unger [Wed, 16 May 2012 09:44:41 +0000 (11:44 +0200)]
Switching to address based map generation. Divided to subroutines.

The generation was geo: tag based but as there is only one tag per
vcard I switched to address lookup instead.
There are problems with CZ village addresses, and some missing
address tags that has to be added to openstreetmap, but it is a
better longterm solution.

12 years agoChanged time to be imported and made xinclude execute in the correct directory.
Fredrik Unger [Wed, 16 May 2012 09:41:58 +0000 (11:41 +0200)]
Changed time to be imported and made xinclude execute in the correct directory.

12 years agoAdding a opening hours parser, creates a table from a simple string, with translations
Fredrik Unger [Fri, 6 Apr 2012 11:47:45 +0000 (13:47 +0200)]
Adding a opening hours parser, creates a table from a simple string, with translations

12 years agoAdding initial xinclude for converting selected VCARD to docbook.
Fredrik Unger [Fri, 6 Apr 2012 05:24:01 +0000 (07:24 +0200)]
Adding initial xinclude for converting selected VCARD to docbook.

Currently reading a VCARDs file, selecting a VCARD based on the
commandline query, and converts it to docbook.
Initial tests with a few VCARDs work. If an address has 2 telephone
numbers, currently only the first is displayed.
If there is only a telephone number and no address, it will not
be displayed in this version.

12 years agoRemoving debug printout.
Fredrik Unger [Fri, 6 Apr 2012 05:22:55 +0000 (07:22 +0200)]
Removing debug printout.

12 years agoAdding initial plugin support for xincludes in documents
Fredrik Unger [Wed, 4 Apr 2012 12:10:09 +0000 (14:10 +0200)]
Adding initial plugin support for xincludes in documents

Using the pkg_resources to package xinclude scripts that can be
generaly usable. Initial tests works and once more scripts are
adapted they will be added.

12 years agoFixing the def main function, properly calling it from treecutter.
Fredrik Unger [Mon, 2 Apr 2012 19:41:54 +0000 (21:41 +0200)]
Fixing the def main function, properly calling it from treecutter.

There are several ways to do this in python and it can be that
it has to be redone. seems to work for now.

12 years agoAdding initial bin/treecutter, and setup.py and package files.
Fredrik Unger [Mon, 2 Apr 2012 18:34:17 +0000 (20:34 +0200)]
Adding initial bin/treecutter, and setup.py and package files.

12 years agoRefactoring, using const, removing global variables, passing some new arguments.
Fredrik Unger [Mon, 2 Apr 2012 14:48:17 +0000 (16:48 +0200)]
Refactoring, using const, removing global variables, passing some new arguments.

This phase was to clean up the use of output and style in several places.
Now passed as arguments to the sections where it is needed.
Tempfile creation also localized.

12 years agoRefactoring, cleaining up imports, setting filemode
Fredrik Unger [Mon, 2 Apr 2012 14:44:34 +0000 (16:44 +0200)]
Refactoring, cleaining up imports, setting filemode

12 years agoRefactoring out every class into separate files. main,tools and const are not classes.
Fredrik Unger [Mon, 2 Apr 2012 14:32:55 +0000 (16:32 +0200)]
Refactoring out every class into separate files. main,tools and const are not classes.

12 years agoPreparing refactoring the single source into a python structure
Fredrik Unger [Mon, 2 Apr 2012 14:01:30 +0000 (16:01 +0200)]
Preparing refactoring the single source into a python structure

12 years agoInitial support for providing command line arguments to scripts via xpointer.
Fredrik Unger [Thu, 8 Mar 2012 16:02:51 +0000 (17:02 +0100)]
Initial support for providing command line arguments to scripts via xpointer.

Accept-Language is also used to provide the script with the wanted language.
For calendar server in first line. For example the language of the country tag.
Roads and telephone numbers are pretty language independant, but country names not.
There might be other tags as well that has different value per language.
The xpointer is "abused" to provide a pointer into the run script.

12 years agoAdding omit_xml_declaration=True to amara call, but does not yet work, considering...
Fredrik Unger [Thu, 8 Mar 2012 16:02:11 +0000 (17:02 +0100)]
Adding omit_xml_declaration=True to amara call, but does not yet work, considering to move to lxml or similar.

12 years agoAdded missing ) to ssh_cmd call
Fredrik Unger [Mon, 6 Feb 2012 21:22:16 +0000 (22:22 +0100)]
Added missing ) to ssh_cmd call

12 years agoAdding target directory and readability with ssh_cmd
Fredrik Unger [Mon, 6 Feb 2012 21:17:29 +0000 (22:17 +0100)]
Adding target directory and readability with ssh_cmd

Making sure that the target directory exists and that it is
readable after rsync. ssh_cmd added to simplify the call, but is
currently limited to commands with two arguments plus directory.
Can be generalized. subroutine call used to not need to add extra
dependencies at this point.

12 years agoAdding initial support for html forms.
Fredrik Unger [Mon, 6 Feb 2012 21:17:06 +0000 (22:17 +0100)]
Adding initial support for html forms.

12 years agoChaning & to xml representation.
Fredrik Unger [Mon, 6 Feb 2012 14:35:19 +0000 (15:35 +0100)]
Chaning & to xml representation.

12 years agoAdding docbook.xsl for tree-cutter processing
Fredrik Unger [Mon, 6 Feb 2012 14:04:19 +0000 (15:04 +0100)]
Adding docbook.xsl for tree-cutter processing

12 years agoConverting the template to work with tree-cutter, adjusting paths, adding template...
Fredrik Unger [Mon, 6 Feb 2012 12:15:07 +0000 (13:15 +0100)]
Converting the template to work with tree-cutter, adjusting paths, adding template variables.

12 years agoMoving css files to a subdirectory, renaming index.html to template file.
Fredrik Unger [Mon, 6 Feb 2012 11:12:40 +0000 (12:12 +0100)]
Moving css files to a subdirectory, renaming index.html to template file.

12 years agoChange execute permission on index.html and style.html
Fredrik Unger [Mon, 6 Feb 2012 11:09:35 +0000 (12:09 +0100)]
Change execute permission on index.html and style.html

12 years agoReindent css and convert from DOS format to unix format.
Fredrik Unger [Mon, 6 Feb 2012 11:00:47 +0000 (12:00 +0100)]
Reindent css and convert from DOS format to unix format.

12 years agoReindent html and convert from DOS format to unix format.
Fredrik Unger [Mon, 6 Feb 2012 10:56:57 +0000 (11:56 +0100)]
Reindent html and convert from DOS format to unix format.

12 years agoAdded template from http://freehtml5templates.com/awesomesauce-html5-and-css3-template/
Fredrik Unger [Mon, 6 Feb 2012 08:25:06 +0000 (09:25 +0100)]
Added template from freehtml5templates.com/awesomesauce-html5-and-css3-template/

13 years agoRemoved the initial version of tree-cutter.py after refactoring to use objects. v1.0
Fredrik Unger [Tue, 3 May 2011 20:39:38 +0000 (22:39 +0200)]
Removed the initial version of tree-cutter.py after refactoring to use objects.

Added total timings.
The removed part has not been in use for quite some time and this was the final cleanup.

13 years agoUsing translated cheetah templates, allowing - in filenames.
Fredrik Unger [Tue, 3 May 2011 20:22:11 +0000 (22:22 +0200)]
Using translated cheetah templates, allowing - in filenames.

13 years agoAdding shutil for the copying.
Fredrik Unger [Tue, 3 May 2011 20:21:20 +0000 (22:21 +0200)]
Adding shutil for the copying.

13 years agoFixing sitemap generation, language menus and resource copying.
Fredrik Unger [Tue, 3 May 2011 20:20:33 +0000 (22:20 +0200)]
Fixing sitemap generation, language menus and resource copying.

13 years agoAdding a css mark for the top menu.
Fredrik Unger [Thu, 14 Apr 2011 08:04:08 +0000 (10:04 +0200)]
Adding a css mark for the top menu.

13 years agoFixing script execution path for current directory, fixing missing page printout.
Fredrik Unger [Sun, 10 Apr 2011 19:55:25 +0000 (21:55 +0200)]
Fixing script execution path for current directory, fixing missing page printout.

13 years agoAdding initial language menu support. Adding method lang_menu. Changing templates.
Fredrik Unger [Sun, 10 Apr 2011 19:49:58 +0000 (21:49 +0200)]
Adding initial language menu support. Adding method lang_menu. Changing templates.

Link needs to be properly intergrated to the html href, translation
started earlier in sitemap and saved per language.
'en' special case as it is the original language of iso_639_3.xml

Updating templates with a Language menu item instead of a Level name
Levelname can be maintained in the template, translations are dynamic
as more pages in other languages gets created.

Problems will arrise when a language page is missing. This is first tests.. :)

13 years agoFixing missed namechange of variable.
Fredrik Unger [Sun, 10 Apr 2011 18:22:37 +0000 (20:22 +0200)]
Fixing missed namechange of variable.

13 years agoAdded total timing to compare old for loop to Sitemap process method.
Fredrik Unger [Sun, 10 Apr 2011 14:33:19 +0000 (16:33 +0200)]
Added total timing to compare old for loop to Sitemap process method.

13 years agoAdding method process and publish to mimic the old scripts stages to publish.
Fredrik Unger [Sun, 10 Apr 2011 14:32:18 +0000 (16:32 +0200)]
Adding method process and publish to mimic the old scripts stages to publish.

Timing added to make sure that the Sitemap class is not slower.

13 years agoAdding method to write a sitemap.txt and writing it when something changed.
Fredrik Unger [Sun, 10 Apr 2011 14:30:42 +0000 (16:30 +0200)]
Adding method to write a sitemap.txt and writing it when something changed.

missing & removed sets controll if we need a new sitemap.txt

13 years agoAdding gen_menu method also in Sitemap.
Fredrik Unger [Sun, 10 Apr 2011 14:29:43 +0000 (16:29 +0200)]
Adding gen_menu method also in Sitemap.

13 years agoImplementing generation of a menu, currently only the full menu with and without...
Fredrik Unger [Sun, 10 Apr 2011 14:24:37 +0000 (16:24 +0200)]
Implementing generation of a menu, currently only the full menu with and without Page marker.

13 years agoFixing the inorder iterator. Did not recurse deep enough before.
Fredrik Unger [Sun, 10 Apr 2011 14:22:52 +0000 (16:22 +0200)]
Fixing the inorder iterator. Did not recurse deep enough before.

13 years agoAdding several stage methods in Link that propagates to the Page below.
Fredrik Unger [Sun, 10 Apr 2011 14:21:44 +0000 (16:21 +0200)]
Adding several stage methods in Link that propagates to the Page below.

13 years agoAdding some getters and setters to Class Page.
Fredrik Unger [Sun, 10 Apr 2011 14:20:13 +0000 (16:20 +0200)]
Adding some getters and setters to Class Page.

13 years agoMoving the creation of tmp directory to before the new Class structure.
Fredrik Unger [Sun, 10 Apr 2011 14:18:41 +0000 (16:18 +0200)]
Moving the creation of tmp directory to before the new Class structure.

To be imbedded later.

13 years agoAdjusted references to doc to self._doc.
Fredrik Unger [Sun, 10 Apr 2011 13:44:53 +0000 (15:44 +0200)]
Adjusted references to doc to self._doc.

13 years agoCommenting out printing of the digraph for sitemap.
Fredrik Unger [Wed, 6 Apr 2011 20:52:02 +0000 (22:52 +0200)]
Commenting out printing of the digraph for sitemap.

Will need a cleanup once decided on how graphviz will be used.

13 years agoAdding a simple iterator to the Trie class, now the set operations
Fredrik Unger [Wed, 6 Apr 2011 20:51:03 +0000 (22:51 +0200)]
Adding a simple iterator to the Trie class, now the set operations
on the links in the tree works again.

13 years agoAdded gen_menu stub in sitemap that will generate menues from a prepared sitemap.
Fredrik Unger [Wed, 6 Apr 2011 20:20:07 +0000 (22:20 +0200)]
Added gen_menu stub in sitemap that will generate menues from a prepared sitemap.

13 years agoInitial layout of what work the Page object has to do, based on non object version.
Fredrik Unger [Wed, 6 Apr 2011 20:09:52 +0000 (22:09 +0200)]
Initial layout of what work the Page object has to do, based on non object version.

prepare method to collect all information from the bindery, and to splice in
results from scripts on the page.

render method to do the xsl stylesheet conversion of the docbook xml to html

template method to create html menues and merge the text into the template.

from order, the template for one page can not run before all pages have
run prepare. (sitemap does not have all titles before that)
Solution for language menu and how to deal with a missing page for
a language has to be implemented.

13 years agoAdding mapping Sitemap -> Link -> Page to deal with Content-Language
Fredrik Unger [Wed, 6 Apr 2011 20:04:38 +0000 (22:04 +0200)]
Adding mapping Sitemap -> Link -> Page to deal with Content-Language
and other representation of a page at the same link.

Tree does not have an iterator, hence the link set will not currently work.
The Page object will do conversion, and templating, preparing menues
as all that work is language dependant. Link matches sitemap.txt entries
and matches the Directory object.

13 years agoInitial refactoring to use objects. Simple trie implementation to better
Fredrik Unger [Sun, 3 Apr 2011 19:26:57 +0000 (21:26 +0200)]
Initial refactoring to use objects. Simple trie implementation to better
support the sitemap structure. Initial tests of the objects but
still keeping the initial working code.

13 years agoProperly indenting the code, using /usr/share/doc/python2.6/examples/Tools/scripts...
Fredrik Unger [Mon, 28 Mar 2011 07:55:24 +0000 (09:55 +0200)]
Properly indenting the code, using /usr/share/doc/python2.6/examples/Tools/scripts/reindent.py

13 years agoAdding initial sitemap, differentiate class directive in tree building.
Fredrik Unger [Mon, 28 Mar 2011 07:36:02 +0000 (09:36 +0200)]
Adding initial sitemap, differentiate class directive in tree building.