Browse Source

Added ASCII art to Yarrbox script on init and edit.

master
treyzania 4 years ago
parent
commit
f231d06050
6 changed files with 67 additions and 0 deletions
  1. 10
    0
      old-arts/yb-art-lol-fixed.txt
  2. 10
    0
      old-arts/yb-art-lol.txt
  3. 10
    0
      old-arts/yb-art-noflavor.txt
  4. 17
    0
      yarrbox.py
  5. 10
    0
      yb-art-lol.txt
  6. 10
    0
      yb-art.txt

+ 10
- 0
old-arts/yb-art-lol-fixed.txt View File

                           _
 __   __                  | |
|  | |  |  ____  ___  ___ | |___    ___ __  __
|  | |  | / _  ||  _||  _|| / _ \  / _ \\ \/ /
|  |_|  || |_| || |  | |  |  |_| || |_| ||  |
 \___   | \____||_|  |_|  |_\___/  \___//_/\_\
     \  |
  ___/  | . . . Boxing your yarrs since 2019.
 |_____/


+ 10
- 0
old-arts/yb-art-lol.txt View File

                           _
 __   __                  | |
|  | |  |  ____  ___  ___ | |___    ___ __  __
|  | |  | / _  ||  _||  _|| / _ \  / _ \\ \/ /
|  |_|  || |_| || |  | |  |  |_| || |_| ||  |
 \___   | \____||_|  |_|  |_\___/  \___//_/\_\
     \  |
  ___/  | . . . boxing your yarrs since 2019.
 |_____/


+ 10
- 0
old-arts/yb-art-noflavor.txt View File

_
__ __ | |
| | | | ____ ___ ___ | |___ ___ __ __
| | | | / _ || _|| _|| / _ \ / _ \\ \/ /
| |_| || |_| || | | | | |_| || |_| || |
\___ | \____||_| |_| |_\___/ \___//_/\_\
\ |
___/ |
|_____/


+ 17
- 0
yarrbox.py View File

import os import os
from collections import OrderedDict from collections import OrderedDict
import sys import sys
import subprocess


import getpass import getpass
import json import json


USAGE_STR = 'usage: yarrbox.py <init|edit|generate>' USAGE_STR = 'usage: yarrbox.py <init|edit|generate>'


def print_ascii_art():
art = 'Yarrbox - Boxing your yarrs since 2019' # fallback text
try:
artfile = 'yb-art.txt'
if os.getenv('TERM') == 'xterm-256color':
artfile = 'yb-art-lol.txt'
with open(artfile, 'r') as f:
art = f.read()
except:
pass
print(art)

def main(): def main():
if len(sys.argv) != 2: if len(sys.argv) != 2:
print(USAGE_STR) print(USAGE_STR)


command = sys.argv[1] command = sys.argv[1]
if command == 'init': if command == 'init':
print_ascii_art()

# Check if a config already exists # Check if a config already exists
if os.path.exists('config.json'): if os.path.exists('config.json'):
print('A config exists here, overwrite? [y/n, default: n] ', end='', flush=True) print('A config exists here, overwrite? [y/n, default: n] ', end='', flush=True)
save_config(cfg) save_config(cfg)


elif command == 'edit': elif command == 'edit':
print_ascii_art()

print('Leave options blank to leave unchanged!\n') print('Leave options blank to leave unchanged!\n')
cfg = read_config() cfg = read_config()



+ 10
- 0
yb-art-lol.txt View File

                           _
 __   __                  | |
|  | |  |  ____  ___  ___ | |___    ___ __  __
|  | |  | / _  ||  _||  _|| / _ \  / _ \\ \/ /
|  |_|  || |_| || |  | |  |  |_| || |_| ||  |
 \___   | \____||_|  |_|  |_\___/  \___//_/\_\
     \  |
  ___/  | . . . Boxing your yarrs since 2019!
 |_____/


+ 10
- 0
yb-art.txt View File

_
__ __ | |
| | | | ____ ___ ___ | |___ ___ __ __
| | | | / _ || _|| _|| / _ \ / _ \\ \/ /
| |_| || |_| || | | | | |_| || |_| || |
\___ | \____||_| |_| |_\___/ \___//_/\_\
\ |
___/ | . . . boxing your yarrs since 2019.
|_____/


Loading…
Cancel
Save