Skip to content

Commit

Permalink
docs: update images and contributing guidelines (#180)
Browse files Browse the repository at this point in the history
* docs: update images and contributing guidelines

* lint

* fix alignment
  • Loading branch information
adbar authored Dec 30, 2024
1 parent 314272e commit 97da567
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 61 deletions.
44 changes: 19 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,35 @@
## How to contribute

Thank you for considering contributing to htmldate!

Here are some important resources:
If you value this software or depend on it for your product,
consider sponsoring it and contributing to its codebase.
Your support will help ensure the sustainability and growth of the project.

- [List of currently open issues](https://github.com/adbar/htmldate/issues) (no pretention to exhaustivity!)
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
There are many ways to contribute:

There are many ways to contribute, you could:
* Sponsor the project: Show your appreciation [on GitHub](https://github.com/sponsors/adbar) or [ko-fi.com](https://ko-fi.com/adbarbaresi)
* Find bugs and submit bug reports: Help making Htmldate an even more robust tool
* Write code: Fix bugs or add new features by writing [pull requests](https://docs.github.com/en/pull-requests) with a list of what you have done

- Improve the documentation
- Find bugs and submit bug reports
- Submit feature requests
- Write tutorials or blog posts
- Write code
A special thanks to the [contributors](https://github.com/adbar/htmldate/graphs/contributors) who have played a part in Htmldate.

## Installing and Running Pre-commit

### Introduction
## Testing and evaluating the code

Pre-commit is a tool that helps maintain a consistent code style and quality in our project by running a set of hooks before each commit. These hooks perform checks such as code formatting, linting, and ensuring compliance with project-specific guidelines.

### Installation and Running
Here is how you can run the tests and code quality checks.
Pull requests will only be accepted if the changes are tested
and if there are no errors.

To install and set up pre-commit in your development environment, follow these steps:
1. Install the necessary packages with `pip install htmldate[dev]`
2. Run the tests and code quality tools:
- Tests with `pytest`
- Type checking with `mypy` on the directory: `mypy htmldate/`
- Code formatting with `black` on the directory as well
- Optional: install `pre-commit` to use the corresponding commit hooks

1. Run `pip install pre-commit` to your terminal to install pre-commit using pip.
2. Navigate to your project directory and run `pre-commit install` to initialize pre-commit hooks.
3. Run it manually on your changes using `git ls-files -- 'htmldate/*.py' | xargs pre-commit run --files`

## Submitting changes

Please send a [GitHub Pull Request to htmldate](https://github.com/adbar/htmldate/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)).

**Working on your first Pull Request?** You can learn how from this series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)

For further questions you can contact me on [GitHub issues](https://github.com/adbar/htmldate/issues), [Twitter](https://twitter.com/adbarbaresi) or by [E-Mail](http://adrien.barbaresi.eu/contact.html)
For further questions you can use [GitHub issues](https://github.com/adbar/htmldate/issues) or [E-Mail](https://adrien.barbaresi.eu/).

Thanks,

Expand Down
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<br/>

<img src="https://raw.githubusercontent.com/adbar/htmldate/master/docs/htmldate-logo.png" alt="Logo as PNG image" width="60%"/>
<img src="https://raw.githubusercontent.com/adbar/htmldate/master/docs/htmldate-logo.png" alt="Htmldate Logo" align="center" width="60%"/>

<br/>

Expand All @@ -27,7 +27,7 @@ The package is used in production on millions of documents and integrated into

<br/>

<img src="https://raw.githubusercontent.com/adbar/htmldate/master/docs/htmldate-demo.gif" alt="Demo as GIF image" width="80%"/>
<img src="https://raw.githubusercontent.com/adbar/htmldate/master/docs/htmldate-demo.gif" alt="Demo as GIF image" align="center" width="80%"/>

<br/>

Expand Down Expand Up @@ -116,17 +116,18 @@ license](https://www.apache.org/licenses/LICENSE-2.0.html).

Versions prior to v1.8.0 are under GPLv3+ license.

## Context
## Context and contributions

Initially launched to create text databases for research purposes
at the Berlin-Brandenburg Academy of Sciences (DWDS and ZDL units),
this project continues to be maintained but its future development
depends on community support.

**If you value this software or depend on it for your product, consider
sponsoring it and contributing to its codebase**. Your support will
help maintain and enhance this popular package, ensuring its growth,
robustness, and accessibility for developers and users around the world.
sponsoring it and contributing to its codebase**. Your support
will help maintain and enhance this package.
Visit the [Contributing page](https://github.com/adbar/htmldate/blob/master/CONTRIBUTING.md)
for more information.

Reach out via the software repository or the [contact page](https://adrien.barbaresi.eu/)
for inquiries, collaborations, or feedback.
Expand Down Expand Up @@ -161,15 +162,6 @@ for inquiries, collaborations, or feedback.
Proceedings of the [10th Web as Corpus Workshop
(WAC-X)](https://www.sigwac.org.uk/wiki/WAC-X), 2016.

## Contributing

[Contributions](https://github.com/adbar/htmldate/blob/master/CONTRIBUTING.md)
are welcome as well as issues filed on the [dedicated
page](https://github.com/adbar/htmldate/issues).

Special thanks to the
[contributors](https://github.com/adbar/htmldate/graphs/contributors)
who have submitted features and bugfixes!

## Acknowledgements

Expand Down
Binary file modified docs/htmldate-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/htmldate-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 10 additions & 21 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
htmldate: find the publication date of web pages
Htmldate: Find the Publication Date of Web Pages
================================================

.. image:: https://img.shields.io/pypi/v/htmldate.svg
Expand Down Expand Up @@ -28,7 +28,7 @@ htmldate: find the publication date of web pages
|
.. image:: htmldate-logo.png
:alt: Logo as PNG image
:alt: Htmldate Logo
:align: center
:width: 60%

Expand All @@ -52,7 +52,7 @@ In a nutshell
.. image:: htmldate-demo.gif
:alt: Demo as GIF image
:align: center
:width: 95%
:width: 80%
:target: https://htmldate.readthedocs.org/

|
Expand Down Expand Up @@ -253,18 +253,20 @@ This package is distributed under the `Apache 2.0 license <https://www.apache.or
Versions prior to v1.8.0 are under GPLv3+ license.


Context
-------
Context and contributions
-------------------------

Initially launched to create text databases for research purposes
at the Berlin-Brandenburg Academy of Sciences (DWDS and ZDL units),
this project continues to be maintained but its future development
depends on community support.

**If you value this software or depend on it for your product, consider
sponsoring it and contributing to its codebase**. Your support will
help maintain and enhance this popular package, ensuring its growth,
robustness, and accessibility for developers and users around the world.
sponsoring it and contributing to its codebase**. Your support
`on GitHub <https://github.com/sponsors/adbar>`_ or `ko-fi.com <https://ko-fi.com/adbarbaresi>`_
will help maintain and enhance this package.
Visit the `Contributing page <https://github.com/adbar/htmldate/blob/master/CONTRIBUTING.md>`_
for more information.

Reach out via the software repository or the `contact page
<https://adrien.barbaresi.eu/>`_ for inquiries, collaborations, or feedback.
Expand Down Expand Up @@ -298,19 +300,6 @@ Reach out via the software repository or the `contact page
- Barbaresi, A. "`Efficient construction of metadata-enhanced web corpora <https://hal.archives-ouvertes.fr/hal-01371704v2/document>`_", Proceedings of the `10th Web as Corpus Workshop (WAC-X) <https://www.sigwac.org.uk/wiki/WAC-X>`_, 2016.


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

`Contributions <https://github.com/adbar/htmldate/blob/master/CONTRIBUTING.md>`_ are welcome!

Feel free to file issues on the `dedicated page <https://github.com/adbar/htmldate/issues>`_. Thanks to the `contributors <https://github.com/adbar/htmldate/graphs/contributors>`_ who submitted features and bugfixes!

Kudos to the following software libraries:

- `lxml <http://lxml.de/>`_, `dateparser <https://github.com/scrapinghub/dateparser>`_
- A few patterns are derived from the `python-goose <https://github.com/grangier/python-goose>`_, `metascraper <https://github.com/ianstormtaylor/metascraper>`_, `newspaper <https://github.com/codelucas/newspaper>`_ and `articleDateExtractor <https://github.com/Webhose/article-date-extractor>`_ libraries. This module extends their coverage and robustness significantly.


Going further
-------------

Expand Down

0 comments on commit 97da567

Please sign in to comment.