mirror of
https://github.com/jongracecox/anybadge.git
synced 2026-01-04 19:32:11 +01:00
Added version info, and Python3 support.
This commit is contained in:
11
anybadge.py
11
anybadge.py
@@ -6,6 +6,15 @@ A Python module for generating badges for your projects, with a focus on
|
|||||||
simplicity and flexibility.
|
simplicity and flexibility.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
# Package information
|
||||||
|
version = __version__ = "0.1.0.dev0"
|
||||||
|
__version_info__ = tuple(re.split('[.-]', __version__))
|
||||||
|
__title__ = "anybadge"
|
||||||
|
__summary__ = "A simple, flexible badge generator."
|
||||||
|
__uri__ = "https://github.com/jongracecox/anybadge"
|
||||||
|
|
||||||
|
|
||||||
# Set some defaults
|
# Set some defaults
|
||||||
DEFAULT_FONT = 'DejaVu Sans,Verdana,Geneva,sans-serif'
|
DEFAULT_FONT = 'DejaVu Sans,Verdana,Geneva,sans-serif'
|
||||||
@@ -453,7 +462,7 @@ def main():
|
|||||||
# Write badge SVG to file
|
# Write badge SVG to file
|
||||||
badge.write_badge(args.file, overwrite=args.overwrite)
|
badge.write_badge(args.file, overwrite=args.overwrite)
|
||||||
else:
|
else:
|
||||||
print badge.badge_svg_text
|
print(badge.badge_svg_text)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user