Skip to content

Commit c9ea20a

Browse files
committed
feat: CLI option to remove default emojis from header sections.
1 parent ec3df5b commit c9ea20a

File tree

11 files changed

+108
-74
lines changed

11 files changed

+108
-74
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515

1616
All notable changes to the *readme-ai* project will be documented in this file.
1717

18+
---
19+
## [v0.1.6] - *2023-10-20*
20+
21+
1822
---
1923

2024
## [v0.1.5] - *2023-10-15*

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -495,17 +495,18 @@ poetry install
495495

496496
To generate a *README.md* file, use the `readmeai` command in your terminal, along with the arguments below.
497497

498-
| Short Flag | Long Flag | Description | Status |
499-
|------------|----------------|-----------------------------------------------------|--------------|
500-
| `-k` | `--api-key` | Your language model API secret key. | Optional |
501-
| `-b` | `--badges` | Select 'shields' or 'square' to change badge style. | Optional |
502-
| `-f` | `--offline-mode`| Run offline without calling the OpenAI API. | Optional |
503-
| `-m` | `--model` | Large language model engine (gpt-3.5-turbo) | Optional |
504-
| `-o` | `--output` | The output path for your README.md file. | Optional |
505-
| `-r` | `--repository` | The URL or path to your code repository. | Required |
506-
| `-t` | `--temperature`| The temperature (randomness) of the model. | Optional |
507-
| `-l` | `--language` | The language of text to write README in. | Coming Soon! |
508-
| `-s` | `--style` | The README template style to build. | Coming Soon! |
498+
| Short Flag | Long Flag | Description | Type | Status |
499+
|------------|------------------|-----------------------------------------------------|-------------|--------------|
500+
| `-k` | `--api-key` | Your language model API secret key. | String | Optional |
501+
| `-b` | `--badges` | Select 'shields' or 'square' to change badge style. | String | Optional |
502+
| `-e` | `--emojis` | Add emojis to your README.md file heading sections | Boolean | Optional |
503+
| `-f` | `--offline-mode` | Run offline without calling the OpenAI API. | Boolean | Optional |
504+
| `-m` | `--model` | Large language model engine (gpt-3.5-turbo) | String | Optional |
505+
| `-o` | `--output` | The output path for your README.md file. | Path/String | Optional |
506+
| `-r` | `--repository` | The URL or path to your code repository. | URL/String | Required |
507+
| `-t` | `--temperature` | The temperature (randomness) of the model. | Float | Optional |
508+
| `-l` | `--language` | The language of text to write README in. | String | Coming Soon! |
509+
| `-s` | `--style` | The README template style to build. | String | Coming Soon! |
509510

510511
<br>
511512

poetry.lock

Lines changed: 27 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "readmeai"
7-
version = "0.4.026"
8-
description = "🚀 Generate beautiful README.md files from the terminal. Powered by OpenAI's GPT LLMs 💫"
7+
version = "0.4.027"
8+
description = "🚀 Generate beautiful README files from the terminal, powered by AI. 💫"
99
authors = ["Eli <0x.eli.64s@gmail.com>"]
1010
license = "MIT"
1111
readme = "README.md"

readmeai/cli/commands.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
@click.command()
1212
@options.api_key
1313
@options.badges
14-
@options.encoding
15-
@options.endpoint
14+
@options.emojis
1615
@options.offline_mode
1716
@options.model
1817
@options.output
@@ -23,8 +22,7 @@
2322
def commands(
2423
api_key: str,
2524
badges: Optional[str],
26-
encoding: Optional[str],
27-
endpoint: Optional[str],
25+
emojis: Optional[bool],
2826
offline_mode: Optional[bool],
2927
model: Optional[str],
3028
output: Optional[str],
@@ -37,8 +35,7 @@ def commands(
3735
main(
3836
api_key=api_key,
3937
badges=badges,
40-
encoding=encoding,
41-
endpoint=endpoint,
38+
emojis=emojis,
4239
offline_mode=offline_mode,
4340
model=model,
4441
output=output,

readmeai/cli/options.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,12 @@
2424
- 'shields' refers to badges from shields.io \
2525
- 'square' refers to app-like square badges.""",
2626
)
27-
encoding = click.option(
28-
"-c",
29-
"--encoding",
30-
default="cl100k_base",
31-
help="Encoding used to tokenize text.",
27+
emojis = click.option(
28+
"-e",
29+
"--emojis",
30+
default=True,
31+
help="Emojis prefixed to all README heading sections.",
3232
)
33-
endpoint = click.option(
34-
"--endpoint",
35-
default="https://api.openai.com/v1/chat/completions",
36-
help="Large language model API endpoint.",
37-
)
38-
3933
model = click.option(
4034
"-m",
4135
"--model",

readmeai/core/config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ class ApiConfig(BaseModel):
3434
offline_mode: bool
3535

3636

37+
class CliConfig(BaseModel):
38+
"""Command-line interface configuration."""
39+
40+
emojis: bool
41+
42+
3743
class GitConfig(BaseModel):
3844
"""Pydantic model for Git repository configuration."""
3945

@@ -121,6 +127,7 @@ class AppConfig(BaseModel):
121127
"""Nested Pydantic model for the entire configuration."""
122128

123129
api: ApiConfig
130+
cli: CliConfig
124131
git: GitConfig
125132
md: MarkdownConfig
126133
paths: PathsConfig

readmeai/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
def main(
2626
api_key: str,
2727
badges: str,
28-
encoding: str,
29-
endpoint: str,
28+
emojis: bool,
3029
offline_mode: bool,
3130
model: str,
3231
output: str,
@@ -40,6 +39,7 @@ def main(
4039
config_model = AppConfigModel(app=config)
4140
config_helper = load_config_helper(config_model)
4241
config.api.model = model
42+
config.cli.emojis = emojis
4343
config.paths.output = output
4444
config.api.temperature = temperature
4545
config.api.offline_mode = offline_mode

0 commit comments

Comments
 (0)