From d870e4fed6d6e1d684e34017f1c4163f6159e9de Mon Sep 17 00:00:00 2001 From: janis Date: Fri, 6 May 2022 17:47:39 +0200 Subject: [PATCH 1/2] fixed small error in top_games.py --- alpha_modules/top_games.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/alpha_modules/top_games.py b/alpha_modules/top_games.py index 30e4411..91a5daf 100644 --- a/alpha_modules/top_games.py +++ b/alpha_modules/top_games.py @@ -17,6 +17,7 @@ class TopGamesUpdater: def updater(self): self.__source = bin.lib.website_source_grabber.WebsiteSourceGrabber().grabber() self.list_generator() + return self.__return_value def list_generator(self): while self.__go == 1: @@ -36,7 +37,5 @@ class TopGamesUpdater: except ValueError: self.__go = 0 - return self.__return_value - -TopGamesUpdater().updater() +print(TopGamesUpdater().updater()) From e6634480c6399249bbd72ce88220828736747caa Mon Sep 17 00:00:00 2001 From: janis Date: Mon, 16 May 2022 08:04:15 +0200 Subject: [PATCH 2/2] new file structure and some changes to the main file --- .../price_extractor_objectoriented.py | 2 +- {beta_modules => bin/webscratching}/top_games.py | 2 +- simplePCBuilding-PC-Configurator-alpha1.py | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) rename bin/{price_extractor => webscratching}/price_extractor_objectoriented.py (98%) rename {beta_modules => bin/webscratching}/top_games.py (97%) diff --git a/bin/price_extractor/price_extractor_objectoriented.py b/bin/webscratching/price_extractor_objectoriented.py similarity index 98% rename from bin/price_extractor/price_extractor_objectoriented.py rename to bin/webscratching/price_extractor_objectoriented.py index 576fcad..2d09dae 100644 --- a/bin/price_extractor/price_extractor_objectoriented.py +++ b/bin/webscratching/price_extractor_objectoriented.py @@ -30,7 +30,7 @@ class PriceExtractor: def readfile(self, filename): """Reads a new file that contains links in csv format. Arguments: - Filename. Either specify full path (e.g. /home/[username]/price_extractor/prices.csv), relative path when + Filename. Either specify full path (e.g. /home/[username]/webscratching/prices.csv), relative path when inside the folder of the executable (e.g. /pricedata/prices2.csv) or inside another folder that is located in the parent folder (e.g. ../pricedata/prices3.csv). Returns the content of the file inside of a list. diff --git a/beta_modules/top_games.py b/bin/webscratching/top_games.py similarity index 97% rename from beta_modules/top_games.py rename to bin/webscratching/top_games.py index 20dacc8..fc3b7d4 100644 --- a/beta_modules/top_games.py +++ b/bin/webscratching/top_games.py @@ -38,4 +38,4 @@ class TopGamesUpdater: self.__go = 0 -print(TopGamesUpdater().updater()) +TopGamesUpdater().updater() diff --git a/simplePCBuilding-PC-Configurator-alpha1.py b/simplePCBuilding-PC-Configurator-alpha1.py index e504ad0..84cc2fd 100644 --- a/simplePCBuilding-PC-Configurator-alpha1.py +++ b/simplePCBuilding-PC-Configurator-alpha1.py @@ -4,10 +4,16 @@ import time from kivy.uix.screenmanager import ScreenManager from kivy.uix.popup import Popup from kivy.lang import Builder -from kivy.clock import mainthread from kivymd.app import MDApp from kivymd.uix.screen import MDScreen from kivy.clock import Clock +import bin.webscratching.top_games +import bin.lib.csv_parsers + + +topg = bin.webscratching.top_games.TopGamesUpdater() +cvw = bin.lib.csv_parsers.CsvWrite() +cvr = bin.lib.csv_parsers.CsvRead() version = "alpha 1.0"