==========================
Image URLs from HTML field
==========================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/15.0/html_image_url_extractor
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-html_image_url_extractor
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/149/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
This module includes a method that extracts image URLs from any chunk of HTML,
in appearing order.
It is useful for modules such as `website_blog_excerpt_img
<https://github.com/OCA/website/tree/14.0/website_blog_excerpt_img>`_: blog list shows the first
image included in the post if haven't a defined cover image.
**Table of contents**
.. contents::
:local:
Usage
=====
This module just adds a technical utility, but nothing for the end user.
If you are a developer and need this utility for your module, see these
examples and read the docs inside the code.
Python example::
@api.multi
def some_method(self):
# Get images from an HTML field
imgs = self.env["ir.fields.converter"].imgs_from_html(self.html_field)
for url in imgs:
# Do stuff with those URLs
pass
QWeb example::
<!-- Extract first image from a blog post -->
<t t-foreach="env['ir.fields.converter']
.imgs_from_html(blog_post.content, 1)"
t-as="url">
<img t-att-href="url"/>
</t>
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20html_image_url_extractor%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Tecnativa
* Onestein
Contributors
~~~~~~~~~~~~
* Dennis Sluijk <d.sluijk@onestein.nl>
* `Tecnativa <https://www.tecnativa.com>`_:
* Jairo Llopis
* Vicent Cubells
* Cristina Martin R
* Víctor Martínez
* Helly kapatel <helly.kapatel@initos.com>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/15.0/html_image_url_extractor>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Raw data
{
"_id": null,
"home_page": "https://github.com/OCA/server-tools",
"name": "odoo-addon-html-image-url-extractor",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Tecnativa, Onestein, Odoo Community Association (OCA)",
"author_email": "support@odoo-community.org",
"download_url": "",
"platform": null,
"description": "==========================\nImage URLs from HTML field\n==========================\n\n.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n !! This file is generated by oca-gen-addon-readme !!\n !! changes will be overwritten. !!\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png\n :target: https://odoo-community.org/page/development-status\n :alt: Beta\n.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png\n :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html\n :alt: License: AGPL-3\n.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github\n :target: https://github.com/OCA/server-tools/tree/15.0/html_image_url_extractor\n :alt: OCA/server-tools\n.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png\n :target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-html_image_url_extractor\n :alt: Translate me on Weblate\n.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png\n :target: https://runbot.odoo-community.org/runbot/149/15.0\n :alt: Try me on Runbot\n\n|badge1| |badge2| |badge3| |badge4| |badge5| \n\nThis module includes a method that extracts image URLs from any chunk of HTML,\nin appearing order.\n\nIt is useful for modules such as `website_blog_excerpt_img\n<https://github.com/OCA/website/tree/14.0/website_blog_excerpt_img>`_: blog list shows the first\nimage included in the post if haven't a defined cover image.\n\n**Table of contents**\n\n.. contents::\n :local:\n\nUsage\n=====\n\nThis module just adds a technical utility, but nothing for the end user.\n\nIf you are a developer and need this utility for your module, see these\nexamples and read the docs inside the code.\n\nPython example::\n\n @api.multi\n def some_method(self):\n # Get images from an HTML field\n imgs = self.env[\"ir.fields.converter\"].imgs_from_html(self.html_field)\n for url in imgs:\n # Do stuff with those URLs\n pass\n\nQWeb example::\n\n <!-- Extract first image from a blog post -->\n <t t-foreach=\"env['ir.fields.converter']\n .imgs_from_html(blog_post.content, 1)\"\n t-as=\"url\">\n <img t-att-href=\"url\"/>\n </t>\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.\nIn case of trouble, please check there if your issue has already been reported.\nIf you spotted it first, help us smashing it by providing a detailed and welcomed\n`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20html_image_url_extractor%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.\n\nDo not contact contributors directly about support or help with technical issues.\n\nCredits\n=======\n\nAuthors\n~~~~~~~\n\n* Tecnativa\n* Onestein\n\nContributors\n~~~~~~~~~~~~\n\n* Dennis Sluijk <d.sluijk@onestein.nl>\n\n* `Tecnativa <https://www.tecnativa.com>`_:\n\n * Jairo Llopis\n * Vicent Cubells\n * Cristina Martin R\n * V\u00edctor Mart\u00ednez\n\n* Helly kapatel <helly.kapatel@initos.com>\n\nMaintainers\n~~~~~~~~~~~\n\nThis module is maintained by the OCA.\n\n.. image:: https://odoo-community.org/logo.png\n :alt: Odoo Community Association\n :target: https://odoo-community.org\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\nThis module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/15.0/html_image_url_extractor>`_ project on GitHub.\n\nYou are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.\n\n\n",
"bugtrack_url": null,
"license": "AGPL-3",
"summary": "Extract images found in any HTML field",
"version": "15.0.1.0.1",
"project_urls": {
"Homepage": "https://github.com/OCA/server-tools"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e836f2af4a5b9e6b0910e8c30a7bd45e686a0a413bc7eabef211b63b7000b540",
"md5": "ba9ee0b9d8230292dd7400bec8e38ee7",
"sha256": "ee0ab0ae80bffffeb4eae34131497dfe07c2f2048941668ef7faf26fae863536"
},
"downloads": -1,
"filename": "odoo_addon_html_image_url_extractor-15.0.1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ba9ee0b9d8230292dd7400bec8e38ee7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 70045,
"upload_time": "2023-06-07T01:15:09",
"upload_time_iso_8601": "2023-06-07T01:15:09.308495Z",
"url": "https://files.pythonhosted.org/packages/e8/36/f2af4a5b9e6b0910e8c30a7bd45e686a0a413bc7eabef211b63b7000b540/odoo_addon_html_image_url_extractor-15.0.1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-07 01:15:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OCA",
"github_project": "server-tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "astor",
"specs": []
},
{
"name": "dataclasses",
"specs": []
},
{
"name": "mako",
"specs": []
},
{
"name": "odoorpc",
"specs": []
},
{
"name": "openpyxl",
"specs": []
},
{
"name": "openupgradelib",
"specs": []
},
{
"name": "pygount",
"specs": []
},
{
"name": "sentry_sdk",
"specs": [
[
">=",
"1.17.0"
]
]
}
],
"lcname": "odoo-addon-html-image-url-extractor"
}