So I was reading https://fedi.simonwillison.net/@simon blog post https://simonwillison.net/2023/May/18/cli-tools-for-llms/
He had a neat workflow to summarize web pages.
So I extended it, and used pup
and strip-tags
to get the frontpage links from the Drudge Retort (NOT DRUDGE REPORT), processed all the links through curl and use 4o
to summarize them. THen I summarized the summaries, and I get a quick hit read of what happened today. Kinda like WTFJHT.
# Create a file to store all summaries
echo -n "" > all_summaries.txt
# Loop through each URL
for url in (curl -s https://drudge.com/ | pup '.newslink .frontheadline a attr{href}')
echo "Processing $url"
# Fetch, strip tags, and summarize
set summary (curl -A '' -s "$url" | strip-tags | llm -m 4o 'summarize this information')
# Save individual summary to a file
echo "Summary of $url: \n" >> all_summaries.txt
echo "$summary" >> all_summaries.txt
echo -e "\n\n" >> all_summaries.txt
end
Then, summarize again.. I know, this could be in the script.
cat all_summaries.txt | llm -m 4o 'I am showing you a summary of several urls, please review all the data, and produce a quick to read bullet point list of things that happened.'
I mean, I know there's no magic here, but it's pretty neato regardless. Here's what the summary was for 2024-05-15
- Boeing Faces Potential Criminal Prosecution: DOJ investigating safety lapses, breach of 2021 deferred prosecution agreement.
- U.S. Orders Chinese-Backed Crypto Miner to Sell Land: Due to national security concerns near a military base.
- Trump Appears to Fall Asleep in Court: During cross-examination of Michael Cohen.
- Biden Increases Chinese Tariffs: Significant tariffs on Chinese electric vehicles and other products.
- Trump and Biden Presidential Debates: Both altering traditional debate formats, planning CNN, and ABC-hosted debates.
- Slovakian Prime Minister Robert Fico Shot: In serious condition following an assassination attempt.
- Tesla Excess Inventory: Tesla stores surplus vehicles in rented parking lots due to overproduction.
- Huy Fong Foods Halts Sriracha Production: Due to supply issues with red jalapeño peppers.
- Louisiana Abortion Laws: State insists child rape victims must carry pregnancies to term.
- Trump Pledges to Scrap Offshore Wind Projects: If re-elected, aligning with his broader anti-renewable energy stance.
- CDC Warns Against Raw Milk: Due to bird flu outbreak among dairy cattle.
- Public Access to Martins Beach: California judge rules against venture capitalist Vinod Khosla’s efforts to restrict access.
- NYC Dublin Portal Shutdown: Due to inappropriate visitor behavior; measures being taken to improve conduct.
- $600 Million Donations from 50 Families: Significant influence on the 2024 elections, predominantly supporting Republicans.
- Nikki Haley Support in Primaries: Despite dropping out, significant votes against Trump in Maryland and Nebraska primaries.
- Tennessee Woman's Loss Due to Abortion Law: Denied an abortion despite fatal fetal condition, resulting in severe medical consequences.
This bullet point list provides a concise overview of the main events and updates from the provided summaries.