Commit Graph

13 Commits

Author SHA1 Message Date
Christopher Williams 3664ef28ac Add first rss feed generation
- Now we are able to generate an RSS Feed from multiple posts without
  needing the website to have an original rss feed that we modify
- The first website that we can do it for is opengoal.dev/blog
- However, some values are temporarily hardcoded for right now, the code
  needs to support having RSSItems passed into it so that it can fill in
  all of the values based on actual values rather than "example.com"
- 9to5mac is now using a couple of constants for variables now as well.
  More refactoring to come for this
2024-01-03 20:32:08 -05:00
Christopher Williams fbd9082f9b Add a few more websites and bind RSSImage
- Add 9to5google and electrek
- Make 9to5mac and godot use the live website and cache the result to the database
2024-01-02 11:24:45 -05:00
Christopher Williams 6f972ef5fe Add RSS Feed merge function
- We are now able to use a native Go function to merge 2 feeds into one
  so that it can be served back to the requester
2024-01-02 09:51:21 -05:00
Christopher Williams 0025c458a4 Use Golang log methods rather than a lua log library 2024-01-02 09:11:14 -05:00
Christopher Williams 260840f6ae Add rss:get to get a cached feed or not
- First implementation of the rss feed cache system
- Clean up needs to happen with it. It is in need of extracting code to
  functions
- It is functional though and is able to know when to fetch new data or
  just serve the existing data it has
2024-01-01 22:03:58 -05:00
Christopher Williams 9fe6a16f47 Add looking at the database to get previous scrapes
- We can now grab previous results from the database to serve back to
  the request
- The rss feed items are also now sorted based on their pubDate
- Godot's script is now fully function and scrapes only when needed
- Other scripts still need some work to make it so that they are
  utilizing the database
- Duplicate entries in the database aren't checked for just yet, this
  needs to be done or else if there are any mistakes in lua, the
  databases becomes a mess
- Add sorter file to handle the pubDate sorting
2023-12-29 17:34:56 -05:00
Christopher Williams 4056d0008c Refactor html module to userdata
- There is now an "html" object that can be used to perform html parsing
  functions. Currently there are select, remove and get functions
- Remove has been added to the html tools so that tags can be removed
  from the document
2023-12-28 20:56:36 -05:00
Christopher Williams 38ab153c1a Use the RSS Item struct instead of a generic table 2023-12-27 19:17:54 -05:00
Christopher Williams 0536244bfa First working website!
- Godot's blog now can return the blog posts that are listed in the rss
  feed!
- Currently it does not cache this data so each request will go and
  scrape the data again. This need to be addressed
2023-12-27 14:54:45 -05:00
Christopher Williams 1759df6ba7 Add opengoal script 2023-12-26 17:07:42 -05:00
Christopher Williams 4e292463e9 Add support for a few html actions
- Support using the html parser to get html out of a node
  - There is now html:parse and html:select
2023-12-26 15:01:07 -05:00
Christopher Williams 4c4774fe00 Add a get and parse rss feed function 2023-12-26 14:20:44 -05:00
Christopher Williams a0e31cb1b3 Initial commit
- Able to execute lua code and respond to requests
- Able to reload the server and lua scripts easily
2023-12-25 18:06:50 -05:00