Skip to content

Commit b57a3b6

Browse files
[IMP] html_image_url_extractor: pre-commit auto fixes
1 parent b7616d9 commit b57a3b6

File tree

8 files changed

+78
-81
lines changed

8 files changed

+78
-81
lines changed
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.. image:: https://odoo-community.org/readme-banner-image
2-
:target: https://odoo-community.org/get-involved?utm_source=readme
3-
:alt: Odoo Community Association
4-
51
==========================
62
Image URLs from HTML field
73
==========================
@@ -17,27 +13,28 @@ Image URLs from HTML field
1713
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1814
:target: https://odoo-community.org/page/development-status
1915
:alt: Beta
20-
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
2117
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2218
:alt: License: AGPL-3
2319
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
24-
:target: https://github.com/OCA/server-tools/tree/16.0/html_image_url_extractor
20+
:target: https://github.com/OCA/server-tools/tree/18.0/html_image_url_extractor
2521
:alt: OCA/server-tools
2622
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-html_image_url_extractor
23+
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-html_image_url_extractor
2824
:alt: Translate me on Weblate
2925
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30-
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
3127
:alt: Try me on Runboat
3228

3329
|badge1| |badge2| |badge3| |badge4| |badge5|
3430

35-
This module includes a method that extracts image URLs from any chunk of HTML,
36-
in appearing order.
31+
This module includes a method that extracts image URLs from any chunk of
32+
HTML, in appearing order.
3733

38-
It is useful for modules such as `website_blog_excerpt_img
39-
<https://github.com/OCA/website/tree/14.0/website_blog_excerpt_img>`_: blog list shows the first
40-
image included in the post if haven't a defined cover image.
34+
It is useful for modules such as
35+
`website_blog_excerpt_img <https://github.com/OCA/website/tree/14.0/website_blog_excerpt_img>`__:
36+
blog list shows the first image included in the post if haven't a
37+
defined cover image.
4138

4239
**Table of contents**
4340

@@ -52,60 +49,63 @@ This module just adds a technical utility, but nothing for the end user.
5249
If you are a developer and need this utility for your module, see these
5350
examples and read the docs inside the code.
5451

55-
Python example::
52+
Python example:
53+
54+
::
5655

57-
@api.multi
58-
def some_method(self):
59-
# Get images from an HTML field
60-
imgs = self.env["ir.fields.converter"].imgs_from_html(self.html_field)
61-
for url in imgs:
62-
# Do stuff with those URLs
63-
pass
56+
@api.multi
57+
def some_method(self):
58+
# Get images from an HTML field
59+
imgs = self.env["ir.fields.converter"].imgs_from_html(self.html_field)
60+
for url in imgs:
61+
# Do stuff with those URLs
62+
pass
6463

65-
QWeb example::
64+
QWeb example:
6665

67-
<!-- Extract first image from a blog post -->
68-
<t t-foreach="env['ir.fields.converter']
69-
.imgs_from_html(blog_post.content, 1)"
70-
t-as="url">
71-
<img t-att-href="url"/>
72-
</t>
66+
::
67+
68+
<!-- Extract first image from a blog post -->
69+
<t t-foreach="env['ir.fields.converter']
70+
.imgs_from_html(blog_post.content, 1)"
71+
t-as="url">
72+
<img t-att-href="url"/>
73+
</t>
7374

7475
Bug Tracker
7576
===========
7677

7778
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
7879
In case of trouble, please check there if your issue has already been reported.
7980
If you spotted it first, help us to smash it by providing a detailed and welcomed
80-
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20html_image_url_extractor%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
81+
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20html_image_url_extractor%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
8182

8283
Do not contact contributors directly about support or help with technical issues.
8384

8485
Credits
8586
=======
8687

8788
Authors
88-
~~~~~~~
89+
-------
8990

9091
* Tecnativa
9192
* Onestein
9293

9394
Contributors
94-
~~~~~~~~~~~~
95-
96-
* Dennis Sluijk <d.sluijk@onestein.nl>
95+
------------
9796

98-
* `Tecnativa <https://www.tecnativa.com>`_:
97+
- Dennis Sluijk <d.sluijk@onestein.nl>
98+
- `Tecnativa <https://www.tecnativa.com>`__:
9999

100-
* Jairo Llopis
101-
* Vicent Cubells
102-
* Cristina Martin R
103-
* Víctor Martínez
100+
- Jairo Llopis
101+
- Vicent Cubells
102+
- Cristina Martin R
103+
- Víctor Martínez
104104

105-
* Helly kapatel <helly.kapatel@initos.com>
105+
- Helly kapatel <helly.kapatel@initos.com>
106106

107107
Maintainers
108-
~~~~~~~~~~~
108+
-----------
109109

110110
This module is maintained by the OCA.
111111

@@ -117,6 +117,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
117117
mission is to support the collaborative development of Odoo features and
118118
promote its widespread use.
119119

120-
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/16.0/html_image_url_extractor>`_ project on GitHub.
120+
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/html_image_url_extractor>`_ project on GitHub.
121121

122122
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
- Dennis Sluijk \<<d.sluijk@onestein.nl>\>
2+
- [Tecnativa](https://www.tecnativa.com):
3+
- Jairo Llopis
4+
- Vicent Cubells
5+
- Cristina Martin R
6+
- Víctor Martínez
7+
- Helly kapatel \<<helly.kapatel@initos.com>\>

html_image_url_extractor/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This module includes a method that extracts image URLs from any chunk of
2+
HTML, in appearing order.
3+
4+
It is useful for modules such as
5+
[website_blog_excerpt_img](https://github.com/OCA/website/tree/14.0/website_blog_excerpt_img):
6+
blog list shows the first image included in the post if haven't a
7+
defined cover image.

html_image_url_extractor/readme/DESCRIPTION.rst

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This module just adds a technical utility, but nothing for the end user.
33
If you are a developer and need this utility for your module, see these
44
examples and read the docs inside the code.
55

6-
Python example::
6+
Python example:
77

88
@api.multi
99
def some_method(self):
@@ -13,7 +13,7 @@ Python example::
1313
# Do stuff with those URLs
1414
pass
1515

16-
QWeb example::
16+
QWeb example:
1717

1818
<!-- Extract first image from a blog post -->
1919
<t t-foreach="env['ir.fields.converter']

html_image_url_extractor/static/description/index.html

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>README.rst</title>
6+
<title>Image URLs from HTML field</title>
77
<style type="text/css">
88

99
/*
@@ -360,25 +360,22 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document">
363+
<div class="document" id="image-urls-from-html-field">
364+
<h1 class="title">Image URLs from HTML field</h1>
364365

365-
366-
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367-
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368-
</a>
369-
<div class="section" id="image-urls-from-html-field">
370-
<h1>Image URLs from HTML field</h1>
371366
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372367
!! This file is generated by oca-gen-addon-readme !!
373368
!! changes will be overwritten. !!
374369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375370
!! source digest: sha256:4d0bc4c7368afafaf3fbf96096c81a159def1874506d9dafd0075bc2ea029858
376371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/16.0/html_image_url_extractor"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-html_image_url_extractor"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378-
<p>This module includes a method that extracts image URLs from any chunk of HTML,
379-
in appearing order.</p>
380-
<p>It is useful for modules such as <a class="reference external" href="https://github.com/OCA/website/tree/14.0/website_blog_excerpt_img">website_blog_excerpt_img</a>: blog list shows the first
381-
image included in the post if haven’t a defined cover image.</p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/18.0/html_image_url_extractor"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-html_image_url_extractor"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373+
<p>This module includes a method that extracts image URLs from any chunk of
374+
HTML, in appearing order.</p>
375+
<p>It is useful for modules such as
376+
<a class="reference external" href="https://github.com/OCA/website/tree/14.0/website_blog_excerpt_img">website_blog_excerpt_img</a>:
377+
blog list shows the first image included in the post if haven’t a
378+
defined cover image.</p>
382379
<p><strong>Table of contents</strong></p>
383380
<div class="contents local topic" id="contents">
384381
<ul class="simple">
@@ -393,7 +390,7 @@ <h1>Image URLs from HTML field</h1>
393390
</ul>
394391
</div>
395392
<div class="section" id="usage">
396-
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
393+
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
397394
<p>This module just adds a technical utility, but nothing for the end user.</p>
398395
<p>If you are a developer and need this utility for your module, see these
399396
examples and read the docs inside the code.</p>
@@ -418,24 +415,24 @@ <h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
418415
</pre>
419416
</div>
420417
<div class="section" id="bug-tracker">
421-
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
418+
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
422419
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
423420
In case of trouble, please check there if your issue has already been reported.
424421
If you spotted it first, help us to smash it by providing a detailed and welcomed
425-
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20html_image_url_extractor%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
422+
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20html_image_url_extractor%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
426423
<p>Do not contact contributors directly about support or help with technical issues.</p>
427424
</div>
428425
<div class="section" id="credits">
429-
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
426+
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
430427
<div class="section" id="authors">
431-
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
428+
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
432429
<ul class="simple">
433430
<li>Tecnativa</li>
434431
<li>Onestein</li>
435432
</ul>
436433
</div>
437434
<div class="section" id="contributors">
438-
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
435+
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
439436
<ul class="simple">
440437
<li>Dennis Sluijk &lt;<a class="reference external" href="mailto:d.sluijk&#64;onestein.nl">d.sluijk&#64;onestein.nl</a>&gt;</li>
441438
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
@@ -449,19 +446,18 @@ <h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
449446
</ul>
450447
</div>
451448
<div class="section" id="maintainers">
452-
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
449+
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
453450
<p>This module is maintained by the OCA.</p>
454451
<a class="reference external image-reference" href="https://odoo-community.org">
455452
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
456453
</a>
457454
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
458455
mission is to support the collaborative development of Odoo features and
459456
promote its widespread use.</p>
460-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/16.0/html_image_url_extractor">OCA/server-tools</a> project on GitHub.</p>
457+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/18.0/html_image_url_extractor">OCA/server-tools</a> project on GitHub.</p>
461458
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
462459
</div>
463460
</div>
464461
</div>
465-
</div>
466462
</body>
467463
</html>

0 commit comments

Comments
 (0)