Compare commits

..

5 Commits

Author SHA1 Message Date
09cfd7d7c1 Updated motd.py, is able to display waifus with icat 2022-05-23 16:19:48 +02:00
6c0ba4b0af Making progress in python 2022-05-13 23:49:27 +02:00
86d70c0e93 intreal lolcat 2022-05-13 23:49:01 +02:00
57a264bbef Start migration to python 2022-05-05 19:50:40 +02:00
c547f33eb5 added 264 waifus 2022-04-11 20:07:40 +02:00
795 changed files with 89 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "lolcat"]
path = lolcat
url = git@github.com:jaseg/lolcat.git

1
lolcat Submodule

@ -0,0 +1 @@
Subproject commit 8173ed8cb62f22ca2ebb33a63b5b9954afb20d7e

85
motd.py Executable file
View File

@ -0,0 +1,85 @@
#!/bin/python
from functools import cache
import os
import random
#import ueberzug.lib.v0 as ueberzug
import subprocess
import time
import fnmatch
from curses.textpad import Textbox, rectangle
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))]))
#filter waifus
waifulist = os.listdir(DIR)
waifus_raw = fnmatch.filter(waifulist, '*.256.png')
waifus = list(waifus_raw)
waifuindex = random.randint(1, len(waifus))
#print(modpath)
#######################
#If term Kitty
print(len(waifus))
if random.randint(0,1) == 0:
if os.path.getsize(cachefile) != 0:
f = open(cachefile, 'r')
waifuindex = f.read()
print(int(waifuindex))
#print(len(waifus))
#Else Add File
###############
if int(waifuindex) < len(waifus):
waifu = waifus[int(waifuindex)]
waifuindex = int(waifuindex) + 1
f = open(cachefile, 'w')
f.write(str(waifuindex))
else:
waifuindex = random.randint(1, len(waifus))
f = open(cachefile, 'w')
f.write(str(waifuindex))
waifu = waifus[int(waifuindex)]
else:
waifu = waifus[int(waifuindex)]
#######################
#Declare static methods
@staticmethod
def showImage():
subprocess.run(["/usr/bin/kitty", "icat", DIR+"/"+waifu])
def showUname(unameArg):
os.system("/usr/bin/uname " + unameArg)
def showUptime(uptimeArg):
os.system("/usr/bin/uptime " + uptimeArg)
#def doLolcat():
# if __name__ == '__main__':
# showUname(unameArg)
# showUptime(uptimeArg)
showImage()

BIN
waifus/waifu-162.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
waifus/waifu-162.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
waifus/waifu-162.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
waifus/waifu-163.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
waifus/waifu-163.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
waifus/waifu-163.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
waifus/waifu-164.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
waifus/waifu-164.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
waifus/waifu-164.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
waifus/waifu-165.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
waifus/waifu-165.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
waifus/waifu-165.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
waifus/waifu-166.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
waifus/waifu-166.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
waifus/waifu-166.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
waifus/waifu-167.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
waifus/waifu-167.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

BIN
waifus/waifu-167.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
waifus/waifu-168.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
waifus/waifu-168.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
waifus/waifu-168.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
waifus/waifu-169.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
waifus/waifu-169.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
waifus/waifu-169.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
waifus/waifu-170.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
waifus/waifu-170.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
waifus/waifu-170.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
waifus/waifu-171.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
waifus/waifu-171.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
waifus/waifu-171.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
waifus/waifu-172.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
waifus/waifu-172.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
waifus/waifu-172.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
waifus/waifu-173.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
waifus/waifu-173.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
waifus/waifu-173.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
waifus/waifu-174.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
waifus/waifu-174.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

BIN
waifus/waifu-174.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
waifus/waifu-175.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
waifus/waifu-175.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
waifus/waifu-175.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
waifus/waifu-176.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
waifus/waifu-176.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
waifus/waifu-176.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

BIN
waifus/waifu-177.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
waifus/waifu-177.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
waifus/waifu-177.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
waifus/waifu-178.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
waifus/waifu-178.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
waifus/waifu-178.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
waifus/waifu-179.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
waifus/waifu-179.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
waifus/waifu-179.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
waifus/waifu-180.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
waifus/waifu-180.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
waifus/waifu-180.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
waifus/waifu-181.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
waifus/waifu-181.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
waifus/waifu-181.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
waifus/waifu-182.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
waifus/waifu-182.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
waifus/waifu-182.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
waifus/waifu-183.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
waifus/waifu-183.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
waifus/waifu-183.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
waifus/waifu-184.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
waifus/waifu-184.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
waifus/waifu-184.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
waifus/waifu-185.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
waifus/waifu-185.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
waifus/waifu-185.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
waifus/waifu-186.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
waifus/waifu-186.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
waifus/waifu-186.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
waifus/waifu-187.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
waifus/waifu-187.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
waifus/waifu-187.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
waifus/waifu-188.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
waifus/waifu-188.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
waifus/waifu-188.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
waifus/waifu-189.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
waifus/waifu-189.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
waifus/waifu-189.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
waifus/waifu-190.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
waifus/waifu-190.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
waifus/waifu-190.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
waifus/waifu-191.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
waifus/waifu-191.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
waifus/waifu-191.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
waifus/waifu-192.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
waifus/waifu-192.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
waifus/waifu-192.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
waifus/waifu-193.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
waifus/waifu-193.256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
waifus/waifu-193.64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
waifus/waifu-194.128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Some files were not shown because too many files have changed in this diff Show More