A small command line program that checks whether an XBRL Taxonomy Package complies with the Standard Taxonomy Package 1.0 and adjusts it if necessary.
-
Run for example
app.py EDINET "full/path/to/input/archive.zip"
. Theapp.py
file is the starting point of the application.EDINET
represents the Electronic Disclosure System provided by the JFSA. The path afterwards can be any path locating an XBRL Taxonomy Package (ZIP). In this caseEDINET
is the abbreveation of the taxonomy package provider andfull/path/to/archive.zip
is the path to the zip archive. Packages to test/to experiment with the application are located in theinput
-folder. -
The class
Checker
class inTPChecker.py
analyzes the package according to the Taxonomy Package 1.0 standard. The result of the analyzation is displayed on the command line. -
Based on the result calculated by the
Checker
-class, the next step is to fix the package.TPFixer.py
contains an Interface with relevant abstract methods. Each class represents a package by a specific provider. When the class is initialized, the package to fix will be copied over to theoutput
-folder. The definied methods from the Interface are responsible for fixing the package. The result of the fixed package will be a fixedzip
archive containing all relevant data.
.
βββ .vscode/ - visual studio code settings
βββ tests/ - code and data for tests
βββ input/ - xbrl taxonomy packages
βββ output/ - folder for fixed taxonomy packages
βββ venv/ - data for virtual environemnt
βββ .gitignore - contains folders/files ignored by git
βββ app.py - program entry point
βββ CODE_OF_CONDUCT.md - project code of conduct
βββ COPYRIGHT - project copyright
βββ LICENSE - license text
βββ README.md - relevant information about the project
βββ requirements.txt - requirements to run the project
βββ TPChecker.py - check package according to the standard
βββ TPFixer.py - Fix package according to standard
βββ TPMisc.py - module with helper functions
- Checking and fixing:
- xml format checking
- case sensitivity checking (done by python)
- archive format ceck
- top-level directory checking and fixing
- META-INF folder checking and fixing
- taxonomyPackage.xml checkng and fixing
- catalog.xml checking and fixing
- URL resolution checking and fixing
- Entrypoint localiazation
- Install requirements:
pip3 install -r requirements.txt
- Run script:
python3 app.py [PROVIDER] [PATH/TO/PKG]
python3 app.py EDINET "input/ALL_20221101/ALL_20221101.zip"
Input information:
------------------
Provider -> EDINET
Package -> ..\input\ALL_20221101\ALL_20221101.zip
Analyzis results:
------------------
DONE: Package is ZIP
ERROR: Package has not single toplevel dir
ERROR: Package has no META-INF folder
ERROR: Package has no catalog.xml
ERROR: Package has no taxonomy-package.xml
Fixing package...
META-INF directory generated
Top level directory generated
Package content restructured
catalog.xml file generated
catalog.xml is xml file
taxonomyPackage.xml file generated
taxonomyPackage.xml is xml file
Final zip generated
Output result:
--------------
..\output\ALL_20221101\ALL_20221101.zip is fixed!
- Upgrade packages:
py -m pip install --upgrade build
- Build package:
py -m build
- Install the package:
py -m pip install "dist/example_package_CHRISTOPH_HARTLEB-0.0.1-py3-none-any.whl"
- Move into
dcos
folder
cd docs
- Initilaize project:
sphinx-quickstart
- Build/rebuild the documentation:
make html
Use absolute paths for input XBRL taxonomy packages to avoid any path-related issues.
Ensure your input packages adhere to the XBRL Taxonomy Package 1.0 standard for accurate processing.
If you encounter any issues while using the tool, consider the following troubleshooting steps:
- Check if all prerequisites are installed correctly.
- Verify that the input XBRL taxonomy package is valid and adheres to the required format.
- Refer to the error messages for clues on what might be going wrong.
- Search for similar issues in the project's GitHub repository or online forums.
We welcome contributions from the community! If you'd like to contribute to the project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure all tests pass.
- Submit a pull request with a clear description of your changes.
For more information on how to use the tool and its features, open the official documentation in a browser of your choice.
Here are some planned features and enhancements for future releases:
Support for additional XBRL taxonomy package standards.
Improved error handling and logging.
Integration with other XBRL processing tools.
If you need any assistance or have any questions about the project, feel free to reach out to us via email or open a new issue in the GitHub repository.
This project is licensed under the terms of the GPL v3.
See the COPYRIGHT file for copyright and licensing details.
Please review our Code of Conduct before contributing to this project.
- Python
- XBRL
- XML
- Markdwon
- Editor