LoginSignup
0
0

More than 3 years have passed since last update.

【Mac】Jupyter Notebookをディレクトリ指定で開くアプリのための4行

Last updated at Posted at 2021-04-25

SS 192.png  Jupyter Notebookを一発で開きたい。すぐ使いたい。

やること

Jupyter Notebookを開く時、一度ターミナルを開く必要があります。
またディレクトリを指定して開くこともできますが、その場合はディレクトリも入力する必要があります。
これをクリック一発で行えるアプリをデスクトップに作成します。

環境

  • Mac
  • automator

オートメーターを使って作ります

ssg5 242.png
① 検索ウィンドウに「automator」と入力し、automatorを開く。
② メニューの「新規」から「アプリケーション」を選択。
③ 検索窓に「a」と打ち込んで「アップルスクリプトをを実行」を選択。
④ スクリプトを下記のように上書きする。

applescript
on run {input, parameters}  
    tell application "Terminal"
        delay 0.1
        do script "jupyter notebook /<デフォルトで開きたいパス名>"
    end tell
end run

⑤ 最後に名前をつけてデスクトップ等に保存する。

実行

アプリアイコンを押して実行します。
初回起動時のみ、ダイアログボックスが出ますが、2回目以降は1発で起動できるようになります。
コンフィグでパスを設定するとディレクトリ移動に制限が出るらしいので、その点でこの方法が便利かもしれません。

参考

こちらの記事を参考にしました。

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