Skip to content

原文のnotebookの更新

driller edited this page Jun 27, 2020 · 2 revisions

更新情報

通知するためにSlackに投げたコマンド

/github subscribe quantopian/research_public commits

Clone/管理手順

  • 本リポジトリの展開先は /research_public/notebooks とする
  • /notebooks ディレクトリだけをsparsecheckoutでpullする

/notebooks ディレクトリだけをcloneする手順 参考

cd research_public
git init
git config core.sparsecheckout true
git remote add origin https://github.com/quantopian/research_public.git
echo "notebooks" > .git/info/sparse-checkout
git pull origin master
  • research_public ディレクトリをサブモジュールとして管理する 参考
git submodule add https://github.com/quantopian/research_public.git research_public/

reSTへの変換手順

  • notebook(.ipynb)をreST(.rst)に変換する

下記を /research_public から実行

for x in `find notebooks/ -name "*.ipynb"`; do
  jupyter nbconvert $x --to rst --output-dir=`dirname $x | sed "s/notebooks\//\.\.\/source_rst\//"`
done

更新があった場合の手順

git pull origin master

「reSTへの変換手順」を再度実行する