Closed ZedDrebin closed 5 months ago
This feature has been added, it now supports pulling of current headlines. I'm not sure how I plan to implement choosing to pull any more information for summary than that, as inclusively adding everything to the DCP from the articles would be too much for the API to handle. Possibly if Franklin is asked a question about the news, it can decide if it's a question about news specifically, and then from that discern which article to pull more information on to summarize... but this has yet to be implemented.
Note that the implementation of this currently depends on cronjob scripts that pull the news articles, parse their JSON with jq '.["articles"] | .[] | .title'
, and then generate a line by line list of articles in the file wn.txt
for Franklin to pull headlines from.
The cronjob in it's entirety looks something like: */1 * * * * jq '.["articles"] | .[] | .title' -r /home/franklin/Franklin/worldnews.txt| grep -v '\[Removed\]' | grep ".\{45,\}" | sort -R | head -n 5 | sed -e 's/.*\:\ \+//' | sed -e "s/[’|‘|'|”]//" | tr '\n' '+' | sed -e 's/+/. /g' > /home/franklin/Franklin/wn.txt
It can be found in cronjobs/jobs.txt
.
Headlines are fetched from: newsapi.org
RIP Zed. Love you buddy, hope it's sunny where you're at.
Add the ability to view headlines... Google and other sources allow free retrieval of news via RSS and API