Skip to content

Commit

Permalink
generate project list (see #16)
Browse files Browse the repository at this point in the history
  • Loading branch information
generic-github-user committed Aug 31, 2022
1 parent c5eeb81 commit 5b3e5e0
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 8 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ name = "pypi"
[packages]
python-box = "*"
flake8 = "*"
pyyaml = "*"

[dev-packages]

Expand Down
41 changes: 40 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 56 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,53 @@ to remain stable. I plan to integrate more third-party tooling in the future
and complete some heavy refactoring of old projects that I am interested in
further developing or reusing components from.

## Projects

- pythings `tools` `utilities` `metaprogramming`
- obfuscation `tools` `security` `languages`
- unicode-art `graphics` `diagrams` `tools`
- leetcode `programming-challenges` `leetcode` `algorithms`
- geometry `libraries` `mathematics` `geometry` `analysis`
- graphs `libraries` `mathematics` `graphs` `graph-theory` `data-structures`
- captcha `hci` `security` `experiments`
- zeal `serialization` `markup` `file-formats`
- ao
- board `mathematics` `combinatorics` `board-games` `simulations` `chess`
- transpiler `programming-languages` `transpilers` `compilers`
- finch `programming-languages` `new-language` `compilers` `transpilers` `experimental`
- clover `ai` `ml` `mathematics` `optimization`
- c2s `programming-languages` `new-language` `compilers` `transpilers` `experimental`
- utils `unix` `utilities` `tools` `scripting` `command-line`
- tetris-variants `games` `tetris` `interactive`
- generic-github-user `meta` `profile`
- packings `mathematics` `combinatorics` `simulations` `geometry`
- englint
- set
- grammars
- chrestomathy
- CA2
- CogBench
- Time-Zone-Roles `discord-bot` `automation`
- Blender `add-ons` `extensions` `3d-graphics` `blender`
- quickplot `plotting` `graphs` `tools` `libraries` `matplotlib`
- epidemic-modelling `mathematics` `modelling` `simulations` `dynamical-systems`
- fractals `fractals` `mathematics` `graphics` `numerical-analysis` `dynamical-systems`
- ascii-physics-sim `ascii` `physics` `simulations` `experiments`
- self-avoiding-walks `mathematics` `combinatorics` `analysis` `simulations` `random-walks`
- python-experiments `tools` `utilities` `metaprogramming` `experiments` `programming-languages`
- python-snippets `tools` `utilities` `templates` `programming-languages` `helpers` `libraries`
- shelf `tools` `utilities` `software` `command-line` `organization` `notes`
- locus
- punchcard
- wordtetris
- alexandria
- roulette-curves
- cellular-automata-experiments
- foldz
- programming-puzzles
- visual-computing-simulation
- project-summary

## Branches

- `geometry`: helper classes for geometry in Python that I've been copy-pasting
Expand All @@ -52,14 +99,14 @@ further developing or reusing components from.
## Statistics


cloc|github.com/AlDanial/cloc v 1.82 T=0.08 s (2797.0 files/s, 438490.1 lines/s)
cloc|github.com/AlDanial/cloc v 1.82 T=0.09 s (2723.9 files/s, 432863.5 lines/s)
--- | ---

Language|files|blank|comment|code
:-------|-------:|-------:|-------:|-------:
Python|88|2098|2603|6278
Python|88|2099|2603|6282
HTML|15|2061|35|6012
Markdown|41|621|0|4038
Markdown|41|625|0|4537
Jupyter Notebook|13|0|5687|2134
C|20|357|403|2007
YAML|15|89|26|531
Expand All @@ -74,7 +121,7 @@ XML|2|4|0|52
TOML|4|8|2|26
vim script|2|10|13|15
--------|--------|--------|--------|--------
SUM:|237|5531|8995|22629
SUM:|237|5536|8995|23132


## Tree
Expand Down Expand Up @@ -526,7 +573,9 @@ SUM:|237|5531|8995|22629
## History

```
* 84cf2eb (HEAD -> master, origin/master, origin/ca2, ca2) Add 'ca2/' from commit '49576963f63827c0cad40c823821a5a7f9d3587a'
* c5eeb81 (HEAD -> meta, origin/master, master) add simple build-and-commit script
* 8b26b10 Rebuild project
* 84cf2eb (origin/ca2, ca2) Add 'ca2/' from commit '49576963f63827c0cad40c823821a5a7f9d3587a'
|\
| * 4957696 generate directory listing
| * 4ae5c9d fix some issues with state code
Expand Down Expand Up @@ -869,12 +918,12 @@ SUM:|237|5531|8995|22629
| * 937d5d4 add alternate version of source with IPython markers stripped out
* | 5ee1074 Merge branch 'meta'
|\ \
| * \ d230ab4 (meta) Merge branch 'metadata' into meta
| * \ d230ab4 (origin/meta) Merge branch 'metadata' into meta
| |\ \
| | * | 543b65e (origin/metadata, metadata) list languages for newly added projects
| | * | 12e734d add labels to some recently merged projects
| | * | c440a60 reflow label descriptions
| * | | 9f2f770 (origin/meta) add simple logging to build script
| * | | 9f2f770 add simple logging to build script
| |/ /
| * | fd5fc44 add newly merged projects
| * | ead61a5 add some whitespace (to save my eyes)
Expand Down
4 changes: 4 additions & 0 deletions README.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ to remain stable. I plan to integrate more third-party tooling in the future
and complete some heavy refactoring of old projects that I am interested in
further developing or reusing components from.

## Projects

[[projects]]

## Branches

- `geometry`: helper classes for geometry in Python that I've been copy-pasting
Expand Down
5 changes: 5 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import subprocess
import yaml
import json
from box import Box

# Run a shell command and return the output (i.e., stdout); assumes result is
# UTF-8 encoded text
Expand All @@ -11,11 +12,15 @@ def runcmd(command):
print(f'Loading source files')
with open('README.src.md', 'r') as f: content = f.read()
with open('substitutions.yaml', 'r') as f: subs = yaml.safe_load(f.read())
with open('projects.yaml', 'r') as f: projects = Box(yaml.safe_load(f.read()), default_box=True)

print(json.dumps(subs, indent=4))

for k, v in subs.items():
print(f'Replacing template: {k}')
content = content.replace(f'[[{k}]]', runcmd(v))
content = content.replace('[[projects]]', '\n'.join(
f'- {k} {"".join(f" `{t}`" for t in v.labels)}' for k, v in projects.projects.items()))

print(f'Writing output file')
with open('README.md', 'w+') as f: f.write(content)
Expand Down

0 comments on commit 5b3e5e0

Please sign in to comment.