From bf52c2748adf4455d0e5276d6adf1c752dcff965 Mon Sep 17 00:00:00 2001 From: maxiwee69 Date: Wed, 24 Jan 2024 20:03:56 +0100 Subject: [PATCH] added some meta tag thing --- cleanlibrary/index.html | 3 ++- depictions/index.html | 1 + fiveicondock/index.html | 1 + learntotweak/aarch64/index.html | 1 + learntotweak/index.html | 1 + learntotweak/step2/index.html | 1 + learntotweak/step3/index.html | 1 + noballz/index.html | 1 + nobar/index.html | 1 + nodock/index.html | 1 + nolabels/index.html | 1 + nopill/index.html | 1 + noquickies/index.html | 1 + projects/index.html | 1 + projects/mytweaks/index.html | 1 + tag.py | 29 +++++++++++++++++++++++++++++ 16 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 tag.py diff --git a/cleanlibrary/index.html b/cleanlibrary/index.html index 596c39e..a5f5770 100755 --- a/cleanlibrary/index.html +++ b/cleanlibrary/index.html @@ -1,6 +1,7 @@ + CleanLibrary @@ -10,7 +11,7 @@
Back to My Tweaks

CleanLibrary

-

This is probal ymy lamest tweak. It hides the names of the categoreis in the app library.

+

This is probal my lamest tweak. It hides the names of the categories in the app library.

CleanLibrary in action diff --git a/depictions/index.html b/depictions/index.html index ebe9736..63f63c4 100755 --- a/depictions/index.html +++ b/depictions/index.html @@ -1,6 +1,7 @@ + PackageName diff --git a/fiveicondock/index.html b/fiveicondock/index.html index a69c0e9..b7e7b7c 100755 --- a/fiveicondock/index.html +++ b/fiveicondock/index.html @@ -1,6 +1,7 @@ + FiveIconDock diff --git a/learntotweak/aarch64/index.html b/learntotweak/aarch64/index.html index eb1bd50..78ba14f 100644 --- a/learntotweak/aarch64/index.html +++ b/learntotweak/aarch64/index.html @@ -1,6 +1,7 @@ + Maxiwee diff --git a/learntotweak/index.html b/learntotweak/index.html index 59b3bd1..c54add1 100644 --- a/learntotweak/index.html +++ b/learntotweak/index.html @@ -1,6 +1,7 @@ + Maxiwee diff --git a/learntotweak/step2/index.html b/learntotweak/step2/index.html index eee374f..9bcb71c 100644 --- a/learntotweak/step2/index.html +++ b/learntotweak/step2/index.html @@ -1,6 +1,7 @@ + Maxiwee diff --git a/learntotweak/step3/index.html b/learntotweak/step3/index.html index 8c7a8a2..c7e2510 100644 --- a/learntotweak/step3/index.html +++ b/learntotweak/step3/index.html @@ -1,6 +1,7 @@ + Maxiwee diff --git a/noballz/index.html b/noballz/index.html index e3c2f75..4bccbb9 100755 --- a/noballz/index.html +++ b/noballz/index.html @@ -1,6 +1,7 @@ + NoBallz diff --git a/nobar/index.html b/nobar/index.html index 40807b1..906bfa5 100755 --- a/nobar/index.html +++ b/nobar/index.html @@ -1,6 +1,7 @@ + NoBar diff --git a/nodock/index.html b/nodock/index.html index 76779d3..aeb115e 100755 --- a/nodock/index.html +++ b/nodock/index.html @@ -1,6 +1,7 @@ + NoDock diff --git a/nolabels/index.html b/nolabels/index.html index 1c5afa7..7d039b4 100755 --- a/nolabels/index.html +++ b/nolabels/index.html @@ -1,6 +1,7 @@ + NoLabels diff --git a/nopill/index.html b/nopill/index.html index ca28059..bb852de 100755 --- a/nopill/index.html +++ b/nopill/index.html @@ -1,6 +1,7 @@ + NoPill diff --git a/noquickies/index.html b/noquickies/index.html index 8d8531a..d3249b0 100755 --- a/noquickies/index.html +++ b/noquickies/index.html @@ -1,6 +1,7 @@ + NoQuickies diff --git a/projects/index.html b/projects/index.html index 3084412..24fdde5 100644 --- a/projects/index.html +++ b/projects/index.html @@ -1,6 +1,7 @@ + Maxiwee diff --git a/projects/mytweaks/index.html b/projects/mytweaks/index.html index 0824214..1f4a2b3 100644 --- a/projects/mytweaks/index.html +++ b/projects/mytweaks/index.html @@ -1,6 +1,7 @@ + My Tweaks diff --git a/tag.py b/tag.py new file mode 100644 index 0000000..5de32ca --- /dev/null +++ b/tag.py @@ -0,0 +1,29 @@ +import os + +# Define the meta tag you want to add +meta_tag = '' + +# Specify the directory you want to start from +root_dir = r'C:\Users\maxi\maxiwee69.github.io' + +# Walk through all subdirectories +for dirpath, dirnames, filenames in os.walk(root_dir): + for filename in filenames: + # Check if the file is an index.html file + if filename == 'index.html': + filepath = os.path.join(dirpath, filename) + print(f'Found file: {filepath}') + with open(filepath, 'r+') as file: + # Read the existing content + content = file.read() + # Check if the meta tag already exists + if meta_tag not in content: + # If not, add the meta tag after the opening head tag + content = content.replace('', '\n' + meta_tag, 1) + # Write the new content back to the file + file.seek(0) + file.write(content) + file.truncate() + print(f'Meta tag added to: {filepath}') + else: + print(f'Meta tag already exists in: {filepath}')