Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
*node_modules/
settings.py
*.sqlite3
.project
.pydevproject
.settings
.vscode
doctrees
bin/
etc/
pyvenv.cfg
share/
.gzipper/
.venv

__pycache__/
*.py[cod]
.pytest_cache/
.ipynb_checkpoints
*.ipynb
notebooks/

# C extensions
*.so

# Distribution / packaging
.Python
env/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
build/

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Django stuff:
*.log

# Sphinx documentation
docs/_build

48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,51 @@ This single .md file contains all the content from your input files, with a tabl
(Content of styles.css)
```

## Terminal

To use Auto MD from the command line, run the following command:

```bash
python terminal.py [options]
```

### Options

- `-i`, `--input`: Input file(s) or folder(s) (required)
- `-o`, `--output`: Output file or folder (required)
- `-s`, `--single-file`: Combine all input files into a single output file (default: False)
- `-r`, `--repo-depth`: Depth for GitHub repository cloning (default: None)
- `-m`, `--include-metadata`: Include metadata in output (default: True)
- `-t`, `--include-toc`: Include table of contents in output (default: True)
- `-v`, `--verbose`: Enable verbose output (default: False)
- `-g`, `--gitignore`: Path to a .gitignore file to use for excluding files (default: None)
- `-x`, `--ignore-paths`: Comma-separated list of paths to ignore (default: None)

### Examples

1. Process a single text file and save the output to a single Markdown file:

```bash
python terminal.py -i input.txt -o output.md -s
```

2. Process a folder and save each file as a separate Markdown file:

```bash
python terminal.py -i input_folder -o output_folder
```

3. Process a GitHub repository and save the output to a single Markdown file, excluding files listed in a .gitignore file:

```bash
python terminal.py -i https://github.com/user/repo.git -o output.md -s -ig /path/to/.gitignore
```

4. Ignore some paths

```bash
python terminal.py -i input_folder -o output_folder -ip docs tests
```

This will not include the `docs` and `tests` path in the processing

Loading