1.1 --- a/moinformat/parsers/__init__.py Tue Dec 12 21:02:01 2017 +0100
1.2 +++ b/moinformat/parsers/__init__.py Tue Dec 12 21:08:53 2017 +0100
1.3 @@ -0,0 +1,24 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +"""
1.7 +Moin wiki parsers.
1.8 +
1.9 +Copyright (C) 2017 Paul Boddie <paul@boddie.org.uk>
1.10 +
1.11 +This program is free software; you can redistribute it and/or modify it under
1.12 +the terms of the GNU General Public License as published by the Free Software
1.13 +Foundation; either version 3 of the License, or (at your option) any later
1.14 +version.
1.15 +
1.16 +This program is distributed in the hope that it will be useful, but WITHOUT
1.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.19 +details.
1.20 +
1.21 +You should have received a copy of the GNU General Public License along with
1.22 +this program. If not, see <http://www.gnu.org/licenses/>.
1.23 +"""
1.24 +
1.25 +from moinformat.parsers.manifest import parsers
1.26 +
1.27 +# vim: tabstop=4 expandtab shiftwidth=4
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/moinformat/parsers/manifest.py Tue Dec 12 21:08:53 2017 +0100
2.3 @@ -0,0 +1,44 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +"""
2.7 +Moin wiki parser manifest.
2.8 +
2.9 +Copyright (C) 2017 Paul Boddie <paul@boddie.org.uk>
2.10 +
2.11 +This program is free software; you can redistribute it and/or modify it under
2.12 +the terms of the GNU General Public License as published by the Free Software
2.13 +Foundation; either version 3 of the License, or (at your option) any later
2.14 +version.
2.15 +
2.16 +This program is distributed in the hope that it will be useful, but WITHOUT
2.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2.19 +details.
2.20 +
2.21 +You should have received a copy of the GNU General Public License along with
2.22 +this program. If not, see <http://www.gnu.org/licenses/>.
2.23 +"""
2.24 +
2.25 +from moinformat.imports import get_extensions
2.26 +from os.path import split
2.27 +
2.28 +reserved = ["__init__", "common", "manifest"]
2.29 +
2.30 +# Obtain details of this module's package.
2.31 +
2.32 +dirname = split(__file__)[0]
2.33 +package = __name__.rsplit(".", 1)[0]
2.34 +
2.35 +# Define an attribute mapping names to modules.
2.36 +
2.37 +modules = {}
2.38 +get_extensions(dirname, package, modules, reserved)
2.39 +
2.40 +# Obtain all parsers.
2.41 +
2.42 +parsers = {}
2.43 +
2.44 +for module_name, module in modules.items():
2.45 + parsers[module_name] = module.parser
2.46 +
2.47 +# vim: tabstop=4 expandtab shiftwidth=4
3.1 --- a/moinformat/parsers/table.py Tue Dec 12 21:02:01 2017 +0100
3.2 +++ b/moinformat/parsers/table.py Tue Dec 12 21:08:53 2017 +0100
3.3 @@ -118,4 +118,6 @@
3.4 "regionend" : parse_table_end,
3.5 })
3.6
3.7 +parser = TableParser
3.8 +
3.9 # vim: tabstop=4 expandtab shiftwidth=4
4.1 --- a/moinformat/serialisers/__init__.py Tue Dec 12 21:02:01 2017 +0100
4.2 +++ b/moinformat/serialisers/__init__.py Tue Dec 12 21:08:53 2017 +0100
4.3 @@ -19,6 +19,7 @@
4.4 this program. If not, see <http://www.gnu.org/licenses/>.
4.5 """
4.6
4.7 +from moinformat.serialisers.manifest import serialisers
4.8 from moinformat.serialisers.moin import MoinSerialiser
4.9
4.10 # Top-level functions.