Skip to content

Commit

Permalink
Merge branch 'main' into embedded_image
Browse files Browse the repository at this point in the history
  • Loading branch information
FeuRicardo authored Dec 19, 2024
2 parents 939a8a3 + dd87dd5 commit 8d114c3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vscode

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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

[![PyPI](https://img.shields.io/pypi/v/markitdown.svg)](https://pypi.org/project/markitdown/)
![PyPI - Downloads](https://img.shields.io/pypi/dd/markitdown)



MarkItDown is a utility for converting various files to Markdown (e.g., for indexing, text analysis, etc).
It supports:
- PDF
Expand Down
39 changes: 21 additions & 18 deletions src/markitdown/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,34 @@
# SPDX-License-Identifier: MIT
import sys
import argparse
from textwrap import dedent
from ._markitdown import MarkItDown


def main():
parser = argparse.ArgumentParser(
description="Convert various file formats to markdown.",
formatter_class=argparse.RawDescriptionHelpFormatter,
usage="""
SYNTAX:
markitdown <OPTIONAL: FILENAME>
If FILENAME is empty, markitdown reads from stdin.
EXAMPLE:
markitdown example.pdf
OR
cat example.pdf | markitdown
OR
markitdown < example.pdf
""".strip(),
usage=dedent(
"""
SYNTAX:
markitdown <OPTIONAL: FILENAME>
If FILENAME is empty, markitdown reads from stdin.
EXAMPLE:
markitdown example.pdf
OR
cat example.pdf | markitdown
OR
markitdown < example.pdf
"""
).strip(),
)

parser.add_argument("filename", nargs="?")
Expand Down

0 comments on commit 8d114c3

Please sign in to comment.