fix replacements
This commit is contained in:
parent
f8fa8bb698
commit
2da650dccb
42
.github/replace.py
vendored
42
.github/replace.py
vendored
@ -17,9 +17,9 @@ def replaces_for_beginners_guide(text):
|
||||
|
||||
def do_some_individual_replaces(text):
|
||||
#special cases of link not replaced correctly
|
||||
text = re.sub('.pages.dev/storage/#encode--decode_urls', '.pages.dev/storage/#encode--decode-urls', text)
|
||||
text = re.sub('.pages.dev/base64/#do-k-ument', '.pages.dev/base64/#do_k_ument', text)
|
||||
text = re.sub('.pages.dev/devtools/#machine-learning2', '.pages.dev/devtools/#machine-learning-1', text)
|
||||
text = re.sub('/storage/#encode--decode_urls', '/storage/#encode--decode-urls', text)
|
||||
text = re.sub('/base64/#do-k-ument', '/base64/#do_k_ument', text)
|
||||
text = re.sub('/devtools/#machine-learning2', '/devtools/#machine-learning-1', text)
|
||||
|
||||
#Base64-decoder script link
|
||||
text = re.sub('\*\* site or extension\.\n', '** site or extension\.\nAlternatively, install this [userscript](https://rentry.co/wc7s2/raw)\n', text, flags=re.MULTILINE)
|
||||
@ -52,25 +52,25 @@ def remove_backtowiki_and_toc(text):
|
||||
return text
|
||||
|
||||
def replace_domain_and_page(text):
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/ai', 'fmhy.pages.dev/ai', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/adblock-vpn-privacy', 'fmhy.pages.dev/adblockvpnguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/android', 'fmhy.pages.dev/android-iosguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/video', 'fmhy.pages.dev/videopiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/audio', 'fmhy.pages.dev/audiopiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/games', 'fmhy.pages.dev/gamingpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/reading', 'fmhy.pages.dev/readingpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/download', 'fmhy.pages.dev/downloadpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/torrent', 'fmhy.pages.dev/torrentpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/edu', 'fmhy.pages.dev/edupiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/tools-misc', 'fmhy.pages.dev/toolsguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/linux', 'fmhy.pages.dev/linuxguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/non-eng', 'fmhy.pages.dev/non-english', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/misc', 'fmhy.pages.dev/miscguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/storage', 'fmhy.pages.dev/storage', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/dev-tools', 'fmhy.pages.dev/devtools', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/img-tools', 'fmhy.pages.dev/img-tools', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/ai', '/ai', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/adblock-vpn-privacy', '/adblockvpnguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/android', '/android-iosguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/video', '/videopiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/audio', '/audiopiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/games', '/gamingpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/reading', '/readingpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/download', '/downloadpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/torrent', '/torrentpiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/edu', '/edupiracyguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/tools-misc', '/toolsguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/linux', '/linuxguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/non-eng', '/non-english', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/misc', '/miscguide', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/storage', '/storage', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/dev-tools', '/devtools', text)
|
||||
text = re.sub('www.reddit.com/r/FREEMEDIAHECKYEAH/wiki/img-tools', '/img-tools', text)
|
||||
|
||||
text = re.sub('github.com/nbats/FMHYedit/blob/main/base64.md#', 'fmhy.pages.dev/base64/#', text)
|
||||
text = re.sub('github.com/nbats/FMHYedit/blob/main/base64.md#', '/base64/#', text)
|
||||
|
||||
return text
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user