mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 03:37:58 +00:00
25 lines
673 B
Python
Executable File
25 lines
673 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sys
|
|
import subprocess
|
|
|
|
EXCLUDE = ('clever4-front-white.png', 'clever4-front-white-large.png', '.DS_Store',
|
|
'clever4-front-black-large.png','clover42-black.png', 'clover42-main-margin.png')
|
|
|
|
code = 0
|
|
|
|
os.chdir('./docs')
|
|
|
|
for root, dirs, files in os.walk('assets'):
|
|
for f in files:
|
|
if f not in EXCLUDE:
|
|
path = os.path.join(root, f)
|
|
try:
|
|
subprocess.check_output(['grep', '-F', '-r', path, './ru', './en'])
|
|
except subprocess.CalledProcessError:
|
|
print('\x1b[1;31mAssets file {} is not used\x1b[0m'.format(path))
|
|
code = 1
|
|
|
|
sys.exit(code)
|