Add aliases for repo-to-text and --create-settings

Fixes #11

Add aliases for `repo-to-text` and `--create-settings`.

* **setup.py**
  - Add alias `flatten` for `repo-to-text` in `entry_points`.

* **repo_to_text/main.py**
  - Add alias `--init` for `--create-settings` in `argparse` setup.

* **README.md**
  - Update usage documentation to include alias `flatten` for `repo-to-text`.
  - Update usage documentation to include alias `--init` for `--create-settings`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/kirill-markin/repo-to-text/issues/11?shareId=XXXX-XXXX-XXXX-XXXX).
This commit is contained in:
Aleksey Bykhun 2024-10-30 04:51:58 -07:00
parent ad36a75a7a
commit 3e236d7508
3 changed files with 15 additions and 2 deletions

View file

@ -42,6 +42,12 @@ After installation, you can use the `repo-to-text` command in your terminal. Nav
repo-to-text
```
or
```bash
flatten
```
This will create a file named `repo-to-text_YYYY-MM-DD-HH-MM-SS-UTC.txt` in the current directory with the text representation of the repository. The contents of this file will also be copied to your clipboard for easy sharing.
### Options
@ -56,12 +62,18 @@ You can customize the behavior of `repo-to-text` with the following options:
This will save the file in the specified output directory instead of the current directory.
- `--create-settings`: Create a default `.repo-to-text-settings.yaml` file with predefined settings. This is useful if you want to start with a template settings file and customize it according to your needs. To create the default settings file, run the following command in your terminal:
- `--create-settings` or `--init`: Create a default `.repo-to-text-settings.yaml` file with predefined settings. This is useful if you want to start with a template settings file and customize it according to your needs. To create the default settings file, run the following command in your terminal:
```bash
repo-to-text --create-settings
```
or
```bash
repo-to-text --init
```
This will create a file named `.repo-to-text-settings.yaml` in the current directory. If the file already exists, an error will be raised to prevent overwriting.
- `--debug`: Enable DEBUG logging. By default, `repo-to-text` runs with INFO logging level. To enable DEBUG logging, use the `--debug` flag: