forked from koaning/thismonth.rocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
179 changed files
with
11,835 additions
and
3,020 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,13 @@ install: | |
pip install -r requirements | ||
npm install http-server [email protected] uglifycss | ||
|
||
website: | ||
python automator.py run-jinja | ||
css: website | ||
npx tailwindcss build styles.css -o src/all.css | ||
npx purgecss --css src/all.css --content src/*.html --out public | ||
npx uglifycss --ugly-comments public/all.css > public/style.css | ||
|
||
website: | ||
python automator.py build | ||
|
||
clean: | ||
rm -rm public/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 15, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Collecting pyyaml\n", | ||
" Downloading PyYAML-5.3.1.tar.gz (269 kB)\n", | ||
"\u001b[K |████████████████████████████████| 269 kB 1.1 MB/s eta 0:00:01\n", | ||
"\u001b[?25hBuilding wheels for collected packages: pyyaml\n", | ||
" Building wheel for pyyaml (setup.py) ... \u001b[?25ldone\n", | ||
"\u001b[?25h Created wheel for pyyaml: filename=PyYAML-5.3.1-cp37-cp37m-macosx_10_14_x86_64.whl size=44627 sha256=488a765a02cdf2d22a506477dffa3a87aeffbcf3c7985db568c9698a15e4ca0f\n", | ||
" Stored in directory: /Users/vincent/Library/Caches/pip/wheels/5e/03/1e/e1e954795d6f35dfc7b637fe2277bff021303bd9570ecea653\n", | ||
"Successfully built pyyaml\n", | ||
"Installing collected packages: pyyaml\n", | ||
"Successfully installed pyyaml-5.3.1\n", | ||
"Note: you may need to restart the kernel to use updated packages.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%pip install pyyaml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 16, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import json\n", | ||
"import yaml\n", | ||
"from pathlib import Path" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"d = {1: 2}" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"d.update({'b': 3})" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"{1: 2, 'a': 1, 'b': 3}" | ||
] | ||
}, | ||
"execution_count": 10, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"d" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 35, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"blob = json.loads(Path(\"public/tips-backup.json\").read_text())\n", | ||
"for d in blob:\n", | ||
" filename=d['img'].replace(\"svg\", \"md\")\n", | ||
" d['short'] = d['appendix'].replace(\"\\n\", \"\")\n", | ||
" del d['appendix']\n", | ||
" d['icon'] = d['img']\n", | ||
" del d['img']\n", | ||
" text = '---\\n' + yaml.dump(d) + '---\\n'\n", | ||
" Path(f\"src/ideas/{filename}\").write_text(text)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 36, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"rm src/ideas/*.yml" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 34, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"51" | ||
] | ||
}, | ||
"execution_count": 34, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"len(list(Path(\"src/ideas\").glob(\"*.yml\")))" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.