Get up and running with SwissKnife by performing your first file conversion. This guide will walk you through a simple conversion to verify your installation works correctly.
First Conversion
Let’s convert a simple text file to PDF to verify everything is working:
Create a test file
Create a simple text file to convert: echo "Hello from SwissKnife!" > test.txt
Run your first conversion
Convert the text file to PDF: python solution.py convert test.txt test.pdf
Expected output: Converting: /path/to/test.txt to /path/to/test.pdf
Success: Document conversion successful: /path/to/test.pdf
Info: Conversion completed in 0.85 seconds.
Verify the output
Check that test.pdf was created in your current directory. Open it to verify the content was converted correctly.
Conversions are typically very fast - most operations complete in under a second!
Common Use Cases
Now that you’ve completed your first conversion, try these common workflows:
Document Conversion
Convert documents between popular formats:
# Convert Word document to PDF
python solution.py convert report.docx report.pdf
# Convert Markdown to PowerPoint
python solution.py convert presentation.md presentation.pptx
# Convert Excel to PDF
python solution.py convert data.xlsx data.pdf
Image Processing
Transform images between formats:
# Compress PNG to JPG
python solution.py convert photo.png photo.jpg
# Convert image to PDF
python solution.py convert diagram.png diagram.pdf
# Convert WebP to PNG
python solution.py convert image.webp image.png
Convert audio and video files:
# Convert MP3 to FLAC (lossless)
python solution.py convert song.mp3 song.flac
# Convert video to MP4
python solution.py convert video.avi video.mp4
# Create GIF from video
python solution.py convert tutorial.mp4 tutorial.gif
Batch Processing
Convert entire directories of files at once:
# Convert all DOCX files in a folder to PDF
python solution.py batch-convert ./documents ./output docx pdf
# Convert all PNG images to JPG
python solution.py batch-convert ./images ./compressed png jpg
Expected output:
Info: Found 15 files with extension .docx
Info: Converting from /path/to/documents to /path/to/output, .docx → .pdf
Converting: document1.docx → document1.pdf
Converting: document2.docx → document2.pdf
...
Info: Batch conversion completed - Successful: 15
Info: Failed: 0
Info: Output directory: /path/to/output
AI Summarization
Generate summaries of documents using AI:
# Generate a medium-length summary
python solution.py summarize document.pdf
# Generate a short summary
python solution.py summarize report.docx --length short
# Generate a detailed summary
python solution.py summarize thesis.pdf --length long
Summarization requires a valid Google API key. See the AI Setup Guide for configuration instructions.
PDF Operations
Merge or split PDF files:
# Merge multiple PDFs
python solution.py merge chapter1.pdf chapter2.pdf chapter3.pdf
# Split PDF (extract pages 1-3, 5, and 7-9)
python solution.py split document.pdf "1-3,5,7-9"
Next Steps
Commands Reference Explore all available commands and their options
File Types See all supported file formats and conversions
Examples Browse real-world usage examples
Dependencies Configure optional dependencies for advanced features
Tips for Success
Preserving Original Files
By default, SwissKnife works on temporary copies of your files. To explicitly preserve the original during conversion: python solution.py convert input.docx output.pdf --preserve-original
Handling Password-Protected Archives
Convert password-protected archives using the --password flag: python solution.py convert secure.zip backup.7z --password mypassword
Use the --help flag with any command to see detailed usage information: python solution.py convert --help
python solution.py summarize --help
python solution.py batch-convert --help