Skip to content

Troubleshooting

インストール後に tdsl --help が実行できない場合は、インストール先が PATH に含まれているか確認します。

Terminal window
which tdsl
tdsl --help

インストールスクリプトを使った場合、既定の配置先は ~/.local/bin/tdsl です。

Terminal window
export PATH="${HOME}/.local/bin:${PATH}"

.tdsl の構文エラーを切り分けたい

Section titled “.tdsl の構文エラーを切り分けたい”

まず check で構文・意味チェックを実行します。パース結果を確認したい場合は ast を使います。

Terminal window
tdsl check sample.tdsl
tdsl ast sample.tdsl

lint は未定義lane参照、重複id、start > end、空label、タグの空要素・重複などを検出します。安全に直せる項目は --fix で修正できます。

Terminal window
tdsl lint sample.tdsl
tdsl lint sample.tdsl --fix

CIや別ツールで扱う場合はJSON形式にします。

Terminal window
tdsl lint sample.tdsl --format json

Wikidata import を含むファイルでネットワークやキャッシュの影響を避けたい場合は、--offline で静的項目だけを処理します。

Terminal window
tdsl build sample.tdsl --offline --pretty
tdsl render sample.tdsl --offline --output sample.html

最新データを取り直したい場合は --no-cache、キャッシュTTLを変えたい場合は --cache-ttl <秒> を指定します。

Terminal window
tdsl build sample.tdsl --no-cache --pretty
tdsl build sample.tdsl --cache-ttl 0 --pretty

render の表示オプションを調整します。

Terminal window
tdsl render sample.tdsl \
--output sample.html \
--scale 5 \
--lane-height 80 \
--theme dark

独自CSSを追加する場合は --custom-css を使います。