Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove myst-parser and rewrite docs in rst (thanks pandoc) #66

Merged
merged 1 commit into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions docs/advanced_usage.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/class_reference.md

This file was deleted.

19 changes: 19 additions & 0 deletions docs/class_reference.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Class Reference
===============

This is the main python binding for chardetng, a rust character encoding
detector for legacy Web content.

The class here is a wrapper around the rust struct ``EncodingDetector``.
The documentation for the rust structure is available on
`docs.rs <https://docs.rs/chardetng/>`__.

For more information about the overall function of the library, read
Henri Sivonen’s `excellent write-up <https://hsivonen.fi/chardetng/>`__.

chardetng_py.detector
---------------------

.. automodule:: chardetng_py.detector
:members:
:undoc-members:
3 changes: 0 additions & 3 deletions docs/codeofconduct.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/codeofconduct.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\```{include} ../CODE_OF_CONDUCT.md

\``\`
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"sphinx_toolbox.more_autodoc",
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"myst_parser",
"numpydoc",
]
autodoc_typehints = "description"
Expand Down
7 changes: 0 additions & 7 deletions docs/contributing.md

This file was deleted.

7 changes: 7 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
+----------------------------------+
| \```{include} ../CONTRIBUTING.md |
+==================================+
| end-before: |
+----------------------------------+

\``\`
26 changes: 0 additions & 26 deletions docs/index.md

This file was deleted.

105 changes: 105 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
chardetng_py
============

|PyPI| |Status| |Python Version| |License|

|Read the documentation at https://chardetng-py.readthedocs.io/| |Tests|

|pre-commit| |Black|

Features
--------

Python binding for the
`chardetng <https://github.com/hsivonen/chardetng>`__ character encoding
detector.

Installation
------------

You can install ``chardetng_py`` via `pip <https://pip.pypa.io/>`__ from
`PyPI <https://pypi.org/>`__:

.. code:: console

$ pip install chardetng-py

Or via poetry:

.. code:: console

$ poetry add chardetng-py

Quick Start
-----------

The easiest way to get started is to use the :meth:``detect`` method.

.. code:: python

>>> from chardetng_py import detect
>>> detect(b'Jakby r\xeaka Boga')
'windows-1254'

There is also a ``detect`` method available for compatability with
``chardet``, but it will always report ``None`` for the language and a
confidence value of ``0.99``.

.. code:: python

>>> from chardetng_py.compat import detect
>>> detect(b'Jakby r\xeaka Boga')
{'encoding': 'windows-1254', 'confidence': 0.99, 'language': None}

Contributing
------------

Contributions are very welcome. To learn more, see the `Contributor
Guide <https://github.com/john-parton/chardetng-py/blob/main/CONTRIBUTING.md>`__.

License
-------

Distributed under the terms of the `MIT
license <https://github.com/john-parton/chardetng-py/blob/main/LICENSE>`__,
``chardetng_py`` is free and open source software.

Issues
------

If you encounter any problems, please `file an
issue <https://github.com/john-parton/chardetng-py/issues>`__ along with
a detailed description.

Credits
-------

.. raw:: html

<!-- github-only -->

.. |PyPI| image:: https://img.shields.io/pypi/v/chardetng-py.svg
:target: https://pypi.org/project/chardetng-py/
.. |Status| image:: https://img.shields.io/pypi/status/chardetng-py.svg
:target: https://pypi.org/project/chardetng-py/
.. |Python Version| image:: https://img.shields.io/pypi/pyversions/chardetng-py
:target: https://pypi.org/project/chardetng-py
.. |License| image:: https://img.shields.io/pypi/l/chardetng-py
:target: https://github.com/john-parton/chardetng-py/blob/main/LICENSE
.. |Read the documentation at https://chardetng-py.readthedocs.io/| image:: https://img.shields.io/readthedocs/chardetng-py/latest.svg?label=Read%20the%20Docs
:target: https://chardetng-py.readthedocs.io/
.. |Tests| image:: https://github.com/john-parton/chardetng-py/workflows/Tests/badge.svg
:target: https://github.com/john-parton/chardetng-py/actions?workflow=Tests
.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
:target: https://github.com/pre-commit/pre-commit
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

.. toctree::
:maxdepth: 0
:hidden:

usage
shortcuts
class_reference
recipes
7 changes: 0 additions & 7 deletions docs/license.md

This file was deleted.

10 changes: 10 additions & 0 deletions docs/license.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
License
=======

+---------------------------------+
| \```{literalinclude} ../LICENSE |
+=================================+
| language: none |
+---------------------------------+

\``\`
111 changes: 0 additions & 111 deletions docs/recipes.md

This file was deleted.

Loading