Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
jvoisin
mat2
Commits
3e2890eb
Commit
3e2890eb
authored
Aug 30, 2018
by
dkg
Committed by
jvoisin
Sep 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
three minor spelling fixes
parent
91e80527
Pipeline
#18684
passed with stages
in 2 minutes and 55 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
doc/implementation_notes.md
doc/implementation_notes.md
+1
-1
libmat2/abstract.py
libmat2/abstract.py
+2
-2
mat2
mat2
+2
-2
No files found.
doc/implementation_notes.md
View file @
3e2890eb
...
...
@@ -6,7 +6,7 @@ Lightweight cleaning mode
Due to
*popular*
request, MAT2 is providing a
*lightweight*
cleaning mode,
that only cleans the superficial metadata of your file, but not
the ones that might be in
**embeded**
resources. Like for example,
the ones that might be in
**embed
d
ed**
resources. Like for example,
images in a PDF or an office document.
Revisions handling
...
...
libmat2/abstract.py
View file @
3e2890eb
...
...
@@ -6,8 +6,8 @@ assert Set # make pyflakes happy
class
AbstractParser
(
abc
.
ABC
):
""" This is the base class
e
of every parser.
It might yield `ValueError` on instan
c
iation on invalid files.
""" This is the base class of every parser.
It might yield `ValueError` on instan
t
iation on invalid files.
"""
meta_list
=
set
()
# type: Set[str]
mimetypes
=
set
()
# type: Set[str]
...
...
mat2
View file @
3e2890eb
...
...
@@ -68,7 +68,7 @@ def show_meta(filename: str):
print
(
" %s: harmful content"
%
k
)
def
clean_meta
(
params
:
Tuple
[
str
,
bool
])
->
bool
:
filename
,
is_lightweig
t
h
=
params
filename
,
is_lightweigh
t
=
params
if
not
__check_file
(
filename
,
os
.
R_OK
|
os
.
W_OK
):
return
False
...
...
@@ -76,7 +76,7 @@ def clean_meta(params: Tuple[str, bool]) -> bool:
if
p
is
None
:
print
(
"[-] %s's format (%s) is not supported"
%
(
filename
,
mtype
))
return
False
if
is_lightweig
t
h
:
if
is_lightweigh
t
:
return
p
.
remove_all_lightweight
()
return
p
.
remove_all
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment