-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtest.py
More file actions
executable file
·38 lines (29 loc) · 1012 Bytes
/
test.py
File metadata and controls
executable file
·38 lines (29 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python3
import lilv
import lilvlib
import os
import sys
world = lilv.World()
if len(sys.argv) > 1:
world.load_specifications()
world.load_plugin_classes()
for bundle in sys.argv[1:]:
if not bundle.endswith(os.sep):
bundle += os.sep
world.load_bundle(world.new_file_uri(None, bundle))
else:
world.load_all()
for plugin in world.get_all_plugins():
info = lilvlib.get_plugin_info(world, plugin)
if not info['errors']:
continue
errors = info['errors'].copy()
if 'plugin comment is missing' in errors:
errors.remove('plugin comment is missing')
if 'plugin license is missing' in errors:
errors.remove('plugin license is missing')
if 'plugin is missing version information' in errors:
errors.remove('plugin is missing version information')
if errors:
print("----------------------", str(plugin.get_uri()), "----------------------")
print('\t -> ' + '\n\t -> '.join(errors))