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
Add --name option to change badge left side text #25
Conversation
Thanks a lot @nefrob ! I suggested to fix a few typos here and there. Also, could you please check that the "removing the left text" use case is actually supported, and update the flag documentation accordingly ? Other than this, the last thing is that for Line 89 in 6a796cf
becomes
with Thanks ! |
svg = self.as_svg(use_shields=use_shields) | ||
if clear_left_txt: | ||
svg = svg.replace(">" + self.left_txt + "<", "><") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little messy. In the case where we keep the left side of the badge but have no text it would be great to pass a tab character. However shields escapes label input so this doesn't work well. Instead we're looking for a strict match of the left txt inside html tags and replacing it with nothing afterwards. A placeholder ###
is used to create the svg space (so removing text doesn't remove the left side) in this case. Thoughts on improving this welcome.
@smarie tried to remove |
Hmm I can't seem to figure out getting the tests to run at all locally, especially for the breaking python versions. Not sure why they wouldn't be passing now when I didn't tweak anything around dependencies. Maybe per your suggestion we can set |
I made two comments with changes proposals, that I accepted in hope I could see the result (it works locally on my machine). However for some reason github actions does not re-trigger. I'll merge and see. Thanks again @nefrob ! |
Gotcha, thanks for looking into this @smarie. Let me know if I can help with anything else in getting this released. |
This is now released - 1.1.0 is out :) thanks again ! |
Re:
Pending:
Pass tests? It seems to be inserting the oppositeSeems I hadn't installed the newest version ofref_nbs
values as needed. I didn't edit this so not sure if it is something wrong with my local env setup and this is fine.pillow
somehow.