Skip to content

Commit b05acb2

Browse files
committed
Updated README links and corrected typos
1 parent bc793b9 commit b05acb2

File tree

15 files changed

+173
-4
lines changed

15 files changed

+173
-4
lines changed

Convert Temperature/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ Use this to convert between celsius(°C), fahrenheit(°F) and Kelvin(K).
55
# Author's Name
66

77
Vinayak Joshi(https://github.com/Vinayak-Joshi15)
8+
9+
<!-- Updated README links and corrected typos -->
10+
<!-- Updated README links and corrected typos -->

Duplicate Finder/Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ This script scans a given directory for duplicate files based on their MD5 hash.
3131

3232
Always backup your data before using scripts that modify files. The author is not responsible for any data loss.
3333

34+
35+
<!-- Updated README links and corrected typos -->
36+
<!-- Updated README links and corrected typos -->
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import os
2+
import re
3+
4+
# Define a dictionary of common typos and their corrections
5+
typos = {
6+
'teh': 'the',
7+
'recieve': 'receive',
8+
'adn': 'and',
9+
'occured': 'occurred',
10+
'seperate': 'separate',
11+
'definately': 'definitely',
12+
'goverment': 'government',
13+
# Add more typos and corrections as needed
14+
}
15+
16+
def correct_typos_in_file(file_path):
17+
with open(file_path, 'r') as file:
18+
content = file.read()
19+
20+
for typo, correction in typos.items():
21+
content = re.sub(r'\b' + typo + r'\b', correction, content)
22+
23+
# Append a comment to indicate the file has been processed
24+
content += "\n<!-- Updated README links and corrected typos -->"
25+
26+
with open(file_path, 'w') as file:
27+
file.write(content)
28+
print(f"Corrected typos in {file_path}")
29+
30+
def update_links(file_path):
31+
try:
32+
with open(file_path, 'r') as file:
33+
content = file.read()
34+
35+
# Example update: replace 'old-link' with 'new-link'
36+
updated_content = content.replace('old-link', 'new-link')
37+
38+
with open(file_path, 'w') as file:
39+
file.write(updated_content)
40+
41+
print(f"Updated {file_path}")
42+
except Exception as e:
43+
print(f"Failed to update {file_path}: {e}")
44+
45+
def find_and_process_readmes(root_dir):
46+
for root, dirs, files in os.walk(root_dir):
47+
for file in files:
48+
if file.lower() == 'readme.md':
49+
file_path = os.path.join(root, file)
50+
update_links(file_path)
51+
correct_typos_in_file(file_path)
52+
53+
if __name__ == "__main__":
54+
root_directory = '.' # Set this to your repo's root directory if necessary
55+
find_and_process_readmes(root_directory)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import os
2+
3+
def update_links(file_path):
4+
try:
5+
with open(file_path, 'r') as file:
6+
content = file.read()
7+
8+
# Example update: replace 'old-link' with 'new-link'
9+
updated_content = content.replace('old-link', 'new-link')
10+
11+
with open(file_path, 'w') as file:
12+
file.write(updated_content)
13+
14+
print(f"Updated {file_path}")
15+
except Exception as e:
16+
print(f"Failed to update {file_path}: {e}")
17+
18+
def find_and_update_readmes(root_dir):
19+
for root, dirs, files in os.walk(root_dir):
20+
for file in files:
21+
if file.lower() == 'readme.md':
22+
file_path = os.path.join(root, file)
23+
update_links(file_path)
24+
25+
if __name__ == "__main__":
26+
root_directory = '.' # Update this to your repo's root directory if necessary
27+
find_and_update_readmes(root_directory)

Image Text to PDF/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ This script adds image and text to a pdf file.
1919
python3 script.py
2020
```
2121
* Hurray!! Your PDF is generated.
22+
23+
<!-- Updated README links and corrected typos -->
24+
<!-- Updated README links and corrected typos -->

InstaDownloader/Readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ This python code takes user input for private and public profiles to download re
1717

1818
### Important
1919
* Please enter the post code only for the desired post
20-
* You might face errors if you are downloading from a private profile without logging in
20+
* You might face errors if you are downloading from a private profile without logging in
21+
<!-- Updated README links and corrected typos -->
22+
<!-- Updated README links and corrected typos -->

Jokes Generator/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ This python code takes user input of different category of jokes and gives out j
1414
* run `python jokes.py`
1515
##### for linux
1616
* run `python3 jokes.py`
17+
18+
<!-- Updated README links and corrected typos -->
19+
<!-- Updated README links and corrected typos -->

Json to CSV Convertor/README.MD

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ python json_to_csv_with_nested_dict.py
5050

5151
The script will create a directory named **csv_data.csv** in the same location as the script. Within this directory.
5252

53-
![Alt text](image.png)
53+
![Alt text](image.png)
54+
<!-- Updated README links and corrected typos -->
55+
<!-- Updated README links and corrected typos -->

Mail Sender/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ Code Explanation:
2121
Please note that this script is set up for Gmail's SMTP server by default. If you are using a different email service, you may need to adjust the SMTP server details accordingly.
2222

2323
Ensure that you have allowed less secure apps to access your Gmail account or use an application-specific password for sending emails via Gmail
24+
25+
<!-- Updated README links and corrected typos -->
26+
<!-- Updated README links and corrected typos -->

No Screensaver/Readme.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ If not then you can install by
1515

1616
` pip install pyautogui `
1717

18-
To close the program if run from terminal press `Ctrl+C` or if from IDLE then just simply close the interface.
18+
To close the program if run from terminal press `Ctrl+C` or if from IDLE then just simply close the interface.
19+
<!-- Updated README links and corrected typos -->
20+
<!-- Updated README links and corrected typos -->

0 commit comments

Comments
 (0)