Skip to content

Commit 662d74d

Browse files
committed
Reorganize python code to __main__
1 parent 4cfed29 commit 662d74d

File tree

3 files changed

+74
-99
lines changed

3 files changed

+74
-99
lines changed

src/metadata_remover/__main__.py

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,74 @@
1-
import v9
2-
v9.san()
1+
#flag=imp
2+
3+
from metadata_remover import commons
4+
from metadata_remover import mrt
5+
6+
import os
7+
from shutil import move,copy
8+
9+
# Clearscreen
10+
if platform.system().lower()=='windows':
11+
os.system('cls')
12+
else:
13+
os.system('clear')
14+
15+
# Display menu
16+
print('''
17+
\n |------ Metadata Removal Tool ------|\n
18+
1)Remove Metadata from a image.
19+
2)Remove Metadata from a video.
20+
3)Remove Metadata from a audio.
21+
4)Remove Metadata from a Torrent.
22+
5)Remove Metadata from all images in folder.
23+
6)Remove Metadata from all videos in folder.
24+
7)View Metadata in a file.
25+
''')
26+
27+
# Take and parse input
28+
x=input('\n Enter command(1,2,3,4,5,6 or 7):')
29+
if x=='1':
30+
file=input('\n Enter image name:')
31+
singly(file,'i')
32+
exit()
33+
elif x=='2':
34+
file=input('\n Enter Video name:')
35+
singly(file,'v')
36+
exit()
37+
elif x=='3':
38+
file=input('\n Enter Audio File:')
39+
y=copy(file,'MRT')
40+
os.chdir('MRT')
41+
os.system('py mat2.py '+file)
42+
y=move(file.split('.')[0]+'.cleaned.'+file.split('.')[1],'..')
43+
os.remove(file)
44+
os.chdir('..')
45+
exit()
46+
elif x == '4':
47+
file=input('\n Enter Torrent File:')
48+
y=copy(file,'MRT')
49+
os.chdir('MRT')
50+
os.system('py mat2.py '+file)
51+
y=move(file.split('.')[0]+'.cleaned.'+file.split('.')[1],'..')
52+
os.remove(file)
53+
os.chdir('..')
54+
exit()
55+
elif x=='5':
56+
bulk()
57+
exit()
58+
elif x=='6':
59+
bulk1()
60+
exit()
61+
elif x=='7':
62+
exiftool()
63+
rb=input(' Enter Filename:')
64+
if os.path.exists(rb)==False:
65+
print('\n File Not Found!\n')
66+
wait()
67+
exit(0)
68+
meta(rb)
69+
wait()
70+
exit()
71+
elif x.lower()=='mm' or x.lower()=='c' or x.lower()=='close':
72+
exit()
73+
else:
74+
exit()

src/metadata_remover/mrt.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@
44
An Cross-platform opensource Metadata Remover using exiftool and ffmpeg to sanitize your images before posting on internet.
55
'''
66

7-
try:
8-
9-
from commons import *
10-
11-
except ImportError:
12-
print(" The commons Modules Not Found! in mrt")
13-
x=input()
14-
exit()
15-
167
# Function to write given message to file named log in append mode.
178
def w(msg,file='log'):
189
with open(file,'a+') as f:

src/metadata_remover/v9.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)