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
88
99To use the scripts you must set ` LEARN_GUIDE_REPO ` inside of ` get_imports.py ` to point to the location of learn guide repo.
1010
11- default value is ` "../../ Adafruit_Learning_System_Guides/" `
11+ default value is ` "../Adafruit_Learning_System_Guides/" `
1212
1313One directory above the root of this repo.
1414
1515With that pointed at a learn guide repo you can run:
1616
1717```
18- python create_requirement_images.py
18+ python3 create_requirement_images.py
1919```
2020It 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):
325325 (PADDING , PADDING + (LINE_SPACING * (7 + project_files_count ))),
326326 )
327327
328- img .save ("generated_images/{}.png" .format (learn_guide_project .replace ("/" , "_" )))
328+ img .save (
329+ "generated_images/{}.png" .format (learn_guide_project .replace ("/" , "_" ))
330+ )
329331 except SyntaxError as exc :
330332 print (exc )
331333 traceback .print_exc ()
Original file line number Diff line number Diff line change @@ -145,22 +145,23 @@ def get_learn_guide_cp_projects():
145145 for dirpath , dirnames , filenames in os .walk (LEARN_GUIDE_REPO ):
146146 # The top-level needs special treatment
147147 if dirpath == LEARN_GUIDE_REPO :
148- dirnames .remove (' .git' )
148+ dirnames .remove (" .git" )
149149 continue
150150 # Skip this folder and all subfolders
151- if ' .circuitpython.skip' in filenames :
151+ if " .circuitpython.skip" in filenames :
152152 del dirnames [:]
153153 continue
154- # Do not reurse, but handle files in this folder
155- elif '.circuitpython.skip-sub' in filenames :
156- del dirnames [:]
157154 # Skip files in this folder, but handle sub-folders
158- elif ' .circuitpython.skip-here' in filenames :
155+ if " .circuitpython.skip-here" in filenames :
159156 continue
157+ # Do not reurse, but handle files in this folder
158+ if ".circuitpython.skip-sub" in filenames :
159+ del dirnames [:]
160160
161161 if any (f for f in filenames if f .endswith (".py" )):
162162 yield os .path .relpath (dirpath , LEARN_GUIDE_REPO )
163163
164- if __name__ == '__main__' :
164+
165+ if __name__ == "__main__" :
165166 for p in get_learn_guide_cp_projects ():
166167 print ("PROJECT" , p )
You can’t perform that action at this time.
0 commit comments