mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2024-12-03 08:45:34 +02:00
Format utility
This commit is contained in:
parent
574fdf9202
commit
ed5cb3e043
@ -140,33 +140,32 @@ const uri_passphrase = `${Deno.env.get("uri_passphrase") ?? friendlyString()}`;
|
||||
|
||||
const URIBASE = "obsidian://setuplivesync?settings=";
|
||||
async function main() {
|
||||
// We need re-format this
|
||||
const conf = {
|
||||
"couchDB_URI": `${Deno.env.get("hostname")}`,
|
||||
"couchDB_USER": `${Deno.env.get("username")}`,
|
||||
"couchDB_PASSWORD": `${Deno.env.get("password")}`,
|
||||
"couchDB_DBNAME": `${Deno.env.get("database")}`,
|
||||
"syncOnStart": true,
|
||||
"gcDelay": 0,
|
||||
"periodicReplication": true,
|
||||
"syncOnFileOpen": true,
|
||||
"encrypt": true,
|
||||
"passphrase": `${Deno.env.get("passphrase")}`,
|
||||
"usePathObfuscation": true,
|
||||
"batchSave": true,
|
||||
"batch_size": 50,
|
||||
"batches_limit": 50,
|
||||
"useHistory": true,
|
||||
"disableRequestURI": true,
|
||||
"customChunkSize": 50,
|
||||
"syncAfterMerge": false,
|
||||
"concurrencyOfReadChunksOnline": 100,
|
||||
"minimumIntervalOfReadChunksOnline": 100,
|
||||
"handleFilenameCaseSensitive": false,
|
||||
"doNotUseFixedRevisionForChunks": false,
|
||||
"settingVersion": 10,
|
||||
"notifyThresholdOfRemoteStorageSize": 800
|
||||
}
|
||||
couchDB_URI: `${Deno.env.get("hostname")}`,
|
||||
couchDB_USER: `${Deno.env.get("username")}`,
|
||||
couchDB_PASSWORD: `${Deno.env.get("password")}`,
|
||||
couchDB_DBNAME: `${Deno.env.get("database")}`,
|
||||
syncOnStart: true,
|
||||
gcDelay: 0,
|
||||
periodicReplication: true,
|
||||
syncOnFileOpen: true,
|
||||
encrypt: true,
|
||||
passphrase: `${Deno.env.get("passphrase")}`,
|
||||
usePathObfuscation: true,
|
||||
batchSave: true,
|
||||
batch_size: 50,
|
||||
batches_limit: 50,
|
||||
useHistory: true,
|
||||
disableRequestURI: true,
|
||||
customChunkSize: 50,
|
||||
syncAfterMerge: false,
|
||||
concurrencyOfReadChunksOnline: 100,
|
||||
minimumIntervalOfReadChunksOnline: 100,
|
||||
handleFilenameCaseSensitive: false,
|
||||
doNotUseFixedRevisionForChunks: false,
|
||||
settingVersion: 10,
|
||||
notifyThresholdOfRemoteStorageSize: 800,
|
||||
};
|
||||
const encryptedConf = encodeURIComponent(await encrypt(JSON.stringify(conf), uri_passphrase, false));
|
||||
const theURI = `${URIBASE}${encryptedConf}`;
|
||||
console.log("\nYour passphrase of Setup-URI is: ", uri_passphrase);
|
||||
|
Loading…
Reference in New Issue
Block a user