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

Implement dates #5

Closed
0323pin opened this issue Feb 18, 2022 · 9 comments · Fixed by #9
Closed

Implement dates #5

0323pin opened this issue Feb 18, 2022 · 9 comments · Fixed by #9
Assignees
Labels
question Further information is requested

Comments

@0323pin
Copy link

0323pin commented Feb 18, 2022

Hi,

NetBSD package maintainer here. I'm currently using neix for feeds from project I maintain packages for.
neix is no longer maintained and I would like to move to tuifeed, also because I could drop ncursesw from my system doing so.

There's a feature that stops me from doing that. neix displays dates, which is rather useful info for a package maintainer.
See screenshot

Would this be something that could be implemented? And, are you willing to do so?

@0323pin 0323pin added the question Further information is requested label Feb 18, 2022
@veeso
Copy link
Owner

veeso commented Aug 2, 2022

I will add a parameter in the configuration to do that

@0323pin
Copy link
Author

0323pin commented Aug 7, 2022

@veeso Thank you for the new release!
Dates work fine for projects hosted at sourcehut from where feeds are provided in rss.xml format.

2022-08-07-051652_1366x768_scrot

But, fail to display for github hosted projects, as github uses the atom format for the feeds.

2022-08-07-051709_1366x768_scrot

Any chance to get these too?

Btw, I've updated the package and merged the package, https://mail-index.netbsd.org/pkgsrc-changes/2022/08/07/msg258095.html

@0323pin
Copy link
Author

0323pin commented Aug 11, 2022

@veeso Can this be extended to include also atom?

impl From<RssEntry> for Article {
    fn from(entry: RssEntry) -> Self {
        let content_or_summary = content_or_summary(&entry);
        Self {
            title: entry
                .title
                .map(|x| str_helpers::strip_html(x.content.as_str())),
            authors: entry.authors.into_iter().map(|x| x.name).collect(),
            summary: content_or_summary,
            url: entry
                .links
                .get(0)
                .map(|x| x.href.clone())
                .unwrap_or(entry.id),
            date: entry.published.map(DateTime::<Local>::from),
        }
    }
}

@veeso
Copy link
Owner

veeso commented Aug 11, 2022

Can you provide me with the link you're getting the feed from?

@0323pin
Copy link
Author

0323pin commented Aug 11, 2022

@veeso Any github repository really but, as an example we can take tuifeed itself, https://github.com/veeso/tuifeed/releases.atom

@veeso
Copy link
Owner

veeso commented Aug 11, 2022

Ok, I'll make a fix to use updated in case published is not available

@0323pin
Copy link
Author

0323pin commented Aug 11, 2022

Thank you!
Let me know if you need testing before release. I'm happy to do local test builds from git-HEAD if you like.

@0323pin
Copy link
Author

0323pin commented Aug 19, 2022

Fixed by #9

@veeso veeso closed this as completed in #9 Aug 19, 2022
@veeso
Copy link
Owner

veeso commented Aug 19, 2022

0.2.1 will be released today

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

Successfully merging a pull request may close this issue.

2 participants