# HG changeset patch # User Paul Boddie # Date 1333315619 -7200 # Node ID cdbfc82274f8d3a80da3f76bec8dbff4f0115f6e # Parent 192a2a30aff4ba96271dad8a7d8307ca342757a5 Added copyright and licensing boilerplate. diff -r 192a2a30aff4 -r cdbfc82274f8 convert.py --- a/convert.py Sun Apr 01 23:22:19 2012 +0200 +++ b/convert.py Sun Apr 01 23:26:59 2012 +0200 @@ -1,5 +1,26 @@ #!/usr/bin/env python +""" +Confluence XML dump conversion to a MoinMoin-compatible representation. + +Copyright (C) 2012 Paul Boddie + +This software is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of +the License, or (at your option) any later version. + +This software is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public +License along with this library; see the file LICENCE.txt +If not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +""" + from os import listdir, mkdir, makedirs from os.path import exists, extsep, join, splitext from zipfile import ZipFile diff -r 192a2a30aff4 -r cdbfc82274f8 parser.py --- a/parser.py Sun Apr 01 23:22:19 2012 +0200 +++ b/parser.py Sun Apr 01 23:26:59 2012 +0200 @@ -3,6 +3,27 @@ """ Confluence Wiki syntax parsing. +Copyright (C) 2012 Paul Boddie + +This software is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 2 of +the License, or (at your option) any later version. + +This software is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public +License along with this library; see the file LICENCE.txt +If not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +-------- + +The basic procedure is as follows: + 1. Wiki pages are first split up into regions. 2. Then, within these regions, the text is split into blocks. 1. First, lists are identified.