Skip to content

Commit

Permalink
Fixed install dependency, fixed configurator, added warning labels, a…
Browse files Browse the repository at this point in the history
…dded waiting label, enhanced readme
  • Loading branch information
pronopython committed Dec 28, 2023
1 parent 5c49343 commit e5e0a33
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 18 deletions.
28 changes: 24 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 |
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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=` |



Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
17 changes: 16 additions & 1 deletion rugivi/rugivi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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))

Expand Down
24 changes: 13 additions & 11 deletions rugivi/rugivi_configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -269,7 +269,7 @@ def __init__(self) -> None:


self.root = Tk()
self.root.geometry("800x460")
self.root.geometry("800x480")
self.root.title("RuGiVi Configurator")


Expand All @@ -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)



Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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'
Expand Down

0 comments on commit e5e0a33

Please sign in to comment.