[8.0][html_text] Excerpt generator. - #355
Merged
Merged
Conversation
This module adds a technical utility to allow the developer to get an excerpt from any HTML chunk. You can choose the maximum amount of words or characters if you want. See the README and inline docstrings for further details.
| Text from HTML field | ||
| ==================== | ||
|
|
||
| This module extracts text from any chunk of HTML, without HTML tags or |
There was a problem hiding this comment.
This module extracts text from any chunk of HTML, without HTML tags or
attributes. You can chose either:
- to truncate the result by amount of words or characters.
- to append an ellipsis (or any character(s)) at the end of the result.
Member
There was a problem hiding this comment.
I think it's better to put "This module provides some technical modules that allow to extract ..."
added 3 commits
February 12, 2016 09:58
Otherwise QWeb views would get broken badly.
Add a new `fail` parameter to allow exceptions to bubble up. Control `ParserError` exceptions too.
Member
Author
|
Could somebody please tag this as "needs review"? |
Member
|
Tagged as needs review |
2 tasks
Member
|
Little comment, but 👍 |
Member
|
code reviewed 👍 |
Member
Author
|
Fixed. |
yajo
pushed a commit
to Tecnativa/website
that referenced
this pull request
Jul 4, 2016
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
gfcapalbo
pushed a commit
to gfcapalbo/website
that referenced
this pull request
Jul 19, 2016
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
gfcapalbo
pushed a commit
to gfcapalbo/website
that referenced
this pull request
Sep 14, 2016
[8.0][website_blog_excerpt_img] New layout for blog. Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355 Rephrasing. Default value for `background_image` is usually something like `http://localhost/blog/our-news-1/post/blog-post-title-3?enable_editor=1`, not empty, so fixing here to avoid failure loading empty covers. Simpler logic and better layout in phones. Fix bug in generated images, add convenient classes. The output of some images was a generator instead of an URL. I add excerpt-txt and excerpt-img classes for make life easier for themes. Add basic styling. All images now have the same height, and excerpts are 80 words long, which mostly matches the image height. Update for upstream module rename. Initial commit [IMP] Improved changing images and added backend view [ADD] Readme [FIX] New lines at end of xml files [FIX] Removed unnecessary css class [UPD] addons table in README.md [ADD] setup.py OCA Transbot updated translations from Transifex first release of website_canonical_url add a proper description correct import according to review FIX the review remarks bug fixes + add languages clean the code fix README file [FIX] remove empty section from README.rst [IMP] add pagination support [NEW][8.0] website_snippet_country_dropdown: New base module for country dropdown flags. Add demo page. CSS to Sass. Include compiled version and CSS map. Fix typo. Refactor snippet code. - The `js_country_dropdown` class is added automatically by the template. - Add `extra_class` variable to highest div element. You can set it to `has-error` for example. - Add `default_value` variable to autopopulate the inputs. - `default_country` is smarter now. Translate to Spanish. [UPD] addons table in README.md [ADD] setup.py [8.0][IMP][website_snippet_country_dropdown] Choose user's country by default. With this patch, when the currently logged-in user has a country in its profile, it will be chosen by default for the flag. [UPD] addons table in README.md Update README.rst Update README.rst OCA Transbot updated translations from Transifex Adding module website twitter no external dependencies HB connection with token working version with application token request adding formatting adding parametric support images and frontend Better data model Parametric stuff Major fix views and js fixes FIX Naming, now js is recognized Human readable name fix js error Refactoring Add theming Theming in snippet Menu Documentation Cleanup remove required Add dependency to website_parameterized_snippet flake8 better placement of menues in knowledge menu fix fix menu permissions added explicit security for therp website admin access and user access remove group, security managed on a model level access to all Feed lenght managment remove therp branding improve UL look and correct color of h5 flake8
gfcapalbo
pushed a commit
to gfcapalbo/website
that referenced
this pull request
Sep 15, 2016
[8.0][website_blog_excerpt_img] New layout for blog. Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355 Rephrasing. Default value for `background_image` is usually something like `http://localhost/blog/our-news-1/post/blog-post-title-3?enable_editor=1`, not empty, so fixing here to avoid failure loading empty covers. Simpler logic and better layout in phones. Fix bug in generated images, add convenient classes. The output of some images was a generator instead of an URL. I add excerpt-txt and excerpt-img classes for make life easier for themes. Add basic styling. All images now have the same height, and excerpts are 80 words long, which mostly matches the image height. Update for upstream module rename. Initial commit [IMP] Improved changing images and added backend view [ADD] Readme [FIX] New lines at end of xml files [FIX] Removed unnecessary css class [UPD] addons table in README.md [ADD] setup.py OCA Transbot updated translations from Transifex first release of website_canonical_url add a proper description correct import according to review FIX the review remarks bug fixes + add languages clean the code fix README file [FIX] remove empty section from README.rst [IMP] add pagination support [NEW][8.0] website_snippet_country_dropdown: New base module for country dropdown flags. Add demo page. CSS to Sass. Include compiled version and CSS map. Fix typo. Refactor snippet code. - The `js_country_dropdown` class is added automatically by the template. - Add `extra_class` variable to highest div element. You can set it to `has-error` for example. - Add `default_value` variable to autopopulate the inputs. - `default_country` is smarter now. Translate to Spanish. [UPD] addons table in README.md [ADD] setup.py [8.0][IMP][website_snippet_country_dropdown] Choose user's country by default. With this patch, when the currently logged-in user has a country in its profile, it will be chosen by default for the flag. [UPD] addons table in README.md Update README.rst Update README.rst OCA Transbot updated translations from Transifex Adding module website twitter no external dependencies HB connection with token working version with application token request adding formatting adding parametric support images and frontend Better data model Parametric stuff Major fix views and js fixes FIX Naming, now js is recognized Human readable name fix js error Refactoring Add theming Theming in snippet Menu Documentation Cleanup remove required Add dependency to website_parameterized_snippet flake8 better placement of menues in knowledge menu fix fix menu permissions added explicit security for therp website admin access and user access remove group, security managed on a model level access to all Feed lenght managment remove therp branding improve UL look and correct color of h5 flake8
yajo
pushed a commit
to Tecnativa/website
that referenced
this pull request
Dec 19, 2016
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
yajo
pushed a commit
to Tecnativa/website
that referenced
this pull request
Dec 22, 2016
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
yajo
pushed a commit
to Tecnativa/website
that referenced
this pull request
Dec 22, 2016
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
yajo
pushed a commit
to Tecnativa/website
that referenced
this pull request
Dec 27, 2016
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
yajo
pushed a commit
to Tecnativa/website
that referenced
this pull request
Dec 28, 2016
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
yajo
pushed a commit
to Tecnativa/website
that referenced
this pull request
Jan 4, 2017
Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355
rafaelbn
pushed a commit
to OCA/website
that referenced
this pull request
Oct 12, 2017
* [8.0][website_blog_excerpt_img] New layout for blog. Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355 * Default value for `background_image` is usually something like `http://localhost/blog/our-news-1/post/blog-post-title-3?enable_editor=1`, not empty, so fixing here to avoid failure loading empty covers. * Simpler logic and better layout in phones. Fix bug in generated images, add convenient classes. The output of some images was a generator instead of an URL. I add excerpt-txt and excerpt-img classes for make life easier for themes. Add basic styling. All images now have the same height, and excerpts are 80 words long, which mostly matches the image height. Update for upstream module rename. * OCA Transbot updated translations from Transifex * [9.0][website_blog_excerpt_img] Migrate, LGPL. Relicensed, migrated, new tests.
cristinamartinrod
pushed a commit
to Tecnativa/website
that referenced
this pull request
Feb 15, 2019
* [8.0][website_blog_excerpt_img] New layout for blog. Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355 * Default value for `background_image` is usually something like `http://localhost/blog/our-news-1/post/blog-post-title-3?enable_editor=1`, not empty, so fixing here to avoid failure loading empty covers. * Simpler logic and better layout in phones. Fix bug in generated images, add convenient classes. The output of some images was a generator instead of an URL. I add excerpt-txt and excerpt-img classes for make life easier for themes. Add basic styling. All images now have the same height, and excerpts are 80 words long, which mostly matches the image height. Update for upstream module rename. * OCA Transbot updated translations from Transifex * [9.0][website_blog_excerpt_img] Migrate, LGPL. Relicensed, migrated, new tests.
yajo
added a commit
to Tecnativa/website
that referenced
this pull request
Apr 23, 2019
* [8.0][website_blog_excerpt_img] New layout for blog. Add an excerpt and an image taken from the post to the blog summary page. To make this work, these open PR need to be merged: - OCA/server-tools#354 - OCA/server-tools#355 * Default value for `background_image` is usually something like `http://localhost/blog/our-news-1/post/blog-post-title-3?enable_editor=1`, not empty, so fixing here to avoid failure loading empty covers. * Simpler logic and better layout in phones. Fix bug in generated images, add convenient classes. The output of some images was a generator instead of an URL. I add excerpt-txt and excerpt-img classes for make life easier for themes. Add basic styling. All images now have the same height, and excerpts are 80 words long, which mostly matches the image height. Update for upstream module rename. * OCA Transbot updated translations from Transifex * [9.0][website_blog_excerpt_img] Migrate, LGPL. Relicensed, migrated, new tests.
SiesslPhillip
pushed a commit
to grueneerde/OCA-server-tools
that referenced
this pull request
Nov 20, 2024
Syncing from upstream OCA/server-tools (11.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This module adds a technical utility to allow the developer to get an excerpt from any HTML chunk.
You can choose the maximum amount of words or characters if you want.
See the README and inline docstrings for further details. Example usage found in OCA/website#163.