Created
June 17, 2022 23:03
-
-
Save kojp/0277c48a384a6559cfb131897ceea599 to your computer and use it in GitHub Desktop.
Logseqの当日の日誌ファイル(Markdownファイル)を開くPythonスクリプト。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import os | |
import subprocess | |
# Logseqのjournalsディレクトリのパスを指定する | |
os.chdir("C:/Users/username/iCloudDrive/iCloud~com~logseq~logseq/journals") | |
# 当該のファイルを開くアプリケーションのパスを指定する | |
# (Visual Studio Codeで開く場合の例) | |
app = "C:/Users/username/AppData/Local/Programs/Microsoft VS Code/Code.exe" | |
# 当日の日付に対応するファイル名を設定する | |
today = datetime.datetime.today() | |
file = today.strftime("%Y_%m_%d.md") | |
subprocess.Popen([app, file]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment