Compare commits
6 Commits
03b1d6a38a
...
499b9a3e74
Author | SHA1 | Date |
---|---|---|
ktyl | 499b9a3e74 | |
ktyl | 82cfd03e9f | |
ktyl | 23134ef83c | |
ktyl | 0cacdd0b10 | |
ktyl | cb39047ee9 | |
ktyl | f86bbad8bb |
|
@ -0,0 +1,6 @@
|
|||
feed:
|
||||
python feed.py `pwd`
|
||||
|
||||
rss: feed
|
||||
|
||||
.PHONY: feed
|
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import markdown
|
||||
import pathlib
|
||||
import sys
|
||||
import re
|
||||
import glob
|
||||
|
||||
def print_usage():
|
||||
print("\nusage: python feed.py ROOT\n")
|
||||
print("\n")
|
||||
print("\t\ROOT\tbase folder")
|
||||
|
||||
def validate():
|
||||
# check args for at least one file path
|
||||
if len(sys.argv) < 2:
|
||||
print_usage()
|
||||
sys.exit(1)
|
||||
|
||||
validate()
|
||||
|
||||
base_folder = sys.argv[1]
|
||||
|
||||
def get_paths() -> [str]:
|
||||
return [x for x in glob.glob(f"{base_folder}/*.md")]
|
||||
|
||||
def get_text(path):
|
||||
with open(path) as f:
|
||||
return f.read()
|
||||
|
||||
#def to_html(md : str) -> str:
|
||||
# return markdown.markdown(md, extensions=["fenced_code"])
|
||||
|
||||
def get_entry(path):
|
||||
return get_title(get_text(path))
|
||||
|
||||
def get_title(md):
|
||||
return re.compile(r"^# (.+)\n").match(md).group(1)
|
||||
|
||||
def get_entries() -> [str]:
|
||||
return "\n\n".join([get_entry(p) for p in get_paths()])
|
||||
|
||||
def get_header() -> str:
|
||||
return """<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
||||
<channel>
|
||||
<title></title>
|
||||
<link>https://ktyl.dev/garden</link>
|
||||
<description></description>
|
||||
<atom:link href="https://ktyl.dev/garden/feed.xml" rel="self" type="application/rss+xml"/>
|
||||
"""
|
||||
|
||||
def get_footer() -> str:
|
||||
return "\n</channel></rss>"
|
||||
|
||||
print(get_header())
|
||||
print(get_entries())
|
||||
print(get_footer())
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
python feed.py `pwd`
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
||||
<channel>
|
||||
<title></title>
|
||||
<link>https://ktyl.dev/garden</link>
|
||||
<description></description>
|
||||
<atom:link href="https://ktyl.dev/garden/feed.xml" rel="self" type="application/rss+xml"/>
|
||||
|
||||
Digital Gardens
|
||||
|
||||
RSS
|
||||
|
||||
</channel></rss>
|
|
@ -0,0 +1,5 @@
|
|||
# Digital Gardens
|
||||
|
||||
* Obsidian
|
||||
* Notion
|
||||
* Git
|
|
@ -1,16 +1,22 @@
|
|||
# RSS
|
||||
|
||||
Really Simple Syndication (RSS) is a an ancient file format for communicating updates over the Web.
|
||||
Really Simple Syndication (RSS) is an ancient file format for communicating updates over the Web, and my personal favourite.
|
||||
|
||||
## Stubs:
|
||||
* [It's Time for an RSS Revival](https://www.wired.com/story/rss-readers-feedly-inoreader-old-reader/)
|
||||
|
||||
* readers
|
||||
* feed generation
|
||||
### Stubs:
|
||||
|
||||
## YouTube Subscriptions
|
||||
* my curated feeds
|
||||
* reader applications
|
||||
|
||||
## Technical Simplicity
|
||||
|
||||
From a technical perspective, like [Gemini](gemini://gemini.circumlunar.space) [\(HTTP\)](https://gemini.circumlunar.space/) it's grokkable with a couple good reads of the specification. I wrote [a simple generator](https://ktyl.dev/blog/2022/6/3/rss.md)] for my blog posts, and am now working on [a simpler one](./feed.py) for the garden.
|
||||
|
||||
## Managing YouTube Subscriptions
|
||||
|
||||
There are many reasons to avoid the YouTube homepage, such as recommended videos or the accursed Shorts.
|
||||
Since RSS feeds are published per-channel, it's totally possible to circumvent its subscription system entirely - including having to make an account - and keep track of channels one enjoys with RSS feeds instead.
|
||||
YouTube publishes channel-specific RSS feeds, making it totally possible to circumvent its subscription system entirely - including having to make an account - and keep track of channels one enjoys with RSS feeds instead.
|
||||
Get a channel's ID:
|
||||
|
||||
1. Go to the channel's page
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.landing .fsText a {
|
||||
.landing a {
|
||||
color: var(--foreground-inactive);
|
||||
font-size: 2em;
|
||||
transform: translate(0,50%);
|
||||
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.landing .fsText a:hover {
|
||||
.landing a:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,6 @@
|
|||
|
||||
.landing .socials i {
|
||||
color: var(--foreground-inactive);
|
||||
font-size: 3.5em;
|
||||
padding: 0 .07em;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,12 @@ ul.nav-links {
|
|||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
.nav .nav-links li a {
|
||||
color: var(--foreground-inactive);
|
||||
font-size: 1.4em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav li a::before {
|
||||
content: "/";
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
}
|
||||
|
||||
.title h1 {
|
||||
font-size: 1.4em;
|
||||
padding-bottom: 0;
|
||||
margin-bottom:0;
|
||||
margin-top:0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<ul class="nav-links">
|
||||
<li><a href="/about.html" class="fsText">about</a></li>
|
||||
<li><a href="/blog.html" class="fsText">blog</a></li>
|
||||
<li><a href="/gallery.html" class="fsText">gallery</a></li>
|
||||
<li><a href="/about.html">about</a></li>
|
||||
<li><a href="/blog.html">blog</a></li>
|
||||
<li><a href="/gallery.html">gallery</a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<div class="title">
|
||||
<h1 class="fsText"><a href="https://ktyl.dev/">ktyl.dev</a><span class="pageTitle">
|
||||
<h1><a href="https://ktyl.dev/">ktyl.dev</a><span class="pageTitle">
|
||||
|
|
|
@ -14,4 +14,8 @@
|
|||
--color3: #ff00ff;
|
||||
--color4: #ffff00;
|
||||
--color5: #00ffff;
|
||||
|
||||
/* TODO: extract general varibles file ? */
|
||||
/* Text */
|
||||
--font-size: 1.4em;
|
||||
}
|
||||
|
|
|
@ -21,21 +21,8 @@ li {
|
|||
display:inline;
|
||||
}
|
||||
|
||||
a.fsText {
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--foreground-inactive);
|
||||
transform: scale(1);
|
||||
transition: background-color 0.2s, color 0.2s, transform 0.2s;
|
||||
}
|
||||
|
||||
.fsText a {
|
||||
text-decoration: none;
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
.fsText {
|
||||
--font-size: 1.4em;
|
||||
font-size: var(--font-size);
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue