1.1 --- a/convert.py Sun Apr 01 23:22:19 2012 +0200
1.2 +++ b/convert.py Sun Apr 01 23:26:59 2012 +0200
1.3 @@ -1,5 +1,26 @@
1.4 #!/usr/bin/env python
1.5
1.6 +"""
1.7 +Confluence XML dump conversion to a MoinMoin-compatible representation.
1.8 +
1.9 +Copyright (C) 2012 Paul Boddie <paul@boddie.org.uk>
1.10 +
1.11 +This software is free software; you can redistribute it and/or
1.12 +modify it under the terms of the GNU General Public License as
1.13 +published by the Free Software Foundation; either version 2 of
1.14 +the License, or (at your option) any later version.
1.15 +
1.16 +This software is distributed in the hope that it will be useful,
1.17 +but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 +GNU General Public License for more details.
1.20 +
1.21 +You should have received a copy of the GNU General Public
1.22 +License along with this library; see the file LICENCE.txt
1.23 +If not, write to the Free Software Foundation, Inc.,
1.24 +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
1.25 +"""
1.26 +
1.27 from os import listdir, mkdir, makedirs
1.28 from os.path import exists, extsep, join, splitext
1.29 from zipfile import ZipFile
2.1 --- a/parser.py Sun Apr 01 23:22:19 2012 +0200
2.2 +++ b/parser.py Sun Apr 01 23:26:59 2012 +0200
2.3 @@ -3,6 +3,27 @@
2.4 """
2.5 Confluence Wiki syntax parsing.
2.6
2.7 +Copyright (C) 2012 Paul Boddie <paul@boddie.org.uk>
2.8 +
2.9 +This software is free software; you can redistribute it and/or
2.10 +modify it under the terms of the GNU General Public License as
2.11 +published by the Free Software Foundation; either version 2 of
2.12 +the License, or (at your option) any later version.
2.13 +
2.14 +This software is distributed in the hope that it will be useful,
2.15 +but WITHOUT ANY WARRANTY; without even the implied warranty of
2.16 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2.17 +GNU General Public License for more details.
2.18 +
2.19 +You should have received a copy of the GNU General Public
2.20 +License along with this library; see the file LICENCE.txt
2.21 +If not, write to the Free Software Foundation, Inc.,
2.22 +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
2.23 +
2.24 +--------
2.25 +
2.26 +The basic procedure is as follows:
2.27 +
2.28 1. Wiki pages are first split up into regions.
2.29 2. Then, within these regions, the text is split into blocks.
2.30 1. First, lists are identified.