From e5e0a336a7b85f45df8e6ea8efbd3f1e9c2e7325 Mon Sep 17 00:00:00 2001 From: pronopython Date: Thu, 28 Dec 2023 22:52:46 +0100 Subject: [PATCH] Fixed install dependency, fixed configurator, added warning labels, added waiting label, enhanced readme --- README.md | 28 ++++++++++++++++++++++++---- rugivi/rugivi.py | 17 ++++++++++++++++- rugivi/rugivi_configurator.py | 24 +++++++++++++----------- setup.py | 4 ++-- 4 files changed, 55 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index cf8d63d..ae39671 100755 --- a/README.md +++ b/README.md @@ -97,9 +97,9 @@ You can also export a world map: Clone this repository into a writeable directory. -### 2. Install python tkinter +### 2. Install python tkinter and pillow -`sudo apt-get install python3-tk` +`sudo apt-get install python3-tk python3-pil.imagetk` ### 3. Install RuGiVi via pip @@ -198,6 +198,8 @@ Run `rugivi_configurator`: Change the entries to fit your setup. +> :cherries: *You must save the settings on the first run of RuGiVi even if you change nothing here* + |Setting | Description | |-----------------|------------------------------------------------------------------------------------| |Crawler root directory | This is the root directory of all the pictures you want to explore within RuGiVi | @@ -208,6 +210,8 @@ Change the entries to fit your setup. | FapTable parent dirs | See FapTables | | FapTable single dirs | See FapTables | +> :cherries: *You must use a new World DB File or delete the old one when changing root directory* + Make sure your database files are placed on a SSD drive! # Start RuGiVi @@ -254,6 +258,8 @@ You can watch this process or start traveling through the images world. |p |Pause crawler (troubleshooting) | |e |Generate and export world map as png file | +To make `t` and `s` work, you must have the fapel-system installed and make sure, that the correct python executable is set in RuGiVis config file (this should work out of the box for Ubuntu and Windows but I could not check all possibilities). + # Quitting RuGiVi @@ -382,8 +388,8 @@ Note that you can only run World Overlook one time per RuGiVi Session. You need | RuGiVi does not start| Try starting RuGiVi via console (with `rugivi`) and look at the error messages. Common reasons is a broken or incorrect config file. You can also try to define new world and thumb database files.| |Screen is black|Probably Edit mode is enabled, press middle mousebutton again| |Images are pixelated or just red | RuGuVi is probably loading a lot of images and the ones you currently want to see are at a later position at the loader queue. Keep an eye on "Queue" in the information box ( press `i` to show it) | -|RuGiVi is slow | Loading takes time and RuGiVi loads a lot of data. See the Tips section for speed tips. | | -| | | +|RuGiVi is slow | Loading takes time and RuGiVi loads a lot of data. See the Tips section for speed tips. | +|Fapel-System keys (t and s) crash RuGiVi, despite the Fapel-System being installed | Check RuGiVi Config file if the correct python executable is mentioned under section `[control]`, `pythonexecutable=` | @@ -399,6 +405,7 @@ Note that you can only run World Overlook one time per RuGiVi Session. You need * Despite not changing anything, RuGiVi does not work on read-only media directories. This is because pygame image loader opens files with write access. * TIFF files may produce warnings which on Windows are opened as separate message boxes. * Big worlds (> 500,000 images) are not round or rectangular but have the shape of a plus sign ("+"), see big world map example on this page. This is due to the crawler placement algorithm, which is in alpha state. +* Audio pops at startup (probably a pygame issue) # Technical Stuff @@ -494,6 +501,19 @@ If you want to backup your config and database files, just make a copy of these # Release Notes +## v0.3.1-alpha + +### added + +- RuGiVi Configurator: A red labeled warning that you must use a different World DB File or delete the old one when changig the root directory +- Animated "please wait" label showing as long as less than 10 pictures are loaded, because initial startup takes a few seconds and this especially puzzled new users since nothing was displayed. +- Some technical topics / troubleshootings in readme + +### fixed + +- missing Pillow / PIL dependency during setup (added as a manual step for Ubuntu and in setup.py) +- pressing Cancel in the root dir folder dialog crashed RuGiVi Configurator + ## v0.3.0-alpha ### added diff --git a/rugivi/rugivi.py b/rugivi/rugivi.py index 8915f59..f2c7a38 100755 --- a/rugivi/rugivi.py +++ b/rugivi/rugivi.py @@ -112,7 +112,7 @@ def __init__(self) -> None: root.withdraw() messagebox.showinfo( "Not configured", - "Please configure RuGiVi with the RuGiVi Configurator before running it", + "Please configure RuGiVi and save the settings with the RuGiVi Configurator before running it", ) sys.exit(0) @@ -789,6 +789,21 @@ def run(self) -> NoReturn: status.draw(self.display) + + if self.image_server._total_database_loaded + self.image_server._total_disk_loaded < 10: + + font = pygame.font.SysFont("monospace", 40) + label = font.render( + "starting... please wait!", True, (255, 255, 255) + ) + self.display.blit(label, (30, 30)) + mp = int(time() % 4) + label2 = font.render((" "*mp) + ".", True, (255, 80, 207)) + self.display.blit(label2, (30, 80)) + #pygame.display.flip() + + + if self.running == False: self.display.fill((100, 100, 100, 0)) diff --git a/rugivi/rugivi_configurator.py b/rugivi/rugivi_configurator.py index d0bcb3e..1c709df 100755 --- a/rugivi/rugivi_configurator.py +++ b/rugivi/rugivi_configurator.py @@ -95,7 +95,7 @@ def loadInitValue(self) -> None: def buttonClicked(self) -> None: selected_folder = filedialog.askdirectory() - if selected_folder != "": + if selected_folder != "" and len(selected_folder) > 0: selected_folder = os.path.abspath(selected_folder) self.dirText.set(selected_folder) @@ -269,7 +269,7 @@ def __init__(self) -> None: self.root = Tk() - self.root.geometry("800x460") + self.root.geometry("800x480") self.root.title("RuGiVi Configurator") @@ -288,33 +288,35 @@ def __init__(self) -> None: itfo = SelectionFile(frm,self.configParser,"Crawler World DB File","world","worldDB",filetypes) itfo.getFrame().grid(column=0,row=2,ipadx=10,padx=10,sticky=W+E) - Label(frm, text="Thumb Database settings").grid(column=0, row=3,sticky=W) + Label(frm, text="You must use a new World DB File or delete the old one when changing root directory", fg="red").grid(column=0, row=3,sticky=W) + + Label(frm, text="Thumb Database settings").grid(column=0, row=4,sticky=W) itfo = SelectionFile(frm,self.configParser,"Thumb DB File","thumbs","thumbDB",filetypes) - itfo.getFrame().grid(column=0,row=4,ipadx=10,padx=10,sticky=W+E) + itfo.getFrame().grid(column=0,row=5,ipadx=10,padx=10,sticky=W+E) - Label(frm, text="GUI settings").grid(column=0, row=5,sticky=W) + Label(frm, text="GUI settings").grid(column=0, row=6,sticky=W) itfo = SelectionBoolean(frm,self.configParser,"Reverse Scroll Wheel Zoom","control","reversescrollwheelzoom") - itfo.getFrame().grid(column=0,row=6,ipadx=10,padx=10,sticky=W+E) + itfo.getFrame().grid(column=0,row=7,ipadx=10,padx=10,sticky=W+E) itfo = SelectionInteger(frm,self.configParser,"Status font size","fonts","statusfontsize") - itfo.getFrame().grid(column=0,row=7,ipadx=10,padx=10,sticky=W+E) + itfo.getFrame().grid(column=0,row=8,ipadx=10,padx=10,sticky=W+E) - Label(frm, text="FapTables").grid(column=0, row=8,sticky=W) + Label(frm, text="FapTables").grid(column=0, row=9,sticky=W) itfo = SelectionMultiFolder(frm,self.configParser,"FapTable parent dirs","fapTableParentDirs","dir") - itfo.getFrame().grid(column=0,row=9,ipadx=10,padx=9,sticky=W+E) + itfo.getFrame().grid(column=0,row=10,ipadx=10,padx=9,sticky=W+E) itfo = SelectionMultiFolder(frm,self.configParser,"FapTable single dirs","fapTableSingleDirs","dir") - itfo.getFrame().grid(column=0,row=10,ipadx=10,padx=10,sticky=W+E) + itfo.getFrame().grid(column=0,row=11,ipadx=10,padx=10,sticky=W+E) bframe = Frame(frm) Button(bframe, text="Save and exit", command=self.actionSaveAndExit).grid(column=0,row=0,ipadx=5,sticky=E) Button(bframe, text="Exit without save", command=self.actionExitWithoutSave).grid(column=1,row=0,ipadx=5,sticky=E) - bframe.grid(column=0,row=11,sticky=E) + bframe.grid(column=0,row=12,sticky=E) diff --git a/setup.py b/setup.py index 719961e..2b23be2 100755 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ from setuptools import setup setup(name='rugivi', - version='0.3.0-alpha', + version='0.3.1-alpha', description='RuGiVi - Adult Media Landscape Browser', url='https://github.com/pronopython/rugivi', author='pronopython', @@ -39,7 +39,7 @@ package_data={'rugivi':['*']}, include_package_data=True, zip_safe=False, - install_requires=['pygame','psutil','numpy','sqlitedict','pyshortcuts'], + install_requires=['pygame','psutil','numpy','sqlitedict','pyshortcuts','Pillow'], entry_points={ 'gui_scripts': [ 'rugivi_configurator=rugivi.rugivi_configurator:main'