Commit Graph

19 Commits

Author SHA1 Message Date
Christopher Williams 5ef546f085 Add scripts config option 2024-03-03 09:41:31 -05:00
Christopher Williams ad52fa20b6 Fix issue where response would not be retrieved 2024-03-02 19:43:57 -05:00
Christopher Williams 3c9f4e73a4 Start moving lua scripting to a cron job 2024-03-02 17:21:47 -05:00
Christopher Williams e48c26ca50 Fix the merge function
- Do not use the : notation because the first argument will be the table
  when calling the rss functions
- Optimize the table concatenation
- Introduce an rss:limit function that will limit the number of items
  within a list
- Add the "eurogamer" script
2024-01-03 18:26:56 -05:00
Christopher Williams d1641c9143 Add error message when there are no entries for create_rss_feed
- Log to a file on the filesystem, this needs to be configurable
2024-01-03 17:35:51 -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 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 19f1c49db7 Fix parse_xml only giving lua the last object 2023-12-29 12:43:16 -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 e2da3476c4 Make TODOs get highlighted 2023-12-27 20:49:16 -05:00
Christopher Williams c9f5891f76 Refactoring of function and struct names 2023-12-27 19:46:07 -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