FEAT: Add custom symbol style and custom code block language#491
FEAT: Add custom symbol style and custom code block language#491caupolicanre wants to merge 30 commits intoanmol098:masterfrom
Conversation
for requirements.txt
Customize code block language and handle symbol style
|
Great addition. |
aravindvnair99
left a comment
There was a problem hiding this comment.
@caupolicanre could you undo the formatting changes? Especially the one to action.yml
@aravindvnair99 I don't know why it shows a complete change on the whole file, I didn't change the formatting of it. I don't know if there is a way to go back to a previous version of the file in github (before the fork) and try adding again those lines. If there is a way to do that, let me know and I'll change it. EDIT: Just used these commands to restore original git fetch upstream
git checkout upstream/master -- [action.yml]Then added the 2 new environment variables in this commit. |
I reestablished in git the original action file
|
@anmol098 @aravindvnair99 PR is ready to review. I remain attentive for any questions or changes needed. |
MarkenJaden
left a comment
There was a problem hiding this comment.
I'd reeeaally like this change. Code looks good to me, I tested it on my machine.
Formatting changed were rolled back but still seem to occur, I'm also not sure why this happens, but it's working fine. I think this change can be dismissed.
Thank you so much for reviewing my PR! I would also love this change in the main project, but as of today, I'm using my own fork to have this enhanced version. |
There was a problem hiding this comment.
What's the diff in this file, I wonder, why so much?..
There was a problem hiding this comment.
What's the diff in this file, I wonder, why so much?..
I don't know why it shows changes in the whole file.
I just added these two new variables.
I didn't modify the format or anything else.
In this commit, I did a rollback, bringing action.yml file to it's original version.
There was a problem hiding this comment.
@caupolicanre Perhaps you had an auto format enabled which is a common setting in VS Code, linting tools, etc. I see the diff is mostly whitespace changes. You can resync this file from master and reapply the changes.
|
@caupolicanre Can you please resolve conflicts? |
aravindvnair99
left a comment
There was a problem hiding this comment.
Resolve conflicts, rebase with master and also revert the formatting.
There was a problem hiding this comment.
@caupolicanre Perhaps you had an auto format enabled which is a common setting in VS Code, linting tools, etc. I see the diff is mostly whitespace changes. You can resync this file from master and reapply the changes.
|
I feel like |
@ok-coder1 |
Hi! Yesterday, I was implementing this action on my personal README and instantly thought about 2 cool features that I'd like in this action. So first I made an issue requesting a new symbol to be added #489, but then forked the repo and started programming them by myself.
This PR has 2 new features:
Custom Symbol Style
Created a new environment variable
SYMBOL_STYLEwhere the flag can be set to "▰▱" (just an example) to change the style of progress bar (by default is empty). If the length of the string is not 2, the default symbol version will be used.Then changed the logic to:
So if there are 2 symbols in "SYMBOL_STYLE" it will use them, if not, will use "SYMBOL_VERSION".
Custom Code Block Language
Created a new environment variable
CODE_BLOCK_LANGUAGEwhere the flag can be set to "python" (just an example) to change the language of code blocks (by default is "text"). Here is a list of the language code blocks supported by github. I preferred to simply add the link to the list of languages to the README, and not write it, so that it is not so long.A verification can be added if you want. It could be an if statement to check if "CODE_BLOCK_LANGUAGE" is in the available languages list.
Example
Everything was tested in my personal repository.

Here is an example of my personal README where I'm using a custom symbol and python language for the code block:
I added the new documentation to the README explaining the two new environment variables.
I remain attentive for any questions.
Caupo.