Skip to content

Commit

Permalink
v0.4.0 added, video stills, better crawling, image cache
Browse files Browse the repository at this point in the history
  • Loading branch information
pronopython committed Feb 19, 2024
1 parent e5e0a33 commit babadf3
Show file tree
Hide file tree
Showing 29 changed files with 2,398 additions and 565 deletions.
322 changes: 298 additions & 24 deletions README.md

Large diffs are not rendered by default.

Binary file added img/202401125.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401254.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401274.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401365.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401487.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401521.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401888.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401895.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/202401982.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/2302.png
Binary file not shown.
17 changes: 17 additions & 0 deletions rugivi/config_file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import os
from pathlib import Path
import configparser
import sys
from tkinter import messagebox
from . import dir_helper as dir_helper


Expand Down Expand Up @@ -59,15 +61,19 @@ def get_config_parser(self) -> configparser.RawConfigParser:
return self.config_parser

def get(self, group, key) -> str:
self.check_key(group, key)
return self.config_parser.get(group, key)

def get_int(self, group, key) -> int:
self.check_key(group, key)
return int(self.config_parser.get(group, key))

def get_boolean(self, group, key) -> bool:
self.check_key(group, key)
return self.config_parser.get(group, key) in ("True", "TRUE", "true", "1")

def get_directory_path(self, group, key, ifEmpty="") -> str:
self.check_key(group, key)
path = self.get(group, key)
if path == "":
return ifEmpty.replace("~", self.homedir)
Expand All @@ -85,3 +91,14 @@ def write_changed_config(self) -> None:
print("Writing changes to config file", self.config_file_path)
configfile = open(self.config_file_path, "w")
self.config_parser.write(configfile)

def check_key(self, group, key):
try:
self.config_parser.get(group, key)
except configparser.NoOptionError:
errortext = 'Error: The following group / key combination is missing in your RuGiVi config "'+self.config_file_path+'":\n\n['+group+']\n'+key+'\n\nLook into rugivi dir of git repo for a default config file!'
print("Config entry missing!")
print(errortext)
messagebox.showerror('Config entry missing!', errortext)
sys.exit()

Loading

0 comments on commit babadf3

Please sign in to comment.