Work friendly request to regex hacker to hobbyist #274
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ken_fallon Could the Hobby Public Radio site be Regexed to change the page titles from Hacker to Hobbyist?
The generator should have options to regex the replacement of the following
hacker to hobbyist
hackers to hobbyists
Completing regex as "words" except when used with hackerpublicradio
Ensure that the regex respects the CaSe Of ThE wOrDs
Are these changes just for the non-user generated portions of the site--aka main header, introductory text? There are some sections a global regex would cause issues:
If the filter is to change hackers to hobbyists, the above ends up with: "...interest to hobbyists, makers, hobbyists, etc."
In the History section of the About page I feel the retcon of Hobby Public Radio needs some explanation and not just a simple swap. I understand the need for the Hobby Public Radio url and naming, but I think there needs some explanation and linkage to Hacker Public Radio. It is going to be very confusing when every episode starts with "This is Hacker Public Radio..."
For the start of the History section something like:
We can have a configuration option which triggers more targeted changes to specific parts of the generated text.
The purpose is to allow people who know they want to go to Hacker Public Radio, but some expensive cyber firewall is blocking all sites with the word hacker.
I suggest you use this ticket to work on a proper replacement strategy with the definitions coming from a configuration file.
I'll hack together a brute force sed script for now.
From what I understand:
SELECT id, title, summary, notes, tags FROM eps where (title like '%hacker%' or eps.summary like '%hacker%' or notes like '%hacker%' or tags like '%hacker%') and notes not like '%hackerpublicradio.org/%'
The templating system isn't really designed to search and replace itself. If you really don't want the word hacker to show up anywhere on the site and it to automatically catch new references to hacker in the templates or in the user content, it will be easier to create an external script (store it in the utils directory), and run it on the generated html.
If you just need a site that "looks friendlier" for resumes or general consumption for some people, I think what I proposed in my PR works. I will update the trolling function names to something less triggering 😉
One other way that might prevent that filtering is to use html hex/decimal entities to replace the word hacker in content and url encoded hex entities to replace the word hacker in URLs. Would need tested but would probably get past filters.
Normally anything dumb enough to block solely on the word Hacker, is sufficiently thrown off the scent by using the domain Hobby and checking the first few pages. Oddly enough the links to hackerpublicradio didn't seem to bother them.
So far when I hear about products that do this, I contact the companies and have had success in getting them to remove the block on HPR.
Companies can and do block the site based on the dns query hacker, install their own cert on their employees computers to check what's going on.
A sed script after producing is the way to go for now.
Let's put this ticket on hold.
I reopened this ticket as I was not thinking clearly. Apologies to @rho_n and @archer72 for this.