-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR]: View message source #377
Comments
Hello @maturz. You structured several issues into single ticket, do not do that next time and split your atomic issues into separate tickets. :) What is
Also, Or did you mean to have access to FULL XML RSS/ATOM/JSON "node" that represents the single message? Like in the below picture? Btw, to see page source, you can: |
Sorry they way I saw it was I had one issue with several possible solutions (if one solution is chosen then one issue is is all that's needed but if you would like to implement several then it should probably be split into more issues).
Here is an example of a feed that has it http://renewcanceltv.com/feed/
This was just one possible way of exposing the data. For example you could then list all non standard data from the xml node here. E.g. attributes.category, attributes.image, attributes.thumbnail or whatever else people decide to put in their feeds (anything RSS Guard isn't using would dynamically get added to attributes).
Yes when I was talking about source I meant "FULL XML RSS/ATOM/JSON". The core issue is that some feeds have data that I think RSS Guard ignores with no way to use it for filters or viewing it in the client. So most of the other things I wrote were just different ideas for how the problem could be fixed. |
@maturz
Yes, I read it again and tweaked my answer, my bad, sorry. :) Now, I get it. We need to take some more things into account:
That said, I think I could add new So for example after this is fixed, you would obtain this inside <item>
<title>
‘Dwight in Shining Armor’ Season 6? Cancelled Or Renewed?
</title>
<link>
https://www.renewcanceltv.com/dwight-in-shining-armor-season-6-cancelled-or-renewed/
</link>
<comments>
https://www.renewcanceltv.com/dwight-in-shining-armor-season-6-cancelled-or-renewed/#respond
</comments>
<dc:creator>Renew Cancel</dc:creator>
<pubDate>Tue, 09 Mar 2021 23:26:48 +0000</pubDate>
<category>Cancelled Or Renewed?</category>
<category>dwight in shining armor</category>
<category>BYUtv</category>
<category>Dwight In Shining Armor</category>
<guid isPermaLink="false">https://www.renewcanceltv.com/?p=131381</guid>
<description>
<p>The post <a rel="nofollow" href="https://www.renewcanceltv.com/dwight-in-shining-armor-season-6-cancelled-or-renewed/" data-wpel-link="internal">‘Dwight in Shining Armor’ Season 6? Cancelled Or Renewed?</a> appeared first on <a rel="nofollow" href="https://www.renewcanceltv.com" data-wpel-link="internal">RenewCancelTV</a>.</p>
</description>
<wfw:commentRss>
https://www.renewcanceltv.com/dwight-in-shining-armor-season-6-cancelled-or-renewed/feed/
</wfw:commentRss>
<slash:comments>0</slash:comments>
</item> Would such a solution be okay for you? |
Yes, that would let me filter using category so it would solve my problem, if I can also modify the message attributes such as content in a filter then that could make it even more powerful (wasn't sure if I could do that as I tried changing msg.isRead and msg.title without success). There could be benefits to exposing some of this data in the UI as well for sorting or for people not able to write filters but my needs would be met at least :) |
@maturz Of course you can change "contents" attribute already. Thas is the whole point of message filters. https://github.com/martinrotter/rssguard/blob/master/resources/docs/Message-filters.md (make sure to read it all) as for "sorting" there is a new "score" attribute which you can use to assign a floating point number to your messages and sort them in message list: #373 (reply in thread) |
OK. I implemented it RN and tested with simple filter to make sure it works. This fix is in version-4 branch and will appear in RSS Guard 4, when it gets released. You can check here (search for "rawContent") for documentation and I also added example to "Examples" section. Very simple script is: function filterMessage() {
console.log(msg.rawContents);
return MessageObject.Accept;
} |
Note that the JavaScript standard support by the RSS Guard does not include "DomParser" class for parsing XML. To solve the issue, you can "import" your own javascript modules. I also plan to expand the filtering JavaScript environment with some custom "util" methods, perhaps adding method |
Cool, thanks. I think I can probably get by doing most things with just some regex. Probably way overkill here but I remember I've used https://www.npmjs.com/package/cheerio before for "serverside dom" parsing/traversing. |
@maturz I am adding "util" built-in functions right now. Wait for it. |
OK, I am almost done, I will commit changes and post some examples tomorrow and close this issue. |
OK, feature is done, I also added "utils" variable with some functions, one of them being ability to convert easily from XML to JSON. |
is this something that can help load content from feeds that hide part of the text? On android, feeder can handle this and displays the entire text. |
No. EDIT: EDIT2: |
Brief description of the feature request.
I would like to have some way to view the source of the message (view xml source rather than the normal preview). I would also like for this to be done in a way so that it can be accessed when writing a filter function (e.g. msg.source).
Why?
I just started using this RSS client and I noticed that the attribute categories is nowhere to be found in the interface (or I have note been able to find it at least). However rather than just requesting this attribute be added (could be a good idea if someone wants to see it in the list). I wanted instead to have some way to see all attributes that are not supported. Primarily I want to use the category attribute for writing filters as it has some information not available to me in the other attributes.
Alternatives
The text was updated successfully, but these errors were encountered: