mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Add support for excluded roles
This commit is contained in:
parent
2c3470d740
commit
41e78d90ac
2 changed files with 27 additions and 5 deletions
|
@ -2,15 +2,26 @@
|
||||||
|
|
||||||
'''
|
'''
|
||||||
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.
|
the role directory does not contain a README file and it is not listed in
|
||||||
|
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).
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import os, glob
|
import os
|
||||||
|
from os.path import join as make_path
|
||||||
|
from glob import glob
|
||||||
|
|
||||||
for role in sorted(os.listdir("roles")):
|
def included_roles():
|
||||||
readme_glob = os.path.join("roles", role, "README.*")
|
all_roles = set(os.listdir("roles"))
|
||||||
if not glob.glob(readme_glob):
|
excluded_roles = \
|
||||||
|
map(str.rstrip, open(make_path("scripts", "docs_ignore")))
|
||||||
|
included_roles = list(all_roles.difference(excluded_roles))
|
||||||
|
included_roles.sort()
|
||||||
|
return included_roles
|
||||||
|
|
||||||
|
for role in included_roles():
|
||||||
|
readme = make_path("roles", role, "README.*")
|
||||||
|
if not glob(readme):
|
||||||
print(role)
|
print(role)
|
||||||
|
|
11
scripts/docs_ignore
Normal file
11
scripts/docs_ignore
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
authserver
|
||||||
|
debian_schooltool
|
||||||
|
ejabberd_xs
|
||||||
|
idmgr
|
||||||
|
ajenti
|
||||||
|
moodle-1.9
|
||||||
|
pathagar
|
||||||
|
schooltool
|
||||||
|
nodogsplash
|
||||||
|
docker
|
||||||
|
sugar-stats
|
Loading…
Add table
Add a link
Reference in a new issue