experimental implementation to use markdown as input of Sphinx.
- install remarkdown
from functools import wraps | |
def memoize(func): | |
cache = {} | |
@wraps(func) | |
def wrapper(*args, **kwargs): | |
key = args + tuple(kwargs.items()) | |
if key not in cache: |
ここに記載されている内容のすべては私一個人の意見であり、所属先の見解とは関係ありません。 | |
と書いておけと言われました。 |
# -*- coding: utf-8 -*- | |
from setuptools import setup | |
setup() |
# -*- coding: utf-8 -*- | |
# | |
# Sphinx extension for renaming _static/ directory | |
# | |
# Author: Takeshi KOMIYA / License: BSD | |
# | |
import re | |
import os | |
import shutil |
この記事は #ごちうさたーん Advent Calendar 4日目の記事です。
#ごちうさたーん Advent Calendar の詳細については https://twitter.com/wonderful_panda/status/538109851981721600 を御覧ください。
次は @wonderful_panda さんです。
# -*- coding: utf-8 -*- | |
# イベントページの自動更新に使えないかと考えたが、使えないことに気づいたのでここに埋める | |
import json | |
import arrow | |
from urllib import urlopen | |
from operator import itemgetter | |
events = {} |
# -*- coding: utf-8 -*- | |
from docutils import nodes | |
def generate_rawrole(format): | |
def role(typ, rawtext, text, lineno, inliner, options={}, content=[]): | |
return [nodes.raw('', text, format=format)], [] | |
return role |
# -*- coding: utf-8 -*- | |
# | |
# localsectnum.py: Yet another section numbering extension | |
# | |
# 拡張を読み込むと、セクション名の "#." がセクション番号に展開されます。 | |
# セクション番号はドキュメントをまたぐとリセットされます。 | |
# | |
# 注意: | |
# * ``toctree`` ディレクティブの ``:numbered:`` オプションと機能が干渉するため、 | |
# 同時に利用できません |