Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pdf-miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qin Kaijie
pdf-miner
Commits
18af71a2
Commit
18af71a2
authored
Jun 27, 2024
by
赵小蒙
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
2f1a99fd
c1e224e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
benchmark.py
tools/benchmark.py
+3
-3
No files found.
tools/benchmark.py
View file @
18af71a2
...
@@ -12,11 +12,11 @@ file_types = ["academic_literature", "atlas", "courseware", "colorful_textbook",
...
@@ -12,11 +12,11 @@ file_types = ["academic_literature", "atlas", "courseware", "colorful_textbook",
def
test_cli
():
def
test_cli
():
magicpdf_path
=
os
.
path
.
join
(
pdf_dev_path
,
"output"
)
magicpdf_path
=
os
.
path
.
join
(
pdf_dev_path
,
"output"
)
cmd
=
'cd
%
s && export PYTHONPATH=. && find
%
s -type f -name "*.pdf" | xargs -I{} python magic_pdf/cli/magicpdf.py pdf-command --pdf {}'
%
(
code_path
,
magicpdf_path
)
os
.
system
(
cmd
)
rm_cmd
=
"rm -rf
%
s"
%
(
pdf_res_path
)
rm_cmd
=
"rm -rf
%
s"
%
(
pdf_res_path
)
os
.
system
(
rm_cmd
)
os
.
system
(
rm_cmd
)
os
.
makedirs
(
pdf_res_path
)
os
.
makedirs
(
pdf_res_path
)
cmd
=
'cd
%
s && export PYTHONPATH=. && find
%
s -type f -name "*.pdf" | xargs -I{} python magic_pdf/cli/magicpdf.py pdf-command --pdf {}'
%
(
code_path
,
magicpdf_path
)
os
.
system
(
cmd
)
for
root
,
dirs
,
files
in
os
.
walk
(
pdf_res_path
):
for
root
,
dirs
,
files
in
os
.
walk
(
pdf_res_path
):
for
magic_file
in
files
:
for
magic_file
in
files
:
for
file_type
in
file_types
:
for
file_type
in
file_types
:
...
@@ -49,7 +49,7 @@ def extrat_zip(zip_file_path, extract_to_path):
...
@@ -49,7 +49,7 @@ def extrat_zip(zip_file_path, extract_to_path):
def
ci_ben
():
def
ci_ben
():
fr
=
open
(
os
.
path
.
join
(
pdf_dev_path
,
"ci"
,
"result.json"
),
"r"
)
.
read
()
fr
=
open
(
os
.
path
.
join
(
pdf_dev_path
,
"ci"
,
"result.json"
),
"r"
)
.
read
()
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
extrat_zip
(
os
.
path
.
join
(
pdf_dev_path
,
'output.zip'
),
os
.
path
.
join
(
pdf_dev_path
))
extrat_zip
(
os
.
path
.
join
(
pdf_dev_path
,
'output.zip'
),
os
.
path
.
join
(
pdf_dev_path
))
...
...
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