File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ This folder contains scripts that can be run to create requirement screenshots f
8
8
9
9
To use the scripts you must set ` LEARN_GUIDE_REPO ` inside of ` get_imports.py ` to point to the location of learn guide repo.
10
10
11
- default value is ` "../../ Adafruit_Learning_System_Guides/" `
11
+ default value is ` "../Adafruit_Learning_System_Guides/" `
12
12
13
13
One directory above the root of this repo.
14
14
15
15
With that pointed at a learn guide repo you can run:
16
16
17
17
```
18
- python create_requirement_images.py
18
+ python3 create_requirement_images.py
19
19
```
20
20
It will create images in the ` generated_images ` directory.
Original file line number Diff line number Diff line change @@ -325,7 +325,9 @@ def make_libraries(libraries, position):
325
325
(PADDING , PADDING + (LINE_SPACING * (7 + project_files_count ))),
326
326
)
327
327
328
- img .save ("generated_images/{}.png" .format (learn_guide_project .replace ("/" , "_" )))
328
+ img .save (
329
+ "generated_images/{}.png" .format (learn_guide_project .replace ("/" , "_" ))
330
+ )
329
331
except SyntaxError as exc :
330
332
print (exc )
331
333
traceback .print_exc ()
Original file line number Diff line number Diff line change @@ -145,22 +145,23 @@ def get_learn_guide_cp_projects():
145
145
for dirpath , dirnames , filenames in os .walk (LEARN_GUIDE_REPO ):
146
146
# The top-level needs special treatment
147
147
if dirpath == LEARN_GUIDE_REPO :
148
- dirnames .remove (' .git' )
148
+ dirnames .remove (" .git" )
149
149
continue
150
150
# Skip this folder and all subfolders
151
- if ' .circuitpython.skip' in filenames :
151
+ if " .circuitpython.skip" in filenames :
152
152
del dirnames [:]
153
153
continue
154
- # Do not reurse, but handle files in this folder
155
- elif '.circuitpython.skip-sub' in filenames :
156
- del dirnames [:]
157
154
# Skip files in this folder, but handle sub-folders
158
- elif ' .circuitpython.skip-here' in filenames :
155
+ if " .circuitpython.skip-here" in filenames :
159
156
continue
157
+ # Do not reurse, but handle files in this folder
158
+ if ".circuitpython.skip-sub" in filenames :
159
+ del dirnames [:]
160
160
161
161
if any (f for f in filenames if f .endswith (".py" )):
162
162
yield os .path .relpath (dirpath , LEARN_GUIDE_REPO )
163
163
164
- if __name__ == '__main__' :
164
+
165
+ if __name__ == "__main__" :
165
166
for p in get_learn_guide_cp_projects ():
166
167
print ("PROJECT" , p )
You can’t perform that action at this time.
0 commit comments