├── LICENSE ├── README.md ├── asciiText.py ├── logo.svg ├── setup.py └── stargaze_star_gradient.svg /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 JoeVenner 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### ASCII TEXT GENERATOR - PYTHON 2 | 3 | Ascii Text Generator, it will help you to add beatufull banners to your scripts 4 | 5 | ![demo](https://i.ibb.co/yYFFpkm/1.png) 6 | 7 | ## HOW TO USE : 8 | 9 | ### INSTALL REQS 10 | 11 | pip install wheel 12 | 13 | python setup.py bdist_wheel 14 | 15 | pip install -e . 16 | 17 | import asciiText 18 | 19 | 20 | #### GET LIST OF AVAILABLE FONTS 21 | 22 | asciiText.listFonts(exemple=True,text="TestText") 23 | 24 | 25 | - exemple : If True it will list all the fonts including exemples if False it will list only the font id 26 | 27 | ### GENERATE ASCII ART FROM A TEXT 28 | ![asciigenerator](https://i.ibb.co/0ZnhGff/2.png) 29 | 30 | asciiText.getAscii(text="TextText",font="broadway") 31 | 32 | ![colorascii](https://i.ibb.co/YBXG36v/color.png) 33 | 34 | asciiText.getAsciiColor(text="JoeVenner",font="broadway",color="green") 35 | 36 | 37 | ### FOR API CALL 38 | 39 | 1. LIST FONTS http://artii.herokuapp.com/fonts_list 40 | 2. GENERATE ASCII TEXT http://artii.herokuapp.com/make?text=ASCII+art&font=trek 41 | 42 | 43 | ### TO ADD 44 | 45 | - [ ] Add as python Module 46 | - [ ] Use it in Offline mode 47 | -------------------------------------------------------------------------------- /asciiText.py: -------------------------------------------------------------------------------- 1 | from bs4 import BeautifulSoup 2 | import requests 3 | 4 | Colors={ 5 | "PURPLE" : '\033[95m', 6 | "BLUE" : '\033[94m', 7 | "CYAN" : '\033[36m', 8 | "GREEN" : '\033[92m', 9 | "YELLOW" : '\033[93m', 10 | "RED" : '\033[91m', 11 | "ENDC" : '\033[0m', 12 | "BOLD" : '\033[1m', 13 | "UNDERLINE" : '\033[4m', 14 | "All" : '\033[5;31;40m' 15 | } 16 | colorsToUse = {0: '3-d', 2: '5lineoblique', 9: 'asc_____', 24: 'c_ascii_', 28: 'char2___', 36: 'charact6', 38: 'charset_', 17 | 46: 'demo_1__', 56: 'f15_____', 67: 'fireing_', 115: 'npn_____', 122: 'panther_', 128: 'r2-d2___', 131: 'radical_', 18 | 143: 'roman', 144: 'roman___', 145: 'script__', 175: 'twin_cob', 177: 'ucf_fan_', 189: 'acrobatic', 190: 'alligator', 19 | 191: 'alligator2', 194: 'banner', 195: 'banner3-D', 196: 'banner3', 197: 'banner4', 198: 'barbwire', 199: 'basic', 200: '5x7', 20 | 203: '6x9', 205: 'briteb', 210: 'clb6x10', 211: 'clb8x10', 212: 'clb8x8', 213: 'cli8x8', 221: 'clr7x10', 223: 'clr8x10', 21 | 224: 'clr8x8', 245: 'utopiab', 260: 'xhelvbi', 267: 'xsbookb', 273: 'bell', 274: 'big', 277: 'block', 278: 'broadway', 22 | 279: 'bubble', 281: 'calgphy2', 282: 'caligraphy', 285: 'coinstak', 286: 'colossal', 288: 'contrast', 289: 'cosmic', 292: 'cricket', 23 | 300: 'doh', 302: 'dotmatrix', 313: 'epic', 316: 'fraktur', 320: 'graffiti', 324: 'isometric1', 325: 'isometric2', 326: 'isometric3', 24 | 327: 'isometric4', 335: 'larry3d', 342: 'marquee', 351: 'nancyj-fancy', 356: 'nvscript', 371: 'rev', 378: 'sblood', 387: 'smisome1', 25 | 397: 'starwars', 415: 'usaflag' 26 | } 27 | 28 | def listFonts(exemple,text="TestText"): 29 | if exemple: 30 | for id in colorsToUse: 31 | print("ID : ",colorsToUse[id]) 32 | print(getAscii(text,colorsToUse[id])) 33 | else: 34 | print(colorsToUse) 35 | 36 | def getAscii(text="Text",font="broadway"): 37 | url = f'http://artii.herokuapp.com/make?text={text}&font={font}' 38 | data = requests.get(url) 39 | soup = BeautifulSoup(data.content, 'html.parser') 40 | print(soup) 41 | 42 | def getAsciiColor(text="Text",font="broadway",color="cyan"): 43 | url = f'http://artii.herokuapp.com/make?text={text}&font={font}' 44 | data = requests.get(url) 45 | soup = BeautifulSoup(data.content, 'html.parser') 46 | print(Colors[color.upper()]+soup.text+Colors["ENDC"]) 47 | 48 | 49 | print("\n\n") 50 | getAsciiColor("JoeVenner","coinstak","green") 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | stargaze_logo 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | setup( 3 | name='asciiText', 4 | version='0.0.1', 5 | description='Generate Beautiful Ascii Text Art', 6 | py_modules=['generator'], 7 | install_requires=[ 8 | 'BeautifulSoup4', 9 | 'requests' 10 | ], 11 | author='JoeVenner' 12 | 13 | ) 14 | -------------------------------------------------------------------------------- /stargaze_star_gradient.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | --------------------------------------------------------------------------------