Skip to content

Commit 5a20f62

Browse files
author
obervinov
authored
Merge pull request #21 from obervinov/fix/v1.0.3
# PR-21: Correction of errors and misprints in documentation **full changelog**: v1.0.2...v1.0.3 by @ obervinov https://github.com/obervinov/messages-package/pull/ ## v1.0.3 - 2024-01-29 ### What's Changed **full changelog**: v1.0.2...v1.0.3 by @ obervinov https://github.com/obervinov/messages-package/pull/ #### 📚 Documentation * [Fix typos in README.md](#20)
2 parents c057c27 + be6cf24 commit 5a20f62

File tree

4 files changed

+37
-12
lines changed

4 files changed

+37
-12
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.
33
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
44

55

6+
## v1.0.3 - 2024-01-29
7+
### What's Changed
8+
**full changelog**: https://github.com/obervinov/messages-package/compare/v1.0.2...v1.0.3 by @ obervinov https://github.com/obervinov/messages-package/pull/21
9+
#### 📚 Documentation
10+
* [Fix typos in README.md](https://github.com/obervinov/messages-package/issues/20)
11+
12+
613
## v1.0.2 - 2024-01-24
714
### What's Changed
815
**full changelog**: https://github.com/obervinov/messages-package/compare/v1.0.1...v1.0.2 by @ obervinov https://github.com/obervinov/messages-package/pull/19

README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This package helps to easily and quickly generate beautiful messages for telegra
2626
## <img src="https://github.com/obervinov/_templates/blob/v1.0.5/icons/build.png" width="25" title="build"> Environment variables
2727
| Variable | Description | Default value |
2828
| ------------- | ------------- | ------------- |
29-
| `MESSAGES_CONFIG` | Json file with templates for rendering messages. (Example)[tests/configs/messages.json] | `configs/messages.json` |
29+
| `MESSAGES_CONFIG` | Json file with templates for rendering messages. [Example](tests/configs/messages.json) | `configs/messages.json` |
3030

3131

3232
## <img src="https://github.com/obervinov/_templates/blob/main/icons/stack2.png" width="20" title="install"> Installing with Poetry
@@ -38,7 +38,7 @@ version = "1.0.0"
3838
3939
[tool.poetry.dependencies]
4040
python = "^3.10"
41-
messages = { git = "https://github.com/obervinov/messages-package.git", tag = "v1.0.1" }
41+
messages = { git = "https://github.com/obervinov/messages-package.git", tag = "v1.0.3" }
4242
4343
[build-system]
4444
requires = ["poetry-core"]
@@ -54,7 +54,14 @@ poetry install
5454
- all emojis should be wrapped in `:`
5555
- all variables must be specified in the same form as in your code
5656
```json
57-
{ "templates": {"hello_message": {"text": "Hi, <b>{0}</b>! {1}\nAccess for your account - allowed {2}", "args": ["username", ":raised_hand:", ":unlocked:"]}}}
57+
{
58+
"templates": {
59+
"hello_message": {
60+
"text": "Hi, <b>{0}</b>! {1}\nAccess for your account - allowed {2}",
61+
"args": ["username", ":raised_hand:", ":unlocked:"]
62+
}
63+
}
64+
}
5865
```
5966

6067
```python
@@ -84,7 +91,14 @@ Access for your account - allowed 🔓
8491
- all emojis should be wrapped in `:`
8592
- all variables must be specified in the same form as in your code
8693
```json
87-
{"templates": {"progressbar_message": {"text": "{0} Messages from the queue have already been processed", "args": [":framed_picture:", "progressbar"]}}
94+
{
95+
"templates": {
96+
"queue_message": {
97+
"text": "{0} Messages from the queue have already been processed\n{1}",
98+
"args": [":framed_picture:", "progressbar"]
99+
}
100+
}
101+
}
88102
```
89103

90104
```python
@@ -94,16 +108,20 @@ from messages import Messages
94108
# Create instance
95109
messages = Messages()
96110

97-
# Rendering and getting messages
111+
# Render and get messages with progress bar
98112
print(
99-
messages.render_progressbar(
100-
total_count=100,
101-
current_count=19
113+
messages.render_template(
114+
template_alias='queue_message',
115+
progressbar=messages.render_progressbar(
116+
total_count=100,
117+
current_count=19
118+
)
102119
)
103120
)
104121
```
105122

106123
_output result_
107124
```python
108-
[◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️]19%🔓
125+
🏞 Messages from the queue have already been processed
126+
[◾◾◾◾◾◾◾◾◾◾◾◾◾◾◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻◻◻◻]19%
109127
```

poetry.lock

Lines changed: 1 addition & 1 deletion
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
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "messages"
3-
version = "1.0.2"
3+
version = "1.0.3"
44
description = "This package helps to easily and quickly generate beautiful messages for telegram bots using templates described in json."
55
authors = ["Bervinov Oleg <[email protected]>"]
66
maintainers = ["Bervinov Oleg <[email protected]>"]
@@ -18,7 +18,7 @@ include = ["CHANGELOG.md"]
1818

1919
[tool.poetry.dependencies]
2020
python = "^3.10"
21-
emoji = "^2.10.0"
21+
emoji = "^2"
2222

2323
[build-system]
2424
requires = ["poetry-core"]

0 commit comments

Comments
 (0)