Start migration to python

This commit is contained in:
Lord Of Nougate 2022-05-05 19:50:40 +02:00
parent c547f33eb5
commit 57a264bbef

22
motd.py Executable file
View File

@ -0,0 +1,22 @@
#!/bin/python
import os
modpath = os.path.dirname(__file__)
cachefile = "/tmp/waifu.cache"
resolution = 256
center = True
lolcat = False
unameArg = "-sr"
uptimeArg = "--pretty"
terminal = os.get_terminal_size()
minTermW = 200
#unameColor = "\033[1;38;5;93m"
#uptimeColor = "\033[1;38;5;99m"
#print len([name for name in os.listdir(f'{modpath}/waifus') if os.path.isfile(name)])
DIR=modpath + '/waifus'
print(len([name for name in os.listdir(DIR) if os.path.isfile(os.path.join(DIR, name))]))
print(modpath)