Comments (9)
👍
As I explained in my comment #33 I need to add "wfw" namespace to link comments feeds.
I guess that we can find way to extend Feed and Item to be able to add custom entries. I will take a look on what can be done, if there is a pure Go method and if a PR must be proposed.
from feeds.
My understanding of XML namespaces in Go is that there's some history: golang/go#13400
A 'cheat' way might just to be wrap the output/modify it to add the namespace statically.
from feeds.
I agree if we only need to add a namespace. But we need to add "tags" in items. The better is to be able to add custom item entries and one or more namespaces on the root element. I didn't checked how to override Item and Feed elements but I think that having the possibility to declare some custom namespaces and item properties should be the way to go.
I see something like that:
feed := Feed{
// ... append title, author and so on
}
// add a namespace (name, dtd link, feed type that can be RSS, ATOM or ALL)
feed.AddNameSpace("wfw", "http://...", RSS)
item := Item{
Title: "...",
Description: "...",
CustomFields : []CustomFields{
{Name:"wfw", Value:"link to comment field", For: RSS}
},
}
// add item
feed.Items = append(feed.Items, item)
What I should do is to:
- append namespaces that are declared by AddNameSpace (but I need to be able to check if this namespace works with RSS or Atom)
- build custom fileds
from feeds.
Can we add custom fields to the ITEM ??
from feeds.
Can you show an example of what you want to change? The Item aligns with
the RSS and Atom data models.
On Thu, Oct 13, 2016 at 7:23 AM sourav-babajob [email protected]
wrote:
Can we add custom fields to the ITEM ??
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#25 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABIcLZUKVjiSLi0cp8Ob5zmrQRfQcCRks5qzj41gaJpZM4GGkTT
.
from feeds.
@elithrar Currently the library creates the below ATOM FEED ( Item ) in my case
<entry>
<title>Driver</title>
<updated>2016-09-11T20:45:17+05:30</updated>
<id>2146289956</id>
<content type="html">
description
</content>
<link href="http://xyz.com/"/>
<author>
<name>ZYZ</name>
</author>
</entry>
I want to add custom tags in the Item struct like and
The current Item struct allows ->
type Item struct {
Title string
Link *Link
Author *Author
Description string // used as description in rss, summary in atom
Id string // used as guid in rss, id in atom
Updated time.Time
Created time.Time
}
from feeds.
@elithrar Check #33 comment I opened. I need that tag inside an item:
<wfw:commentRss>http://linuxfr.org/nodes/108491/comments.atom</wfw:commentRss>
Atom allows to add xml tags after we've added a namespace. At this time we can't.
from feeds.
golang/go#13400 seems to be unresolved.
On Fri, Oct 21, 2016 at 5:46 AM Patrice Ferlet [email protected]
wrote:
@elithrar https://github.com/elithrar Check #33
#33 comment I opened. I need
that tag inside an item:wfw:commentRsshttp://linuxfr.org/nodes/108491/comments.atom/wfw:commentRss
Atom allows to add xml tags after we've added a namespace. At this time we
can't.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#25 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABIcFZbxppeQFv_P7K21ViZ3B2LKFGJks5q2LQZgaJpZM4GGkTT
.
from feeds.
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.
from feeds.
Related Issues (20)
- [FEATURE] iTunes RSS extensions support HOT 1
- [FEATURE] Ability to set isPermaLink="false" for guid
- Sort feed items by created timestamp HOT 5
- problems unmarshaling rss HOT 3
- New release? HOT 1
- Time for a new release? HOT 2
- Itunes Podcast Tags HOT 5
- Migrate to CircleCI HOT 1
- JSON Hubs are broken [bug] HOT 1
- [feature] RSS item can hold multiple <category> HOT 1
- [feature] isPermaLink="false" for guid field HOT 1
- [feature] add image/category/tags attributes HOT 2
- Spurious empty <summary> elements in atom feed HOT 12
- RSS feeds where items have author tags aren't valid HOT 3
- Support `xml:base` HOT 1
- [feature] Support JSON feed v1.1 HOT 4
- [bug] Sending deprecated Content-Type header HOT 4
- [bug] slice bounds out of range [-1:] HOT 1
- [bug] Panic when non-obligatory link field is not given to item HOT 5
- [feature] Allow multiple Links in a feed item HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feeds.