- MILLION R@G @【拡大版】アニメから得た学びを発表会 (2024/07)
- venvによるPython開発環境の管理をpip-toolsでアップデートする提案 〜Ryeのソースリーディングより〜 @PyCon Kyushu 2024 KAGOSHIMA (2024/05)
- 『アイの歌声を聴かせて』をきっかけに考え始めた幸せ @エンジニアがアニメから得た学び (2024/05)
- Python開発環境 基礎 @みんなのPython勉強会#103 (2024/04)
- VS Codeで文字列のちょっとした変換ができるんです! 〜実装まで覗くクイックツアー〜 @VS Code Conference JP 2024 (2024/04)
- ソフトウェアを作りたかった私へ 〜変更しやすいコードを書くコツが見えてきた今伝えられること〜 @Object-Oriented Conference 2024 (2024/03)
- テストコードが書けるようになって「変更したけど壊してないかな」という不安を解消しませんか?〜テスト駆動開発の世界のクイックツアーも添えて〜 @PHPカンファレンス関西2024 (2024/02)
2024-slides's Introduction
2024-slides's People
2024-slides's Issues
TechRAMENのスライド ドラフト版が見える
7月のエンジニアニメのスライドドラフト版が見える
5月 エンジニアニメ トークスライドのドラフトが見える
環境構築できたことを示す簡単なスライドが見られる
- sphinx-revealjs 2系に上げる
- pip-toolsを試す(pipx?)
- GitHub Actions
PHPカンファレンス関西のトークスライド ドラフト版が見える
PyCon Kyushuのpip-toolsトークのスライド ドラフト版が見える
スライドにはてなスターを付けるボタンを出せるか検証している
YAPCのsongmuさんトークを参考に
Try sphinx-revealjs 3
4月のみんなのPython勉強会のスライド ドラフト版が見える
VS Code Conference 2024のスライド ドラフト版が見える
継承まで使わずにNewTabLinkHTMLTranslator.starttagメソッドの代入で解決できないだろうか
2024-slides/source/extensions/custom_translator.py
Lines 6 to 10 in 0982ac6
以下も試した
TweakedRevealjsSlideTranslator.starttag = NewTabLinkHTMLTranslator.starttag
make revealjsで落ちる
# Platform: darwin; (macOS-12.6.6-arm64-arm-64bit)
# Sphinx version: 7.2.6
# Python version: 3.12.0 (CPython)
# Docutils version: 0.20.1
# Jinja2 version: 3.1.3
# Pygments version: 2.17.2
# Last messages:
# copying assets...
# copying static files...
# done
# copying extra files...
# done
# done
# �[2K
# writing output... [ 50%]
# index
#
# Loaded extensions:
# sphinx.ext.mathjax (7.2.6)
# alabaster (0.7.16)
# sphinxcontrib.applehelp (1.0.8)
# sphinxcontrib.devhelp (1.0.6)
# sphinxcontrib.htmlhelp (2.0.5)
# sphinxcontrib.serializinghtml (1.1.10)
# sphinxcontrib.qthelp (1.0.7)
# sphinx.ext.githubpages (7.2.6)
# sphinx_revealjs._ext.highlightings (2.9.3)
# sphinx_revealjs._ext.notes (2.9.3)
# sphinx_revealjs (2.9.3)
# sphinx_design (0.5.0)
# custom_translator (unknown version)
# Traceback:
Traceback (most recent call last):
File "/.../venv/lib/python3.12/site-packages/sphinx/cmd/build.py", line 298, in build_main
app.build(args.force_all, args.filenames)
File "/.../venv/lib/python3.12/site-packages/sphinx/application.py", line 355, in build
self.builder.build_update()
File "/.../venv/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 293, in build_update
self.build(to_build,
File "/.../venv/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 363, in build
self.write(docnames, list(updated_docnames), method)
File "/.../venv/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 571, in write
self._write_serial(sorted(docnames))
File "/.../venv/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 580, in _write_serial
self.write_doc_serialized(docname, doctree)
File "/.../venv/lib/python3.12/site-packages/sphinx/builders/html/__init__.py", line 661, in write_doc_serialized
title = self.render_partial(title_node)['title'] if title_node else ''
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../venv/lib/python3.12/site-packages/sphinx/builders/html/__init__.py", line 431, in render_partial
self._publisher.publish()
File "/.../venv/lib/python3.12/site-packages/docutils/core.py", line 237, in publish
output = self.writer.write(self.document, self.destination)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../venv/lib/python3.12/site-packages/docutils/writers/__init__.py", line 80, in write
self.translate()
File "/.../venv/lib/python3.12/site-packages/sphinx/writers/html.py", line 36, in translate
self.document.walkabout(visitor)
File "/.../venv/lib/python3.12/site-packages/docutils/nodes.py", line 186, in walkabout
if child.walkabout(visitor):
^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../venv/lib/python3.12/site-packages/docutils/nodes.py", line 178, in walkabout
visitor.dispatch_visit(self)
File "/.../venv/lib/python3.12/site-packages/sphinx/util/docutils.py", line 582, in dispatch_visit
method(node)
File "/.../venv/lib/python3.12/site-packages/sphinx/writers/html5.py", line 473, in visit_title
super().visit_title(node)
File "/.../venv/lib/python3.12/site-packages/docutils/writers/_html_base.py", line 1669, in visit_title
self.body.append(self.starttag(node, 'h1', '', CLASS='title'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../venv/lib/python3.12/site-packages/sphinx_new_tab_link/__init__.py", line 21, in starttag
return super().starttag(node, tagname, *args, **atts)
^^^^^^^^^^^^^^^^
TypeError: super(type, obj): obj must be an instance or subtype of type
superがうまくいっていない
https://docs.python.org/ja/3/library/functions.html#super
(Pdb) self
<custom_translator.TweakedRevealjsSlideTranslator object at 0x102d603b0>
starttagの代入であって、NewTabLinkHTMLTranslatorが親クラスに入っていないからではないか
ここではNewTabLinkHTMLTranslatorの親クラスのstarttagが上書きできればいいので、以下で動いた(ただしワークアラウンド)
- return super().starttag(node, tagname, *args, **atts)
+ return super(self.__class__, self).starttag(node, tagname, *args, **atts)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.