No description, website, or topics provided.
Python XSLT CSS HTML Other
Switch branches/tags
Nothing to show
Clone or download
Latest commit 0864dea Oct 2, 2016
Permalink
Failed to load latest commit information.
css iphone6 css fix Apr 12, 2015
etc misc fix Jan 9, 2015
genshi start of two new modules Jan 29, 2011
img regen of images Jan 11, 2012
js work work Apr 19, 2010
mediawiki misc misc Nov 6, 2009
patches new patches updated Oct 2, 2016
sparql more adaptions to the new environment Jun 6, 2015
static misc fix Mar 9, 2011
test forgotten file Apr 25, 2015
wikimarkup whoops Feb 1, 2012
xsl Handle new UI to rkrattsbaser.gov.se Feb 20, 2016
.gitignore formatting fix for URL Apr 27, 2015
ARN.py iphone6 css fix Apr 12, 2015
DV.py minor fixes for running in the new py27 environment May 26, 2015
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 Final part of docx support Nov 9, 2010
DocumentRepository.py Start of composite Direktiv class (with parse() method that may use t… Feb 8, 2011
EncodingTest.py misc changes due to python 2.6 and other more current software on I7 … Aug 3, 2009
EurlexCaselaw.py start of two new modules Jan 29, 2011
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 more work on the nextgen framework Dec 12, 2009
JO.py more code cleanup Jul 26, 2008
Jurimetrics.py All major stuff needed for Keyword/Wiki integration Jul 11, 2009
Keyword.py more adaptions to the new environment Jun 6, 2015
Kommitte.py add required coding metadata Mar 22, 2011
LICENSE decided on a license, rewrote most of the static text pages Aug 15, 2008
LegalRef.py Misc fixes Sep 21, 2011
LegalSource.py force rdflib to parse XHT2 files as RDFa 1.0 Jun 7, 2015
LegalURI.py RDFLib 3 compat Jan 7, 2011
LogAnalyze.py some table recognition fixes - now all testcases for which there is a… Aug 5, 2008
Manager.py more adaptions to the new environment Jun 6, 2015
Mkpatch.py korr stavfel i URL Apr 4, 2016
PDFBuilder.py misc misc Feb 3, 2012
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 more code cleanup Jul 26, 2008
SFS.py Handle new UI to rkrattsbaser.gov.se Feb 20, 2016
SKVFS.py start of two new modules Jan 29, 2011
SOU.py ongoing work Feb 8, 2011
SesameStore.py more adaptions to the new environment Jun 6, 2015
TextReader.py fix #207 Sep 26, 2009
Util.py Misc fixes Sep 21, 2011
W3Standards.py Start of Kommitteberättelse download/parsing Feb 7, 2011
Wiki.py patching Mar 20, 2013
conf.ini-example Merge changes on branch/stable-1.5 up to r304 Jul 29, 2009
ferenda.conf-example work on toc Jan 23, 2011
wikiimport.py humanity-inspirerat färgschema Aug 19, 2009
wikilink.py No commit message Jun 23, 2010

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/