Skip to content

Commit ed84a11

Browse files
committed
Fix issues in #10.
2 parents 1d4246b + c71b512 commit ed84a11

File tree

2 files changed

+51
-55
lines changed

2 files changed

+51
-55
lines changed

src/metadata_remover/__main__.py

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,55 @@
66
import os
77
from shutil import move,copy
88

9-
# Display menu
10-
cls()
11-
print('''
12-
\n |------ Metadata Removal Tool ------|\n
13-
1)Remove Metadata from a image.
14-
2)Remove Metadata from a video.
15-
3)Remove Metadata from a audio.
16-
4)Remove Metadata from a Torrent.
17-
5)Remove Metadata from all images in folder.
18-
6)Remove Metadata from all videos in folder.
19-
7)View Metadata in a file.
20-
''')
21-
22-
# Take and parse input
23-
x=input('\n Enter command(1,2,3,4,5,6 or 7):')
24-
match x:
25-
case '1':
26-
file=input('\n Enter image name:')
27-
singly(file,'i')
28-
case '2':
29-
file=input('\n Enter Video name:')
30-
singly(file,'v')
31-
case '3':
32-
file=input('\n Enter Audio File:')
33-
y=copy(file,'MRT')
34-
os.chdir('MRT')
35-
os.system('py mat2.py '+file)
36-
y=move(file.split('.')[0]+'.cleaned.'+file.split('.')[1],'..')
37-
os.remove(file)
38-
os.chdir('..')
39-
case '4':
40-
file=input('\n Enter Torrent File:')
41-
y=copy(file,'MRT')
42-
os.chdir('MRT')
43-
os.system('py mat2.py '+file)
44-
y=move(file.split('.')[0]+'.cleaned.'+file.split('.')[1],'..')
45-
os.remove(file)
46-
os.chdir('..')
47-
case '5':
48-
bulk()
49-
case '6':
50-
bulk1()
51-
case '7':
52-
exiftool()
53-
rb=input(' Enter Filename:')
54-
if os.path.exists(rb)==False:
55-
print('\n File Not Found!\n')
9+
x='1'
10+
while x in ['1','2','3','4','5','6','7']:
11+
cls()
12+
print('''
13+
\n |------ Metadata Removal Tool ------|\n
14+
1)Remove Metadata from a image.
15+
2)Remove Metadata from a video.
16+
3)Remove Metadata from a audio.
17+
4)Remove Metadata from a Torrent.
18+
5)Remove Metadata from all images in folder.
19+
6)Remove Metadata from all videos in folder.
20+
7)View Metadata in a file.
21+
c)Close.
22+
''')
23+
x = input('\n Enter command(1,2,3,4,5,6,7 or c):')
24+
match x:
25+
case '1':
26+
file=input('\n Enter image name:')
27+
singly(file,'i')
28+
case '2':
29+
file=input('\n Enter Video name:')
30+
singly(file,'v')
31+
case '3':
32+
file=input('\n Enter Audio File:')
33+
y=copy(file,'MRT')
34+
os.chdir('MRT')
35+
os.system('py mat2.py '+file)
36+
y=move(file.split('.')[0]+'.cleaned.'+file.split('.')[1],'..')
37+
os.remove(file)
38+
os.chdir('..')
39+
case '4':
40+
file=input('\n Enter Torrent File:')
41+
y=copy(file,'MRT')
42+
os.chdir('MRT')
43+
os.system('py mat2.py '+file)
44+
y=move(file.split('.')[0]+'.cleaned.'+file.split('.')[1],'..')
45+
os.remove(file)
46+
os.chdir('..')
47+
case '5':
48+
bulk()
49+
case '6':
50+
bulk1()
51+
case '7':
52+
exiftool()
53+
rb=input(' Enter Filename:')
54+
if os.path.exists(rb)==False:
55+
print('\n File Not Found!\n')
56+
wait()
57+
exit(0)
58+
meta(rb)
5659
wait()
57-
exit(0)
58-
meta(rb)
59-
wait()
6060
exit()

src/metadata_remover/commons.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,4 @@ def bcopy(file,file1):
100100

101101
# Clear screen
102102
def cls():
103-
os.system('cls') if sys() == 'windows' else os.system('clear')
104-
105-
# Get system name
106-
def sys():
107-
return "windows" if platform.system().lower() == 'windows' else "notwin"
103+
os.system('cls') if platform.system().lower() == 'windows' else os.system('clear')

0 commit comments

Comments
 (0)