We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90ab4ca commit a5608dfCopy full SHA for a5608df
update_example_snippets.py
@@ -10,6 +10,7 @@
10
11
domain = b'https://gist.github.com'
12
path = b'/psifertex/6fbc7532f536775194edd26290892ef7' # Feel free to adapt to your own setup
13
+archive = path + b'/archive/'
14
subfolder = 'default' # Change to save the snippets to a different sub-folder
15
tab2space = False
16
width = 4
@@ -32,8 +33,8 @@ def update_snippets():
32
33
url = domain + path
34
log_info("Downloading from: %s" % url)
35
source = download(url)
- zipPath = [s for s in source.split(b'\"') if s.endswith(b'.zip')]
36
- if len(zipPath) != 1:
+ zipPath = [s for s in source.split(b'\"') if s.endswith(b'.zip') and archive in s]
37
+ if len(zipPath) != 2:
38
log_error("Update failed.")
39
return
40
url = domain + zipPath[0]
0 commit comments