diff --git a/README.md b/README.md index 2358326..b0f1a49 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,47 @@ -# python-xml-microparser - -A lightweight XML Parser written in Python for basic XML parsing and manipulation of XML documents. \ No newline at end of file +# Python XML-Microparser Module + +The **python-xml-microparser** module is a small OOP based XML Parser without DTD and SAX functionality. + +## 1. Documentation + +Documentation including examples can be found at either [./doc](./doc) or [https://pythondocs.webcodex.de/xml-microparser/](https://pythondocs.webcodex.de/xml-microparser/). + +## 2. Installation + +Most Linux Distributions come with already Python3 met dependencies (see **2.1**). Just download the Relase Tarball [link](link) and continue with section **2.2**. + +## 2.1. Dependencies + +You need the `pip3` Python3 Package Installer, Python3 Setuptools `python3-setuptools` and the downloaded XML-Microparser +Package found under Releases. + +```bash +# apt-get install python3-setuptools python3-pip +``` + +>[!IMPORTANT] +> The following section describes how to install the XML-Microparser package globally. Newer PIP Package Manager Versions forbid this. +> It is possible to override by providing the `--break-system-packages` flag. + +## 2.2. Non-Restrictive PIP Install + +Do this for a pip system where `--break-system-packages` is not needed. + +```bash +# sudo pip3 install dist/xmlmicroparser-0.50b0.tar.gz +``` + +## 2.3. Restrictive PIP Install + +Do this for a pip system where `--break-system-packages` is needed. + +```bash +# sudo pip3 install dist/xmlmicroparser-0.50b0.tar.gz --break-system-packages +``` + +## 3. Boost Python + +Using the XML-Microparser Module with Boost Python C++ https://www.boost.org/doc/libs/1_86_0/libs/python/doc/html/index.html +makes XML configuration handling in C++ projects easy. + +See @ https://github.com/WEBcodeX1/http-1.2/. diff --git a/setup.py b/setup.py index b71dfc3..13f75d6 100644 --- a/setup.py +++ b/setup.py @@ -2,24 +2,26 @@ setup( - name = 'python-xml-microparser', - version = '0.53beta', + name = 'xmlmicroparser', + version = '0.54beta', author = 'Claus Prüfer', author_email = 'pruefer@webcodex.de', maintainer = 'Claus Prüfer', - description = 'A tiny, plain xml parser without XSLT/DTD capability.', - url = 'http://python-xml-microparser.docs.webcodex.de', + description = 'A tiny xml parser without DTD/XSLT/SAX functionality.', license = 'GPLv3', - long_description = open('./README.rst').read(), + long_description = open('./README.md').read(), packages = [ - 'xml_microparser' + 'xmlmicroparser' ], package_dir = { - 'xml_microparser': 'src/' + 'xmlmicroparser': 'src/' }, + install_requires = [ + ], + zip_safe = True ) diff --git a/src/helper.py b/src/helper.py index 5690ab8..5959861 100755 --- a/src/helper.py +++ b/src/helper.py @@ -2,14 +2,12 @@ # . XML Microparser Python Module . # ]*[ --------------------------------------------------------------------- ]*[ # . . -# . Copyright Claus Prüfer 2016-2019 . +# . Copyright Claus Prüfer 2016-2024 . # . . # . XML Parser Helper classes . # . . # ]*[ --------------------------------------------------------------------- ]*[ -# -*- coding:utf-8 -*- - import logging diff --git a/src/microparser.py b/src/microparser.py index d212535..69859a3 100755 --- a/src/microparser.py +++ b/src/microparser.py @@ -2,20 +2,18 @@ # . XML Microparser Python Module . # ]*[ --------------------------------------------------------------------- ]*[ # . . -# . Copyright Claus Prüfer 2016-2019 . +# . Copyright Claus Prüfer 2016-2024 . # . . # . Lightweight XML Parser and JSON Transformer Module . # . . # ]*[ --------------------------------------------------------------------- ]*[ -# -*- coding:utf-8 -*- - import re import json import logging -from xml_microparser.transformer import JSONTransformer -from xml_microparser.helper import Looper +from xmlmicroparser.transformer import JSONTransformer +from xmlmicroparser.helper import Looper class Parser(): diff --git a/src/transformer.py b/src/transformer.py index 469ada1..15008cd 100755 --- a/src/transformer.py +++ b/src/transformer.py @@ -2,14 +2,12 @@ # . XML Microparser Python Module . # ]*[ --------------------------------------------------------------------- ]*[ # . . -# . Copyright Claus Prüfer 2016-2019 . +# . Copyright Claus Prüfer 2016-2024 . # . . # . XML Parser JSON Transformer Module . # . . # ]*[ --------------------------------------------------------------------- ]*[ -# -*- coding:utf-8 -*- - import json import logging