Skip to content

Commit

Permalink
add trademark notices
Browse files Browse the repository at this point in the history
  • Loading branch information
drkane committed Oct 8, 2023
1 parent 0bd25dd commit bbdd24f
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 36 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -30,14 +32,17 @@ 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
# or
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
Expand Down Expand Up @@ -120,8 +125,8 @@ git push origin v<VERSION_NUMBER>

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:
Expand All @@ -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.
6 changes: 3 additions & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
**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.
7 changes: 5 additions & 2 deletions docs/command-line.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# 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
# or
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
Expand All @@ -19,4 +22,4 @@ python -m ixbrlparse -h
# format of the output
# --fields {numeric,nonnumeric,all}
# Which fields to output
```
```
13 changes: 10 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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.
6 changes: 3 additions & 3 deletions docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

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

### Create a custom format class

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`):
Expand Down
8 changes: 4 additions & 4 deletions docs/python-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +26,6 @@ content = '''<some ixbrl 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
Expand All @@ -48,6 +47,7 @@ print(x.contexts)
```

The units are stored as key:value dictionary entries

```python
print(x.units)
# {
Expand All @@ -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
Expand Down Expand Up @@ -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.
19 changes: 19 additions & 0 deletions docs_theme/partials/copyright.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="md-copyright">
{% if config.copyright %}
<div class="md-copyright__highlight">
{{ config.copyright.replace("%%NOW%%", build_date_utc.year|string) }}
&middot;
Last updated {{ build_date_utc.strftime("%d %B %Y") }}
</div>
{% endif %}
<div class="md-copyright__highlight">
{% if not config.extra.generator == false %}
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
&middot;
{% endif %}
XBRL™ and iXBRL™ are trademarks of XBRL International, Inc. All rights reserved.
</div>
</div>
35 changes: 20 additions & 15 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- mkdocstrings:
enabled: true
default_handler: python
handlers:
python:
options:
heading_level: 3
copyright: Copyright &copy; 2018 - %%NOW%% Kane Data Limited
watch:
- docs_theme
2 changes: 1 addition & 1 deletion src/ixbrlparse/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.0"
__version__ = "0.8.1"

0 comments on commit bbdd24f

Please sign in to comment.