Files
upstream-mirror 8e9cceaeae
Some checks failed
Build / test on ubuntu-latest (py-3.9) (push) Failing after 2m36s
Build / typecheck (push) Successful in 1m38s
Build / test on macos-latest (py-3.9) (push) Has been cancelled
Build / test on windows-latest (py-3.9) (push) Has been cancelled
CodeQL / Analyze (python) (push) Failing after 1s
snapshot of https://github.com/ActivityWatch/aw-watcher-window.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 00:21:37 +05:00

24 lines
854 B
Python

def build_swift_command(
binpath,
server_address,
bucket_id,
client_hostname,
client_name,
exclude_title=False,
exclude_titles=None,
research_category_map=None,
research_app_category_map=None,
):
command = [binpath, server_address, bucket_id, client_hostname, client_name]
if exclude_title:
command.append("--exclude-title")
for title in exclude_titles or []:
command.extend(["--exclude-titles", title])
if research_category_map is not None:
command.append("--research")
for pattern, category in research_category_map.items():
command.extend(["--research-category", pattern, category])
for app_name, category in (research_app_category_map or {}).items():
command.extend(["--research-app-category", app_name, category])
return command