Export unified gmcli conversations
This commit is contained in:
6
nixos/flake.lock
generated
6
nixos/flake.lock
generated
@@ -720,11 +720,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1783909743,
|
"lastModified": 1783912502,
|
||||||
"narHash": "sha256-yzJQVmVl27Q5VC1E6HtzFWn3nuVmZgOKdrK5WjlkWdU=",
|
"narHash": "sha256-eN7+87SwVX+s1dr5GF+t7z6c+0u3TkBmVWp7RtprA84=",
|
||||||
"owner": "colonelpanic8",
|
"owner": "colonelpanic8",
|
||||||
"repo": "gmcli",
|
"repo": "gmcli",
|
||||||
"rev": "28c2cbba87a480cfea792687ff9c2995ec674429",
|
"rev": "9f44bb911bf231071f90194a2934c72932c4617b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
gmcliArchiveRoot = "/home/imalison/Backups/gmcli/git-sync";
|
gmcliArchiveRoot = "/home/imalison/Backups/gmcli/git-sync";
|
||||||
gmcliArchiveOutput = "${gmcliArchiveRoot}/archive";
|
gmcliArchiveOutput = "${gmcliArchiveRoot}/archive";
|
||||||
gmcliTelephonyOutput = "${gmcliArchiveRoot}/telephony";
|
gmcliTelephonyOutput = "${gmcliArchiveRoot}/telephony";
|
||||||
|
gmcliUnifiedOutput = "${gmcliArchiveRoot}/unified";
|
||||||
gmcliTelephonyFullOutput = "/home/imalison/Backups/gmcli/android-telephony-full";
|
gmcliTelephonyFullOutput = "/home/imalison/Backups/gmcli/android-telephony-full";
|
||||||
gmcliBackupLock = "/home/imalison/.local/state/gmcli/backup.lock";
|
gmcliBackupLock = "/home/imalison/.local/state/gmcli/backup.lock";
|
||||||
gmcliChromeCookieDB = "/home/imalison/.config/google-chrome/Default/Cookies";
|
gmcliChromeCookieDB = "/home/imalison/.config/google-chrome/Default/Cookies";
|
||||||
@@ -47,6 +48,14 @@
|
|||||||
--force --include-part-data=false
|
--force --include-part-data=false
|
||||||
${gmcliPackage}/bin/gmcli android verify-telephony --dir ${lib.escapeShellArg gmcliTelephonyOutput}
|
${gmcliPackage}/bin/gmcli android verify-telephony --dir ${lib.escapeShellArg gmcliTelephonyOutput}
|
||||||
'';
|
'';
|
||||||
|
exportGmcliUnifiedArchive = pkgs.writeShellScript "export-gmcli-unified-archive" ''
|
||||||
|
set -euo pipefail
|
||||||
|
${gmcliPackage}/bin/gmcli export unified-jsonl \
|
||||||
|
--relay-dir ${lib.escapeShellArg gmcliArchiveOutput} \
|
||||||
|
--telephony-dir ${lib.escapeShellArg gmcliTelephonyOutput} \
|
||||||
|
--out ${lib.escapeShellArg gmcliUnifiedOutput} --force
|
||||||
|
${gmcliPackage}/bin/gmcli export verify-unified --dir ${lib.escapeShellArg gmcliUnifiedOutput}
|
||||||
|
'';
|
||||||
exportGmcliTelephonyFullArchive = pkgs.writeShellScript "export-gmcli-telephony-full-archive" ''
|
exportGmcliTelephonyFullArchive = pkgs.writeShellScript "export-gmcli-telephony-full-archive" ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
${gmcliPackage}/bin/gmcli android export-telephony \
|
${gmcliPackage}/bin/gmcli android export-telephony \
|
||||||
@@ -61,6 +70,7 @@
|
|||||||
${refreshGmcliCookies} || status=1
|
${refreshGmcliCookies} || status=1
|
||||||
${gmcliPackage}/bin/gmcli sync --include-spam=false --include-archive=false || status=1
|
${gmcliPackage}/bin/gmcli sync --include-spam=false --include-archive=false || status=1
|
||||||
${exportGmcliArchive} || status=1
|
${exportGmcliArchive} || status=1
|
||||||
|
${exportGmcliUnifiedArchive} || status=1
|
||||||
exit "$status"
|
exit "$status"
|
||||||
'';
|
'';
|
||||||
backfillGmcliArchiveUnlocked = pkgs.writeShellScript "backfill-gmcli-archive-unlocked" ''
|
backfillGmcliArchiveUnlocked = pkgs.writeShellScript "backfill-gmcli-archive-unlocked" ''
|
||||||
@@ -103,6 +113,7 @@
|
|||||||
fi
|
fi
|
||||||
${exportGmcliArchive} || status=1
|
${exportGmcliArchive} || status=1
|
||||||
${exportGmcliTelephonyArchive} || status=1
|
${exportGmcliTelephonyArchive} || status=1
|
||||||
|
${exportGmcliUnifiedArchive} || status=1
|
||||||
${gmcliPackage}/bin/gmcli coverage verify || status=1
|
${gmcliPackage}/bin/gmcli coverage verify || status=1
|
||||||
exit "$status"
|
exit "$status"
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user