mirror of
https://github.com/fmhy/edit.git
synced 2026-01-18 01:41:52 +11:00
chore(build): rewrite for new structure
This commit is contained in:
parent
23389c69df
commit
4da817f466
3 changed files with 42 additions and 36 deletions
61
.github/add-headers.py
vendored
61
.github/add-headers.py
vendored
|
|
@ -2,67 +2,70 @@ import os
|
||||||
|
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
"AdblockVPNGuide.md": [
|
"adblockvpnguide.md": [
|
||||||
"Adblocking / Privacy",
|
"Adblocking / Privacy",
|
||||||
"Adblocking, Privacy, VPN's, Proxies, Antivirus",
|
"Adblocking, Privacy, VPN's, Proxies, Antivirus",
|
||||||
],
|
],
|
||||||
"AI.md": [
|
"ai.md": [
|
||||||
"Artificial Intelligence",
|
"Artificial Intelligence",
|
||||||
"Chat Bots, Text Generators, Image Generators, ChatGPT Tools",
|
"Chat Bots, Text Generators, Image Generators, ChatGPT Tools",
|
||||||
],
|
],
|
||||||
"Android-iOSGuide.md": ["Android / iOS", "Apps, Jailbreaking, Android Emulators"],
|
"android-iosguide.md": ["Android / iOS", "Apps, Jailbreaking, Android Emulators"],
|
||||||
"AudioPiracyGuide.md": [
|
"audiopiracyguide.md": [
|
||||||
"Music / Podcasts / Radio",
|
"Music / Podcasts / Radio",
|
||||||
"Stream Audio, Download Audio, Torrent Audio",
|
"Stream Audio, Download Audio, Torrent Audio",
|
||||||
],
|
],
|
||||||
"Beginners-Guide.md": ["Beginners Guide", "A Guide for Beginners to Piracy"],
|
"beginners-guide.md": ["Beginners Guide", "A Guide for Beginners to Piracy"],
|
||||||
"DownloadPiracyGuide.md": [
|
"downloadpiracyguide.md": [
|
||||||
"Downloading",
|
"Downloading",
|
||||||
"Download Sites, Software Sites, Open Directories",
|
"Download Sites, Software Sites, Open Directories",
|
||||||
],
|
],
|
||||||
"EDUPiracyGuide.md": ["Educational", "Courses, Documentaries, Learning Resources"],
|
"edupiracyguide.md": ["Educational", "Courses, Documentaries, Learning Resources"],
|
||||||
"GamingPiracyGuide.md": [
|
"gamingpiracyguide.md": [
|
||||||
"Gaming / Emulation",
|
"Gaming / Emulation",
|
||||||
"Download Games, ROMs, Gaming Tools",
|
"Download Games, ROMs, Gaming Tools",
|
||||||
],
|
],
|
||||||
"LinuxGuide.md": ["Linux / MacOS", "Apps, Software Sites, Gaming"],
|
"linuxguide.md": ["Linux / MacOS", "Apps, Software Sites, Gaming"],
|
||||||
"MISCGuide.md": ["Miscellaneous", "Extensions, Indexes, News, Health, Food, Fun"],
|
"miscguide.md": ["Miscellaneous", "Extensions, Indexes, News, Health, Food, Fun"],
|
||||||
"NSFWPiracy.md": ["NSFW", "NSFW Indexes, Streaming, Downloading"],
|
"nsfwpiracy.md": ["NSFW", "NSFW Indexes, Streaming, Downloading"],
|
||||||
"Non-English.md": ["Non-English", "International Piracy Sites"],
|
"non-english.md": ["Non-English", "International Piracy Sites"],
|
||||||
"ReadingPiracyGuide.md": [
|
"readingpiracyguide.md": [
|
||||||
"Books / Comics / Manga",
|
"Books / Comics / Manga",
|
||||||
"Books, Comics, Magazines, Newspapers",
|
"Books, Comics, Magazines, Newspapers",
|
||||||
],
|
],
|
||||||
"gaming-tools.md": ["Gaming Tools", "Gaming Optimization, Game Launchers, Multiplayer"],
|
"gaming-tools.md": [
|
||||||
"DEVTools.md": ["Developer Tools", "Git, Hosting, App Dev, Software Dev"],
|
"Gaming Tools",
|
||||||
|
"Gaming Optimization, Game Launchers, Multiplayer",
|
||||||
|
],
|
||||||
|
"devtools.md": ["Developer Tools", "Git, Hosting, App Dev, Software Dev"],
|
||||||
"img-tools.md": ["Image Tools", "Image Editors, Generators, Compress"],
|
"img-tools.md": ["Image Tools", "Image Editors, Generators, Compress"],
|
||||||
"Audio-Tools.md": [
|
"audio-tools.md": [
|
||||||
"Audio Tools",
|
"Audio Tools",
|
||||||
"Audio Players, Audio Editors, Audio Downloaders",
|
"Audio Players, Audio Editors, Audio Downloaders",
|
||||||
],
|
],
|
||||||
"System-Tools.md": [
|
"system-tools.md": [
|
||||||
"System Tools",
|
"System Tools",
|
||||||
"System Tools, Hardware Tools, Windows ISOs, Customization",
|
"System Tools, Hardware Tools, Windows ISOs, Customization",
|
||||||
],
|
],
|
||||||
"File-Tools.md": ["File Tools", "Download Managers, File Hosting, File Archivers"],
|
"file-tools.md": ["File Tools", "Download Managers, File Hosting, File Archivers"],
|
||||||
"Video-Tools.md": [
|
"video-tools.md": [
|
||||||
"Video Tools",
|
"Video Tools",
|
||||||
"Video Players, Video Editors, Live Streaming, Animation",
|
"Video Players, Video Editors, Live Streaming, Animation",
|
||||||
],
|
],
|
||||||
"Text-Tools.md": ["Text Tools", "Text Editors, Pastebins, Fonts, Translators"],
|
"text-tools.md": ["Text Tools", "Text Editors, Pastebins, Fonts, Translators"],
|
||||||
# "Internet-Tools.md": ["Internet Tools", "Browsers, Extensions, Search Engines"],
|
# "internet-tools.md": ["Internet Tools", "Browsers, Extensions, Search Engines"],
|
||||||
"Social-Media-Tools.md": [
|
"social-media-tools.md": [
|
||||||
"Social Media Tools",
|
"Social Media Tools",
|
||||||
"Discord Tools, Reddit Tools, YouTube Tools",
|
"Discord Tools, Reddit Tools, YouTube Tools",
|
||||||
],
|
],
|
||||||
"STORAGE.md": ["Storage", "Sections too big to fit on main pages"],
|
"storage.md": ["Storage", "Sections too big to fit on main pages"],
|
||||||
"TorrentPiracyGuide.md": ["Torrenting", "Torrent Clients, Torrent Sites, Trackers"],
|
"torrentpiracyguide.md": ["Torrenting", "Torrent Clients, Torrent Sites, Trackers"],
|
||||||
"VideoPiracyGuide.md": [
|
"videopiracyguide.md": [
|
||||||
"Movies / TV / Anime",
|
"Movies / TV / Anime",
|
||||||
"Stream Videos, Download Videos, Torrent Videos",
|
"Stream Videos, Download Videos, Torrent Videos",
|
||||||
],
|
],
|
||||||
"base64.md": ["Base64", "Base64 storage"],
|
"base64.md": ["Base64", "Base64 storage"],
|
||||||
"UnsafeSites.md": ["Unsafe Sites", "Unsafe/harmful sites to avoid."],
|
"unsafesites.md": ["Unsafe Sites", "Unsafe/harmful sites to avoid."],
|
||||||
}
|
}
|
||||||
|
|
||||||
title = '<div class="space-y-2 not-prose"><h1 class="text-4xl font-extrabold tracking-tight text-primary underline lg:text-5xl lg:leading-[3.5rem]">'
|
title = '<div class="space-y-2 not-prose"><h1 class="text-4xl font-extrabold tracking-tight text-primary underline lg:text-5xl lg:leading-[3.5rem]">'
|
||||||
|
|
@ -82,13 +85,13 @@ def getHeader(page: str):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
files = os.listdir(".")
|
files = os.listdir("docs/")
|
||||||
for file in files:
|
for file in files:
|
||||||
if file in headers:
|
if file in headers:
|
||||||
with open(file, "r", encoding="utf-8") as f:
|
with open(f"docs/{file}", "r", encoding="utf-8") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
if not content.startswith("---"):
|
if not content.startswith("---"):
|
||||||
with open(file, "w", encoding="utf-8") as f2:
|
with open(f"docs/{file}", "w", encoding="utf-8") as f2:
|
||||||
header = getHeader(file)
|
header = getHeader(file)
|
||||||
f2.write(header + content)
|
f2.write(header + content)
|
||||||
|
|
||||||
|
|
|
||||||
16
.github/replace.py
vendored
16
.github/replace.py
vendored
|
|
@ -36,7 +36,11 @@ def individual(text: str):
|
||||||
text = re.sub("/linuxguide#software-sites2", "/linuxguide#software-sites-1", text)
|
text = re.sub("/linuxguide#software-sites2", "/linuxguide#software-sites-1", text)
|
||||||
text = re.sub("/linuxguide#software_sites", "/linuxguide#software-sites", text)
|
text = re.sub("/linuxguide#software_sites", "/linuxguide#software-sites", text)
|
||||||
text = re.sub("/non-english#reading10", "/non-english#reading-9", text)
|
text = re.sub("/non-english#reading10", "/non-english#reading-9", text)
|
||||||
text = re.sub("/storage#satellite-.26amp.3B_street_view_maps", "/storage#satellite-street-view-maps", text)
|
text = re.sub(
|
||||||
|
"/storage#satellite-.26amp.3B_street_view_maps",
|
||||||
|
"/storage#satellite-street-view-maps",
|
||||||
|
text,
|
||||||
|
)
|
||||||
|
|
||||||
# Base64-decoder script link
|
# Base64-decoder script link
|
||||||
text = re.sub(
|
text = re.sub(
|
||||||
|
|
@ -259,15 +263,15 @@ def replace_urls(text):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
files = os.listdir(".")
|
files = os.listdir("docs")
|
||||||
for file in files:
|
for file in files:
|
||||||
if file.endswith(".md"):
|
if file.endswith(".md"):
|
||||||
with open(file, "r", encoding="utf-8") as f:
|
with open(f"docs/{file}", "r", encoding="utf-8") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
content = replace_urls(content)
|
content = replace_urls(content)
|
||||||
if file == "Beginners-Guide.md":
|
if file == "beginners-guide.md":
|
||||||
content = beginners_guide(content)
|
content = beginners_guide(content)
|
||||||
with open(file, "w", encoding="utf-8") as f2:
|
with open(f"docs/{file}", "w", encoding="utf-8") as f2:
|
||||||
f2.write(content)
|
f2.write(content)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -277,5 +281,5 @@ what = """
|
||||||

|

|
||||||
"""
|
"""
|
||||||
|
|
||||||
with open("meow.md", "w", encoding="utf-8") as file:
|
with open("docs/meow.md", "w", encoding="utf-8") as file:
|
||||||
file.write(what)
|
file.write(what)
|
||||||
|
|
|
||||||
1
.github/script.sh
vendored
1
.github/script.sh
vendored
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
python .github/replace.py
|
python .github/replace.py
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue