diff --git a/.gitignore b/.gitignore index 6ea48f7..abc5e71 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -pandorabox.log +pandora-box.log diff --git a/images/images.py b/images/images.py new file mode 100755 index 0000000..7b11e37 --- /dev/null +++ b/images/images.py @@ -0,0 +1,19 @@ +#!/usr/bin/python3 + +# display all images and reset + +import os +import time + +format = "1020x600" +#format = "1920x1080" + +images = ["pandora-box1.png", "pandora-box2.png", "pandora-box3.png", "pandora-box4.png"] + +for image in images : + os.system("convert -resize %s -background black -gravity center -extent %s %s bgra:/dev/fb0" % (format,format,image)) + time.sleep(1) + +os.system("reset") + + diff --git a/images/pandora-box1.png b/images/pandora-box1.png new file mode 100644 index 0000000..254a482 Binary files /dev/null and b/images/pandora-box1.png differ diff --git a/images/pandora-box2.png b/images/pandora-box2.png new file mode 100644 index 0000000..13218ac Binary files /dev/null and b/images/pandora-box2.png differ diff --git a/images/pandora-box3.png b/images/pandora-box3.png new file mode 100644 index 0000000..d92314b Binary files /dev/null and b/images/pandora-box3.png differ diff --git a/images/pandora-box4.png b/images/pandora-box4.png new file mode 100644 index 0000000..13868fa Binary files /dev/null and b/images/pandora-box4.png differ diff --git a/pandorabox.ini b/pandora-box.ini similarity index 92% rename from pandorabox.ini rename to pandora-box.ini index 6c6a0e2..76baa1e 100644 --- a/pandorabox.ini +++ b/pandora-box.ini @@ -1,5 +1,8 @@ [DEFAULT] +; Curses mode (full text) +CURSES = False + ; Set USB_AUTO_MOUNT to true is if the OS mount automaticaly mount USB keys USB_AUTO_MOUNT = True diff --git a/pandora-box.py b/pandora-box.py old mode 100644 new mode 100755 index 99c4586..01d6086 --- a/pandora-box.py +++ b/pandora-box.py @@ -24,6 +24,7 @@ USB_AUTO_MOUNT = False PANDORA_ROOT_URL = "http://127.0.0.1:6100" FAKE_SCAN = False QUARANTINE = False +CURSES = True """ read configuration file """ def config(): @@ -40,6 +41,8 @@ def config(): # Quarantine QUARANTINE = config['DEFAULT']['QUARANTINE'].lower()=="true" QUARANTINE_FOLDER = config['DEFAULT']['QUARANTINE_FOLDER'] + # Curses + CURSES = config['DEFAULT']['CURSES'].lower()=="true" # ---------------------------------------------------------- @@ -51,8 +54,20 @@ def human_readable_size(size, decimal_places=1): size /= 1024.0 return f"{size:.{decimal_places}f}{unit}" + # ----------------------------------------------------------- -# Screen +# Image Screen +# ----------------------------------------------------------- + +def display_image(status): + if status=="WAIT": + elif status=="WORK": + elif status=="OK": + elif status=="BAD": + else + +# ----------------------------------------------------------- +# CURSES Screen # ----------------------------------------------------------- """Initialise curses""" @@ -190,7 +205,7 @@ def init_log(): log_win = curses.newwin(curses.LINES-20, curses.COLS, 20, 0) log_win.border(0) logging.basicConfig( - filename='pandorabox.log', + filename='pandora-box.log', level=logging.INFO, format='%(asctime)s - %(message)s', datefmt='%m/%d/%y %H:%M'