diff --git a/README.md b/README.md index 6777cb6..9509353 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ # ixbrl-parse - ![Test status](https://github.com/drkane/ixbrl-parse/workflows/tests/badge.svg) [![PyPI version](https://img.shields.io/pypi/v/ixbrlparse)](https://pypi.org/project/ixbrlparse/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ixbrlparse) ![PyPI - License](https://img.shields.io/pypi/l/ixbrlparse) [![Documentation Status](https://readthedocs.org/projects/ixbrl-parse/badge/?version=latest)](https://ixbrl-parse.readthedocs.io/en/latest/?badge=latest) -A python module for getting useful data out of ixbrl files. The library is at an early stage - feedback and improvements are very welcome. +A python module for getting useful data out of iXBRL™ and XBRL™ files. The library is at an early stage - feedback and improvements are very welcome. Full documentation is available at [ixbrl-parse.readthedocs.io](https://ixbrl-parse.readthedocs.io/) +For more about the iXBRL™ and XBRL™ standards, see the [specification site](https://specifications.xbrl.org/) +and [XBRL International](https://www.xbrl.org/). This tool is not affiliated with XBRL International. + **[Changelog](https://ixbrl-parse.readthedocs.io/en/latest/changelog/)** ## Requirements @@ -30,7 +32,7 @@ pip install ixbrlparse ## How to use -You can run the module directly to extract data from an IXBRL file. +You can run the module directly to extract data from an iXBRL™ file. ```bash ixbrlparse example_file.html @@ -38,6 +40,9 @@ ixbrlparse example_file.html python -m ixbrlparse example_file.html ``` +While primarily designed for iXBRL™ files, the parser should also work +for XBRL™ files. + The various options for using this can be found through: ```bash @@ -120,8 +125,8 @@ git push origin v Developed by [David Kane](https://dkane.net/) of [Kane Data Ltd](https://kanedata.co.uk/) -Originally developed for a project with -[Power to Change](https://www.powertochange.org.uk/) looking at how to extract data from +Originally developed for a project with +[Power to Change](https://www.powertochange.org.uk/) looking at how to extract data from financial documents of community businesses. Thanks to the following users for their contributions: @@ -130,3 +135,7 @@ Thanks to the following users for their contributions: - [@wcollinscw](https://github.com/wcollinscw) - [@ajmarks](https://github.com/ajmarks) - [@adobrinevski](https://github.com/adobrinevski) + +XBRL™ and iXBRL™ are trademarks of XBRL International, Inc. All rights reserved. + +The XBRL™ standards are open and freely licensed by way of the XBRL International License Agreement. Our use of these trademarks is permitted by XBRL International in accordance with the XBRL International Trademark Policy. diff --git a/docs/changelog.md b/docs/changelog.md index d0fa07f..3841650 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -10,8 +10,8 @@ **New in version 0.5.4**: Added backreferences to BeautifulSoup objects - thanks to @avyfain for PR. -**New in version 0.5.3**: Support for `exclude` and `continuation` elements within XBRL documents. Thanks to @wcollinscw for adding support for exclude elements. +**New in version 0.5.3**: Support for `exclude` and `continuation` elements within iXBRL™ documents. Thanks to @wcollinscw for adding support for exclude elements. -**New in version 0.5**: Support for Python 3.11 has been added. I've had some problems with Python 3.11 and Windows as lxml binaries aren't yet available. Also new in version 0.5 is type checking - the whole library now has types added. +**New in version 0.5**: Support for Python 3.11 has been added. I've had some problems with Python 3.11 and Windows as lxml binaries aren't yet available. Also new in version 0.5 is type checking - the whole library now has types added. -**New in version 0.4**: I've added initial support for pure XBRL files as well as tagged HTML iXBRL files. Feedback on this feature is welcome - particularly around getting values out of numeric items. \ No newline at end of file +**New in version 0.4**: I've added initial support for pure XBRL™ files as well as tagged HTML iXBRL™ files. Feedback on this feature is welcome - particularly around getting values out of numeric items. diff --git a/docs/command-line.md b/docs/command-line.md index 370ac5e..4f91352 100644 --- a/docs/command-line.md +++ b/docs/command-line.md @@ -1,6 +1,6 @@ # Command line -You can run the module directly to extract data from an IXBRL file. +You can run the module directly to extract data from an iXBRL™ file. ```bash ixbrlparse example_file.html @@ -8,6 +8,9 @@ ixbrlparse example_file.html python -m ixbrlparse example_file.html ``` +While primarily designed for iXBRL™ files, the parser should also work +for XBRL™ files. + The various options for using this can be found through: ```bash @@ -19,4 +22,4 @@ python -m ixbrlparse -h # format of the output # --fields {numeric,nonnumeric,all} # Which fields to output -``` \ No newline at end of file +``` diff --git a/docs/index.md b/docs/index.md index 7798821..0c718bb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,7 +6,10 @@ ![PyPI - License](https://img.shields.io/pypi/l/ixbrlparse) [![Documentation Status](https://readthedocs.org/projects/ixbrl-parse/badge/?version=latest)](https://ixbrl-parse.readthedocs.io/en/latest/?badge=latest) -A python module for getting useful data out of ixbrl files. The library is at an early stage - feedback and improvements are very welcome. +A python module for getting useful data out of iXBRL™ and XBRL™ files. The library is at an early stage - feedback and improvements are very welcome. + +For more about the iXBRL™ and XBRL™ standards, see the [specification site](https://specifications.xbrl.org/) +and [XBRL International](https://www.xbrl.org/). This tool is not affiliated with XBRL International. ## Requirements @@ -27,8 +30,8 @@ pip install ixbrlparse Developed by [David Kane](https://dkane.net/) of [Kane Data Ltd](https://kanedata.co.uk/) -Originally developed for a project with -[Power to Change](https://www.powertochange.org.uk/) looking at how to extract data from +Originally developed for a project with +[Power to Change](https://www.powertochange.org.uk/) looking at how to extract data from financial documents of community businesses. Thanks to the following users for their contributions: @@ -37,3 +40,7 @@ Thanks to the following users for their contributions: - [@wcollinscw](https://github.com/wcollinscw) - [@ajmarks](https://github.com/ajmarks) - [@adobrinevski](https://github.com/adobrinevski) + +XBRL™ and iXBRL™ are trademarks of XBRL International, Inc. All rights reserved. + +The XBRL™ standards are open and freely licensed by way of the XBRL International License Agreement. Our use of these trademarks is permitted by XBRL International in accordance with the XBRL International Trademark Policy. diff --git a/docs/plugins.md b/docs/plugins.md index 55c40df..7cdad61 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -2,9 +2,9 @@ The module allows for plugins to customize functionality, using the [pluggy](https://pluggy.readthedocs.io/en/stable/) framework. -The only current plugin endpoint is to add more Formatters. A formatter takes a value from a ixbrl item and converts it into the appropriate python value. For example, the `ixtNumWordsEn` formatter would take a value like "eighty-five" and turn it into 85. +The only current plugin endpoint is to add more Formatters. A formatter takes a value from a iXBRL™ item and converts it into the appropriate python value. For example, the `ixtNumWordsEn` formatter would take a value like "eighty-five" and turn it into 85. -The formats used within ixbrl files can vary between schemas and countries. Rather than try to cover everything in this module, you can write a plugin to support the format that you need. +The formats used within iXBRL™ files can vary between schemas and countries. Rather than try to cover everything in this module, you can write a plugin to support the format that you need. ## Creating a plugin @@ -12,7 +12,7 @@ The formats used within ixbrl files can vary between schemas and countries. Rath To create a plugin, you first need to create a new format class that subclasses `ixbrlparse.ixbrlFormat`. This has two key components: -- a `format_names` attribute which consists of a tuple of possible names for the format. These are the values that will be checked against the ixbrl items. These names must not clash with other formats that have already been defined. +- a `format_names` attribute which consists of a tuple of possible names for the format. These are the values that will be checked against the iXBRL™ items. These names must not clash with other formats that have already been defined. - a `parse_value` function which takes the original text value and returns the processed value. An example class might look like (in the file `ixbrlparse-dateplugin/ixbrlparse_dateplugin.py`): diff --git a/docs/python-module.md b/docs/python-module.md index abff3d7..38f7ef9 100644 --- a/docs/python-module.md +++ b/docs/python-module.md @@ -15,7 +15,7 @@ with open('sample_ixbrl.html', encoding="utf8") as a: x = IXBRL(a) ``` -If your IXBRL data comes as a string then use a `io.StringIO` wrapper to +If your iXBRL™ data comes as a string then use a `io.StringIO` wrapper to pass it to the class: ```python @@ -26,7 +26,6 @@ content = '''''' x = IXBRL(io.StringIO(content)) ``` - ## Get the contexts and units used in the data These are held in the object. The contexts are stored as a dictionary with the context @@ -48,6 +47,7 @@ print(x.contexts) ``` The units are stored as key:value dictionary entries + ```python print(x.units) # { @@ -67,7 +67,7 @@ The `.name` and `.schema` values give the key of this value, according to the applied schema. Non-numeric facts are stored in `x.nonnumeric` as a list of `ixbrlNonnumeric` -objects, with similar `.value`, `.context`, `.name` and `.schema` values. +objects, with similar `.value`, `.context`, `.name` and `.schema` values. The value of `.value` will be a string for non-numeric facts. ## Check for any parsing errors @@ -95,4 +95,4 @@ Note that the error catching is only available for parsing of `.nonnumeric` and `numeric` items in the document, as well as context items. Any other errors with parsing will be thrown as normal no matter what `raise_on_error` is set to. Errors in `context` items may make it more difficult -to use the resulting data. +to use the resulting data. diff --git a/docs_theme/partials/copyright.html b/docs_theme/partials/copyright.html new file mode 100644 index 0000000..f32d245 --- /dev/null +++ b/docs_theme/partials/copyright.html @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index b41ac8d..dea8b69 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -4,24 +4,29 @@ site_description: A python module for getting useful data out of ixbrl files. site_author: David Kane theme: name: material + custom_dir: docs_theme features: - # - navigation.tabs - - navigation.sections + # - navigation.tabs + - navigation.sections + # - navigation.footer nav: - index.md - changelog.md - - 'Usage': - - 'command-line.md' - - 'python-module.md' - - 'Development': - - 'development.md' - - 'plugins.md' + - "Usage": + - "command-line.md" + - "python-module.md" + - "Development": + - "development.md" + - "plugins.md" - reference.md plugins: -- mkdocstrings: - enabled: true - default_handler: python - handlers: - python: - options: - heading_level: 3 \ No newline at end of file + - mkdocstrings: + enabled: true + default_handler: python + handlers: + python: + options: + heading_level: 3 +copyright: Copyright © 2018 - %%NOW%% Kane Data Limited +watch: + - docs_theme diff --git a/src/ixbrlparse/__about__.py b/src/ixbrlparse/__about__.py index 777f190..8088f75 100644 --- a/src/ixbrlparse/__about__.py +++ b/src/ixbrlparse/__about__.py @@ -1 +1 @@ -__version__ = "0.8.0" +__version__ = "0.8.1"