-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_data.py
71 lines (46 loc) · 1.95 KB
/
app_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
"""
Collection of 'File autoplacer' application data utility required for processing.
"""
_app_name = "File autoplacer" # <= Name of application.
_app_logo_path = "icons/app_logo.png"
_animation_logo_path = "icons/animation.gif"
_yes_logo_path = "icons/yes.png"
_about_logo_path = "icons/about.png"
_exclusions_logo_path = "icons/exclusions.png"
_quit_logo_path = "icons/quit.png"
_file_logo_path = "icons/file.png"
_directory_logo_path = "icons/directory.png"
_lockfile_name = "File-autoplacer.lock" # <= Name of lockfile to be created.
_lockfile_content = " Auto-generated by 'File autoplacer' application, will be deleted automatically after exiting."\
+ "\n Please DO NOT manually create/modify/change this file.\n Have a nice day ;-) "
def lockfile_name():
''' Return the name of lockfile to be created. '''
return _lockfile_name
def writable_lockfile_content():
''' Return content of lockfile to be written. '''
# return "".join("{0:08b}".format(ord(c), "b") for c in str(_lockfile_content))
return _lockfile_content
def is_valid_content(file_content: str=""):
''' Return 'True' if the "file_content" is matched to original lockfile content, otherwise False. '''
if not file_content.strip():
return False
# decoded_binary_content = "".join(chr(int(binary_content[i * 8 : i * 8 + 8], 2)) for i in range(len(binary_content) // 8))
return (file_content == _lockfile_content)
def app_logo_path():
return _app_logo_path
def quit_logo_path():
return _quit_logo_path
def about_logo_path():
return _about_logo_path
def yes_logo_path():
return _yes_logo_path
def app_name():
return _app_name
def exclusions_logo_path():
return _exclusions_logo_path
def file_logo_path():
return _file_logo_path
def directory_logo_path():
return _directory_logo_path
def animation_logo_path():
return _animation_logo_path