diff --git a/Pipfile b/Pipfile index f2a808ff..7071c670 100644 --- a/Pipfile +++ b/Pipfile @@ -6,6 +6,7 @@ name = "pypi" [packages] python-box = "*" flake8 = "*" +pyyaml = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 77786577..41b36dbc 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "263785e5da57e27df304998a6125c2fed36d286d2054112679d18e52bd2f6974" + "sha256": "65ff18f8f21012c207eb3fb35e64adbf0ad866e63f1c768e94dbee54098b81b5" }, "pipfile-spec": 6, "requires": { @@ -67,6 +67,45 @@ ], "index": "pypi", "version": "==6.0.2" + }, + "pyyaml": { + "hashes": [ + "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293", + "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b", + "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57", + "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b", + "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4", + "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07", + "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba", + "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9", + "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287", + "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513", + "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0", + "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0", + "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92", + "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f", + "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2", + "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc", + "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c", + "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86", + "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4", + "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c", + "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34", + "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b", + "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c", + "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb", + "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737", + "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3", + "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d", + "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53", + "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78", + "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803", + "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a", + "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174", + "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5" + ], + "index": "pypi", + "version": "==6.0" } }, "develop": {} diff --git a/README.md b/README.md index 0a5505eb..7783e12d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 @@ -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 @@ -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) diff --git a/README.src.md b/README.src.md index c45cb09d..907eb42b 100644 --- a/README.src.md +++ b/README.src.md @@ -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 diff --git a/build.py b/build.py index 10050573..c0bd35d1 100644 --- a/build.py +++ b/build.py @@ -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 @@ -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)