Commit Graph

41 Commits

Author SHA1 Message Date
Fabio Manganiello c3337ccc6c
[#311] Docs deps autogen sphinx plugin.
continuous-integration/drone/push Build is passing Details
Added an `add_dependencies` plugin to the Sphinx build process that
parses the manifest files of the scanned backends and plugins and
automatically generates the documentation for the required dependencies
and triggered events.

This means that those dependencies are no longer required to be listed
in the docstring of the class itself.

Also in this commit:

- Black/LINT for some integrations that hadn't been touched in a long
  time.

- Deleted some leftovers from previous refactors (deprecated
  `backend.mqtt`, `backend.zwave.mqtt`, `backend.http.request.rss`).

- Deleted deprecated `inotify` backend - replaced by `file.monitor` (see
  #289).
2023-09-24 17:00:08 +02:00
Fabio Manganiello d33d760361
Better way to import `declarative_base` from SQLAlchemy.
Import `declarative_base` in a way that is compatible with any
SQLAlchemy version between 1.3 and 2.x.
2023-04-24 23:23:55 +02:00
Fabio Manganiello 8a70f1d38e
Replaced deprecated sqlalchemy.ext.declarative with sqlalchemy.orm 2022-04-05 22:47:44 +02:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00
Fabio Manganiello 2a78f81a7b Major LINT fixes 2021-04-05 00:58:44 +02:00
Fabio Manganiello ac02becba8 Switched RSS HTML digests style to inline CSS for better client cross-compatibility and added docstring to RssUpdates 2020-09-05 16:54:08 +02:00
Fabio Manganiello 13642cc42e Possibility to customize the CSS in the generated RSS digests 2020-09-05 01:48:28 +02:00
Fabio Manganiello d6f653d834 Using named arguments for formatting the parsed content of a feed 2020-09-05 01:43:33 +02:00
Fabio Manganiello dc254d6474 Also include the link in an RSS feed digest 2020-09-05 01:39:16 +02:00
Fabio Manganiello e9d4ed3911 Added more source fields to the RSS NewFeedEvent 2020-09-05 00:50:04 +02:00
Fabio Manganiello 4ece49bfe7 Added missing string format parameter 2020-03-24 09:11:07 +01:00
Fabio Manganiello d38746d278 Moved imports for extra dependencies inside the methods where they are actually used 2019-12-01 23:35:05 +01:00
Fabio Manganiello 9914d4ef0b Handling CSS and fonts properly in RSSUpdates digests 2019-10-13 12:43:18 +02:00
Fabio Manganiello 1f2f293778 Redirect mercury-parser.js stderr to stdout. Moreover, if an error occurs while parsing a link from an RSS feed we should report the link that raised the error, not the URL of the parent feed 2019-07-25 16:34:00 +00:00
Fabio Manganiello 44e27e6c62 Log the link we are trying to parse (useful for debugging parsing issues) 2019-07-25 18:23:28 +02:00
Fabio Manganiello 6aaa2fa1ea extract_content is supposed to be a boolean 2019-07-25 01:09:16 +02:00
Fabio Manganiello 5293f5b203 #73: Implemented wrapper plugin for the new Node.js mercury-parser.
As the Mercury reader web API is deprecated, and the only available
implementation is the open source mercury-parser, node, npm and
@postlight/mercury-parser have to be added as dependencies for the
http.webpage plugin (or at least for the `simplify` action).
2019-07-24 19:02:53 +02:00
Fabio Manganiello 57712b3693 Be more robust in case of Mercury API failures while parsing RSS feeds. TODO: the Mercury API has now been retired and replaced by a library, that however is only available for Node.js. Figure out how to wrap the new library in Python 3 2019-07-19 15:00:06 +00:00
Fabio Manganiello cd9bdbb1c8 Fixed undefined reference 2019-07-17 14:57:50 +02:00
Fabio Manganiello a60e89806f Fixed undefined reference 2019-07-16 22:43:27 +02:00
Fabio Manganiello cc61032bec Fixes for readthedocs build 2019-07-16 22:38:42 +02:00
Fabio Manganiello 4c2302a534 Removed title from logging trace in RSS backend 2018-10-23 00:23:47 +02:00
Fabio Manganiello ae7cd120d2 Wrapped the RSS parsing loop in a try-except block to prevent the backend from continuously crashing if there are encoding issues on the RSS titles 2018-10-21 14:47:52 +02:00
Fabio Manganiello 7490529ca2 Reverted bugged title decode 2018-10-20 14:49:21 +02:00
Fabio Manganiello 2fd7ba003b Decoding title from RSS feeds 2018-10-19 23:48:04 +02:00
Fabio Manganiello 09d7d98ae3 Retry logic for Mercury API 2018-08-19 21:52:01 +00:00
Fabio Manganiello 2bb6ed6867 Declared logger attribute in HttpRequest as it won't be available to the subclasses otherwise 2018-06-08 16:54:15 +02:00
Fabio Manganiello f0bb2a20b0 Typo 2018-06-08 16:41:31 +02:00
Fabio Manganiello 0756da3861 Fixed logger references 2018-06-08 16:37:59 +02:00
Fabio Manganiello 4da74b1096 Refactored logging submodule 2018-06-06 20:09:23 +02:00
Fabio Manganiello 18efdb1c70 Make sure the summary is always there 2018-05-21 09:47:50 +02:00
Fabio Manganiello 0accbfa66e Logging traces on RSS parse 2018-05-21 09:27:13 +02:00
Fabio Manganiello bd761d420e RSS digests are now optional 2018-05-07 19:44:34 +02:00
Fabio Manganiello e4269a8d5d Skip RSS items if published_parsed is not defined 2018-05-07 18:33:44 +02:00
Fabio Manganiello 88c5bc16f5 - Added rss-news dashboard widget
- Added summary field to the RSS entry
- Added support for custom dashboard backgrounds
- UX fixes + font change
2018-05-05 23:59:43 +02:00
Fabio Manganiello dca41ea86e A more robust logic for spotting new RSS items 2018-05-01 10:13:41 +02:00
Fabio Manganiello 68c52fe102 - Importing Flask.request as http_request to prevent name clashes with
SQLAlchemy's request module

- All SQLAlchemy engine and connection setup done within get_new_items
to prevent different threads from creating and using the db instance

- Added check_same_thread to sqlite connection line to prevent
different-thread exceptions when the Flask main thread does some cleanup
2018-04-28 19:11:14 +02:00
Fabio Manganiello 55eb689121 Support for RSS digest generation either in HTML or PDF format 2018-01-28 02:01:54 +01:00
Fabio Manganiello 91dd975413 mkdir_p replaced with os.makedirs 2018-01-27 13:54:15 +01:00
Fabio Manganiello 22b3f8e9b9 Removed redundant variable 2018-01-27 04:46:28 +01:00
Fabio Manganiello 14afbcad3a Support for RSS feeds update events, solves #48 2018-01-27 04:32:44 +01:00