0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Obsidianを終了時に何とか同期させたい

0
Posted at

概要

obsidianはファイル同期問題があると思います。obsidian-gitというコミュニティが作ったプラグインを使うと同期できます。ただこのプラグイン起動時には自動的にpullできるんですけれども終了時にpushできないんですよ...

方法1 プラグインにあるコマンドを使う

image.png
Git: Commit-and-sync and then close Obsidian

というコマンドでpushした後に閉じてくれます。解決だね!

問題点

僕は忘れっぽい・習慣がないのでやり忘れる。

方法2 作る

作った。

仕組みはスクリプト内でobsidianを起動し、終了を検知したらgit pushを実行するという単純なもの。

windowsのみの対応です。

Linuxは必要になったタイミングで作ります。

使い方

setup.ps1を実行するとobsidianのvaultを聞かれるのでpathを設定します。
するとtemplate内のscriptを修正してoutに吐き出します。
ついでにユーザーレベルのスタートメニュー(AppData\Roaming\Microsoft\Windows\Start Menu)内にvbsのショートカットをObsidian-Gitという名前で作れます。
ps1の実行でエラったらおそらくSet-ExecutionPolicyをいじると治ります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?