Advanced channel filters (#1748)

Adds custom channel filters complete with their own mini-language. Filters can be created in settings, and applied by clicking the three dots to open the Split menu and selecting "Set filters".
This commit is contained in:
dnsge
2020-10-18 15:16:56 +02:00
committed by Rasmus Karlsson
parent 812cbdf4f9
commit 4199a01b96
41 changed files with 2189 additions and 43 deletions
+4 -2
View File
@@ -6,6 +6,8 @@ from _generate_resources import *
ignored_files = ['qt.conf', 'resources.qrc', 'resources_autogenerated.qrc', 'windows.rc',
'generate_resources.py', '_generate_resources.py']
ignored_names = ['.gitignore', '.DS_Store']
# to ignore all files in a/b, add a/b to ignored_directories.
# this will ignore a/b/c/d.txt and a/b/xd.txt
ignored_directories = ['__pycache__', 'linuxinstall']
@@ -16,7 +18,7 @@ def isNotIgnored(file):
if file.parent.as_posix().startswith(ignored_directory):
return False
return file.as_posix() not in ignored_files
return file.as_posix() not in ignored_files and file.name not in ignored_names
all_files = sorted(list(filter(isNotIgnored, \
filter(Path.is_file, Path('.').glob('**/*')))))
@@ -24,7 +26,7 @@ image_files = sorted(list(filter(isNotIgnored, \
filter(Path.is_file, Path('.').glob('**/*.png')))))
with open('./resources_autogenerated.qrc', 'w') as out:
out.write(resources_header)
out.write(resources_header + '\n')
for file in all_files:
out.write(f" <file>{file.as_posix()}</file>\n")
out.write(resources_footer)