Skip to main content
Answers to common questions about using SwissKnife CLI tool.

General Questions

SwissKnife supports a wide range of file formats across different categories:

Documents (solution.py:36)

Input/Output formats:
  • PDF, DOCX, DOC, TXT, MD (Markdown), EPUB
  • PPTX (PowerPoint), XLSX (Excel)
  • HTML, TEX (LaTeX), XML, BIB
  • JSON, RST (reStructuredText), RTF, ODT
  • ORG (Org-mode), IPYNB (Jupyter Notebook)
  • FB2, ICML, OPML, TEXI, TEXTILE
  • TYP, MUSE, HS, ADOC (AsciiDoc)
  • And more formats supported by Pandoc
Supported conversions (solution.py:52): All document formats can be converted to any other document format in the list above.

Images (solution.py:38)

Supported formats:
  • JPG/JPEG, PNG, WEBP, GIF
  • BMP, TIFF, PDF
Conversion capabilities (solution.py:118-131):
  • Convert between any image formats
  • Convert images to PDF
  • Automatic color mode conversion (RGB, RGBA, L)
  • Quality optimization for JPEG (85% quality)

Audio (solution.py:40)

Supported formats:
  • MP3, WAV, FLAC
  • AAC, OGG, M4A
Conversion details (solution.py:75-78):
  • MP3: 192k bitrate with libmp3lame codec
  • AAC/M4A: 192k bitrate with aac codec
  • WAV: PCM 16-bit (lossless)
  • OGG: 192k bitrate with libvorbis codec
  • FLAC: Lossless compression

Video (solution.py:42)

Supported formats:
  • MP4, AVI, MKV, MOV
  • WMV, FLV, WEBM
  • GIF (animated)
Video conversion features (solution.py:71-74, 79-80):
  • H.264/H.265 encoding for high compatibility
  • Optimized GIF creation with palette generation
  • Audio extraction to separate audio files
  • Preset configurations for fast encoding

Archives (solution.py:44)

Supported formats:
  • ZIP, TAR, GZ (tar.gz)
  • BZ2 (tar.bz2), 7Z, RAR
Archive operations (solution.py:135-146):
  • Extract from any archive format
  • Create new archives in any format
  • Password-protected archive support
  • Format conversion (e.g., ZIP to 7Z)

Important Limitations

  • PDF conversion limitation: While you can convert documents TO PDF, converting FROM PDF to other document formats is not supported
  • Archive tools: Some formats (.7z, .rar) require external command-line tools
  • Document conversions: Require Pandoc and LaTeX for full functionality
SwissKnife requires both Python packages and system-level tools.

Python Dependencies

Recommended method using UV:
git clone https://github.com/naineel1209/swissknife.git
cd swissknife
pip install uv --upgrade
uv sync
source .venv/bin/activate  # Windows: .venv\Scripts\activate
Manual installation:
pip install pypandoc pillow imageio-ffmpeg patoolib google-genai pypdf
Or add dependencies individually:
uv add pypandoc          # Document conversions
uv add pillow            # Image processing
uv add imageio-ffmpeg    # Audio/video conversions
uv add patoolib          # Archive handling
uv add google-genai      # AI summarization
uv add pypdf             # PDF operations

System Dependencies

LaTeX (for PDF conversions):Windows:
# Download MiKTeX from miktex.org
# Or using Chocolatey:
choco install texlive
Linux/Ubuntu:
sudo apt update
sudo apt install -y texlive-latex-base texlive-latex-recommended texlive-fonts-recommended
macOS:
brew install --cask basictex
export PATH=/Library/TeX/texbin:$PATH
Archive tools (for .7z and .rar):Linux/Ubuntu:
sudo apt install p7zip-full unrar rar
macOS:
brew install p7zip unrar rar
Windows:
  • Download 7-Zip from 7-zip.org
  • Download RAR from rarlab.com
  • Add installation directories to system PATH
For AI features:
# Get API key from aistudio.google.com
export GOOGLE_API_KEY="your_api_key_here"

Verify Installation

# Test Python packages
python -c "import pypandoc, PIL, imageio_ffmpeg, patoolib, google.genai, pypdf"

# Test system tools
pandoc --version
xelatex --version
7z --version

Troubleshooting

If you encounter “Module not found” errors, the tool will display helpful messages (solution.py:20-25):
Error: Module <name> not found. Please install it using pip.
Error: Try: pip install <package_name>
Error: This module is required for the requested operation.
Simply follow the instructions provided in the error message.
Yes, SwissKnife supports password-protected archives.

Supported Operations (solution.py:138-143)

Extract and convert password-protected archives:
python solution.py convert protected.zip extracted.tar.gz --password mypassword
python solution.py convert secure.rar backup.7z --password secretpass
How it works:
  1. The tool extracts the password-protected archive to a temporary directory (solution.py:137-140)
  2. Converts the extracted contents to the target archive format
  3. Can re-apply password protection to the output (solution.py:143)

Password Protection Behavior

Creating password-protected archives (solution.py:143):
  • If you provide a password, it will be applied to the output archive
  • Exception: TAR-based formats (.tar, .tar.gz, .tar.bz2, .tar.xz) do not support passwords
  • Supported for output: ZIP, 7Z, RAR
Example:
# Extract password-protected ZIP and create password-protected 7Z
python solution.py convert secure.zip backup.7z --password mypass

# Extract password-protected RAR and create unprotected ZIP
# (Password used only for extraction, not reapplied)
python solution.py convert protected.rar output.zip --password oldpass

Password Handling Details

The password parameter is passed to patoolib (solution.py:140):
patoolib.extract_archive(work_path, outdir=temp_extract_dir, 
                       password=password if password else None, 
                       interactive=False)

Important Notes

  1. Security: Passwords are passed as command-line arguments and may be visible in process lists
  2. Format limitations: Not all archive formats support password protection
  3. Documents: Password-protected PDFs or Office documents are NOT supported (only archives)
  4. Debugging: The tool prints “Password: <password>” when processing (solution.py:138)

Limitations

  • Encrypted document files (PDF, DOCX with encryption) are not supported
  • Only archive formats (.zip, .7z, .rar) support password protection
  • Password must be provided via command line (no interactive prompt)
The AI summarization feature has a 100MB file size limit (solution.py:165-166).

Size Validation

When you run the summarize command, the tool:
  1. Checks if the file exists and is readable (solution.py:163)
  2. Calculates file size in megabytes (solution.py:165)
  3. Rejects files over 100MB (solution.py:166)
Code implementation:
file_size_mb = input_abs.stat().st_size / (1024 * 1024)
if file_size_mb > 100:
    raise ValueError(f"File size ({file_size_mb:.1f}MB) exceeds maximum limit of 100MB")

Workarounds for Large Files

1. Convert to plain text first:
# Text files are typically much smaller than formatted documents
python solution.py convert large_document.pdf extracted.txt
python solution.py summarize extracted.txt --length medium
2. Split the document:
# For PDFs, extract specific page ranges
python solution.py split large_book.pdf "1-50"
python solution.py split large_book.pdf "51-100"

# Summarize each section
python solution.py summarize large_book_part1.pdf --length medium
python solution.py summarize large_book_part2.pdf --length medium
3. Compress the PDF:
  • Use external tools to compress the PDF
  • Remove embedded images or reduce their quality
  • Convert high-resolution scans to optimized versions

Why the Limit?

The limit exists because:
  • Files are uploaded to Google’s Gemini API servers (solution.py:171)
  • Large files take longer to upload and process
  • Processing timeout is 5 minutes (300 seconds) (solution.py:181)
  • API quotas and rate limits may apply

File Size Display

The tool displays the file size during processing (solution.py:167):
Info: File validated (45.3MB) - uploading to AI service...
This helps you understand if you’re approaching the limit.
You can customize the AI behavior by editing the summarize_prompt.txt file.

Prompt Template Location

The prompt is loaded from ./summarize_prompt.txt in the current directory (solution.py:175):
with open("./summarize_prompt.txt", "r", encoding="utf-8") as f:
    prompt = f.read()

Template Variables (solution.py:175)

The prompt file supports two placeholders that are replaced at runtime:1. {{SUMMARY_REQUIREMENTS}} - Describes the desired summary length and format
  • Short: “a brief summary about the essence of the document in 1 paragraph”
  • Medium: “a concise summary about the essence of the document in 2-3 paragraphs”
  • Long: “a detailed summary about the essence of the document in 3-4 paragraphs”
2. {{FILE_DETAILS}} - JSON representation of the uploaded file metadata
  • Contains file information from the Google AI service
  • Includes file name, size, mime type, etc.

Summary Length Configuration (solution.py:173-174)

Each length option has specific parameters:
configs = {
    "short": {
        "description": "a brief summary about the essence of the document in 1 paragraph",
        "max_tokens": 1500,
        "temperature": 0.5
    },
    "medium": {
        "description": "a concise summary about the essence of the document in 2-3 paragraphs",
        "max_tokens": 2500,
        "temperature": 0.7
    },
    "long": {
        "description": "a detailed summary about the essence of the document in 3-4 paragraphs",
        "max_tokens": 4000,
        "temperature": 0.8
    }
}

Customization Examples

Example 1: Focus on specific aspects
You are an AI assistant specialized in technical documentation.

Analyze this document and focus on:
- Technical concepts and methodologies
- Key findings and conclusions
- Practical applications

File Details:
{{FILE_DETAILS}}

Requirements:
{{SUMMARY_REQUIREMENTS}}

Provide your summary in a professional, technical tone.
Example 2: Different output format
Create a structured summary with the following sections:

1. Overview: {{SUMMARY_REQUIREMENTS}}
2. Main Points: List 3-5 key takeaways
3. Conclusion: Final thoughts

Document Information:
{{FILE_DETAILS}}

Using Custom Prompts

Simply edit the summarize_prompt.txt file before running the summarize command:
# Edit the prompt file
nano summarize_prompt.txt

# Run summarization with your custom prompt
python solution.py summarize document.pdf --length medium

Model Configuration (solution.py:183)

The tool uses Google’s Gemini 2.5 Flash model with these settings:
response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents=[prompt, doc],
    config=genai.types.GenerateContentConfig(
        temperature=config["temperature"],  # 0.5, 0.7, or 0.8
        top_p=0.9,
        max_output_tokens=config["max_tokens"]  # 1500, 2500, or 4000
    )
)
These parameters are controlled by the --length flag and cannot be modified without editing the source code.
Yes, use the --preserve-original flag to keep the input file unchanged.

How It Works (solution.py:98-111)

Without the flag (default behavior):
  • The tool works directly on the input file
  • Original file may be modified during conversion
  • Input file is validated but not backed up
With --preserve-original flag:
  1. Creates a temporary copy of the input file (solution.py:56-57)
  2. Works on the temporary copy instead (solution.py:110-111)
  3. Original file remains untouched
  4. Temporary files are cleaned up automatically (solution.py:156-157)

Usage Examples

# Preserve original file
python solution.py convert important.docx output.pdf --preserve-original

# Original file is modified (default)
python solution.py convert temp.docx output.pdf

# Combine with password protection
python solution.py convert secure.zip backup.7z --password mypass --preserve-original

Implementation Details

Temporary file creation (solution.py:56-57):
def create_temp_copy(file_path):
    temp_dir = tempfile.mkdtemp()
    temp_file = Path(temp_dir) / Path(file_path).name
    shutil.copy2(file_path, temp_file)
    return str(temp_file)
Working path selection (solution.py:110-111):
work_path = input_abs
if preserve_original:
    temp_file_path = create_temp_copy(input_abs)
    work_path = temp_file_path
Cleanup (solution.py:156-157):
if temp_file_path and Path(temp_file_path).exists():
    shutil.rmtree(Path(temp_file_path).parent, ignore_errors=True)

When to Use

Recommended scenarios:
  • Converting important documents you need to keep
  • Testing conversion settings before committing
  • Creating multiple output formats from one source
  • Working with read-only or archived files
Not necessary when:
  • Converting temporary files
  • You have backups elsewhere
  • Using batch conversion (automatic preservation)

Batch Conversion Behavior

In batch conversion, preserve_original is always enabled (solution.py:93):
convert_file(str(input_file), str(output_file), preserve_original=True)
This ensures the entire input directory remains unchanged during batch operations.

Cleanup Guarantee

Temporary files are cleaned up even if conversion fails (solution.py:152-157):
finally:
    end_time = time.time()
    duration = end_time - start_time
    print(f"Info: Conversion completed in {duration:.2f} seconds.")
    if temp_file_path and Path(temp_file_path).exists():
        shutil.rmtree(Path(temp_file_path).parent, ignore_errors=True)
SwissKnife prompts for confirmation before overwriting existing files.

Overwrite Confirmation (solution.py:63-65)

When the output file already exists, you’ll see:
Output file /path/to/output.pdf exists. Overwrite? (y/N):
Your options:
  • Type y and press Enter → File will be overwritten
  • Type n or just press Enter → Operation cancelled, no changes made

Implementation

if output_abs.exists():
    response = input(f"Output file {output_abs} exists. Overwrite? (y/N): ")
    if response.lower() != "y":
        sys.exit("Operation cancelled.")
The default is N (no), so pressing Enter without typing anything will cancel the operation.

File Preparation (solution.py:66)

If you confirm the overwrite:
  1. Parent directories are created if they don’t exist: output_abs.parent.mkdir(parents=True, exist_ok=True)
  2. Existing file is removed: Path(output_abs).unlink(missing_ok=True)
  3. Conversion proceeds to create new file

Avoiding the Prompt

1. Use a different output name:
python solution.py convert input.pdf output_v2.pdf
python solution.py convert input.pdf output_$(date +%Y%m%d).pdf
2. Remove the file beforehand:
rm output.pdf
python solution.py convert input.pdf output.pdf
3. Use a fresh output directory for batch operations:
python solution.py batch-convert ./input ./output_new .docx .pdf

Batch Conversion Behavior

During batch conversion, the prompt appears for each existing file (solution.py:93-94):
for input_file in input_files:
    try:
        output_filename = input_file.stem + output_ext
        output_file = output_path / output_filename
        print(f"Converting: {input_file.name}{output_filename}")
        convert_file(str(input_file), str(output_file), preserve_original=True)
This can be tedious if many files exist. Consider:
  • Using a fresh output directory
  • Clearing the output directory first
  • Moving existing files to a backup location

Summary Operations

For summaries (solution.py:190-193), the output file is automatically named:
summary_file = input_abs.with_name(input_abs.stem + "_summary.txt")
If document_summary.txt exists, you’ll be prompted to overwrite it.

Safety Features

The confirmation system prevents:
  • Accidental data loss
  • Overwriting important documents
  • Losing work from previous conversions
Always review the file path carefully before confirming.
Batch conversion processes multiple files from one directory to another in a single command.

Basic Usage

python solution.py batch-convert <input_dir> <output_dir> <input_ext> <output_ext>

How It Works (solution.py:83-95)

1. Directory validation (solution.py:84-86):
input_path = Path(input_dir).resolve()
if not input_path.exists():
    raise FileNotFoundError(f"Input directory {input_path} does not exist.")
if not input_path.is_dir():
    raise ValueError(f"Input path {input_path} is not a directory.")
2. Extension normalization (solution.py:87-88):
# Both .txt and txt are accepted
if not input_ext.startswith('.'):
    input_ext = '.' + input_ext
if not output_ext.startswith('.'):
    output_ext = '.' + output_ext
3. Output directory creation (solution.py:89):
output_path.mkdir(parents=True, exist_ok=True)
4. File discovery (solution.py:89-90):
input_files = list(input_path.glob(f"*{input_ext}"))
if not input_files:
    print(f"Info: No files with extension {input_ext} found in {input_path}")
    return
5. Batch processing (solution.py:91-95):
successful_conversions = 0
failed_conversions = 0
for input_file in input_files:
    try:
        output_filename = input_file.stem + output_ext
        output_file = output_path / output_filename
        convert_file(str(input_file), str(output_file), preserve_original=True)
        successful_conversions += 1
    except Exception as e:
        print(f"Error: Failed to convert {input_file.name}: {e}")
        failed_conversions += 1
        continue

Examples

Convert all Word documents to PDF:
python solution.py batch-convert ./documents ./pdf_output .docx .pdf
Convert all images to JPEG:
python solution.py batch-convert ./photos ./jpeg_output .png .jpg
Convert all audio files to MP3:
python solution.py batch-convert ./audio ./mp3_output .flac .mp3
Extensions with or without dots:
# Both commands are equivalent
python solution.py batch-convert ./docs ./output .txt .pdf
python solution.py batch-convert ./docs ./output txt pdf

Key Features

Automatic preservation:
  • Original files are always preserved (solution.py:93)
  • The --preserve-original flag is not needed
Error handling:
  • If one file fails, others continue processing (solution.py:94-95)
  • Failed conversions are counted and reported
  • Error messages show which file failed
Progress reporting (solution.py:91-95):
Info: Found 25 files with extension .docx
Info: Converting from /path/input to /path/output, .docx → .pdf
Converting: document1.docx → document1.pdf
Converting: document2.docx → document2.pdf
...
--------------------------------------------------
Info: Batch conversion completed - Successful: 23
Info: Failed: 2
Info: Output directory: /path/output

Limitations

1. Non-recursive:
  • Only processes files in the specified directory
  • Does not search subdirectories
  • Use separate commands for nested folders
2. Extension matching:
  • Must specify exact extension
  • Case-sensitive on Linux/macOS
  • Only processes files matching the input extension
3. Overwrite prompts:
  • Each existing output file triggers a prompt (solution.py:63-65)
  • Can be tedious with many files
  • Use a fresh output directory to avoid this

Best Practices

1. Use fresh output directories:
python solution.py batch-convert ./input ./output_$(date +%Y%m%d) .docx .pdf
2. Test with a small subset first:
# Copy a few files to test directory
mkdir test_input
cp ./documents/*.docx test_input/ | head -5
python solution.py batch-convert ./test_input ./test_output .docx .pdf
3. Check the summary:
  • Review successful and failed counts
  • Investigate failed conversions individually
  • Re-run failed files with verbose error messages
4. Organize by type:
# Convert different types to different directories
python solution.py batch-convert ./docs ./output/pdfs .docx .pdf
python solution.py batch-convert ./docs ./output/markdown .docx .md
SwissKnife uses Google’s Gemini 2.5 Flash model for document summarization.

Model Configuration (solution.py:183)

response = client.models.generate_content(
    model="gemini-2.5-flash",
    contents=[prompt, doc],
    config=genai.types.GenerateContentConfig(
        temperature=config["temperature"],
        top_p=0.9,
        max_output_tokens=config["max_tokens"]
    )
)

Model Parameters by Length (solution.py:173-174)

Short summaries:
  • Max tokens: 1500
  • Temperature: 0.5 (more focused/deterministic)
  • Output: 1 paragraph
Medium summaries (default):
  • Max tokens: 2500
  • Temperature: 0.7 (balanced)
  • Output: 2-3 paragraphs
Long summaries:
  • Max tokens: 4000
  • Temperature: 0.8 (more creative/varied)
  • Output: 3-4 paragraphs
All configurations use:
  • top_p: 0.9 for nucleus sampling
  • Custom prompt from summarize_prompt.txt

API Requirements

Google API Key (solution.py:164):
if "GOOGLE_API_KEY" not in os.environ:
    raise EnvironmentError("GOOGLE_API_KEY environment variable is not set.")
Get your API key from Google AI Studio.Python package (solution.py:168):
pip install google-genai

Why Gemini 2.5 Flash?

Gemini 2.5 Flash is optimized for:
  • Fast processing speeds
  • Large context windows (can handle long documents)
  • Cost-effective API usage
  • Multimodal capabilities (text, images, documents)
  • Good balance between quality and performance
Conversion time varies based on file type, size, and complexity.

Timing Information

Every conversion displays its duration (solution.py:153-155):
Info: Conversion completed in 3.47 seconds.
This is calculated from start to finish:
start_time = time.time()
# ... conversion process ...
end_time = time.time()
duration = end_time - start_time
print(f"Info: Conversion completed in {duration:.2f} seconds.")

Typical Duration Ranges

Document conversions:
  • Small documents (< 10 pages): 1-3 seconds
  • Medium documents (10-50 pages): 3-10 seconds
  • Large documents (> 50 pages): 10-30 seconds
  • Depends on: Page count, images, formatting complexity, LaTeX compilation
Image conversions:
  • Usually very fast: < 1 second
  • Large images or PDF output: 1-3 seconds
  • Batch processing: Depends on count and size
Audio conversions:
  • Short clips (< 5 min): 2-5 seconds
  • Songs (3-5 min): 5-15 seconds
  • Long recordings: Proportional to duration
  • High-quality formats (FLAC): Slightly longer
Video conversions:
  • Short clips (< 30 sec): 5-20 seconds
  • Standard videos (1-5 min): 20-60 seconds
  • Long videos: Can take several minutes
  • GIF creation: Additional time for palette generation (solution.py:71-74)
Archive operations:
  • Small archives: 1-5 seconds
  • Large archives: 10-60+ seconds
  • Depends on: File count, compression ratio, archive format
AI Summarization:
  • Upload time: Depends on file size and internet speed
  • Processing: 10-120 seconds typically
  • Maximum timeout: 5 minutes (300 seconds) (solution.py:181)

Factors Affecting Speed

  1. File size - Larger files take longer
  2. Complexity - Rich formatting, many images, high resolution
  3. Output format - Some formats require more processing
  4. System resources - CPU, RAM, disk speed
  5. Dependencies - LaTeX compilation can be slow
  6. Network - AI summarization requires upload/download

Optimization Tips

Use --preserve-original judiciously:
  • Adds time for creating temporary copy
  • Only use when necessary
Batch processing:
  • Files are processed sequentially, not in parallel
  • Total time = sum of individual conversions
  • Progress shown for each file (solution.py:93)
Yes, SwissKnife is designed to work well in scripts and automated workflows.

Exit Codes

SwissKnife follows standard Unix exit code conventions:Success (exit code 0):
# Conversion succeeds, program exits normally
convert_file(args.input, args.output)
# Exits with code 0
Errors (exit code 1) (solution.py:266-270):
except KeyboardInterrupt:
    print("\nError: Operation cancelled by user")
    sys.exit(1)
except Exception as e:
    print(f"Error: {e}")
    sys.exit(1)

Script Examples

Bash script for batch processing:
#!/bin/bash

# Convert all documents in multiple directories
for dir in docs1 docs2 docs3; do
    python solution.py batch-convert "./$dir" "./output/$dir" .docx .pdf
    if [ $? -ne 0 ]; then
        echo "Failed to process $dir"
        exit 1
    fi
done

echo "All conversions completed successfully"
Python script for automated conversion:
import subprocess
import sys

files_to_convert = [
    ("report.docx", "report.pdf"),
    ("data.xlsx", "data.pdf"),
    ("notes.md", "notes.html")
]

for input_file, output_file in files_to_convert:
    result = subprocess.run(
        ["python", "solution.py", "convert", input_file, output_file],
        capture_output=True,
        text=True
    )
    
    if result.returncode != 0:
        print(f"Failed to convert {input_file}: {result.stderr}")
        sys.exit(1)
    
    print(result.stdout)

Handling the Overwrite Prompt

The overwrite prompt (solution.py:63-65) can interrupt automation:
Output file exists. Overwrite? (y/N):
Workarounds:
  1. Remove output files beforehand:
rm -f output.pdf
python solution.py convert input.docx output.pdf
  1. Use unique output names:
timestamp=$(date +%Y%m%d_%H%M%S)
python solution.py convert input.docx "output_${timestamp}.pdf"
  1. Pipe ‘y’ to the command:
echo y | python solution.py convert input.docx output.pdf

Capturing Output

SwissKnife prints informative messages during operation:
# Capture stdout and stderr
result = subprocess.run(
    ["python", "solution.py", "convert", "input.pdf", "output.docx"],
    capture_output=True,
    text=True
)

print("STDOUT:", result.stdout)
print("STDERR:", result.stderr)
print("Exit code:", result.returncode)

Environment Variables

For AI summarization in scripts:
export GOOGLE_API_KEY="your_key_here"
python solution.py summarize document.pdf --length medium
Or in Python:
import os
os.environ["GOOGLE_API_KEY"] = "your_key_here"
subprocess.run(["python", "solution.py", "summarize", "doc.pdf"])

Batch Processing Safety

Batch conversion continues even if individual files fail (solution.py:94-95):
try:
    convert_file(...)
    successful_conversions += 1
except Exception as e:
    print(f"Error: Failed to convert {input_file.name}: {e}")
    failed_conversions += 1
    continue  # Process next file
Check the final summary:
Info: Batch conversion completed - Successful: 23
Info: Failed: 2

Cron Jobs

Example cron job for daily conversions:
# Convert documents daily at 2 AM
0 2 * * * cd /path/to/swissknife && source .venv/bin/activate && python solution.py batch-convert ./daily_docs ./output .docx .pdf >> /var/log/swissknife.log 2>&1

Best Practices

  1. Always check exit codes in scripts
  2. Use absolute paths when possible
  3. Handle the overwrite prompt appropriately
  4. Set GOOGLE_API_KEY in environment for AI features
  5. Log output for debugging
  6. Test scripts with small datasets first

Still Have Questions?

For command-specific help:
python solution.py --help
python solution.py convert --help
python solution.py batch-convert --help
python solution.py summarize --help
python solution.py merge --help
python solution.py split --help

Build docs developers (and LLMs) love