-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0dddd76
commit ed50874
Showing
6 changed files
with
686 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Tools: ./tool.gpt | ||
Params: input: Path to input PDF file | ||
Params: output: Path to output file where the extracted markdown content should be written to. Should end with .md | ||
|
||
Call the MuPDF PDF Document Loader tool with the input and output parameters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import os | ||
import pymupdf4llm | ||
import pathlib | ||
|
||
md_text = pymupdf4llm.to_markdown(os.getenv("INPUT")) | ||
|
||
pathlib.Path(os.getenv("OUTPUT")).write_bytes(md_text.encode()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-i https://pypi.org/simple | ||
pymupdf==1.24.11; python_version >= '3.8' | ||
pymupdf4llm==0.0.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Name: MuPDF PDF Document Loader | ||
Params: input: Path to input PDF file | ||
Params: output: Path to output file where the extracted markdown content should be written to. Should end with .md | ||
metadata: supported-file-type: pdf | ||
|
||
#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/load.py | ||
|
||
|