Skip to content
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

No next entry when browsing Pinboard "popular" feed #65

Open
passiomatic opened this issue Jul 6, 2014 · 2 comments
Open

No next entry when browsing Pinboard "popular" feed #65

passiomatic opened this issue Jul 6, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@passiomatic
Copy link
Owner

PInboard "popular" feed entries have all the same timestamp. E.g:

<item rdf:about="http://www.fullstackpython.com/">
    <title>Full Stack Python</title>
    <dc:date>2014-07-06T14:12:01+00:00</dc:date>
    <link>http://www.fullstackpython.com/</link>
    <dc:creator>davewongillies</dc:creator><description><![CDATA[This guide has a different focus from the above resources. Here I focus on explaining several ways of setting up a Python web application stack from server infrastructure through JavaScript execution on a user's browser.]]></description>
<dc:subject>python webdev linux</dc:subject>
<dc:source>http://delicious.com/</dc:source>
<dc:identifier>http://pinboard.in/u:davewongillies/b:23e4d9f9664a/</dc:identifier>
<taxo:topics><rdf:Bag>  <rdf:li rdf:resource="http://pinboard.in/u:davewongillies/t:python"/>
    <rdf:li rdf:resource="http://pinboard.in/u:davewongillies/t:webdev"/>
    <rdf:li rdf:resource="http://pinboard.in/u:davewongillies/t:linux"/>
</rdf:Bag></taxo:topics>
</item>
<item rdf:about="http://apenwarr.ca/log/?m=201407#01">
    <title>apenwarr: The curse of smart people</title>
    <dc:date>2014-07-06T14:12:01+00:00</dc:date>
    <link>http://apenwarr.ca/log/?m=201407#01</link>
    <dc:creator>mechazoidal</dc:creator><description><![CDATA[It can be easy for very smart people to wall themselves away from the world and rationalize away everything.]]></description>
<dc:subject>culture intelligence post</dc:subject>
<dc:identifier>http://pinboard.in/u:mechazoidal/b:a540d0137946/</dc:identifier>
<taxo:topics><rdf:Bag>  <rdf:li rdf:resource="http://pinboard.in/u:mechazoidal/t:culture"/>
    <rdf:li rdf:resource="http://pinboard.in/u:mechazoidal/t:intelligence"/>
    <rdf:li rdf:resource="http://pinboard.in/u:mechazoidal/t:post"/>
</rdf:Bag></taxo:topics>
</item>

Note that both dc:date elements are set to 2014-07-06T14:12:01+00:00.

This poses a problem since Coldsweat to figure out the next entry to show check entry timestamps and sort it:

n = q.where(Entry.last_updated_on < entry.last_updated_on).order_by(Entry.last_updated_on.desc()).limit(1)

To fix this is necessary to apply two sort and condition parameters: last_updated_on and id. Note that Peewee order_by() method accepts multiple clauses.

@passiomatic passiomatic added this to the 1.0.0 milestone Jul 6, 2014
@passiomatic passiomatic added the bug label Jul 6, 2014
@passiomatic passiomatic self-assigned this Jul 6, 2014
@passiomatic
Copy link
Owner Author

Gonna mark won't fix this. There's little Coldsweat could do to handle this corner-case.

@passiomatic
Copy link
Owner Author

passiomatic commented Aug 23, 2014

First option: Extract all entries from a feed, sort asc by their timestamp and then add them to the database. By relying on ID database autoincrement field we are sure entries will maintain they order, even if timestamps are all equal.
Later, in the views sort by ID's desc, not timestamp. Older entries will be on bottom (smal ID's), recent entries on top.
Second option: Use a greater fetcher "add time" accuracy, down to microseconds maybe, instead of relying to entry published date. This mirrors what Google Reader API expects, so it might be a better solution overall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant