openconvert 1.1.0__tar.gz → 1.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openconvert-1.1.0/src/openconvert.egg-info → openconvert-1.1.1}/PKG-INFO +1 -1
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert/__init__.py +1 -1
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert/openconvert_cli.py +51 -12
- {openconvert-1.1.0 → openconvert-1.1.1/src/openconvert.egg-info}/PKG-INFO +1 -1
- {openconvert-1.1.0 → openconvert-1.1.1}/.readthedocs.yaml +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/LICENSE +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/MANIFEST.in +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/PYPI_UPLOAD.md +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/README.md +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/demo.py +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/api/cli.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/api/client.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/api/openconvert.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/deployment/network-setup.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/development/contributing.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/examples/batch-processing.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/examples/python-integration.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/getting-started/basic-usage.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/getting-started/installation.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/getting-started/quickstart.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/index.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/advanced-usage.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/cli-reference.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/python-api.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/supported-formats.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/troubleshooting.rst.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/api/cli.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/api/client.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/api/openconvert.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/conf.py +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/deployment/network-setup.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/development/contributing.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/examples/batch-processing.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/examples/python-integration.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/getting-started/basic-usage.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/getting-started/installation.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/getting-started/quickstart.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/index.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/requirements.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/user-guide/advanced-usage.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/user-guide/cli-reference.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/user-guide/python-api.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/user-guide/supported-formats.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/docs/user-guide/troubleshooting.rst +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/pyproject.toml +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/scripts/README.md +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/scripts/launch_agents.py +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/scripts/launch_agents.sh +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/setup.cfg +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/setup.py +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert/__main__.py +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert/client.py +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert.egg-info/SOURCES.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert.egg-info/dependency_links.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert.egg-info/entry_points.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert.egg-info/not-zip-safe +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert.egg-info/requires.txt +0 -0
- {openconvert-1.1.0 → openconvert-1.1.1}/src/openconvert.egg-info/top_level.txt +0 -0
@@ -86,7 +86,9 @@ def validate_args(args: argparse.Namespace) -> bool:
|
|
86
86
|
"""
|
87
87
|
# For conversion operations, input and output are required
|
88
88
|
if not args.input or not args.output:
|
89
|
-
logger.error("Input
|
89
|
+
logger.error("Input and output are required for conversion")
|
90
|
+
logger.error("Usage: openconvert <input> <output>")
|
91
|
+
logger.error(" or: openconvert -i <input> -o <output>")
|
90
92
|
return False
|
91
93
|
|
92
94
|
# Check input exists
|
@@ -102,10 +104,17 @@ def validate_args(args: argparse.Namespace) -> bool:
|
|
102
104
|
logger.error(f"Output directory does not exist: {output_dir}")
|
103
105
|
return False
|
104
106
|
|
105
|
-
# If input is a directory, require --from and --to
|
107
|
+
# If input is a directory, require --from and --to (positional args don't support directory conversion)
|
106
108
|
if input_path.is_dir():
|
107
109
|
if not args.from_format or not args.to_format:
|
108
110
|
logger.error("When input is a directory, --from and --to formats must be specified")
|
111
|
+
logger.error("Example: openconvert -i docs/ -o converted/ --from text/plain --to application/pdf")
|
112
|
+
return False
|
113
|
+
|
114
|
+
# For directory conversion, must use flag arguments
|
115
|
+
if hasattr(args, 'input_file') and (args.input_file or args.output_file):
|
116
|
+
logger.error("Directory conversion requires -i and -o flags, not positional arguments")
|
117
|
+
logger.error("Example: openconvert -i docs/ -o converted/ --from text/plain --to application/pdf")
|
109
118
|
return False
|
110
119
|
|
111
120
|
return True
|
@@ -388,24 +397,36 @@ def main() -> int:
|
|
388
397
|
"""Main CLI entry point.
|
389
398
|
|
390
399
|
Returns:
|
391
|
-
int: Exit code (0
|
400
|
+
int: Exit code (0 for success, 1 for error)
|
392
401
|
"""
|
393
402
|
parser = argparse.ArgumentParser(
|
394
|
-
|
403
|
+
prog="openconvert",
|
404
|
+
description="Connect to OpenConvert OpenAgents network for file conversions",
|
395
405
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
396
|
-
epilog="""
|
406
|
+
epilog=f"""
|
397
407
|
Examples:
|
398
|
-
#
|
399
|
-
openconvert
|
408
|
+
# Simple file conversion (positional arguments)
|
409
|
+
openconvert input.txt output.pdf
|
410
|
+
openconvert image.png image.jpg
|
411
|
+
|
412
|
+
# Using flags (traditional way)
|
413
|
+
openconvert -i input.txt -o output.pdf
|
414
|
+
openconvert -i image.png -o image.jpg
|
400
415
|
|
401
|
-
#
|
402
|
-
openconvert -i
|
416
|
+
# Directory conversion (requires format specification)
|
417
|
+
openconvert -i docs/ -o converted/ --from text/plain --to application/pdf
|
418
|
+
|
419
|
+
# Convert with format specification
|
420
|
+
openconvert input.data output.pdf --from text/csv --to application/pdf
|
403
421
|
|
404
422
|
# Convert with custom prompt
|
405
|
-
openconvert
|
423
|
+
openconvert data.csv report.pdf --prompt "Create a formatted report with charts"
|
406
424
|
|
407
425
|
# Specify network connection
|
408
|
-
openconvert
|
426
|
+
openconvert file.doc file.md --host remote.server.com --port 8765
|
427
|
+
|
428
|
+
# List available formats
|
429
|
+
openconvert --list-formats
|
409
430
|
|
410
431
|
Supported formats include:
|
411
432
|
Documents: txt, pdf, docx, html, md, rtf, csv, xlsx
|
@@ -418,7 +439,19 @@ Supported formats include:
|
|
418
439
|
"""
|
419
440
|
)
|
420
441
|
|
421
|
-
#
|
442
|
+
# Positional arguments (optional)
|
443
|
+
parser.add_argument(
|
444
|
+
"input_file",
|
445
|
+
nargs="?",
|
446
|
+
help="Input file path (alternative to -i/--input)"
|
447
|
+
)
|
448
|
+
parser.add_argument(
|
449
|
+
"output_file",
|
450
|
+
nargs="?",
|
451
|
+
help="Output file path (alternative to -o/--output)"
|
452
|
+
)
|
453
|
+
|
454
|
+
# Traditional flag arguments (for backward compatibility and directory operations)
|
422
455
|
parser.add_argument(
|
423
456
|
"-i", "--input",
|
424
457
|
help="Input file or directory path"
|
@@ -479,6 +512,12 @@ Supported formats include:
|
|
479
512
|
# Parse arguments
|
480
513
|
args = parser.parse_args()
|
481
514
|
|
515
|
+
# Merge positional and flag arguments (positional takes precedence)
|
516
|
+
if args.input_file:
|
517
|
+
args.input = args.input_file
|
518
|
+
if args.output_file:
|
519
|
+
args.output = args.output_file
|
520
|
+
|
482
521
|
# Configure logging level
|
483
522
|
if args.quiet:
|
484
523
|
logging.getLogger().setLevel(logging.ERROR)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/deployment/network-setup.rst.txt
RENAMED
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/development/contributing.rst.txt
RENAMED
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/examples/batch-processing.rst.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/getting-started/quickstart.rst.txt
RENAMED
File without changes
|
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/advanced-usage.rst.txt
RENAMED
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/cli-reference.rst.txt
RENAMED
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/python-api.rst.txt
RENAMED
File without changes
|
File without changes
|
{openconvert-1.1.0 → openconvert-1.1.1}/docs/_build/html/_sources/user-guide/troubleshooting.rst.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|