No description, website, or topics provided.
Python XSLT CSS HTML Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
css
etc misc fix Jan 9, 2015
genshi start of two new modules Jan 29, 2011
img
js work work Apr 19, 2010
mediawiki
patches
sparql
static
test forgotten file Apr 25, 2015
wikimarkup
xsl added banner announcing new version to most pages Aug 5, 2018
.gitignore
ARN.py
DV.py
DataObjects.py Implementation of a generic (but surprisingly useful) implementation … Jan 19, 2011
Direktiv.py Start of composite Direktiv class (with parse() method that may use t… Feb 8, 2011
DispatchMixin.py
DocumentRepository.py
EncodingTest.py misc changes due to python 2.6 and other more current software on I7 … Aug 3, 2009
EurlexCaselaw.py
EurlexTreaties.py start of two new modules Jan 29, 2011
FilebasedTester.py ongoing EURLex work Jan 24, 2010
GraphBuilder.py Misc Feb 19, 2012
GraphVizualizer.py misc fix Mar 9, 2011
JK.py
JO.py
Jurimetrics.py
Keyword.py added banner announcing new version to most pages Aug 5, 2018
Kommitte.py
LICENSE decided on a license, rewrote most of the static text pages Aug 15, 2008
LegalRef.py Misc fixes Sep 21, 2011
LegalSource.py
LegalURI.py
LogAnalyze.py some table recognition fixes - now all testcases for which there is a… Aug 5, 2008
Manager.py
Mkpatch.py
PDFBuilder.py
ProfileStats.py SFS.py now uses the FilebasedTester framework, Manager.py has a new T… Jul 17, 2008
Propositioner.py ongoing work Feb 8, 2011
README.txt Merge changes on branch/stable-1.5 up to r304 Jul 29, 2009
RegPubl.py Merge changes on branch/stable-1.5 up to r304 Jul 29, 2009
Regeringen.py ongoing work Feb 8, 2011
Robot.py
SFS.py
SKVFS.py start of two new modules Jan 29, 2011
SOU.py ongoing work Feb 8, 2011
SesameStore.py added banner announcing new version to most pages Aug 5, 2018
TextReader.py
Util.py
W3Standards.py
Wiki.py
conf.ini-example
ferenda.conf-example work on toc Jan 23, 2011
wikiimport.py
wikilink.py

README.txt

Description:
============

This is a collection of python scripts and modules, XSLT stylesheets
and various other pieces which is used to create all the static
content for https://lagen.nu/

Requirements:
=============

The code has been tested on windows and linux, and should run on
macosx and other unices as well, as long as the following requirements
are met (all command line programs must be in your PATH):

 * Python 2.5 together with

   * beautifulsoup
   * mechanize
   * configobj
   * simpleparse
   * rdflib 2.4
   * pyRDFa

 * xmllint and xsltproc (for XSLT transformations)
 * patch, find and recode (If you're on windows, install cygwin)
 * apache2 (to view the entire generated site -- if you're on windows
   you must use the cygwin version, since the win32 version has `a bug
   <https://issues.apache.org/bugzilla/show_bug.cgi?id=41441>`_
   concerning colons in URLs, which we use)
 
The required python modules should be installable with ``easy_install
beautifulsoup mechanize configobj simpleparse
"rdflib>=2.4,<=3.0a"``. PyRDFa isn't installable through easy_install,
you'll have to manually download it from from
http://www.w3.org/2007/08/pyRdfa/. Currently, there's a bug in that
module; you'll need to apply the following patch::

    --- pyRdfa/__init__.py  2008-08-16 23:38:58.043000000 +0200
    +++ pyRdfa/__init__.py~ 2008-06-16 12:23:42.000000000 +0200
    @@ -458,6 +458,6 @@
                    for t in options.warning_graph : graph.add(t)
    
            # That is it...
    -       return graph
    +       return Graph


For downloading verdicts from Domstolsverkets ftp-server and
transforming them into HTML you need four additional things:

 * A username/password - I can't give out mine, unfortunately
 * ncftp
 * pywin32 (python module)
 * Microsoft Word 2003 (possibly earlier and later versions work, but
   I haven't tested this)

If you can't get these, an easier way is to just download the
downloaded and converted documents from
http://ferenda.lagen.nu/dv.html.zip and unzip into
$WORKDIR/data/dv/intermediate (see more below)

Running:
========

The python scripts and modules are not meant to be installed in your
site-packages -- run them from your checked-out copy of the code.

The main executable module is ``Manager.py``, which takes a command
name parameter and, depending on the command, additional
parameters. Try running the regression test suite to see if things
seem OK:

``python Manager.py RunTest``

It should report some failures, but most test cases should work.

More Information:
=================

See the development trac (in Swedish) at http://trac.lagen.nu/