Just For Fun

  1. # -*- coding: utf-8 -*-
  2. """生成 ascii 字体
  3. pip install colorama termcolor pyfiglet
  4. """
  5. import sys
  6. from colorama import init
  7. init(strip=not sys.stdout.isatty()) # strip colors if stdout is redirected
  8. from termcolor import cprint
  9. from pyfiglet import figlet_format
  10. # cprint(figlet_format('missile!', font='starwars'), 'yellow', 'on_red', attrs=['bold'])
  11. cprint(figlet_format(u'docker vim', width=300))
  12. """
  13. ____ _ _ __ __ _ ____ _ _
  14. | _ \ _ _| |_| |__ ___ _ __ \ \ / /__| |__ / ___|_ _(_) __| | ___
  15. | |_) | | | | __| '_ \ / _ \| '_ \ \ \ /\ / / _ \ '_ \ | | _| | | | |/ _` |/ _ \
  16. | __/| |_| | |_| | | | (_) | | | | \ V V / __/ |_) | | |_| | |_| | | (_| | __/
  17. |_| \__, |\__|_| |_|\___/|_| |_| \_/\_/ \___|_.__/ \____|\__,_|_|\__,_|\___|
  18. |___/
  19. """