{"slug": "miniflux-add-country-flags-to-all-feeds", "title": "★ miniflux: add country flags to all feeds 🌐", "summary": "A developer used OpenAI Codex to add emoji country flags to 164 of 687 RSS feed titles in their Miniflux server, with 523 feeds still lacking flags. The process involved sourcing origins from explicit statements on blogs and using idempotent SQL updates to preserve feed titles.", "body_md": "♠ **Problem statement**: given my miniflux server with hundreds of RSS feed\nsubscriptions, add emoji country flags to each feed title, representing their\ncountry of origin and/or the country they’re associated with 1.\n\nFor example:\n\nSome feeds may be identified with multiple flags. The distinction is purposely loose.\n\nI started to do this tagging process manually, throughout several weeks, until I exhausted the ones I knew about.\n\nThe next natural step, in 2026, is to resort to Gen AI to finish the heavy lifting, now that the initial pattern has been established.\n\nWith my [OpenAI Codex](https://perrotta.dev/2026/08/chatgpt-/-openai-/-codex-plan-usage/) subscription and pi, I prompted away:\n\nUser: List all prompts I ran in this session, bulleted list:\n\nThinking: Listing all user prompt messages\n\n- “Are you able to connect to my miniflux database in knol? (ssh knol) Creds are in /etc/miniflux.conf in knol.”\n- “Note that Alpine Linux uses doas, not sudo.”\n- “Are you able to find my list of subscriptions / feeds? There should be 687 of these.”\n- “Observe that some feed titles have flags in them.”\n- “I want to add a flag for the origin of each blog. Source a few feeds lacking flags and suggest which flags to add.”\n- “LGTM.”\n- “Source 10–15 more blogs.”\n- “LGTM.”\n- “Write a blog post about this work using /bloggify.”\n- “List all prompts I ran in this session, bulleted list.”\n\nHere are a few interesting bits produced by the agent. Note that I run the\ncoding harness (`pi`\n\n) from my laptop, not from my server. As such, all commands\nthat interact with the server do so via `ssh`\n\n. This is good enough for my\npurposes.\n\nCount all feeds:\n\n```\n% ssh knol 'doas sh -c '\\''. /etc/miniflux.conf; psql \"$DATABASE_URL\" -X -Atqc \"SELECT count(*) FROM feeds\"'\\'''\n687\n```\n\nSome titles already followed the convention:\n\n```\n780|37signals jobs 🇩🇰🇺🇸\n818|A cup of coffee by Quentin JOLY 🇫🇷\n1366|AI Engineer Guide 🇮🇳\n562|Adam Gordon Bell: Cascade Of Insights 🇨🇦\n916|Adam Johnson 🇬🇧\n```\n\nA pair of Unicode regional indicators forms a flag. Export the titles and count those pairs:\n\n```\n% ssh knol 'doas sh -c '\\''. /etc/miniflux.conf; psql \"$DATABASE_URL\" -X -q -c \\\n  \"COPY (SELECT id, title FROM feeds ORDER BY title) TO STDOUT WITH CSV\"'\\''' | \\\n  python3 -c 'import csv,sys,re; rows=list(csv.reader(sys.stdin)); p=re.compile(r\"[\\U0001F1E6-\\U0001F1FF]{2}\"); found=[(i,t,p.findall(t)) for i,t in rows if p.search(t)]; print(f\"feeds_with_flags={len(found)} flags={sum(len(x[2]) for x in found)}\")'\nfeeds_with_flags=148 flags=158\n```\n\nI did not infer origin from a name, domain, language, or current residence. Each\naddition needed an explicit source. For example, [Jeremy\nKeith](https://adactio.com/about/) says “I’m from Ireland originally”, [Andre\nGarzia](https://andregarzia.com/about.html) says he is originally from Brazil,\nand [Christian Rebischke](https://shibumi.dev/about/) describes himself as being\nfrom Germany.\n\nThe title itself is the metadata. Exact old-title guards made each update idempotent and prevented an accidental edit to a renamed feed:\n\n```\nBEGIN;\nUPDATE feeds\nSET title = 'Christian Rebischke: shibumi 🇩🇪'\nWHERE id = 207 AND title = 'Christian Rebischke: shibumi';\nUPDATE feeds\nSET title = 'Adactio: Journal by Jeremy Keith 🇮🇪'\nWHERE id = 1106 AND title = 'Adactio: Journal by Jeremy Keith';\nUPDATE feeds\nSET title = 'Adactio: Articles by Jeremy Keith 🇮🇪'\nWHERE id = 1107 AND title = 'Adactio: Articles by Jeremy Keith';\nUPDATE feeds\nSET title = 'Andre Alves Garzia 🇧🇷'\nWHERE id = 1481 AND title = 'Andre Alves Garzia';\nCOMMIT;\nBEGIN\nUPDATE 1\nUPDATE 1\nUPDATE 1\nUPDATE 1\nCOMMIT\n```\n\nA second sourced batch added 12 more titles. Compound origins stay compound:\n\n```\n430|Burak Karakan: ps 🇩🇪🇹🇷\n1022|Amjad Masad 🇯🇴🇺🇸\n1076|Christopher Olah 🇨🇦\n1100|Cognitive Medium by Michael Nielsen 🇦🇺🇺🇸\n1174|Andrej Karpathy 🇸🇰🇨🇦\n1489|Jeff Geerling 🇺🇸\n```\n\nThe same audit now reports:\n\n```\ntotal=687\nfeeds_with_flags=164\nflags=178\nwithout_flags=523\n```\n\nOnly 523 to go.\n\nThis is a practical excuse to tokenmaxx, eh?!\n\nWeb searches are done with [pi-web-search](https://github.com/thiagowfx/.dotfiles/tree/e6d1452118ad2b2c317545571fd0923519bf7a41/pi/.pi/agent/local/web-search). ∎\n\nWhy? Purely as a matter of context, and for an extra dose of serendipity\nvia diversity. For example, it’s often exciting to me to read posts from\nother Canadians, for no particular reason. [↩︎](https://perrotta.dev/2026/08/miniflux-add-country-flags-to-all-feeds/#fnref:1)\n\n— § —\n\nReply via [email](mailto:serendipity@perrotta.dev?subject=Reply to: miniflux: add country flags to all feeds 🌐)", "url": "https://wpnews.pro/news/miniflux-add-country-flags-to-all-feeds", "canonical_source": "https://perrotta.dev/2026/08/miniflux-add-country-flags-to-all-feeds/", "published_at": "2026-08-27 23:20:26+00:00", "updated_at": "2026-08-28 00:19:16.142867+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents"], "entities": ["OpenAI Codex", "Miniflux"], "alternates": {"html": "https://wpnews.pro/news/miniflux-add-country-flags-to-all-feeds", "markdown": "https://wpnews.pro/news/miniflux-add-country-flags-to-all-feeds.md", "text": "https://wpnews.pro/news/miniflux-add-country-flags-to-all-feeds.txt", "jsonld": "https://wpnews.pro/news/miniflux-add-country-flags-to-all-feeds.jsonld"}}