Skip to content

tutorial RSS feeds #488

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

Merged
merged 8 commits into from
May 18, 2025
Merged

tutorial RSS feeds #488

merged 8 commits into from
May 18, 2025

Conversation

sneakers-the-rat
Copy link
Contributor

@sneakers-the-rat sneakers-the-rat commented May 13, 2025

fix: #153

i saw something with allcaps PRIORITY! and was like "oh i know how to do that.

so i slightly modified the linked PEP example and just made it dataclasses so we know whats goin on yno.

I think in general treating first paragraphs of things as descriptions the same way i think dumping a bunch of PR titles in a document and calling it a changelog - it technically satisfies the thing you were trying to do, but it isn't all that useful for that purpose. So, two at once, freebie style, i figure if we define an opengraph title and description we can just use them in the feed.

You'll see a bunch of placeholder text in the tutorial item pages - that should be changed to be an actual description instead of placeholder text!

but ya anyway this builds an rss feed into /tutorials.rss that looks like this

expand/collapse rss
<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>PyOpenSci Tutorials</title>
    <link>https://www.pyopensci.org/python-package-guide/tutorials/intro.html</link>
    <atom:link href="https://www.pyopensci.org/python-package-guide/tutorials.rss" rel="self"/>
    <description>Tutorials for learning python i guess!!!</description>
    <language>en</language>
    <lastBuildDate>Mon, 12 May 2025 18:15:41 GMT</lastBuildDate>
<item>
  <title>Using Hatch to Migrate setup.py to a pyproject.toml</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/setup-py-to-pyproject-toml.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/setup-py-to-pyproject-toml.html</guid>
  <pubDate>Fri, 09 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Make your Python package PyPI ready - pyproject.toml</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/pyproject-toml.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/pyproject-toml.html</guid>
  <pubDate>Thu, 08 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Publish your Python package to PyPI</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/publish-pypi.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/publish-pypi.html</guid>
  <pubDate>Wed, 07 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Publish your Python package that is on PyPI to conda-forge</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/publish-conda-forge.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/publish-conda-forge.html</guid>
  <pubDate>Tue, 06 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Get to Know Hatch</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/get-to-know-hatch.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/get-to-know-hatch.html</guid>
  <pubDate>Mon, 05 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Python packaging 101</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/intro.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/intro.html</guid>
  <pubDate>Mon, 05 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Command Line Reference Guide</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/command-line-reference.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/command-line-reference.html</guid>
  <pubDate>Sun, 04 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Add a README file to your Python package</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/add-readme.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/add-readme.html</guid>
  <pubDate>Sat, 03 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Add a License and Code of Conduct to your python package</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/add-license-coc.html</link>
  <description>Placeholder text!!!!</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/add-license-coc.html</guid>
  <pubDate>Fri, 02 Jan 1970 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Make your Python code installable so it can be used across projects</title>
  <link>https://www.pyopensci.org/python-package-guide/tutorials/installable-code.html</link>
  <description>Learn how to make your Python code installable so you can use it across projects.</description>
  <author>PyOpenSci</author>
  <guid isPermaLink="true">https://www.pyopensci.org/python-package-guide/tutorials/installable-code.html</guid>
  <pubDate>Thu, 01 Jan 1970 00:00:00 GMT</pubDate>
</item>
  </channel>
</rss>

@sneakers-the-rat
Copy link
Contributor Author

literally what
Screenshot 2025-05-12 at 6 24 23 PM

@sneakers-the-rat
Copy link
Contributor Author

I turned off pre-commit because i find it very annoying and the output here is not giving me enough information to know what to do. not a fan of pre-commit!

@lwasser
Copy link
Member

lwasser commented May 15, 2025

I turned off pre-commit because i find it very annoying and the output here is not giving me enough information to know what to do. not a fan of pre-commit!

@sneakers-the-rat thank you so so much!! I know so many people who dislike pre-commit. I love it for the pre-commit CI bot, which is useful for contributors who don't want to install or mess with pre-commit and linting in their dev environments. I totally get the challenge of troubleshooting bugs.

Thank you for doing this. It will save me so much time trying to manually update our learning resources page. I will test it out and also help fill in the missing descriptions, dates, and other details in the original headers. 🎉

Copy link
Member

@lwasser lwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great locally! let's merge!

_ext/rss.py Outdated
title=meta[":og:title"],
description=meta[":og:description"],
date=datetime.fromisoformat(meta["date"]),
author=meta.get(":og:author", "PyOpenSci"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
author=meta.get(":og:author", "PyOpenSci"),
author=meta.get(":og:author", "pyOpenSci"),

@lwasser
Copy link
Member

lwasser commented May 18, 2025

Ok the point of failures here are link related error code 200's (hashes that it can't find). We are ok to go ahead and merge.

@lwasser lwasser merged commit b520fb6 into pyOpenSci:main May 18, 2025
3 of 4 checks passed
@lwasser
Copy link
Member

lwasser commented May 18, 2025

@sneakers-the-rat thank you again for this!!!

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

Successfully merging this pull request may close these issues.

PRIORITY! SPHINX book: Create rss feed of pyOS tutorials
2 participants