Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Add custom symbol style and custom code block language #491

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ad5c77d
Add new symbol version
caupolicanre Dec 3, 2023
e85eefe
Add new symbols for VERSION_4
caupolicanre Dec 3, 2023
3a88e90
Add symbol style option to .env.example and
caupolicanre Dec 3, 2023
f3d179d
Refactor progress bar symbol handling
caupolicanre Dec 3, 2023
ad6d3f4
Remove default symbol style in action.yml
caupolicanre Dec 3, 2023
937d0d3
Remove unused symbol style
caupolicanre Dec 3, 2023
671b673
Add SYMBOL_STYLE flag to change progress bar style
caupolicanre Dec 3, 2023
9618a41
small change in SYMBOL_STYLE env variable README
caupolicanre Dec 3, 2023
4384df8
Update action.yml and .env.example files with CODE_BLOCK_LANGUAGE env…
caupolicanre Dec 3, 2023
bed1496
Refactor code to use code block language in stats
caupolicanre Dec 4, 2023
3a6d86a
Update README.md with code block language flag
caupolicanre Dec 4, 2023
42d825e
Update action.yml to test actions behavior
caupolicanre Dec 4, 2023
c37ff55
Small change to test action
caupolicanre Dec 4, 2023
32bad51
Testing action with composite
caupolicanre Dec 4, 2023
fd0a05b
Update pip installation and add conditional check
caupolicanre Dec 4, 2023
50c6666
Update run command in action.yml
caupolicanre Dec 4, 2023
44acf0a
Update action.yml to install dependencies and run
caupolicanre Dec 4, 2023
4d9360d
Update action.yml to use Docker for running the
caupolicanre Dec 4, 2023
8b4f18f
Fix Dockerfile casing
caupolicanre Dec 4, 2023
131f17f
Fix symbol style check in make_graph function
caupolicanre Dec 4, 2023
98b3702
Fix symbol style assignment in make_graph function
caupolicanre Dec 4, 2023
437c0f1
Fix progress bar symbol style bug
caupolicanre Dec 4, 2023
3f4bd8c
Remove commented out code and update runs section
caupolicanre Dec 4, 2023
728027f
Merge pull request #1 from caupolicanre/customize_text_field
caupolicanre Dec 4, 2023
025f504
Update action.yml
caupolicanre Dec 4, 2023
b11cac2
Rollback to upstream original 'action.yml' file
caupolicanre Dec 4, 2023
2ea7da6
Add new env variables to action.yml
caupolicanre Dec 4, 2023
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
Prev Previous commit
Next Next commit
Fix progress bar symbol style bug
caupolicanre committed Dec 4, 2023
commit 437c0f161d887eac8edffc82d3a1ecd805105917
6 changes: 3 additions & 3 deletions sources/graphics_list_formatter.py
Original file line number Diff line number Diff line change
@@ -42,10 +42,10 @@ def make_graph(percent: float):
:param percent: Completion percent of the progress bar.
:return: The string progress bar representation.
"""
if len(EM.SYMBOL_STYLE) == "":
if len(EM.SYMBOL_STYLE) == 2:
done_block, empty_block = EM.SYMBOL_STYLE[0], EM.SYMBOL_STYLE[1]
else:
done_block, empty_block = Symbol.get_symbols(EM.SYMBOL_VERSION)
elif len(EM.SYMBOL_STYLE) == 2:
done_block, empty_block = EM.SYMBOL_STYLE[0], EM.SYMBOL_STYLE[1]
percent_quart = round(percent / 4)
return f"{done_block * percent_quart}{empty_block * (25 - percent_quart)}"