Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project are documented in this file.

## [2025-01-21]
### Improved
- Improved the content of the README file

## [2025-01-08] -- 1.0.1
### Improved
- Optimized help messages and version information in the project.
Expand Down
27 changes: 26 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This is a Python implementation of the GNU Hello program (version 2.10). The pro
- **Traditional Greeting**: Prints "hello, world".
- **Customizable Greeting**: Allows the user to specify a custom greeting message using the `-g` or `--greeting` option.
- **Version Info**: Displays version information using the `-v` or `--version` option.
- **Help message**: Displays help message using the `-h` or `--help` option.

## Requirements

Expand All @@ -25,6 +26,7 @@ python hello.py [OPTIONS]
- `-v`, `--version`: Display version information.
- `-t`, `--traditional`: Use the traditional greeting "hello, world".
- `-g TEXT`, `--greeting TEXT`: Use `TEXT` as the greeting message.
- `-h`, `--help`: Show help information for the program.

### Examples

Expand Down Expand Up @@ -58,7 +60,30 @@ python hello.py [OPTIONS]

Output:
```
GNU Hello 2.10 in Python version 1.0.0
GNU Hello 2.10 in Python version 1.0.0 Copyright (C) 2025 yahange

```

4. Display help message:

```bash
python hello.py --help
```

Output:
```
(venv) PS C:\Users\yahan\PycharmProjects\pythonProject\learn_argparse\projects\GNU Hello in Python> python hello.py --help
GNU Hello 2.10 in Python version 1.0.0 Copyright (C) 2025 yahange
usage: hello.py [-h] [-v] [-t] [-g TEXT]

Print a friendly, customizable greeting.

options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-t, --traditional use traditional greeting
-g TEXT, --greeting TEXT
use TEXT as the greeting message
```

## License
Expand Down
Loading