Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 787f89a

Browse files
committed
Some re=org
1 parent 665f9b3 commit 787f89a

7 files changed

Lines changed: 21 additions & 7 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,13 @@ or use the `Add File` button above, and then create a PR.
1919

2020
Note that the name of the yml and the name of the repo should ideally match.
2121

22+
## Development
23+
24+
The list if *yml* files in `packages/` is parsed by `build/build.py` using `template.rst` and
25+
the result is saved to `docs/source/packages.rst`. This script is called by `docs/Makefile`
26+
using `make html`. This runs a `sphinx-build` and makes the page at `build/html/index.html`.
27+
28+
This was heavily based on the nice work at <https://pyviz.org>.
29+
2230

2331

File renamed without changes.

tools/build.py renamed to build/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@
100100
else:
101101
package['site_protocol'], package['site'] = package['site'].rstrip('/').split('://')
102102

103-
template = Template(open(os.path.join(here, 'template.html'), 'r').read())
103+
template = Template(open(os.path.join(here, 'template.rst'), 'r').read())
104104

105105
with open(os.path.join(here, '../docs/source/packages.rst'), 'w') as f:
106106
f.write("Third-party packages\n")
107107
f.write("====================\n\n")
108108
f.write(".. include:: intro.rst\n\n")
109-
f.write(".. raw:: html\n\n")
109+
# f.write(".. include:: html\n\n")
110110
f.write(template.render(config=config))
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
<div id="tools-wrapper">
2-
{% for section in config %}
3-
<h3 id="{{ section.name.lower().replace(' ', '-') }}">{{ section.name }}</h3>
4-
{{ section.get('intro', '') }}
1+
{% for section in config %}
2+
3+
{{ section.name }}
4+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
6+
{{ section.get('intro', '') }}
7+
8+
.. raw:: html
9+
10+
<div>
511
<table>
612
<tr style="text-align:center">
713
<th style="width:10em">Name</th>

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ help:
1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20-
python ../tools/build.py
20+
python ../build/build.py
2121
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 commit comments

Comments
 (0)