Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
ed8311fc
Commit
ed8311fc
authored
Jun 07, 2018
by
Ryan Herbert
Committed by
Mikaël Salson
Jul 18, 2018
Browse files
vidjilparser.py add reset method
resets the parser prefixes and the writer's buffer
parent
c24d1324
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/vidjilparser.py
View file @
ed8311fc
...
...
@@ -132,6 +132,10 @@ class VidjilParser(object):
def
addPrefix
(
self
,
prefix
,
conditional
=
None
,
comp
=
None
,
value
=
None
):
self
.
prefixes
.
append
((
prefix
,
Predicate
(
conditional
,
comp
,
value
)))
def
reset
(
self
):
self
.
prefixes
=
[]
self
.
_writer
.
purgeBuffer
()
def
extract
(
self
,
filepath
):
vidjilfile
=
open
(
filepath
,
'r'
)
parser
=
ijson
.
parse
(
vidjilfile
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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