Skip to content

Commit 5fdbcd8

Browse files
for v25.3.5
1 parent a2c9b55 commit 5fdbcd8

File tree

4 files changed

+42
-4
lines changed

4 files changed

+42
-4
lines changed

packages/markitdown/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
from pathlib import Path
33
from openize.markitdown.processor import DocumentProcessor
4-
4+
from openize.markitdown.license_manager import LicenseManager
55

66

77
def run_conversion(input_file):
@@ -14,5 +14,8 @@ def run_conversion(input_file):
1414
parser.add_argument("input_file", type=str, help="Path to the input file")
1515
args = parser.parse_args()
1616

17+
license_manager = LicenseManager()
18+
license_manager.apply_license()
19+
1720
run_conversion(args.input_file)
1821

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import os
2+
import configparser
3+
4+
CONFIG_FILE = os.path.expanduser("setup.cfg")
5+
6+
def ask_license():
7+
"""Prompt the user for license details after installation."""
8+
print("\n🔹 Do you want to use an Aspose license? (yes/no)")
9+
use_license = input("Enter your choice: ").strip().lower()
10+
11+
if use_license in ["yes", "y"]:
12+
license_path = input("Enter the full path to the Aspose license file: ").strip()
13+
else:
14+
license_path = ""
15+
16+
save_config(use_license == "yes", license_path)
17+
18+
def save_config(use_license, license_path):
19+
"""Save user preferences to a config file."""
20+
config = configparser.ConfigParser()
21+
config["Aspose"] = {
22+
"use_license": str(use_license),
23+
"license_path": license_path
24+
}
25+
26+
with open(CONFIG_FILE, "w") as configfile:
27+
config.write(configfile)
28+
29+
print(f"\n✅ Configuration saved to {CONFIG_FILE}")
30+
31+
if __name__ == "__main__":
32+
ask_license()

packages/markitdown/setup.cfg

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = openize-markitdown
3-
version = 25.3.4
3+
version = 25.3.5
44
author = Openize
55
author_email = packages@openize.com
66
description = A document converter for Word, PDF, Excel, and PowerPoint to Markdown.
@@ -38,7 +38,10 @@ where = src
3838
[options.entry_points]
3939
console_scripts =
4040
markitdown = openize.markitdown.main:main
41+
post-install = openize.markitdown.post_install:ask_license
4142

4243
[aspose-licenses]
4344
use_aspose_license = true
44-
license_file_path = /path/to/Aspose.Total.lic
45+
license_file_path = /path/to/Aspose.Total.lic
46+
47+

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.4"
9+
__version__ = "25.3.5"
1010

1111
from .processor import DocumentProcessor
1212
from .converters import WordConverter, PDFConverter, ExcelConverter, PowerPointConverter

0 commit comments

Comments
 (0)