Skip to content

Commit

Permalink
Partial fix for PDF doc build (#2044)
Browse files Browse the repository at this point in the history
* Add pngcrushed 'Image Not Available' placeholder

* Fix absent camo.github usercontent for Truple Vision on Game Jam 2020 page

* Replace FlaPy bird image with non-404

* Fix Two Worlds image for sample games

* Allow PDF to build by converting .gif images

* Add requirements notes on PDF built to CONTRIBUtING.md

* Add install size flag

* Add link targets for BoxHead

* Remove image + fix typo

* Remove unused image_not_available.png
  • Loading branch information
pushfoo committed Apr 16, 2024
1 parent d4f61e1 commit d625a01
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,37 @@ You can now open http://localhost:8000 in your browser to preview the doc.

Be sure to re-run build & refresh to update after making changes!

#### Building PDFs

It is also possible to build a PDF of Arcade's documentation. This is
more complicated than the HTML doc because it requires
[LaTex](https://www.latex-project.org/), a powerful documentation
language.

##### Installing

On Linux distros based on Debian and Ubuntu, you may need to install
the following packages to build PDFs:

``console
sudo apt install latexmk
sudo apt install texlive-latex-extra
``
To reduce the large (300 MB+) install size of the second package, you
may be able to use the `--no-install-recommends` flag.

Other platforms may require different install steps.

##### Building

Once you have LaTeX and extra required configs installed,
run the following:

```console
./make.py latexpdf
```


## Optional: Improve Ergonomics on Mac and Linux

### make.py shorthand
Expand Down
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.imgconverter', # Converts .gif for PDF doc build
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
Expand Down
6 changes: 1 addition & 5 deletions doc/example_code/game_jam_2020.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ Here are the games that made it to the top 10:

2nd Place: `Triple Blocks <https://github.com/python-discord/game-jam-2020/tree/master/Finalists/gamer_gang>`_

.. figure:: https://camo.githubusercontent.com/f28f09b33244a7db72df7b4985791d89358f8d88/68747470733a2f2f63646e2e646973636f72646170702e636f6d2f6174746163686d656e74732f3639333137373530373638333336393031302f3730343030363031343535343437323439382f756e6b6e6f776e2e706e67
:target: https://github.com/python-discord/game-jam-2020/tree/master/Finalists/monkeys-and-frogs-on-fire
:width: 45%

3nd Place: `Triple Vision <https://github.com/python-discord/game-jam-2020/tree/master/Finalists/monkeys-and-frogs-on-fire>`_
3rd Place: `Triple Vision <https://github.com/python-discord/game-jam-2020/tree/master/Finalists/monkeys-and-frogs-on-fire>`_

.. figure:: https://raw.githubusercontent.com/python-discord/game-jam-2020/master/Finalists/KTGames/rd_images/OpeningScreen.png
:target: https://github.com/python-discord/game-jam-2020/tree/master/Finalists/KTGames
Expand Down
16 changes: 10 additions & 6 deletions doc/example_code/sample_games.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ You also might want to check out sample Arcade games from:
* :ref:`concept_games`
* :ref:`platformer_tutorial`

BoxHead
~~~~~~~

BoxHead Survivor
~~~~~~~~~~~~~~~~

.. image:: https://img.itch.zone/aW1hZ2UvMjM1MTM4Mi8xMzkyODQ1Ni5qcGc=/original/YI7uLX.jpg
:width: 560px

- GitHub: Unchained112/BoxHead2D: A top-down shooter game dev with Python Arcade (github.com)
- itch io: BoxHead Survivor by Unchain (itch.io)
A top-down 2D shooter game.

* Playable builds at `itch.io <https://unchain112.itch.io/boxhead-survivor>`_
* Source on `GitHub at Unchained112/BoxHead2D <https://github.com/Unchained112/BoxHead2D>`_


Temporum
~~~~~~~~
Expand Down Expand Up @@ -197,7 +201,7 @@ Space Typer
FlapPy Bird
~~~~~~~~~~~

.. image:: https://camo.githubusercontent.com/f0e9f79d083289e7385a9af79231ba9cc07a10dd/68747470733a2f2f692e706f7374696d672e63632f665678394b736b672f53637265656e5f53686f745f323031382d30392d32375f61745f31322e31312e31395f414d2e706e67
.. image:: https://camo.githubusercontent.com/b373859d570155b72030f36ae7ece8b9575bda6d45eb0695f5a060d3dfa27dab/68747470733a2f2f692e706f7374696d672e63632f665678394b736b672f53637265656e5f53686f745f323031382d30392d32375f61745f31322e31312e31395f414d2e706e67

`FlapPy-Bird`_ - A bird-game clone.

Expand Down Expand Up @@ -230,7 +234,7 @@ Dungeon_, explore a maze picking up arrows and coins.
Two Worlds
~~~~~~~~~~

.. image:: https://camo.githubusercontent.com/bb2fb323ea9ab3f6041d3b72569a2d2360aa46ba07fe4cb3dbcd8248b3e8699d/68747470733a2f2f696d6775722e636f6d2f7356516e4331542e706e67
.. image:: https://camo.githubusercontent.com/a74f38285980087502aec7795e10bec5869e71c840a35729fa37edf6ad17858d/68747470733a2f2f696d6775722e636f6d2f634372674171712e706e67
:width: 75%

`Two Worlds`_, a castle adventure with a dungeon and caverns underneath it.
Expand Down

0 comments on commit d625a01

Please sign in to comment.