-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
30 lines (23 loc) · 1.22 KB
/
Copy pathProgram.cs
File metadata and controls
30 lines (23 loc) · 1.22 KB
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
using iPhoneBackupMessagesRenderer.AppleMessages;
using iPhoneBackupMessagesRenderer.WhatsApp;
namespace iPhoneBackupMessagesRenderer;
public static class Program
{
public static void Main()
{
// ***** Edit these *****
ImageConverter.AvifEncPath = "<insert path here>";
var myName = "Julie";
string backupBasePath = "<insert path here>";
string outputDirectory = $"<insert path here>/{myName}";
// ***** Regular sourcecode hereon *****
var manifestDbPath = Path.Combine(backupBasePath, "Manifest.db");
using var manifestDb = new ManifestDatabase(manifestDbPath);
var addressBookDbFileInfo = manifestDb.GetFileInfo("HomeDomain", "Library/AddressBook/AddressBook.sqlitedb") ??
throw new Exception("Can't find AddressBook.sqlitedb in manifest");
using var addressBookDb =
new AddressBookDatabase(addressBookDbFileInfo.GetContentPath(backupBasePath), myName);
AppleMessagesExporter.Export(manifestDb, addressBookDb, backupBasePath, Path.Combine(outputDirectory, "Messages"));
WhatsAppExporter.Export(manifestDb, myName, backupBasePath, Path.Combine(outputDirectory, "WhatsApp"));
}
}