- Windows :
start - Mac :
open - Linux :
xdg-openorgnome-open
マルチプラットフォームで「関連付けされたアプリケーションで開く」をやりたい場合は、 Windows, Mac は上記の通り、 Linux は xdg-open をデフォルトとしつつ、コマンドを設定できるようにするのが良いのかな?
startopenxdg-open or gnome-openマルチプラットフォームで「関連付けされたアプリケーションで開く」をやりたい場合は、 Windows, Mac は上記の通り、 Linux は xdg-open をデフォルトとしつつ、コマンドを設定できるようにするのが良いのかな?
apt で locales と locales-all をインストールし、環境変数 LANG に ja_JP.UTF-8 を設定。以上。
日本語ディレクトリを作ったら、以下のエラーが発生した。
sphinx-build -b html -d build/doctrees source build/html
Running Sphinx v1.4.9
loading translations [ja]... not available for built-in messages
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 0 source files that are out of date
はじめに.rst:: ERROR: non-ASCII filename not supported on this filesystem encoding 'ANSI_X3.4-1968', skipped.
...(略)
/work/source/index.rst:14: WARNING: toctree contains reference to nonexisting document u'\u306f\u3058\u3081\u306b'
...(略)日本語を含むパスでエラーが起きて、対象のディレクトリを見つけられず、 toctree でそのリンクがが作成されない感じ。
エラーメッセージで検索し、下記箇所が問題の処理だというのがわかった。
いろいろ検索したら、多言語対応に必要なパッケージが無いのが原因だったことがわかった。
そんなわけなので、 Dockerfile に下記 2 行を追加した。
RUN apt-get -y install locales locales-all && apt-get -y clean
ENV LANG=ja_JP.UTF-8最終的に下記 Dockerfile ができた。
以上。
前回作った Ubuntu の Docker イメージ をもとに、 sphinx と textlint, prh の環境を整える。
で、作った Dockerfile がこれ。 オフィシャルの ubuntu:zesty イメージを基にする場合は「apt ミラー設定」は不要。
FROM myubuntu:zesty
# apt ミラー設定
RUN echo "deb http://jp.archive.ubuntu.com/ubuntu/ zesty main restricted universe multiverse" > /etc/apt/sources.list
RUN echo "deb http://jp.archive.ubuntu.com/ubuntu/ zesty-security main restricted universe multiverse" >> /etc/apt/sources.list
# ベースのアップグレード
RUN apt-get -y update
RUN apt-get -y upgrade && apt-get -y clean
# sphinx 環境構築
RUN apt-get -y install make && apt-get -y clean
RUN apt-get -y install sphinx-common && apt-get -y clean
# nodejs 環境構築
RUN apt-get -y install curl && apt-get -y clean
RUN apt-get -y install gnupg1 gnupg2 && apt-get -y clean
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get -y install -y nodejs && apt-get -y clean
# textlint 環境構築
RUN npm install -g textlint
RUN npm install -g prh
RUN npm install -g textlint-rule-prh
# textlint を rst 対応させるためのもの
RUN apt-get -y install -y python-pip && apt-get -y clean
RUN pip install docutils-ast-writer
RUN npm install -g textlint-plugin-rst
# textlint 結果可視化するための環境構築
RUN apt-get -y install lcov && apt-get -y clean
RUN npm install -g textlint-formatter-lcov以上。