mirror of
https://github.com/kirill-markin/repo-to-text.git
synced 2025-12-06 03:22:23 -08:00
Merge remote-tracking branch 'remotes/caffeinum/add-aliases' into release/0.4.4
This commit is contained in:
commit
fd84b62395
3 changed files with 16 additions and 3 deletions
14
README.md
14
README.md
|
|
@ -42,6 +42,12 @@ After installation, you can use the `repo-to-text` command in your terminal. Nav
|
||||||
repo-to-text
|
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.
|
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
|
### 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.
|
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
|
```bash
|
||||||
repo-to-text --create-settings
|
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.
|
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:
|
- `--debug`: Enable DEBUG logging. By default, `repo-to-text` runs with INFO logging level. To enable DEBUG logging, use the `--debug` flag:
|
||||||
|
|
|
||||||
|
|
@ -259,10 +259,10 @@ def create_default_settings_file():
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description='Convert repository structure and contents to text')
|
parser = argparse.ArgumentParser(description='Convert repository structure and contents to text')
|
||||||
parser.add_argument('input_dir', nargs='?', default='.', help='Directory to process') # P3e87
|
parser.add_argument('input_dir', nargs='?', default='.', help='Directory to process')
|
||||||
parser.add_argument('--debug', action='store_true', help='Enable debug logging')
|
parser.add_argument('--debug', action='store_true', help='Enable debug logging')
|
||||||
parser.add_argument('--output-dir', type=str, help='Directory to save the output file')
|
parser.add_argument('--output-dir', type=str, help='Directory to save the output file')
|
||||||
parser.add_argument('--create-settings', action='store_true', help='Create default .repo-to-text-settings.yaml file')
|
parser.add_argument('--create-settings', '--init', action='store_true', help='Create default .repo-to-text-settings.yaml file')
|
||||||
parser.add_argument('--stdout', action='store_true', help='Output to stdout instead of a file')
|
parser.add_argument('--stdout', action='store_true', help='Output to stdout instead of a file')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
|
|
||||||
1
setup.py
1
setup.py
|
|
@ -19,6 +19,7 @@ setup(
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'repo-to-text=repo_to_text.main:main',
|
'repo-to-text=repo_to_text.main:main',
|
||||||
|
'flatten=repo_to_text.main:main',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue