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.
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.
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.
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
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.
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.
Fredrik Unger [Tue, 6 Nov 2012 14:46:36 +0000 (15:46 +0100)]
Renaming calendar to events due to naming collision in vobject.
Fredrik Unger [Sun, 28 Oct 2012 07:22:04 +0000 (08:22 +0100)]
Switching to ElementMaker from Element/SubElement
Fredrik Unger [Sun, 28 Oct 2012 07:13:42 +0000 (08:13 +0100)]
Adding the 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Fredrik Unger [Wed, 16 May 2012 10:08:02 +0000 (12:08 +0200)]
Fixing UTF-8 encoding for the foreign texts and characters.
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.
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.
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.
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
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.
Fredrik Unger [Fri, 6 Apr 2012 05:22:55 +0000 (07:22 +0200)]
Removing debug printout.
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.
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.
Fredrik Unger [Mon, 2 Apr 2012 18:34:17 +0000 (20:34 +0200)]
Adding initial bin/treecutter, and setup.py and package files.
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.
Fredrik Unger [Mon, 2 Apr 2012 14:44:34 +0000 (16:44 +0200)]
Refactoring, cleaining up imports, setting filemode
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.
Fredrik Unger [Mon, 2 Apr 2012 14:01:30 +0000 (16:01 +0200)]
Preparing refactoring the single source into a python structure
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.
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.
Fredrik Unger [Mon, 6 Feb 2012 21:22:16 +0000 (22:22 +0100)]
Added missing ) to ssh_cmd call
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.
Fredrik Unger [Mon, 6 Feb 2012 21:17:06 +0000 (22:17 +0100)]
Adding initial support for html forms.
Fredrik Unger [Mon, 6 Feb 2012 14:35:19 +0000 (15:35 +0100)]
Chaning & to xml representation.
Fredrik Unger [Mon, 6 Feb 2012 14:04:19 +0000 (15:04 +0100)]
Adding docbook.xsl for tree-cutter processing
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.
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.
Fredrik Unger [Mon, 6 Feb 2012 11:09:35 +0000 (12:09 +0100)]
Change execute permission on index.html and style.html
Fredrik Unger [Mon, 6 Feb 2012 11:00:47 +0000 (12:00 +0100)]
Reindent css 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.
Fredrik Unger [Mon, 6 Feb 2012 08:25:06 +0000 (09:25 +0100)]
Added template from freehtml5templates.com/awesomesauce-html5-and-css3-template/
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.
Fredrik Unger [Tue, 3 May 2011 20:22:11 +0000 (22:22 +0200)]
Using translated cheetah templates, allowing - in filenames.
Fredrik Unger [Tue, 3 May 2011 20:21:20 +0000 (22:21 +0200)]
Adding shutil for the copying.
Fredrik Unger [Tue, 3 May 2011 20:20:33 +0000 (22:20 +0200)]
Fixing sitemap generation, language menus and resource copying.
Fredrik Unger [Thu, 14 Apr 2011 08:04:08 +0000 (10:04 +0200)]
Adding a css mark for the top menu.
Fredrik Unger [Sun, 10 Apr 2011 19:55:25 +0000 (21:55 +0200)]
Fixing script execution path for current directory, fixing missing page printout.
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.. :)
Fredrik Unger [Sun, 10 Apr 2011 18:22:37 +0000 (20:22 +0200)]
Fixing missed namechange of variable.
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.
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.
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
Fredrik Unger [Sun, 10 Apr 2011 14:29:43 +0000 (16:29 +0200)]
Adding gen_menu method also in Sitemap.
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.
Fredrik Unger [Sun, 10 Apr 2011 14:22:52 +0000 (16:22 +0200)]
Fixing the inorder iterator. Did not recurse deep enough before.
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.
Fredrik Unger [Sun, 10 Apr 2011 14:20:13 +0000 (16:20 +0200)]
Adding some getters and setters to Class Page.
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.
Fredrik Unger [Sun, 10 Apr 2011 13:44:53 +0000 (15:44 +0200)]
Adjusted references to doc to self._doc.
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.
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.
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.
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.
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.
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.
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
Fredrik Unger [Mon, 28 Mar 2011 07:36:02 +0000 (09:36 +0200)]
Adding initial sitemap, differentiate class directive in tree building.
Fredrik Unger [Mon, 28 Mar 2011 07:27:16 +0000 (09:27 +0200)]
Fixing regexp to treat /xx special.
Fredrik Unger [Mon, 28 Mar 2011 07:26:19 +0000 (09:26 +0200)]
rsync also removes target files that should not be there.
Fredrik Unger [Mon, 21 Mar 2011 23:04:41 +0000 (00:04 +0100)]
Adding functionality to publish linked documents. link xlink:href and imagedata fileref.
Fredrik Unger [Thu, 17 Mar 2011 20:01:55 +0000 (21:01 +0100)]
Changes due to that rsync does not create target with mkdir -p
Added a staged publish function in /tmp to be able to provide
a simple rsync target functionality. This to enable output exported
over ssh at a later stage.
Fredrik Unger [Tue, 8 Mar 2011 13:56:28 +0000 (14:56 +0100)]
Improving status report, changing to rsync by adding function publish for output.
Fredrik Unger [Tue, 8 Mar 2011 13:55:25 +0000 (14:55 +0100)]
Changing css references to /css, and js to /js as relative linking does not work with deeper levels.
Fredrik Unger [Tue, 8 Mar 2011 13:54:02 +0000 (14:54 +0100)]
Changing the references to images to /images as relative linking does not work
with deeper levels.
Fredrik Unger [Mon, 7 Mar 2011 20:17:39 +0000 (21:17 +0100)]
Whitespace and indetation changes.
Fredrik Unger [Mon, 7 Mar 2011 20:16:26 +0000 (21:16 +0100)]
Adding argparse to arguments --style and --output.
Fredrik Unger [Fri, 4 Mar 2011 21:11:01 +0000 (22:11 +0100)]
Remove $site, in favour for site. site should not be a template variable.
Fredrik Unger [Fri, 4 Mar 2011 20:48:47 +0000 (21:48 +0100)]
Initial docbook.xsl a copy of style/freggies/docbook.xsl
Fredrik Unger [Fri, 4 Mar 2011 20:46:57 +0000 (21:46 +0100)]
Add docbook extension stylsheet to controll the apearance of the docbook
document.
Currently it just takes and forward the root, dropping the <html>
declarations leaving only the original article.
Fredrik Unger [Fri, 4 Mar 2011 20:41:55 +0000 (21:41 +0100)]
Renamed index.html to index.en.html.tmpl and adding templatestrings.
Fredrik Unger [Thu, 3 Mar 2011 20:37:55 +0000 (21:37 +0100)]
Removing the x bit from license.txt
Fredrik Unger [Thu, 3 Mar 2011 20:36:50 +0000 (21:36 +0100)]
Moving css to a separate directory.
Fredrik Unger [Thu, 3 Mar 2011 20:26:36 +0000 (21:26 +0100)]
Moving stylesheets to a separate directory.
Fredrik Unger [Wed, 2 Mar 2011 07:34:35 +0000 (08:34 +0100)]
Removing example article text and example navigation.
Fredrik Unger [Wed, 2 Mar 2011 07:13:44 +0000 (08:13 +0100)]
Corrected indent and whitespace. Validates now with nxml html5.rnc rules.
Fredrik Unger [Thu, 24 Feb 2011 10:37:29 +0000 (11:37 +0100)]
Fixed invalid range check of index.
Fredrik Unger [Thu, 24 Feb 2011 10:23:05 +0000 (11:23 +0100)]
Fixed the problem of index overflow when no lesser level exist at the end.
Fredrik Unger [Thu, 24 Feb 2011 10:15:04 +0000 (11:15 +0100)]
Whitespace fixes (emacs mode detected and fixed them)
Fredrik Unger [Thu, 24 Feb 2011 10:14:31 +0000 (11:14 +0100)]
Adapting tree-cutter.py to deal with language codes in the filenames.
Fredrik Unger [Tue, 15 Feb 2011 21:51:48 +0000 (22:51 +0100)]
Added template from freehtml5templates.com/bluenightsky-html5-and-css3-template/
Fredrik Unger [Tue, 15 Feb 2011 21:51:13 +0000 (22:51 +0100)]
Adding template from freehtml5templates.com/adropabove-html5-css3-and-jquery-template/
Fredrik Unger [Tue, 15 Feb 2011 21:50:20 +0000 (22:50 +0100)]
Adding template from freehtml5templates.com/turquoiseswirls-html5-and-css3-template/
Fredrik Unger [Tue, 15 Feb 2011 21:49:27 +0000 (22:49 +0100)]
Added template from freehtml5templates.com/freggies-html5-and-css3-template/
Fredrik Unger [Tue, 15 Feb 2011 17:14:06 +0000 (18:14 +0100)]
Temporarilly fixed the directory problem. runs in doc, with style and htdocs ..
Should be made configurable and a standard path should be decided..
Fredrik Unger [Tue, 15 Feb 2011 16:53:12 +0000 (17:53 +0100)]
Added xsltproc test, 10x faster. Need to check output.