Commit graph

149 commits

Author SHA1 Message Date
Pierre Mazière
70c490d6ef [BridgeAbstract] handle compressed data
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-17 19:37:41 +02:00
logmanoriginal
1819943451 [FeedExpander] Write debug message for custom build function 2016-09-17 18:19:26 +02:00
logmanoriginal
ffc9418620 [FeedExpander] Fix typos 2016-09-17 18:16:25 +02:00
logmanoriginal
a333226733 Merge branch 'autodetectFeedExpander' of https://framagit.org/peetah/rss-bridge 2016-09-17 18:09:05 +02:00
Pierre Mazière
15c422c648 [FeedExpander] implement default parseItem() method
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-12 10:39:34 +02:00
Pierre Mazière
655b3d578d [FeedExpander] simplify feed type detection and store it
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-12 10:38:50 +02:00
logmanoriginal
6943abd9c2 [Bridge] Fix whitelist check 2016-09-11 14:02:02 +02:00
logmanoriginal
ab16af631e [core] Apply some fixes 2016-09-10 21:01:02 +02:00
logmanoriginal
62eec43980 [core] Apply common indentation
All files are now using tabs for indentation
2016-09-10 20:41:11 +02:00
logmanoriginal
9be03f199b [core] Remove HttpCachingBridgeAbstract
BridgeAbstract implements all functions to cover the implementation
2016-09-10 19:13:01 +02:00
logmanoriginal
2eec89ab27 [bridges] Change all bridges to use BridgeAbstract with getSimpleHTMLDOMCached 2016-09-10 19:11:09 +02:00
logmanoriginal
9f2dd48684 [BridgeAbstract] Add getSimpleHTMLDOMCached
This function is a copy of the get_cached function from
HttpCachingBridgeAbstract, adding all parameters of
getSimpleHTMLDOM in order to replace the need of
HttpCachingBridgeAbstract entirely
2016-09-10 19:04:01 +02:00
logmanoriginal
33584b8423 [HttpCachingBridgeAbstract] General cleanup
- Remove buildCacheFilePath -> Single use, so no real purpose
- Simplify debug messages
- Cleanup documentation
2016-09-10 00:34:25 +02:00
logmanoriginal
3a92a1e04b [HttpCachingBridgeAbstract] Remove get_cached_time and remove_from_cache
Bridges no longer require to check cache file durations
manually as get_cached now supports the duration parameter
2016-09-10 00:09:10 +02:00
logmanoriginal
1a2a48e129 [HttpCachingBridgeAbstract] Use sha1 cache file names
Previously folder hierarchies were created based on the input URL
which could result in very deep folder structures. Using SHA1 file
names also allows to check for old files more effectively (via
fileatime)
2016-09-10 00:00:10 +02:00
logmanoriginal
ce00c6f869 [HttpCachingBridgeAbstract] Don't pass cache directory as parameter 2016-09-09 22:23:40 +02:00
logmanoriginal
84956c4daf [HttpCachingBridgeAbstract] Add duration parameter to 'get_cached'
This allows to specify the cache duration for a specific
url without the need to delete the cache file first.
Instead the cache file is automatically deleted if the
duration elapsed.
2016-09-09 22:23:15 +02:00
logmanoriginal
f1fb527607 [FeedExpander] Add optional parameter to specify max items
Allows caller of collectExpandableDatas to request a limited
amount of items
2016-09-05 20:17:00 +02:00
logmanoriginal
298dc49c67 [lib] Split Bridge/Cache/Format into one file per class
The files have grown to a size where it is necessary to search
for a class in a file. This commit splits the content into one
file per class. RSS-Bridge will require implementations and
the implementations will require (once) the interfaces.
2016-09-05 18:05:19 +02:00
logmanoriginal
acde8a2cea [Bridge] Support 'dc:date' for RSS 2.0 parser 2016-09-04 13:46:57 +02:00
logmanoriginal
546c0036df [Bridge] Rename class RssExpander to FeedExpander
This class no is not RSS only anymore
2016-09-04 13:28:12 +02:00
logmanoriginal
39788485ea [Bridge] Rename 'parseRSSItem' to 'parseItem' 2016-09-04 13:26:17 +02:00
logmanoriginal
149b64879e [Bridge] Support 'dc' namespace for RSS 1.0 2016-09-04 13:05:17 +02:00
logmanoriginal
8fa0b9660f [Bridge] Fix ATOM feed uri detection 2016-09-04 12:40:42 +02:00
logmanoriginal
bf20a2f687 [Bridge] Remove uneccesary debug message 2016-09-04 12:34:56 +02:00
logmanoriginal
51a3a75aac [Bridge] Add RSS 1.0 and 2.0 parser 2016-09-04 12:32:56 +02:00
logmanoriginal
f781965825 [Bridge] Add RSS 0.91 parser 2016-09-04 11:45:14 +02:00
logmanoriginal
0e5775012f [Bridge] Rename parameter 'name' to 'url' 2016-09-04 11:01:13 +02:00
logmanoriginal
2aa9b8f026 [Bridge] Extend RssExpander to load ATOM formats 2016-09-03 22:17:36 +02:00
logmanoriginal
a8883523f4 [Bridge] Pass 'queriedContext' as parameter to 'setInputs'
This makes clear that 'setInputs' depends on the 'queriedContext'
2016-09-02 20:05:18 +02:00
logmanoriginal
d1ff23c7ba [Bridge] Fix incorrect switch variable 2016-09-02 19:53:59 +02:00
logmanoriginal
04bddd0758 [Bridge] Apply default value while setting inputs 2016-09-02 19:52:47 +02:00
logmanoriginal
5f3d60276a [Bridge] Use original input values to guess context 2016-09-02 19:46:58 +02:00
logmanoriginal
4bc4e03d7b [Bridge] Change order of variable declaration 2016-09-02 19:03:51 +02:00
logmanoriginal
41d3aa0695 [Bridge] Change scope of member variable 'inputs' 2016-09-02 19:01:57 +02:00
logmanoriginal
48db1693a1 [Bridge] Use member variable instead of local variable 2016-09-02 18:59:55 +02:00
logmanoriginal
c2e411ba82 [Bridge] Add function to set inputs 2016-09-02 18:38:07 +02:00
logmanoriginal
37f269cf53 [Bridge] Remove unused variable 2016-09-02 18:12:37 +02:00
logmanoriginal
d520e82d9e [Bridge] Fix function names
is* implies Boolean return values, which is not true for
these functions
2016-09-02 18:11:02 +02:00
logmanoriginal
5ad1fa8242 Merge branch 'constantine' of https://framagit.org/peetah/rss-bridge 2016-09-02 17:36:51 +02:00
Pierre Mazière
556b8a2452 [core] transform some BridgeAbstract members to class constants
This concerns $uri, $name, $maintainer, $parameters and $description

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-01 23:12:51 +02:00
Pierre Mazière
729cbadc77 [Bridge] fix input parameter value storage
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-01 23:12:30 +02:00
logmanoriginal
1aa01a1f67 [Bridge] Fix invalid text value without pattern 2016-09-01 21:07:27 +02:00
logmanoriginal
47b6cb8937 [Bridge] Return name of the parameter that failed the check 2016-09-01 20:59:49 +02:00
logmanoriginal
7c36b51aa2 [Bridge] Move code into functions 2016-09-01 20:53:47 +02:00
logmanoriginal
cd9435b936 [Bridge] Simplify cache loading 2016-09-01 19:43:25 +02:00
logmanoriginal
8d050c233b [Format] Change scope of 'sanitizeHtml' to protected 2016-08-29 20:51:11 +02:00
logmanoriginal
f49fca516d [Format] Trim all items elements
This removes unnecessary whitespace in output data
2016-08-29 20:50:02 +02:00
logmanoriginal
cf146523be [formats] Rename variable 'data' to 'item'
This makes the intend of the variable more clear and is now
coherent with all Bridges
2016-08-29 19:47:21 +02:00
logmanoriginal
a84016bcb6 [core] Rename item getter/setter
getDatas -> getItems
setDatas -> setItems

Note: Bridge->setDatas actually sets data, where Bridge->getItems
only returns items (this is why Bridge->setDatas was not changed)
2016-08-29 19:42:58 +02:00