Skip to content

Instantly share code, notes, and snippets.

View tk0miya's full-sized avatar

Takeshi KOMIYA tk0miya

View GitHub Profile
@tk0miya
tk0miya / Makefile
Last active November 9, 2017 14:08
kmuto/review#121 再現コード
all:
docker run -it --rm -v `pwd`:/work vvakame/review bash -c "cd /work; review-webmaker config.yml"
@tk0miya
tk0miya / README
Last active October 17, 2017 01:54
I18N extension for Sphinx. This allows you to switch configuration by language
i18n.py
=======
I18N extension for Sphinx. This allows you to switch configuration by language like following::
# conf.py
extensions = ['i18n']
i18n = {
'ja': {
'some_config': 'value',
# hack visit/depart literal_block
from docutils import nodes
from sphinx.writers.latex import LaTeXTranslator
orig_visit_literal_block = LaTeXTranslator.visit_literal_block
orig_depart_literal_block = LaTeXTranslator.depart_literal_block
def visit_literal_block(self, node):
# :class: オプションが定義されていたら、TeX の環境にマッピングする
@tk0miya
tk0miya / tk0miya-sponsors-2021.md
Last active September 23, 2021 13:25 — forked from melpon/wandbox-sponsors.md
@tk0miya のスポンサー募集

(For English readers: please read https://github.com/sponsors/tk0miya instead)

@tk0miya の企業・個人スポンサーを募集します

@tkomiya は、日本在住の OSS 開発者です。
趣味として Sphinxpycmarkblockdiag などの OSS の開発やメンテナンスに携わっています。

ここ数年の活動の中心は Sphinx です。 Sphinx は PythonLinux カーネルをはじめとして、数多くの OSS のドキュメントに利用されているドキュメンテーションツールです。 Sphinx プロジェクトはごく少人数のメンテナによって活動しており、(明確な役割として定義はされていないものの) リードメンテナ、メインメンテナとして活動しています。

require 'benchmark'
N = 1_000_000
def exc_odd?(n)
begin
raise if n.odd?
false
rescue
require 'benchmark'
N = 10_000
FIZZBUZZ = 1_000
class FizzBuzzException < Exception
end
class FizzException < Exception
# -*- coding: utf-8 -*-
"""
renumber_footnotes.py
=====================
An extension for Sphinx to renumber footnotes to sequential in whole of
project.
:copyright: Copyright 2018 by Takeshi KOMIYA
:license: BSD
#
# Sphinx extension to flush bibliography forcely (for LaTeX)
#
from docutils import nodes
from docutils.parsers.rst import Directive
class bibliography(nodes.Element):
pass
# -*- coding: utf-8 -*-
"""
part-toctree.py
~~~~~~~~~~~~~~~
An extension to support "Part" in HTML section numbering.
This is made for Sphinx-1.5
https://github.com/sphinx-doc/sphinx/issues/3357
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
# -*- coding: utf-8 -*-
import os
import sys
from recommonmark.parser import CommonMarkParser
sys.path.insert(0, os.path.abspath('.'))
extensions = ['toc']
master_doc = 'index'
source_parsers = {