Skip to content

Commit

Permalink
Reorganize docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 15, 2024
1 parent 0ca9bcf commit 6e6b391
Show file tree
Hide file tree
Showing 247 changed files with 470 additions and 501 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@
'live-test': ('/_static/test-%s.html',
'click here!%.0s'),
} | {
f'{code}-d': (f'./{lang}/p%s.html', '✔%.0s') for (code, lang) in langcodes
f'{code}-d': (f'./src/{lang}/p%s.html', '✔%.0s') for (code, lang) in langcodes
} | {
f'{code}-s': (f'./{lang}/p%s.html', '⏱%.0s') for (code, lang) in langcodes
f'{code}-s': (f'./src/{lang}/p%s.html', '⏱%.0s') for (code, lang) in langcodes
} | {
f'{code}-i': (f'./{lang}/p%s.html', '🛠%.0s') for (code, lang) in langcodes
f'{code}-i': (f'./src/{lang}/p%s.html', '🛠%.0s') for (code, lang) in langcodes
}
extlinks_detect_hardcoded_links = True

Expand Down
11 changes: 3 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Problems Solved
+-----------+------------+------------+------------+------------+------------+------------+------------+
| Testing | |d| | |d| | |d| | |d| | |d| | |d| | |d| |
+-----------+------------+------------+------------+------------+------------+------------+------------+
| Browser | | | | | |d| | |d| | |ip| |
| Browser | | | | | |d| | |d| | |d| |
+-----------+------------+------------+------------+------------+------------+------------+------------+
+-----------+------------+------------+------------+------------+------------+------------+------------+
|:prob:`1` |:c-d:`0001` |:cp-d:`0001`|:cs-d:`0001`|:ja-d:`0001`|:js-d:`0001`|:py-d:`0001`|:rs-d:`0001`|
Expand Down Expand Up @@ -236,16 +236,11 @@ Problems Solved
+-----------+------------+------------+------------+------------+------------+------------+------------+

.. toctree::
:glob:
:maxdepth: 2

usage
c
cplusplus
csharp
java
javascript
python
rust
src/*

Indices and tables
==================
Expand Down
59 changes: 0 additions & 59 deletions docs/rust/primes.rst

This file was deleted.

13 changes: 3 additions & 10 deletions docs/c.rst → docs/src/c.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
Euler C Implementation
======================

.. include:: ../c/README.rst
.. include:: ../../c/README.rst
:start-line: 2
:end-before: Problems Solved

Library Code
------------

.. toctree::
:glob:
:numbered:
:maxdepth: 1

c/bcd
c/digits
c/factors
c/fibonacci
c/iterator
c/macros
c/math
c/primes
c/utils
c/lib/*

Problems Solved
---------------
Expand Down
2 changes: 1 addition & 1 deletion docs/c/bcd.rst → docs/src/c/lib/bcd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ It was also a good exercise in x86 assembly, as several portions are accellerate
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/bcd.h
.. literalinclude:: ../../../../c/src/include/bcd.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/digits.rst → docs/src/c/lib/digits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ View source code :source:`c/src/include/digits.h`
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/digits.h
.. literalinclude:: ../../../../c/src/include/digits.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/factors.rst → docs/src/c/lib/factors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ factors for a given number. It is generally used by first calling
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/factors.h
.. literalinclude:: ../../../../c/src/include/factors.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/fibonacci.rst → docs/src/c/lib/fibonacci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ View source code :source:`c/src/include/fibonacci.h`
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/fibonacci.h
.. literalinclude:: ../../../../c/src/include/fibonacci.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/iterator.rst → docs/src/c/lib/iterator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ View source code :source:`c/src/include/iterator.h`
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/iterator.h
.. literalinclude:: ../../../../c/src/include/iterator.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/macros.rst → docs/src/c/lib/macros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ View source code :source:`c/src/include/macros.h`
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/macros.h
.. literalinclude:: ../../../../c/src/include/macros.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/math.rst → docs/src/c/lib/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ View source code :source:`c/src/include/math.h`
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/math.h
.. literalinclude:: ../../../../c/src/include/math.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/primes.rst → docs/src/c/lib/primes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ View source code :source:`c/src/include/primes.h`
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/primes.h
.. literalinclude:: ../../../../c/src/include/primes.h
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/utils.rst → docs/src/c/lib/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ View source code :source:`c/src/include/utils.h`
.. c:namespace-pop::
.. literalinclude:: ../../c/src/include/utils.h
.. literalinclude:: ../../../../c/src/include/utils.h
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0001.rst → docs/src/c/p0001.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0001.c`
Includes
--------

- `iterator.h <./iterator.html>`__
- `iterator.h <./lib/iterator.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0001.c
.. literalinclude:: ../../../c/src/p0001.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0002.rst → docs/src/c/p0002.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0002.c`
Includes
--------

- `fibonacci.h <./fibonacci.html>`__
- `fibonacci.h <./lib/fibonacci.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0002.c
.. literalinclude:: ../../../c/src/p0002.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0003.rst → docs/src/c/p0003.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0003.c`
Includes
--------

- `primes.h <./primes.html>`__
- `primes.h <./lib/primes.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0003.c
.. literalinclude:: ../../../c/src/p0003.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0004.rst → docs/src/c/p0004.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0004.c`
Includes
--------

- `iterator.h <./digits.html>`__
- `iterator.h <./lib/digits.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0004.c
.. literalinclude:: ../../../c/src/p0004.c
:language: C
:linenos:
6 changes: 3 additions & 3 deletions docs/c/p0005.rst → docs/src/c/p0005.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ View source code :source:`c/src/p0005.c`
Includes
--------

- `macros.h <./macros.html>`__
- `primes.h <./primes.html>`__
- `macros.h <./lib/macros.html>`__
- `primes.h <./lib/primes.html>`__

Solution
--------
Expand All @@ -21,6 +21,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0005.c
.. literalinclude:: ../../../c/src/p0005.c
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/p0006.rst → docs/src/c/p0006.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0006.c
.. literalinclude:: ../../../c/src/p0006.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0007.rst → docs/src/c/p0007.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0007.c`
Includes
--------

- `primes.h <./primes.html>`__
- `primes.h <./lib/primes.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0007.c
.. literalinclude:: ../../../c/src/p0007.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0008.rst → docs/src/c/p0008.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0008.c`
Includes
--------

- `macros.h <./macros.html>`__
- `macros.h <./lib/macros.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0008.c
.. literalinclude:: ../../../c/src/p0008.c
:language: C
:linenos:
2 changes: 1 addition & 1 deletion docs/c/p0009.rst → docs/src/c/p0009.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0009.c
.. literalinclude:: ../../../c/src/p0009.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0010.rst → docs/src/c/p0010.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0010.c`
Includes
--------

- `primes.h <./primes.html>`__
- `primes.h <./lib/primes.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0010.c
.. literalinclude:: ../../../c/src/p0010.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0011.rst → docs/src/c/p0011.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ View source code :source:`c/src/p0011.c`
Includes
--------

- `macros.h <./macros.html>`__
- `macros.h <./lib/macros.html>`__

Solution
--------
Expand All @@ -20,6 +20,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0011.c
.. literalinclude:: ../../../c/src/p0011.c
:language: C
:linenos:
4 changes: 2 additions & 2 deletions docs/c/p0012.rst → docs/src/c/p0012.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ View source code :source:`c/src/p0012.c`
Includes
--------

- `factors.h <./factors.html>`__
- `factors.h <./lib/factors.html>`__

Solution
--------
Expand All @@ -25,6 +25,6 @@ Solution
This function is only present in the Python test runner, or when compiling as a standalone program.
It is not present when compiling for the Unity test runner.
.. literalinclude:: ../../c/src/p0012.c
.. literalinclude:: ../../../c/src/p0012.c
:language: C
:linenos:
Loading

0 comments on commit 6e6b391

Please sign in to comment.