an atom (RSS) feed generator written in PHP
Go to file
Jasmine Amalia eee6415633
Update README.md
2023-10-18 14:03:14 +07:00
README.md Update README.md 2023-10-18 14:03:14 +07:00
feed_generator.php remove unnecessary loops 2023-10-18 13:44:40 +07:00

README.md

xml-feed-generator

an RSS/atom feed generator for my personal site 🐱


disclaimer

this script is not meant to be used as is (yet).

expect to do a lot of modification to fit your needs, as this was originally tailored for my site structure and blog markup.


how it works

  1. match files in a specificied directory.
  2. load the DOM of each file.
  3. parse values retrieved from the following strings/HTML elements (prioritizing h-entry markup), as children of a feed <entry>:
    • <element class=p-name> (or <h2>) as <title>
    • the datetime attribute of <time> (or the file creation date) as <updated>
    • <element class="p-summary"> as <summary>
    • <element class="e-content"> (or <article>) as <content>
    • /path/to/blog/entry as <id> and <link>
  4. output all of the above into a new file named articles.xml.

ways to use

  • configure a cron job on your web server to run automatically every now and then.

or

  • run the script locally on your machine.

example output

feel free to check out the resulting file that i've generated.

alternatives