mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	
						commit
						9fd89978e8
					
				
					 3 changed files with 32 additions and 30 deletions
				
			
		
							
								
								
									
										29
									
								
								scripts/roles-needing-docs.py
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										29
									
								
								scripts/roles-needing-docs.py
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,29 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
'''
 | 
			
		||||
This script checks every role in the (Internet-in-a-Box) project and prints its
 | 
			
		||||
name to stdout if (1) the role directory does not contain a README file, and
 | 
			
		||||
(2) the role is not listed in /opt/iiab/iiab/unmaintained-roles.txt
 | 
			
		||||
 | 
			
		||||
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).
 | 
			
		||||
'''
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
from os.path import join as make_path
 | 
			
		||||
from glob import glob
 | 
			
		||||
 | 
			
		||||
def included_roles():
 | 
			
		||||
    all_roles = set(os.listdir("/opt/iiab/iiab/roles"))
 | 
			
		||||
    excluded_roles = \
 | 
			
		||||
        map(str.rstrip,
 | 
			
		||||
            open(make_path("/opt/iiab/iiab/scripts",
 | 
			
		||||
                           "/opt/iiab/iiab/unmaintained-roles.txt")))
 | 
			
		||||
    included_roles = list(all_roles.difference(excluded_roles))
 | 
			
		||||
    included_roles.sort()
 | 
			
		||||
    return included_roles
 | 
			
		||||
 | 
			
		||||
for role in included_roles():
 | 
			
		||||
    readme = make_path("/opt/iiab/iiab/roles", role, "README.*")
 | 
			
		||||
    if not glob(readme):
 | 
			
		||||
        print(role)
 | 
			
		||||
| 
						 | 
				
			
			@ -1,27 +0,0 @@
 | 
			
		|||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
'''
 | 
			
		||||
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 
 | 
			
		||||
scripts/docs_ignore.
 | 
			
		||||
 | 
			
		||||
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).
 | 
			
		||||
'''
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
from os.path import join as make_path
 | 
			
		||||
from glob import glob
 | 
			
		||||
 | 
			
		||||
def included_roles():
 | 
			
		||||
    all_roles = set(os.listdir("roles"))
 | 
			
		||||
    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)
 | 
			
		||||
| 
						 | 
				
			
			@ -1,11 +1,11 @@
 | 
			
		|||
ajenti
 | 
			
		||||
authserver
 | 
			
		||||
debian_schooltool
 | 
			
		||||
docker
 | 
			
		||||
ejabberd_xs
 | 
			
		||||
idmgr
 | 
			
		||||
ajenti
 | 
			
		||||
moodle-1.9
 | 
			
		||||
nodogsplash
 | 
			
		||||
pathagar
 | 
			
		||||
schooltool
 | 
			
		||||
nodogsplash
 | 
			
		||||
docker
 | 
			
		||||
sugar-stats
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue