Merge branch 'main' into feat/save-document-converter-result
This commit is contained in:
commit
4820a42f4c
3 changed files with 26 additions and 19 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
||||||
|
.vscode
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> (12/19/24) Hello! MarkItDown team members will be resting and recharging with family and friends over the holiday period. Activity/responses on the project may be delayed during the period of Dec 21-Jan 06. We will be excited to engage with you in the new year!
|
||||||
|
|
||||||
# MarkItDown
|
# MarkItDown
|
||||||
|
|
||||||
[](https://pypi.org/project/markitdown/)
|
[](https://pypi.org/project/markitdown/)
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MarkItDown is a utility for converting various files to Markdown (e.g., for indexing, text analysis, etc).
|
MarkItDown is a utility for converting various files to Markdown (e.g., for indexing, text analysis, etc).
|
||||||
It supports:
|
It supports:
|
||||||
- PDF
|
- PDF
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
import sys
|
import sys
|
||||||
import argparse
|
import argparse
|
||||||
|
from textwrap import dedent
|
||||||
from ._markitdown import MarkItDown
|
from ._markitdown import MarkItDown
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -10,24 +11,26 @@ def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Convert various file formats to markdown.",
|
description="Convert various file formats to markdown.",
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
usage="""
|
usage=dedent(
|
||||||
SYNTAX:
|
"""
|
||||||
|
SYNTAX:
|
||||||
markitdown <OPTIONAL: FILENAME>
|
|
||||||
If FILENAME is empty, markitdown reads from stdin.
|
markitdown <OPTIONAL: FILENAME>
|
||||||
|
If FILENAME is empty, markitdown reads from stdin.
|
||||||
EXAMPLE:
|
|
||||||
|
EXAMPLE:
|
||||||
markitdown example.pdf
|
|
||||||
|
markitdown example.pdf
|
||||||
OR
|
|
||||||
|
OR
|
||||||
cat example.pdf | markitdown
|
|
||||||
|
cat example.pdf | markitdown
|
||||||
OR
|
|
||||||
|
OR
|
||||||
markitdown < example.pdf
|
|
||||||
""".strip(),
|
markitdown < example.pdf
|
||||||
|
"""
|
||||||
|
).strip(),
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument("filename", nargs="?")
|
parser.add_argument("filename", nargs="?")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue