diff --git a/README.md b/README.md index b5d5117..255857b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Save Remote +# Remotely Save -This is yet another sync plugin for Obsidian. +This is yet another unofficial sync plugin for Obsidian. ## Download and Install -[![BuildCI](https://github.com/fyears/obsidian-save-remote/actions/workflows/auto-build.yml/badge.svg)](https://github.com/fyears/obsidian-save-remote/actions/workflows/auto-build.yml) +[![BuildCI](https://github.com/fyears/obsidian-remotely-save/actions/workflows/auto-build.yml/badge.svg)](https://github.com/fyears/obsidian-remotely-save/actions/workflows/auto-build.yml) Every artifacts are placed in the "Summary" under every successful builds. diff --git a/manifest.json b/manifest.json index 67f62ad..c1ff70e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ { - "id": "obsidian-save-remote", - "name": "Save remote", + "id": "obsidian-remotely-Save", + "name": "Remotely Save", "version": "0.0.15", "minAppVersion": "0.12.15", - "description": "This is yet another plugin allowing users to sync notes between local device and the cloud.", + "description": "Yet another unofficial plugin allowing users to sync notes between local device and the cloud service.", "author": "fyears", "authorUrl": "https://github.com/fyears", "isDesktopOnly": false diff --git a/package.json b/package.json index 98b4899..c20445d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "obsidian-save-remote", + "name": "obsidian-remotely-save", "version": "0.0.15", "description": "This is yet another sync plugin for Obsidian app.", "scripts": { diff --git a/src/debugMode.ts b/src/debugMode.ts index be8dfa8..d23d0de 100644 --- a/src/debugMode.ts +++ b/src/debugMode.ts @@ -5,7 +5,7 @@ import { readAllSyncPlanRecordTexts } from "./localdb"; import type { InternalDBs } from "./localdb"; import { mkdirpInVault } from "./misc"; -const DEFAULT_DEBUG_FOLDER = "_debug_save_remote/"; +const DEFAULT_DEBUG_FOLDER = "_debug_remotely_save/"; const DEFAULT_SYNC_PLANS_HISTORY_FILE_PREFIX = "sync_plans_hist_exported_on_"; export const exportSyncPlansToFiles = async (db: InternalDBs, vault: Vault) => { diff --git a/src/localdb.ts b/src/localdb.ts index 0e87156..fda6de6 100644 --- a/src/localdb.ts +++ b/src/localdb.ts @@ -7,7 +7,7 @@ import type { SyncPlanType } from "./sync"; export type LocalForage = typeof localforage; export const DEFAULT_DB_VERSION_NUMBER: number = 20211114; -export const DEFAULT_DB_NAME = "saveremotedb"; +export const DEFAULT_DB_NAME = "remotelysavedb"; export const DEFAULT_TBL_VERSION = "schemaversion"; export const DEFAULT_TBL_DELETE_HISTORY = "filefolderoperationhistory"; export const DEFAULT_TBL_SYNC_MAPPING = "syncmetadatahistory"; diff --git a/src/main.ts b/src/main.ts index c9939e1..86b4570 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,24 +34,24 @@ import { } from "./s3"; import { exportSyncPlansToFiles } from "./debugMode"; -interface SaveRemotePluginSettings { +interface RemotelySavePluginSettings { s3?: S3Config; password?: string; } -const DEFAULT_SETTINGS: SaveRemotePluginSettings = { +const DEFAULT_SETTINGS: RemotelySavePluginSettings = { s3: DEFAULT_S3_CONFIG, password: "", }; -export default class SaveRemotePlugin extends Plugin { - settings: SaveRemotePluginSettings; +export default class RemotelySavePlugin extends Plugin { + settings: RemotelySavePluginSettings; cm: CodeMirror.Editor; db: InternalDBs; syncStatus: SyncStatusType; async onload() { - console.log("loading plugin obsidian-save-remote"); + console.log("loading plugin obsidian-remotely-save"); await this.loadSettings(); @@ -71,15 +71,17 @@ export default class SaveRemotePlugin extends Plugin { }) ); - this.addRibbonIcon("switch", "Save Remote", async () => { + this.addRibbonIcon("switch", "Remotely Save", async () => { if (this.syncStatus !== "idle") { - new Notice(`Save Remote already running in stage ${this.syncStatus}!`); + new Notice( + `Remotely Save already running in stage ${this.syncStatus}!` + ); return; } try { //console.log(`huh ${this.settings.password}`) - new Notice("1/6 Save Remote Sync Preparing"); + new Notice("1/6 Remotely Save Sync Preparing"); this.syncStatus = "preparing"; new Notice("2/6 Starting to fetch remote meta data."); @@ -121,7 +123,7 @@ export default class SaveRemotePlugin extends Plugin { // The operations above are read only and kind of safe. // The operations below begins to write or delete (!!!) something. - new Notice("6/7 Save Remote Sync data exchanging!"); + new Notice("6/7 Remotely Save Sync data exchanging!"); this.syncStatus = "syncing"; await doActualSync( @@ -133,11 +135,11 @@ export default class SaveRemotePlugin extends Plugin { this.settings.password ); - new Notice("7/7 Save Remote finish!"); + new Notice("7/7 Remotely Save finish!"); this.syncStatus = "finish"; this.syncStatus = "idle"; } catch (error) { - const msg = `Save Remote error while ${this.syncStatus}`; + const msg = `Remotely Save error while ${this.syncStatus}`; console.log(msg); console.log(error); new Notice(msg); @@ -146,7 +148,7 @@ export default class SaveRemotePlugin extends Plugin { } }); - this.addSettingTab(new SaveRemoteSettingTab(this.app, this)); + this.addSettingTab(new RemotelySaveSettingTab(this.app, this)); this.registerCodeMirror((cm: CodeMirror.Editor) => { this.cm = cm; @@ -163,7 +165,7 @@ export default class SaveRemotePlugin extends Plugin { } onunload() { - console.log("unloading plugin obsidian-save-remote"); + console.log("unloading plugin obsidian-remotely-save"); this.destroyDBs(); } @@ -185,9 +187,9 @@ export default class SaveRemotePlugin extends Plugin { } export class PasswordModal extends Modal { - plugin: SaveRemotePlugin; + plugin: RemotelySavePlugin; newPassword: string; - constructor(app: App, plugin: SaveRemotePlugin, newPassword: string) { + constructor(app: App, plugin: RemotelySavePlugin, newPassword: string) { super(app); this.plugin = plugin; this.newPassword = newPassword; @@ -242,10 +244,10 @@ export class PasswordModal extends Modal { } } -class SaveRemoteSettingTab extends PluginSettingTab { - plugin: SaveRemotePlugin; +class RemotelySaveSettingTab extends PluginSettingTab { + plugin: RemotelySavePlugin; - constructor(app: App, plugin: SaveRemotePlugin) { + constructor(app: App, plugin: RemotelySavePlugin) { super(app, plugin); this.plugin = plugin; } @@ -255,7 +257,7 @@ class SaveRemoteSettingTab extends PluginSettingTab { containerEl.empty(); - containerEl.createEl("h1", { text: "Save Remote" }); + containerEl.createEl("h1", { text: "Remotely Save" }); const s3Div = containerEl.createEl("div"); s3Div.createEl("h2", { text: "S3 (-compatible) Service" });