forked from MinBZK/Algoritmeregister
-
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
1 parent
d299f99
commit 3e10729
Showing
108 changed files
with
953 additions
and
85 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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 34, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import urllib.request\n", | ||
"import ssl\n", | ||
"\n", | ||
"lines = []\n", | ||
"with open('../../frontend/assets/styles/_koop_index.scss') as f:\n", | ||
" lines = f.readlines()\n", | ||
"\n", | ||
"with open('../../frontend/assets/styles/_koop_main.scss') as f:\n", | ||
" lines = lines + f.readlines() \n", | ||
"\n", | ||
"def get_path_from_string(x):\n", | ||
" start_char = x.find('/icon-') + 1\n", | ||
" end_char = x.find('.svg') + 4\n", | ||
" return x[start_char:end_char]\n", | ||
"\n", | ||
"list = [l.split(\" \") for l in lines if 'icon-' in l]\n", | ||
"flat_list = [item for sublist in list for item in sublist if '/theme-iconsicon-' in item]\n", | ||
"parsed_icons = [get_path_from_string(x) for x in flat_list]\n", | ||
"\n", | ||
"parsed_icons\n", | ||
"\n", | ||
"base_url = \"http://componenten.overheid.nl/images\"\n", | ||
"\n", | ||
"ssl._create_default_https_context = ssl._create_unverified_context\n", | ||
"\n", | ||
"for icon in parsed_icons:\n", | ||
" url = f\"{base_url}/{icon}\"\n", | ||
" urllib.request.urlretrieve(url, f\"../../frontend/assets/images/icons/{icon}\")" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3.11.0 ('.venv': poetry)", | ||
"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.11.0" | ||
}, | ||
"orig_nbformat": 4, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "2c68b73ee4a8a00702303c18fd5a9e80181e768c01411da6970ac8482f024551" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.