Merge branch 'master' of git.uninsane.org:colin/nix-files

This commit is contained in:
Colin 2023-03-09 06:56:38 +00:00
commit dcd622bc1d
8 changed files with 118 additions and 7 deletions

View File

@ -1,3 +1,9 @@
# candidates:
# - The Nonlinear Library (podcast): <https://forum.effectivealtruism.org/posts/JTZTBienqWEAjGDRv/listen-to-more-ea-content-with-the-nonlinear-library>
# - has ~10 posts per day, text-to-speech; i would need better tagging before adding this
# - <https://www.metaculus.com/questions/11102/introducing-the-metaculus-journal-podcast/>
# - dead since 2022/10 - 2023/03
{ lib, sane-data, ... }:
let
hourly = { freq = "hourly"; };
@ -50,16 +56,23 @@ let
(fromDb "lexfridman.com/podcast" // rat)
## Astral Codex Ten
(fromDb "sscpodcast.libsyn.com" // rat)
## Less Wrong Curated
(fromDb "feeds.libsyn.com/421877" // rat)
## Econ Talk
(fromDb "feeds.simplecast.com/wgl4xEgL" // rat)
## Cory Doctorow -- both podcast & text entries
(fromDb "craphound.com" // pol)
(fromDb "congressionaldish.libsyn.com" // pol)
(mkPod "https://podcasts.la.utexas.edu/this-is-democracy/feed/podcast/" // pol // weekly)
## Civboot -- https://anchor.fm/civboot
(fromDb "anchor.fm/s/34c7232c/podcast/rss" // tech)
## Emerge: making sense of what's next -- <https://www.whatisemerging.com/emergepodcast>
(mkPod "https://anchor.fm/s/21bc734/podcast/rss" // pol // infrequent)
(fromDb "feeds.feedburner.com/80000HoursPodcast" // rat)
## Daniel Huberman on sleep
(fromDb "feeds.megaphone.fm/hubermanlab" // uncat)
## Multidisciplinary Association for Psychedelic Studies
(fromDb "mapspodcast.libsyn.com" // uncat)
(fromDb "allinchamathjason.libsyn.com" // pol)
(fromDb "acquired.libsyn.com" // tech)
# The Intercept - Deconstructed; also available: <rss.acast.com/deconstructed>
@ -112,6 +125,7 @@ let
# DEVELOPERS
(fromDb "uninsane.org" // tech)
(fromDb "ascii.textfiles.com" // tech) # Jason Scott
(fromDb "mg.lol" // tech)
(fromDb "drewdevault.com" // tech)
## Ken Shirriff

View File

@ -74,7 +74,7 @@ in
# see for an example: <https://filipe.kiss.ink/zmv-zsh-rename/>
autoload -Uz zmv
HISTORY_IGNORE='(sane-shutdown *|sane-reboot *|rm *)'
HISTORY_IGNORE='(sane-shutdown *|sane-reboot *|rm *|nixos-rebuild.* switch)'
# extra aliases
# TODO: move to `shellAliases` config?

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,23 @@
{
"bozo": 0,
"content_length": 272569,
"content_type": "text/xml; charset=utf-8",
"description": "Audio version of the posts shared in the LessWrong Curated newsletter.",
"favicon": "",
"favicon_data_uri": "",
"hubs": [
"https://pubsubhubbub.appspot.com/"
],
"is_podcast": true,
"is_push": true,
"item_count": 56,
"last_updated": "2023-03-08T08:00:00+00:00",
"score": 32,
"self_url": "https://feeds.buzzsprout.com/2037297.rss",
"site_name": "",
"site_url": "",
"title": "LessWrong Curated Podcast",
"url": "https://feeds.buzzsprout.com/2037297.rss",
"velocity": 0.192,
"version": "rss20"
}

View File

@ -0,0 +1,21 @@
{
"bozo": 0,
"content_length": 1377252,
"content_type": "application/xml; charset=utf-8",
"description": "Andrew Huberman, Ph.D.",
"favicon": "",
"favicon_data_uri": "",
"hubs": [],
"is_podcast": true,
"is_push": false,
"item_count": 129,
"last_updated": "2023-03-06T09:00:00+00:00",
"score": 14,
"self_url": "https://feeds.megaphone.fm/hubermanlab",
"site_name": "",
"site_url": "",
"title": "Huberman Lab",
"url": "https://feeds.megaphone.fm/hubermanlab",
"velocity": 0.159,
"version": "rss20"
}

View File

@ -0,0 +1,21 @@
{
"bozo": 0,
"content_length": 256360,
"content_type": "application/rss+xml; charset=utf-8",
"description": "Hosted by Zach Leary, the intent of the podcast is to bring you the listener an easily accessible resource for a variety of topics all related to psychedelic research. There is a lot to learn about new research into the therapeutic potential of psychedelics and marijuana. Over the years, the Multidisciplinary Association for Psychedelic Studies (MAPS) has amassed an incredible treasure trove of audio archives sourced from the amazing talks, presentations and panels that have taken place at past Psychedelic Science conferences and other unique events. By selecting some of that content and then bringing it to you in a podcast we hope to create a centralized location for the greater MAPS community. If you're a researcher, scientist, medical professional or just a curiosity seeker we hope that you'll find this content a valuable resource tool.\n\nPlease visit the MAPS website at https://maps.org",
"favicon": "",
"favicon_data_uri": "",
"hubs": [],
"is_podcast": true,
"is_push": false,
"item_count": 62,
"last_updated": "2023-03-06T20:20:00+00:00",
"score": 0,
"self_url": "https://feeds.libsyn.com/95610/rss",
"site_name": "",
"site_url": "",
"title": "MAPS Podcast",
"url": "https://feeds.libsyn.com/95610/rss",
"velocity": 0.028,
"version": "rss20"
}

View File

@ -26,16 +26,23 @@
passthru.initFeedScript = pkgs.writeShellScript
"init-feed"
''
# this is the `nix run '.#init-feed' <url>` script`
sources_dir=modules/data/feeds/sources
name="$1"
url="https://$name"
# prettify the URL, by default
name=$( \
echo "$1" \
| sed 's|^https://||' \
| sed 's|^http://||' \
| sed 's|^www\.||' \
| sed 's|/+$||' \
)
json_path="$sources_dir/$name/default.json"
# the name could have slashes in it, so we want to mkdir -p that
# but in a way where the least could go wrong.
pushd "$sources_dir"; mkdir -p "$name"; popd
${./update.py} "$url" "$json_path"
${./update.py} "$name" "$json_path"
cat "$json_path"
'';
}

View File

@ -13,9 +13,13 @@ logging.getLogger().setLevel(logging.DEBUG)
logging.getLogger().addHandler(logging.StreamHandler(sys.stdout))
logging.getLogger(__name__).debug("logging enabled")
url = coerce_url(url, default_scheme="https")
items = search(url, total_timeout=180, request_timeout=90, max_content_length=100*1024*1024)
items = sort_urls(items)
def try_scheme(url: str, scheme: str):
url = coerce_url(url, default_scheme=scheme)
print(f"trying {url}")
items = search(url, total_timeout=180, request_timeout=90, max_content_length=100*1024*1024)
return sort_urls(items)
items = try_scheme(url, "https") or try_scheme(url, "http")
# print all results
serialized = [item.serialize() for item in items]