version: "3"
tasks:
build:
desc: Compile mozsync (via a flatpak-builder sandbox, for Qt6WebEngine headers only)
sources:
- main.go
- go.mod
- go.sum
- org.mozsync.App.yml
generates:
- mozsync
cmds:
- systemd-run --user --scope --collect -p CPUWeight=10 -p IOWeight=10 -p MemoryHigh=3G -- flatpak run --command=flatpak-builder org.flatpak.Builder --force-clean build-dir org.mozsync.App.yml
- cp build-dir/files/bin/mozsync ./mozsync
- echo "Built ./mozsync - runs directly against the host's Qt6 runtime libs, no flatpak needed."
login:
desc: One-time Mozilla account sign-in, saves credentials to ~/.config/mozsync/credentials.json
deps: [build]
cmds:
- ./mozsync login
dump:
desc: Fetch and print your Firefox Sync bookmarks as JSON
deps: [build]
cmds:
- ./mozsync dump
chrome-import:
desc: Import your Firefox Sync bookmarks into the Chromium flatpak's bookmark store
vars:
CHROME_BOOKMARKS: '{{.CHROME_BOOKMARKS | default (printf "%s/.var/app/org.chromium.Chromium/config/chromium/Default/Bookmarks" (env "HOME"))}}'
deps: [build]
cmds:
- ./mozsync dump | ./mozsync chrome-import "{{.CHROME_BOOKMARKS}}"
falkon-import:
desc: Import your Firefox Sync bookmarks into the Falkon flatpak's bookmark store
vars:
FALKON_BOOKMARKS: '{{.FALKON_BOOKMARKS | default (printf "%s/.var/app/org.kde.falkon/config/falkon/profiles/default/bookmarks.json" (env "HOME"))}}'
deps: [build]
cmds:
- ./mozsync dump | ./mozsync falkon-import "{{.FALKON_BOOKMARKS}}"
clean:
desc: Remove build artifacts
cmds:
- rm -rf build-dir .flatpak-builder mozsync