Python
fromhttps://daniel.feldroy.com
1 day agoWord counter that ignores Markdown
A Python word counter using regular expressions offers a fun challenge for those who enjoy coding puzzles.
When you paste your perfectly formatted article and what happens? The headers show literal ## symbols. Bold text keeps the asterisks. Code blocks lose all formatting. Tables? They just break completely.
What happens when the AI companies (inevitably) encounter spam and attempts at SEO/GEO manipulation in the markdown files targeted to bots? What happens when the .md files no longer provide an equivalent experience to what users are seeing? What happens if they continue crawling those pages but actually toss them out before using the content to form a response? ...And we keep conflating "bot crawling activity" with "the bots are using/liking my markdown content?" How will we know if they're actually using the .md files or not?
This program implements a command-line interface that accepts a markdown file as a command-line argument, reads its content, and prints the entire content to the terminal.