[config] Start refactoring by creating separate config class
Add a class that will hold all configuration and argument information and serve as central repository for this kind of information.
This commit is contained in:
parent
df27355977
commit
a58610f3ee
4 changed files with 100 additions and 2 deletions
|
@ -1,9 +1,14 @@
|
|||
import os
|
||||
import json
|
||||
import glob
|
||||
|
||||
def getpath():
|
||||
return os.path.dirname("{}/themes/".format(os.path.dirname(os.path.realpath(__file__))))
|
||||
|
||||
def themes():
|
||||
d = getpath()
|
||||
return [ os.path.basename(f).replace(".json", "") for f in glob.iglob("{}/*.json".format(d)) ]
|
||||
|
||||
class Theme:
|
||||
_cycle_index = 0
|
||||
_cycle = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue