support_mineru_1
This commit is contained in:
parent
a6de631d15
commit
e93a32ad15
BIN
SimSun.ttf
BIN
SimSun.ttf
Binary file not shown.
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <path-to-pdf-file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FILE_PATH=$(realpath "$1")
|
||||
|
||||
if [ ! -f "$FILE_PATH" ]; then
|
||||
echo "File not found: $FILE_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
conda activate mineru
|
||||
|
||||
if ! command -v magic-pdf &> /dev/null; then
|
||||
echo "magic-pdf could not be found in the current conda environment"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
magic-pdf pdf-command --pdf "$FILE_PATH" --inside_model true
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "PDF conversion successful"
|
||||
else
|
||||
echo "PDF conversion failed"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Reference in New Issue