mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update and rename roles_needing_docs.py to roles-needing-docs.py
This commit is contained in:
parent
d452d1c08f
commit
f915b5ee22
1 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
||||||
'''
|
'''
|
||||||
This script checks every role in the project and prints its name to stdout if
|
This script checks every role in the project and prints its name to stdout if
|
||||||
the role directory does not contain a README file and it is not listed in
|
the role directory does not contain a README file and it is not listed in
|
||||||
scripts/docs_ignore.
|
scripts/docs-ignore.
|
||||||
|
|
||||||
For ease of use, you can pipe the output of this script to a file or to a
|
For ease of use, you can pipe the output of this script to a file or to a
|
||||||
clipboard utility (e.g. pbcopy on macOS, xclip on Linux).
|
clipboard utility (e.g. pbcopy on macOS, xclip on Linux).
|
||||||
|
@ -14,14 +14,14 @@ from os.path import join as make_path
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
|
||||||
def included_roles():
|
def included_roles():
|
||||||
all_roles = set(os.listdir("roles"))
|
all_roles = set(os.listdir("/opt/iiab/iiab/roles"))
|
||||||
excluded_roles = \
|
excluded_roles = \
|
||||||
map(str.rstrip, open(make_path("scripts", "docs_ignore")))
|
map(str.rstrip, open(make_path("/opt/iiab/iiab/scripts", "/opt/iiab/iiab/scripts/docs-ignore")))
|
||||||
included_roles = list(all_roles.difference(excluded_roles))
|
included_roles = list(all_roles.difference(excluded_roles))
|
||||||
included_roles.sort()
|
included_roles.sort()
|
||||||
return included_roles
|
return included_roles
|
||||||
|
|
||||||
for role in included_roles():
|
for role in included_roles():
|
||||||
readme = make_path("roles", role, "README.*")
|
readme = make_path("/opt/iiab/iiab/roles", role, "README.*")
|
||||||
if not glob(readme):
|
if not glob(readme):
|
||||||
print(role)
|
print(role)
|
Loading…
Add table
Add a link
Reference in a new issue