-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy path_update_feeds.py
More file actions
115 lines (107 loc) · 4.8 KB
/
_update_feeds.py
File metadata and controls
115 lines (107 loc) · 4.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/env python3
import sys
filepath = "src/services/news.service.ts"
with open(filepath, "r", encoding="utf-8") as f:
content = f.read()
old_start = " // Human Side of Tech & Leadership"
old_end_marker = 'url: "https://lilianweng.github.io/index.xml",'
start_idx = content.index(old_start)
# Find the end marker and then the closing brace + comma after it
end_search_start = content.index(old_end_marker, start_idx)
# Find the closing "}," after the end marker
closing = content.index("},", end_search_start)
end_idx = closing + len("},")
old_section = content[start_idx:end_idx]
print("=== OLD SECTION ===")
print(old_section)
print("=== END OLD ===")
new_section = ' // Cloud & Infrastructure Engineering\n'
new_section += ' {\n'
new_section += ' name: "Cloudflare Blog",\n'
new_section += ' url: "https://blog.cloudflare.com/rss/",\n'
new_section += ' },\n'
new_section += ' // Human Side of Tech & Leadership\n'
new_section += ' {\n'
new_section += ' name: "The Engineering Manager",\n'
new_section += ' url: "https://theengineeringmanager.com/feed/",\n'
new_section += ' },\n'
new_section += ' { name: "Rands in Repose", url: "https://randsinrepose.com/feed/" },\n'
new_section += ' {\n'
new_section += ' name: "Irrational Exuberance (Will Larson)",\n'
new_section += ' url: "https://lethain.com/feeds.xml",\n'
new_section += ' },\n'
new_section += ' { name: "LeadDev", url: "https://leaddev.com/feed" },\n'
new_section += ' { name: "StaffEng", url: "https://staffeng.com/rss" },\n'
new_section += ' {\n'
new_section += ' name: "Charity Majors (CTO Craft)",\n'
new_section += ' url: "https://charity.wtf/feed/",\n'
new_section += ' },\n'
new_section += ' // Substack & Independent - Architecture & Leadership\n'
new_section += ' {\n'
new_section += ' name: "The Pragmatic Engineer",\n'
new_section += ' url: "https://newsletter.pragmaticengineer.com/feed",\n'
new_section += ' },\n'
new_section += ' { name: "ByteByteGo System Design", url: "https://blog.bytebytego.com/feed" },\n'
new_section += ' { name: "Refactoring (Luca Rossi)", url: "https://refactoring.fm/feed" },\n'
new_section += ' {\n'
new_section += ' name: "Tidy First? (Kent Beck)",\n'
new_section += ' url: "https://tidyfirst.substack.com/feed",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "The Beautiful Mess (John Cutler)",\n'
new_section += ' url: "https://cutlefish.substack.com/feed",\n'
new_section += ' },\n'
new_section += ' { name: "Martin Fowler", url: "https://martinfowler.com/feed.atom" },\n'
new_section += ' { name: "LangChain Blog", url: "https://blog.langchain.dev/rss/" },\n'
new_section += ' // System Design & Architecture\n'
new_section += ' {\n'
new_section += ' name: "High Scalability",\n'
new_section += ' url: "https://highscalability.com/feed/",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "InfoQ",\n'
new_section += ' url: "https://feed.infoq.com/",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "The New Stack",\n'
new_section += ' url: "https://thenewstack.io/feed/",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "Architecture Notes",\n'
new_section += ' url: "https://architecturenotes.co/rss/",\n'
new_section += ' },\n'
new_section += ' // AI Agents, LLMs & Research\n'
new_section += ' { name: "Google Research", url: "https://research.google/blog/rss" },\n'
new_section += ' { name: "Hugging Face", url: "https://huggingface.co/blog/feed.xml" },\n'
new_section += ' {\n'
new_section += ' name: "BAIR (Berkeley AI)",\n'
new_section += ' url: "https://bair.berkeley.edu/blog/feed.xml",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += " name: \"Lil'Log (Lilian Weng)\",\n"
new_section += ' url: "https://lilianweng.github.io/index.xml",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "Anthropic Research",\n'
new_section += ' url: "https://www.anthropic.com/research/rss.xml",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "DeepMind Blog",\n'
new_section += ' url: "https://deepmind.google/blog/rss.xml",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "Meta AI Blog",\n'
new_section += ' url: "https://ai.meta.com/blog/rss/",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += ' name: "AI Snake Oil",\n'
new_section += ' url: "https://www.aisnakeoil.com/feed",\n'
new_section += ' },\n'
new_section += ' {\n'
new_section += " name: \"Simon Willison's Weblog\",\n"
new_section += ' url: "https://simonwillison.net/atom/everything/",\n'
new_section += ' },'
content = content[:start_idx] + new_section + content[end_idx:]
with open(filepath, "w", encoding="utf-8") as f:
f.write(content)
print("Done! Feeds updated successfully.")