Update material design icons
This commit is contained in:
parent
eefa62748b
commit
705e3e4fbb
3 changed files with 10 additions and 9 deletions
|
@ -1,2 +1,2 @@
|
||||||
""" DO NOT MODIFY. Auto-generated by update_mdi script """
|
""" DO NOT MODIFY. Auto-generated by update_mdi script """
|
||||||
VERSION = "38EF63D0474411E4B3CF842B2B6CFE1B"
|
VERSION = "7d76081c37634d36af21f5cc1ca79408"
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
||||||
"""
|
"""
|
||||||
Downloads the latest Polymer v1 iconset version for materialdesignicons.com
|
Downloads the latest Polymer v1 iconset version for materialdesignicons.com
|
||||||
"""
|
"""
|
||||||
|
import hashlib
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
|
@ -75,17 +75,18 @@ def main():
|
||||||
print("materialdesignicons.com icon updater")
|
print("materialdesignicons.com icon updater")
|
||||||
|
|
||||||
local_version = get_local_version()
|
local_version = get_local_version()
|
||||||
remote_version, remote_url = get_remote_version()
|
|
||||||
|
|
||||||
print('Local version:', local_version)
|
# The remote version is not reliable.
|
||||||
print('Remote version:', remote_version)
|
_, remote_url = get_remote_version()
|
||||||
|
|
||||||
if local_version == remote_version:
|
source = clean_component(requests.get(remote_url).text)
|
||||||
|
new_version = hashlib.md5(source.encode('utf-8')).hexdigest()
|
||||||
|
|
||||||
|
if local_version == new_version:
|
||||||
print('Already on the latest version.')
|
print('Already on the latest version.')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
write_component(remote_version,
|
write_component(new_version, source)
|
||||||
clean_component(requests.get(remote_url).text))
|
|
||||||
print('Updated to latest version')
|
print('Updated to latest version')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Reference in a new issue