Comment

Comment by bquinlan

I created an equivalent project for people who wanted to create the same style of badges from Python (or from the command line): https://github.com/google/pybadges

Python example:

  from pybadges import badge
  s = badge(left_text='coverage',
            right_text='23%', 
           right_color='red')
  # s is a string that contains the badge data as an svg image.
  print(s[:40]) # => <svg height="20" width="191.0" xmlns="ht

Command line example:

  python -m pybadges \
    --left-text="coverage" \
    --right-text="23%" \
    --right-color="red"
But there are lots more formatting options documented on the project page.
parent bquinlan 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton