Markdown To M-Rows
MAMOW is a multi-format CLI tool for converting test cases between Markdown, Gherkin, and Excel formats. Designed for QA engineers and test automation developers, it streamlines the process of converting human-readable test specifications into structured formats with automatic tag classification.
Key Features:
- ๐ Multi-format conversion: Gherkin โ Markdown โ Excel
- ๐ท๏ธ Automatic tag classification: 5 standardized metadata categories
- ๐ Directory processing: Batch, merge, and single file modes
- ๐จ Beautiful CLI: Colorful interface with progress indicators
- ๐ Hierarchical help: Context-aware help system
- ๐ Getting Started - Installation & setup
- ๐ How to Use - CLI usage overview
- ๐ฏ Getting Help - Hierarchical help system
- ๐ Legacy Mode - Markdown โ Excel conversion
- ๐ Convert Mode - Multi-format conversion
- ๐ Examples - Practical usage examples
- ๐ท๏ธ Tag Classification - Automatic tag handling
- ๐ Troubleshooting - Common issues & solutions
Before you begin, ensure you have the following installed on your system:
- Python 3.9+ (Check with
python3 --versionorpython --version) - Git (Check with
git --version) - pip (Python package installer)
Clone the project from the very beginning using the following command:
git clone https://github.com/hanifrazin/MAMOW.git
cd MAMOWMAMOW provides two ways to run the tool:
| Method | Command | Best for |
|---|---|---|
| Global CLI (recommended) | mamow -i <input> |
After installation, use from anywhere |
| Direct Python | python src/main.py -i <input> |
Quick testing, no install needed |
The installation scripts below make the mamow command available globally. They handle everything โ including virtual environment creation and dependency installation โ automatically on the first run.
Option A โ Quick Install (Recommended):
Run the installation script from the project root. This copies a launcher into /usr/local/bin:
chmod +x src/executable_scripts/install.sh
./src/executable_scripts/install.shOption B โ Manual PATH Setup (no sudo needed):
If you don't have sudo access, add the scripts folder to your shell profile instead:
echo 'export PATH="$PATH:'"$(pwd)"'/src/executable_scripts"' >> ~/.zshrc
source ~/.zshrcHow it works: The
mamowbash script resolves its real path, creates a.venvvirtual environment with all dependencies on first run, then executessrc/main.pywith your arguments.
Run the installation batch script in Command Prompt (or PowerShell). This adds the src\executable_scripts folder to your user PATH:
.\src\executable_scripts\install.batAfter installation, restart your terminal for the PATH changes to take effect.
How it works: The
mamow.batscript creates a.venvand installs dependencies on first run. It also attempts to build a standalonemamow.exevia PyInstaller for faster subsequent launches. If PyInstaller is not available, it falls back gracefully to running via Python.
๐ก First-run behavior: When you run
mamowfor the first time (on any platform), it will automatically:
- Create a Python virtual environment (
.venv/) in the project root- Install all required dependencies (
pydantic,openpyxl,rich)- Execute your command โ no manual
pip installneeded
MAMOW is a multi-format test case converter with two main operation modes:
For converting Markdown test cases to Excel spreadsheets with advanced directory processing.
For converting between Gherkin, Markdown, and Excel formats with automatic tag classification.
MAMOW features a hierarchical help system to make it easy to find the right information:
# Show main overview with all commands
mamow
# Show help for Markdown โ Excel conversion
mamow --help
# Show help for format conversion (Gherkin โ Markdown โ Excel)
mamow convert --helpConvert Markdown test cases to Excel spreadsheets with directory processing capabilities.
Basic Usage:
mamow -i <input_path> [-o <output_path>] [-c <config_path>] [--merge | --single]Using Python directly:
python src/main.py -i <input_path> [-o <output_path>] [-c <config_path>] [--merge | --single]| Option | Description | Default |
|---|---|---|
-i, --input (Required) |
Path to input Markdown file (.md) or a directory containing .md files |
โ |
-o, --output |
Path to output Excel file (.xlsx) or directory |
Value fromconfig.json |
-c, --config |
Path to configuration file | config.json |
--merge |
Mergeall .md files in a directory into a single .xlsx file |
off |
--single |
Exporteach .md file in a directory to separate .xlsx files |
off |
-h, --help |
Show help message with all options and examples | โ |
Convert between Gherkin, Markdown, and Excel formats with automatic tag classification.
Basic Usage:
mamow convert -i <input_file> -f <format> [-o <output_file>]Format Options:
md- Markdown file (.md)gherkin- Gherkin/Feature file (.feature)feature- Alias forgherkinexcel- Excel spreadsheet (.xlsx)
When converting between Gherkin and Markdown, MAMOW automatically classifies tags into 5 standardized metadata blocks:
- Priority - Uppercase, comma-separated (e.g.,
P1, P2) - TC Type - Capitalized (e.g.,
Positive, Negative) - Test Type - Lowercase (e.g.,
smoke, regression) - Platform Type - Uppercase, comma-separated (e.g.,
UI, MOBILE) - Other Tags - Lowercase, comma-separated (e.g.,
login, bug-123)
When the input is a directory in Legacy Mode, MAMOW supports three modes:
| Mode | Flag | Behavior |
|---|---|---|
| Batch (default) | (no flag) | Processes each.md file individually โ separate .xlsx files |
| Merge | --merge |
Combines all.md files into one .xlsx file |
| Single | --single |
Exports each.md file to its own .xlsx file with conflict-safe naming |
Note:
--mergeand--singlecannot be used together. If the input is a single file, both flags are ignored.
When the output path is a directory, MAMOW auto-generates filenames as follows:
| Mode | Output Filename Pattern | Example |
|---|---|---|
| Single file | {filename}.xlsx |
login.xlsx |
| Batch (directory) | {filename}.xlsx per file |
login.xlsx, register.xlsx |
| Merge (directory) | {input_folder}_merge.xlsx |
data_merge.xlsx |
| Single (directory) | {filename}_single.xlsx (appends _1, _2, โฆ on conflict) |
login_single.xlsx |
When the input is a directory, MAMOW automatically creates a result_<input_folder_name> subfolder inside the output directory to keep your exports organized. For example:
mamow -i samples/data/ -o samples/output/ --mergeโ Exports to samples/output/result_data/data_merge.xlsx
This prevents output clutter and keeps results from different input directories separated.
1. Process a single Markdown file:
mamow -i samples/data/login.md -o samples/output/login.xlsx2. Batch process all files in a directory (default mode):
mamow -i samples/data/ -o samples/output/โ Each .md file becomes its own .xlsx inside samples/output/result_data/
3. Merge all files in a directory into a single Excel workbook:
mamow -i samples/data/ -o samples/output/data.xlsx --mergeโ All test cases combined into samples/output/result_data/data_merge.xlsx
4. Export each file separately using --single mode:
mamow -i samples/data/ -o samples/output/ --singleโ Each .md โ separate .xlsx (e.g., login_single.xlsx, login-2_single.xlsx) inside samples/output/result_data/
5. Run using fallback default paths (as defined in config.json):
mamow -i login.mdโ Looks for samples/input/login.md and outputs to samples/output/
1. Markdown โ Gherkin with tag classification:
mamow convert -i test.md -f gherkin -o test.featureโ Converts Markdown to Gherkin with tags automatically classified
2. Gherkin โ Markdown:
mamow convert -i test.feature -f md -o test.mdโ Converts Gherkin to Markdown with proper tag formatting
3. Markdown โ Excel (via convert mode):
mamow convert -i test.md -f excel -o test.xlsx4. Gherkin โ Excel:
mamow convert -i test.feature -f excel -o test.xlsx5. Auto-generated output naming:
mamow convert -i input.feature -f mdโ Creates input.md in the same directory
MAMOW features a beautiful, colorful CLI interface:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ __ __ _ __ __ _____ __ โ
โ | \/ | / \ | \/ |/ _ \ \ / / โ
โ | |\/| | / _ \ | |\/| | | | \ \ /\ / / โ
โ | | | |/ ___ \| | | | |_| |\ V V / โ
โ |_| |_/_/ \_\_| |_|\___/ \_/\_/ โ
โ โ
โ Markdown To M-Rows โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏThe interface provides:
- Colorful output with clear visual hierarchy
- Progress bars for long operations
- Well-formatted tables and panels
- Intuitive help system with examples
MAMOW automatically classifies Gherkin tags into 5 standardized metadata blocks when converting to/from Markdown:
Example Gherkin tags:
@P1 @Negative @UI @smoke @login @bug-123Becomes in Markdown:
**Priority**: P1
**TC Type**: Negative
**Test Type**: smoke
**Platform Type**: UI
**Other Tags**: login, bug-123| Category | Format | Example Tags |
|---|---|---|
| Priority | Uppercase, comma-separated | P1, P2, P3, P4, P5 |
| TC Type | Capitalized | Positive, Negative |
| Test Type | Lowercase | smoke, regression, sanity, integration |
| Platform Type | Uppercase | UI, MOBILE, API, WEB, DESKTOP |
| Other Tags | Lowercase | login, logout, bug-123, edge-case |
- Feature files:
.featureextension - Scenario tags: Tags before each scenario
- Feature tags: Tags at the feature level
- Roundtrip preservation: All tags preserved through conversions
@P1 @smoke @UI
Feature: Login Module
As a user I want to login to the system
@Negative @MOBILE
Scenario: Invalid login on mobile
Given I am on mobile login page
When I enter wrong credentials
Then error message is displayedHere are some common issues you might encounter and how to fix them:
- Solution: Ensure Python is added to your system's PATH during installation. On Windows, you might need to use
pythoninstead ofpython3.
- Solution (macOS/Linux): Ensure you created the venv with the exact name
venv. Check your current directory is the project root. - Solution (Windows): If you receive a script execution policy error in PowerShell, run
Set-ExecutionPolicy Unrestricted -Scope CurrentUseras an Administrator, or use Command Prompt to runvenv\Scripts\activate.bat.
- Solution: This means the dependencies are not installed or your virtual environment is not active. Make sure you activate the virtual environment (
source venv/bin/activate) and runpip install -r requirements.txtagain.
- Solution: Verify the path to your Markdown file is correct relative to your current terminal working directory. You can also provide an absolute path to the file.
If you try to run mamow and get an error, ensure you have run the installation script first (install.sh for Mac/Linux, install.bat for Windows). If issues persist, follow these manual fixes:
๐ macOS & ๐ง Linux:
-
Issue A: Permission Denied The scripts need execution permissions. Fix: Run the following command from the project root:
chmod +x src/executable_scripts/mamow chmod +x src/executable_scripts/install.sh
-
Issue B: Command not found (
mamow: command not found) Theinstall.shmight have failed to write to/usr/local/bindue to permission issues or restricted environments. Fix 1 (Manual Symlink):sudo ln -s "$(pwd)/src/executable_scripts/mamow" /usr/local/bin/mamowFix 2 (Add to PATH): Add the folder to your
~/.zshrcor~/.bashrc.echo 'export PATH="$PATH:'"$(pwd)"'/src/executable_scripts"' >> ~/.zshrc source ~/.zshrc
๐ช Windows:
If you ran install.bat but mamow still isn't recognized in PowerShell or Command Prompt:
-
Issue: PATH environment variable didn't refresh Fix: Restart your PowerShell or Command Prompt window. The PATH changes applied by
install.battake effect in new terminal sessions. -
Issue: Script Execution Disabled (PowerShell) Fix: Open PowerShell as Administrator and run:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
-
Alternative for Git Bash Users: If you prefer Git Bash instead of PowerShell, Git Bash reads the bash
mamowfile instead ofmamow.bat. You can alias it by running:echo "alias mamow='bash $(pwd)/src/executable_scripts/mamow'" >> ~/.bash_profile source ~/.bash_profile