Skip to content

Commit 3eb922d

Browse files
v25.3.7
1 parent 9503d29 commit 3eb922d

File tree

5 files changed

+36
-26
lines changed

5 files changed

+36
-26
lines changed

packages/markitdown/main.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/markitdown/setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = openize-markitdown
3-
version = 25.3.6
3+
version = 25.3.7
44
author = Openize
55
author_email = packages@openize.com
66
description = A document converter for Word, PDF, Excel, and PowerPoint to Markdown.
@@ -37,8 +37,8 @@ where = src
3737

3838
[options.entry_points]
3939
console_scripts =
40-
markitdown = main:main
41-
post-install = post_install:ask_license
40+
markitdown = openize.markitdown.main:run_conversion
41+
post-install = openize.markitdown.post_install:ask_license
4242

4343
[aspose-licenses]
4444
use_aspose_license = true

packages/markitdown/src/openize/markitdown/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
(.docx, .pdf, .xlsx, .pptx) to Markdown format.
77
"""
88

9-
__version__ = "25.3.6"
9+
__version__ = "25.3.7"
1010

1111
from .processor import DocumentProcessor
1212
from .converters import WordConverter, PDFConverter, ExcelConverter, PowerPointConverter
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import argparse
2+
import logging
3+
from pathlib import Path
4+
from processor import DocumentProcessor
5+
from license_manager import LicenseManager
6+
7+
def run_conversion(input_file, output_dir, insert_into_llm=False):
8+
# Apply license
9+
license_manager = LicenseManager()
10+
license_manager.apply_license()
11+
12+
# Process document
13+
processor = DocumentProcessor(output_dir)
14+
processor.process_document(input_file, insert_into_llm=insert_into_llm)
15+
16+
print(f"Conversion completed: {input_file}{output_dir}")
17+
18+
if __name__ == "__main__":
19+
parser = argparse.ArgumentParser(description="Convert documents to Markdown.")
20+
parser.add_argument("input_file", type=str, help="Path to the input file")
21+
parser.add_argument("output_dir", type=str, help="Path to the output directory")
22+
parser.add_argument(
23+
"--insert-into-llm",
24+
action="store_true",
25+
help="Insert output into LLM instead of saving locally"
26+
)
27+
args = parser.parse_args()
28+
29+
run_conversion(args.input_file, args.output_dir, args.insert_into_llm)
30+
31+

packages/markitdown/post_install.py renamed to packages/markitdown/src/openize/markitdown/post_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import configparser
33

4-
CONFIG_FILE = os.path.expanduser("setup.cfg")
4+
CONFIG_FILE = os.path.expanduser("../../../setup.cfg")
55

66
def ask_license():
77
"""Prompt the user for license details after installation."""

0 commit comments

Comments
 (0)