Diff
Differences From Artifact [50c58e1601]:
- File channels/__init__.py — part of check-in [bd1a9cba05] at 2015-05-10 19:20:49 on branch trunk — Move `favicon` module into extension/feature plugin. Simplify row["favicon"] cache filename pregeneration; separate from favicon module (but basically duplicated code there). Refactor most internal favicon+banner processing, rename methods for clarity. Plugin registers itself as .hooks["play"] callback. Uses main.thread() now instead of custom variant. Create icon cache dir on initialiation rather. Use combined row_to_fn() for cache filename generation instead of domain(), url(), file(), etc. Previous banner downloads are ignored, because the filename normalization is more in line with domain favicons now. Only update pixstore on successful downloads. Pre-check the content type per binary regex now, before saving image files. Combine resizing into store_image() function as well. Even PNG files will be piped through PIL (for sanitization). Completely got rid of urllib usage. Homepage/HTML extraction got rewritten, simpler, still inexact; but works now for most webpages. Favicon homepage downloading checks both returned MIME type and actual file content prior saving. Shorten timeouts to 2-3 seconds for Google and custom favicon retrieval. (user: mario, size: 30042) [annotate] [blame] [check-ins using]
To Artifact [4f19df3b1a]:
- File channels/__init__.py — part of check-in [494088b7d1] at 2015-05-11 12:21:54 on branch trunk — Change pluginconf lookups. Use only pkg basenames for configuration, but override channels.__path__ directly in module. Thus pluginconf can convert `plugin_base` into path list for module_list() scanning. (user: mario, size: 30036) [annotate] [blame] [check-ins using]
42 43 44 45 46 47 48 | # Only export plugin classes __all__ = [ "GenericChannel", "ChannelPlugin", "use_rx", "entity_decode", "strip_tags", "nl", "unhtml", "to_int" ] | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | # Only export plugin classes __all__ = [ "GenericChannel", "ChannelPlugin", "use_rx", "entity_decode", "strip_tags", "nl", "unhtml", "to_int" ] __path__.insert(0, conf.dir + "/plugins") # generic channel module --------------------------------------- class GenericChannel(object): # control attributes |