dates semantics in RSS - rss

I'm reading the documentation of feedparser.
It describes 4 attributes related to date
published
updated
created
expired
What do these attributes mean in relation to RSS specification? It describes only pubDate
thank you

Feedparser covers several syndication formats, for example Atom syndication format (RFC 4287). That is why you see a mis-match with the (relatively old) RSS standard.
The documentation for feedparser has details about the semantics and where in the feed it picks up the values:
Published:
The date this entry was first published
Updated:
The date this entry was last updated
Created:
The date this entry was first created (drafted)
Expired:
The date this entry is set to expire [...] This element is rare.

Related

Can't Format Date in GraphQL in Gatsby Site

I am having trouble formatting a date in Gatsby. I have sourced some data from firestore. One of the fields that I have sourced is called datePublished and it contains a number in the form of a timestamp (e.g., 1576945502000). Indeed, it really is a timestamp, but it got saved to firestore in the number format type.
Now, I would like to format the datePublished field using the formatString function in graphql -- as noted here: https://www.gatsbyjs.org/docs/graphql-reference/#dates
But I can't get the formatting to work. Whether I try to format the string in graphiql or on my site, it does not work. Here is the code that I tried:
query MyQuery {
allNewsFeed {
edges {
node {
published(formatString:"dddd Mo, YYYY")
}
}
}
}
And this is the error message that I get in graphiql:
Unknown argument "formatString on field 'datePublished' of type 'NewsFeed'.
If I dig a little deeper, I notice that the field type in firestore is listed as number and in the graphiql document explorer it is listed as a FloatQueryOperatorInput.
What's more, I did a little experiment where I tried to save the same number as a string, number and timestamp in firestore. Neither the string or number format worked and for whatever reason, the gatsby-firesource plugin will not pull in the field with a timestamp format.
So I am wondering, what do I have to do to get this to work in gatsby?
Any ideas?
Thanks.
I had a similar situation with Gatsby not accepting "formatString" on a date field, for me what solved the issue was to change the format of the field to YYYY-MM-DD so it went from 02 06 2017 to 2017-06-02 and gatsby got the hint that that field represents a date.
It seems gatsby "reads" the data and guesses the type and based on that we get certain functionality.
Since gatsby uses moment.js I'm guessing the YYYY-MM-DD format is picked up by it.
I'm using MDX so it was really easy for me to change the format of my date field since it's just plain text, I'm not sure you have the same luxury with firestore but I hope this at least give you some ideas to try out. Good luck!

finding article by date code in google search appliance GSA

The Google Search Appliance goes through and finds out the date of each article when it crawls (last modified date is the default).
However, it doesn't turn up articles when you query by date code.
Is there any way to get the GSA to do this?
(We have a daily broadcast which people often search for by date code. Right now we have to manually put in the 4 most common date codes into the meta-keywords in order for them to be pulled up through a query)
Have you tried using inmeta:date as described in the Search Protocol Reference documentation?
Alternatively, if the date code is in the document content or the URL you could use entity recognition to extract it.
One way to make sure GSA is collecting the document date is to check the search results in XML format and see if tag has the date value. You can see the results in XML format by removing any proxystylesheet parameter in the URL.
If the value of tag is empty then GSA is not getting the document dates.
You can configure the document dates under Crawl and Index > Document Dates (at least at GSA version 7). We are using a meta tag approach. We put a date meta tag to each document/page and tell GSA to use this meta tag to sort the documents. The full list of options are:
URL
Meta Tag
Title
Body
Last Modified
Here are some links that helped me to find answers when dealing with a similar problem:
https://support.google.com/gsa/answer/2675414?hl=en
https://developers.google.com/search-appliance/documentation/64/xml_reference#request_sort_by_date
https://groups.google.com/forum/#!searchin/google-search-appliance-help/sort$20by$20date$20not$20working

Amazon MWS Report Type "_GET_MERCHANT_LISTINGS_DATA_" result attributes meaning

In Amazon MWS API, when requesting report of type "_GET_MERCHANT_LISTINGS_DATA_"
What is the difference between the returned attributes:
product-id
listing-id
asin1
I also have tried to find any reference for the tab-delimited report types, but it seems to be scattered all around the web. The best description I found was part of the instructions for the Amazon Inventory Loader. (Note: may require a MWS seller login, the corresponding XLS does not have all columns described on the linked webpage) That page should answer most of your questions.
Since the link above might require a login, here's a short description on what these columns do:
asin1 refers to an item's Amazon Standard Identification Number. Every item on Amazon has such a number, there even is a Wikipedia entry describing what it is.
product-id along with product-id-typerefers to the item's non-Amazon standard identification number, if such a thing exists (otherwise it'll contain a copy of the item's ASIN).
product-id-type=1 -> product-id is ASIN
product-id-type=2 -> product-id is ISBN.
product-id-type=3 -> product-id is UPC
product-id-type=4 -> product-id is EAN (now called GTIN)
sku is your own item identifier such as part number. You created the link between an ASIN and your own SKU by creating the product. (I know you didn't ask for this, but this is for the sake of completeness)
listing-id There does not seem to be a lot of documentation on what theses are. There is a page explaining how to find out an item's listing id. It does not say why you'd ever want to know, though. I assume a listing ID identifies a certain seller's (your) offer for a specific item, but all MWS requests I've ever done either required me to link to a ASIN or my own SKU, but there may be others that require this id.
Sidenote: I find it weird that a single listing-id may relate to more than one ASIN - otherwise, why are there columns named asin2 and asin3?

Amazon MWS API, listing seller's products that is updated after a specific date

I am trying to list the products of a seller (using marketplaceID) that is created or updated after a specific date.
I tried RequestReport with ReportType "_GET_MERCHANT_LISTINGS_DATA_" and setting StartDate to the target date but the data returned contains products that are created (or lastly updated) before that date.
https://developer.amazonservices.com/
The documentation is not very specific on what 'StartDate' actually does:
Start of a date range used for selecting the data to report.
Type: xs:datetime
Default: Now
If I recall correctly, this date does not relate to a products modification timestamps but to a products existance in the database. As an example, setting StartDate to yesterday should give you a list of products that were in the database within the last 24 hours. This includes products that were recently created and products that were created way before that but still exist.
I don't think it is possible to get a list of products that were modified within a timeframe (again, I'm writing this from my recollection on how this worked when I played with it)

Linklist with most recent blog at top?

I would like to have a simple linklist of blogs with their latest entry, author, blog name, and date be listed in order of latest update. So, kinda like what Blogger has on their sidebars -- whenever they have linklists, it auto-reorders based on which blog has been updated recently (though it usually doesn't have summaries, just the title of the site).
What I'd like to do is plug in multiple RSS feeds into one place that just checks the latest entry in each feed and then reorders them
The magpie plugin or RSS plugin in EE currently only allows you plug in ONE feed. It will show the latest entry per blog if I repeat the magpie tags several times (one per blog), but that doesn't help with re-ordering, and also it's a bit messy.
Help? Thoughts?
UPDATE: I want to make sure that each blog is still featured even if the last post they've done is a year ago. A blog like that will be the last in the link list for example, while an entry/site updated this hour will be at the top. So for example, if I limit the linklist to 5, it's not going to show the 5 most recent entries, period, from just one site if that one site updated 5 times in one hour. It will show 1 recent entry per site.
Sample behaviour: like the Flickr Friends Page sorted by date and 1 photo per person. http://www.flickr.com/photos/friends/ Except this time, just titles of blog posts and the site they belong to, author, etc.
There is an RSS Aggregator EE Add-on available which combines feeds for you
http://devot-ee.com/add-ons/rss-aggregator
{exp:rss_aggregator:items feed_ids="6|7" limit="10" order_by="pub_date" order="desc" pub_date_format="m-d-Y g:ia" cache_timeout="60"}
<li>
{title}<br />
<small>{pub_date} - From {channel_title}</small><br />
</li>
{/exp:rss_aggregator:items}
You could do this using Yahoo! Pipes. In fact, I created one a bit ago: http://pipes.yahoo.com/pipes/pipe.info?_id=82e8b23b84bf2d6c3014f50c0f6b2f1d
Just call it with a comma-delimited list of RSS feeds and voila! It gives you the latest entry for all the RSS feeds, sorted in reverse chronological order.
Example:
http://pipes.yahoo.com/pipes/pipe.run?_id=82e8b23b84bf2d6c3014f50c0f6b2f1d&_render=json&feedurls=appleinsider.com.feedsportal.com/c/33975/f/616168/index.rss,feeds.foxnews.com/foxnews/latest?format=xml
So now that you have the feed's URL, you can pull out the individual entries using the REST module from Phil Sturgeon.
For those interested, here's how the pipe is setup:
Fairly sure Stash could handle this via set_list and get_list. I haven't tested this but perhaps something like:
{exp:channel:entries channel="feed_urls"}
{exp:magpie url="{url}" limit="1"}
{items}
{exp:stash:append_list name="feed_items"}
{stash:title}{title}{/stash:title}
{stash:pubdate}{pubdate}{/stash:pubdate}
{/exp:stash:append_list}
{/items}
{/exp:magpie}
{/exp:channel:entries}
{exp:stash:get_list name="feed_items" orderby="pubdate"}
<h3>{title}</h3>
<p>{pubdate}</p>
{/exp:stash:get_list}
https://github.com/croxton/Stash
What about using an entries loop with multiple channels, pulling lastest from that and stashing it. Then get the stash in the RSS feed? I think that would work.
You could probably do it with Datagrab because it lets you import XML feeds into your own site and then you'd be able to order them as EE channel entries.

Resources