chiark / gitweb /
metadata: make help for metadata -W option clearer
[fdroidserver.git] / fdroidserver / lint.py
1 #!/usr/bin/env python3
2 #
3 # lint.py - part of the FDroid server tool
4 # Copyright (C) 2013-2014 Daniel Martí <mvdan@mvdan.cc>
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See th
14 # GNU Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public Licen
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19 from argparse import ArgumentParser
20 import glob
21 import os
22 import re
23 import sys
24
25 from . import _
26 from . import common
27 from . import metadata
28 from . import rewritemeta
29
30 config = None
31 options = None
32
33
34 def enforce_https(domain):
35     return (re.compile(r'.*[^sS]://[^/]*' + re.escape(domain) + r'(/.*)?'),
36             domain + " URLs should always use https://")
37
38
39 https_enforcings = [
40     enforce_https('github.com'),
41     enforce_https('gitlab.com'),
42     enforce_https('bitbucket.org'),
43     enforce_https('apache.org'),
44     enforce_https('google.com'),
45     enforce_https('svn.code.sf.net'),
46 ]
47
48
49 def forbid_shortener(domain):
50     return (re.compile(r'https?://[^/]*' + re.escape(domain) + r'/.*'),
51             _("URL shorteners should not be used"))
52
53
54 http_url_shorteners = [
55     forbid_shortener('goo.gl'),
56     forbid_shortener('t.co'),
57     forbid_shortener('ur1.ca'),
58     forbid_shortener('is.gd'),
59     forbid_shortener('bit.ly'),
60     forbid_shortener('tiny.cc'),
61     forbid_shortener('tinyurl.com'),
62 ]
63
64 http_checks = https_enforcings + http_url_shorteners + [
65     (re.compile(r'.*github\.com/[^/]+/[^/]+\.git'),
66      _("Appending .git is not necessary")),
67     (re.compile(r'.*://[^/]*(github|gitlab|bitbucket|rawgit)[^/]*/([^/]+/){1,3}master'),
68      _("Use /HEAD instead of /master to point at a file in the default branch")),
69 ]
70
71 regex_checks = {
72     'WebSite': http_checks,
73     'SourceCode': http_checks,
74     'Repo': https_enforcings,
75     'IssueTracker': http_checks + [
76         (re.compile(r'.*github\.com/[^/]+/[^/]+/*$'),
77          _("/issues is missing")),
78         (re.compile(r'.*gitlab\.com/[^/]+/[^/]+/*$'),
79          _("/issues is missing")),
80     ],
81     'Donate': http_checks + [
82         (re.compile(r'.*flattr\.com'),
83          _("Flattr donation methods belong in the FlattrID flag")),
84     ],
85     'Changelog': http_checks,
86     'Author Name': [
87         (re.compile(r'^\s'),
88          _("Unnecessary leading space")),
89         (re.compile(r'.*\s$'),
90          _("Unnecessary trailing space")),
91     ],
92     'Summary': [
93         (re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE),
94          _("No need to specify that the app is Free Software")),
95         (re.compile(r'.*((your|for).*android|android.*(app|device|client|port|version))', re.IGNORECASE),
96          _("No need to specify that the app is for Android")),
97         (re.compile(r'.*[a-z0-9][.!?]( |$)'),
98          _("Punctuation should be avoided")),
99         (re.compile(r'^\s'),
100          _("Unnecessary leading space")),
101         (re.compile(r'.*\s$'),
102          _("Unnecessary trailing space")),
103     ],
104     'Description': [
105         (re.compile(r'\s*[*#][^ .]'),
106          _("Invalid bulleted list")),
107         (re.compile(r'^\s'),
108          _("Unnecessary leading space")),
109         (re.compile(r'.*\s$'),
110          _("Unnecessary trailing space")),
111         (re.compile(r'.*([^[]|^)\[[^:[\]]+( |\]|$)'),
112          _("Invalid link - use [http://foo.bar Link title] or [http://foo.bar]")),
113         (re.compile(r'(^|.* )https?://[^ ]+'),
114          _("Unlinkified link - use [http://foo.bar Link title] or [http://foo.bar]")),
115     ],
116 }
117
118 locale_pattern = re.compile(r'^[a-z]{2,3}(-[A-Z][A-Z])?$')
119
120
121 def check_regexes(app):
122     for f, checks in regex_checks.items():
123         for m, r in checks:
124             v = app.get(f)
125             t = metadata.fieldtype(f)
126             if t == metadata.TYPE_MULTILINE:
127                 for l in v.splitlines():
128                     if m.match(l):
129                         yield "%s at line '%s': %s" % (f, l, r)
130             else:
131                 if v is None:
132                     continue
133                 if m.match(v):
134                     yield "%s '%s': %s" % (f, v, r)
135
136
137 def get_lastbuild(builds):
138     lowest_vercode = -1
139     lastbuild = None
140     for build in builds:
141         if not build.disable:
142             vercode = int(build.versionCode)
143             if lowest_vercode == -1 or vercode < lowest_vercode:
144                 lowest_vercode = vercode
145         if not lastbuild or int(build.versionCode) > int(lastbuild.versionCode):
146             lastbuild = build
147     return lastbuild
148
149
150 def check_ucm_tags(app):
151     lastbuild = get_lastbuild(app.builds)
152     if (lastbuild is not None
153             and lastbuild.commit
154             and app.UpdateCheckMode == 'RepoManifest'
155             and not lastbuild.commit.startswith('unknown')
156             and lastbuild.versionCode == app.CurrentVersionCode
157             and not lastbuild.forcevercode
158             and any(s in lastbuild.commit for s in '.,_-/')):
159         yield _("Last used commit '{commit}' looks like a tag, but Update Check Mode is '{ucm}'")\
160             .format(commit=lastbuild.commit, ucm=app.UpdateCheckMode)
161
162
163 def check_char_limits(app):
164     limits = config['char_limits']
165
166     if len(app.Summary) > limits['summary']:
167         yield _("Summary of length {length} is over the {limit} char limit")\
168             .format(length=len(app.Summary), limit=limits['summary'])
169
170     if len(app.Description) > limits['description']:
171         yield _("Description of length {length} is over the {limit} char limit")\
172             .format(length=len(app.Description), limit=limits['description'])
173
174
175 def check_old_links(app):
176     usual_sites = [
177         'github.com',
178         'gitlab.com',
179         'bitbucket.org',
180     ]
181     old_sites = [
182         'gitorious.org',
183         'code.google.com',
184     ]
185     if any(s in app.Repo for s in usual_sites):
186         for f in ['WebSite', 'SourceCode', 'IssueTracker', 'Changelog']:
187             v = app.get(f)
188             if any(s in v for s in old_sites):
189                 yield _("App is in '{repo}' but has a link to {url}")\
190                     .format(repo=app.Repo, url=v)
191
192
193 def check_useless_fields(app):
194     if app.UpdateCheckName == app.id:
195         yield _("Update Check Name is set to the known app id - it can be removed")
196
197
198 filling_ucms = re.compile(r'^(Tags.*|RepoManifest.*)')
199
200
201 def check_checkupdates_ran(app):
202     if filling_ucms.match(app.UpdateCheckMode):
203         if not app.AutoName and not app.CurrentVersion and app.CurrentVersionCode == '0':
204             yield _("UCM is set but it looks like checkupdates hasn't been run yet")
205
206
207 def check_empty_fields(app):
208     if not app.Categories:
209         yield _("Categories are not set")
210
211
212 all_categories = set([
213     "Connectivity",
214     "Development",
215     "Games",
216     "Graphics",
217     "Internet",
218     "Money",
219     "Multimedia",
220     "Navigation",
221     "Phone & SMS",
222     "Reading",
223     "Science & Education",
224     "Security",
225     "Sports & Health",
226     "System",
227     "Theming",
228     "Time",
229     "Writing",
230 ])
231
232
233 def check_categories(app):
234     for categ in app.Categories:
235         if categ not in all_categories:
236             yield _("Category '%s' is not valid" % categ)
237
238
239 def check_duplicates(app):
240     if app.Name and app.Name == app.AutoName:
241         yield _("Name '%s' is just the auto name - remove it") % app.Name
242
243     links_seen = set()
244     for f in ['Source Code', 'Web Site', 'Issue Tracker', 'Changelog']:
245         v = app.get(f)
246         if not v:
247             continue
248         v = v.lower()
249         if v in links_seen:
250             yield _("Duplicate link in '{field}': {url}").format(field=f, url=v)
251         else:
252             links_seen.add(v)
253
254     name = app.Name or app.AutoName
255     if app.Summary and name:
256         if app.Summary.lower() == name.lower():
257             yield _("Summary '%s' is just the app's name") % app.Summary
258
259     if app.Summary and app.Description and len(app.Description) == 1:
260         if app.Summary.lower() == app.Description[0].lower():
261             yield _("Description '%s' is just the app's summary") % app.Summary
262
263     seenlines = set()
264     for l in app.Description.splitlines():
265         if len(l) < 1:
266             continue
267         if l in seenlines:
268             yield _("Description has a duplicate line")
269         seenlines.add(l)
270
271
272 desc_url = re.compile(r'(^|[^[])\[([^ ]+)( |\]|$)')
273
274
275 def check_mediawiki_links(app):
276     wholedesc = ' '.join(app.Description)
277     for um in desc_url.finditer(wholedesc):
278         url = um.group(1)
279         for m, r in http_checks:
280             if m.match(url):
281                 yield _("URL {url} in Description: {error}").format(url=url, error=r)
282
283
284 def check_bulleted_lists(app):
285     validchars = ['*', '#']
286     lchar = ''
287     lcount = 0
288     for l in app.Description.splitlines():
289         if len(l) < 1:
290             lcount = 0
291             continue
292
293         if l[0] == lchar and l[1] == ' ':
294             lcount += 1
295             if lcount > 2 and lchar not in validchars:
296                 yield _("Description has a list (%s) but it isn't bulleted (*) nor numbered (#)") % lchar
297                 break
298         else:
299             lchar = l[0]
300             lcount = 1
301
302
303 def check_builds(app):
304     supported_flags = set(metadata.build_flags)
305     # needed for YAML and JSON
306     for build in app.builds:
307         if build.disable:
308             if build.disable.startswith('Generated by import.py'):
309                 yield _("Build generated by `fdroid import` - remove disable line once ready")
310             continue
311         for s in ['master', 'origin', 'HEAD', 'default', 'trunk']:
312             if build.commit and build.commit.startswith(s):
313                 yield _("Branch '{branch}' used as commit in build '{versionName}'")\
314                     .format(branch=s, versionName=build.versionName)
315             for srclib in build.srclibs:
316                 ref = srclib.split('@')[1].split('/')[0]
317                 if ref.startswith(s):
318                     yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\
319                         .format(branch=s, srclib=srclib)
320         for key in build.keys():
321             if key not in supported_flags:
322                 yield _('%s is not an accepted build field') % key
323
324
325 def check_files_dir(app):
326     dir_path = os.path.join('metadata', app.id)
327     if not os.path.isdir(dir_path):
328         return
329     files = set()
330     for name in os.listdir(dir_path):
331         path = os.path.join(dir_path, name)
332         if not (os.path.isfile(path) or name == 'signatures' or locale_pattern.match(name)):
333             yield _("Found non-file at %s") % path
334             continue
335         files.add(name)
336
337     used = {'signatures', }
338     for build in app.builds:
339         for fname in build.patch:
340             if fname not in files:
341                 yield _("Unknown file '{filename}' in build '{versionName}'")\
342                     .format(filename=fname, versionName=build.versionName)
343             else:
344                 used.add(fname)
345
346     for name in files.difference(used):
347         if locale_pattern.match(name):
348             continue
349         yield _("Unused file at %s") % os.path.join(dir_path, name)
350
351
352 def check_format(app):
353     if options.format and not rewritemeta.proper_format(app):
354         yield _("Run rewritemeta to fix formatting")
355
356
357 def check_license_tag(app):
358     '''Ensure all license tags are in https://spdx.org/license-list'''
359     if app.License.rstrip('+') not in SPDX:
360         yield _('Invalid license tag "%s"! Use only tags from https://spdx.org/license-list') \
361             % (app.License)
362
363
364 def check_extlib_dir(apps):
365     dir_path = os.path.join('build', 'extlib')
366     unused_extlib_files = set()
367     for root, dirs, files in os.walk(dir_path):
368         for name in files:
369             unused_extlib_files.add(os.path.join(root, name)[len(dir_path) + 1:])
370
371     used = set()
372     for app in apps:
373         for build in app.builds:
374             for path in build.extlibs:
375                 if path not in unused_extlib_files:
376                     yield _("{appid}: Unknown extlib {path} in build '{versionName}'")\
377                         .format(appid=app.id, path=path, versionName=build.versionName)
378                 else:
379                     used.add(path)
380
381     for path in unused_extlib_files.difference(used):
382         if any(path.endswith(s) for s in [
383                 '.gitignore',
384                 'source.txt', 'origin.txt', 'md5.txt',
385                 'LICENSE', 'LICENSE.txt',
386                 'COPYING', 'COPYING.txt',
387                 'NOTICE', 'NOTICE.txt',
388                 ]):
389             continue
390         yield _("Unused extlib at %s") % os.path.join(dir_path, path)
391
392
393 def check_for_unsupported_metadata_files(basedir=""):
394     """Checks whether any non-metadata files are in metadata/"""
395
396     global config
397
398     return_value = False
399     formats = config['accepted_formats']
400     for f in glob.glob(basedir + 'metadata/*') + glob.glob(basedir + 'metadata/.*'):
401         if os.path.isdir(f):
402             exists = False
403             for t in formats:
404                 exists = exists or os.path.exists(f + '.' + t)
405             if not exists:
406                 print(_('"%s/" has no matching metadata file!') % f)
407                 return_value = True
408         elif not os.path.splitext(f)[1][1:] in formats:
409             print('"' + f.replace(basedir, '')
410                   + '" is not a supported file format: (' + ','.join(formats) + ')')
411             return_value = True
412
413     return return_value
414
415
416 def main():
417
418     global config, options
419
420     # Parse command line...
421     parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]")
422     common.setup_global_opts(parser)
423     parser.add_argument("-f", "--format", action="store_true", default=False,
424                         help=_("Also warn about formatting issues, like rewritemeta -l"))
425     parser.add_argument("appid", nargs='*', help=_("applicationId in the form APPID"))
426     metadata.add_metadata_arguments(parser)
427     options = parser.parse_args()
428     metadata.warnings_action = options.W
429
430     config = common.read_config(options)
431
432     # Get all apps...
433     allapps = metadata.read_metadata(xref=True)
434     apps = common.read_app_args(options.appid, allapps, False)
435
436     anywarns = check_for_unsupported_metadata_files()
437
438     apps_check_funcs = []
439     if len(options.appid) == 0:
440         # otherwise it finds tons of unused extlibs
441         apps_check_funcs.append(check_extlib_dir)
442     for check_func in apps_check_funcs:
443         for warn in check_func(apps.values()):
444             anywarns = True
445             print(warn)
446
447     for appid, app in apps.items():
448         if app.Disabled:
449             continue
450
451         app_check_funcs = [
452             check_regexes,
453             check_ucm_tags,
454             check_char_limits,
455             check_old_links,
456             check_checkupdates_ran,
457             check_useless_fields,
458             check_empty_fields,
459             check_categories,
460             check_duplicates,
461             check_mediawiki_links,
462             check_bulleted_lists,
463             check_builds,
464             check_files_dir,
465             check_format,
466             check_license_tag,
467         ]
468
469         for check_func in app_check_funcs:
470             for warn in check_func(app):
471                 anywarns = True
472                 print("%s: %s" % (appid, warn))
473
474     if anywarns:
475         sys.exit(1)
476
477
478 # A compiled, public domain list of official SPDX license tags from:
479 # https://github.com/sindresorhus/spdx-license-list/blob/v3.0.1/spdx-simple.json
480 # The deprecated license tags have been removed from the list, they are at the
481 # bottom, starting after the last license tags that start with Z.
482 # This is at the bottom, since its a long list of data
483 SPDX = [
484     "PublicDomain",  # an F-Droid addition, until we can enforce a better option
485     "Glide",
486     "Abstyles",
487     "AFL-1.1",
488     "AFL-1.2",
489     "AFL-2.0",
490     "AFL-2.1",
491     "AFL-3.0",
492     "AMPAS",
493     "APL-1.0",
494     "Adobe-Glyph",
495     "APAFML",
496     "Adobe-2006",
497     "AGPL-1.0",
498     "Afmparse",
499     "Aladdin",
500     "ADSL",
501     "AMDPLPA",
502     "ANTLR-PD",
503     "Apache-1.0",
504     "Apache-1.1",
505     "Apache-2.0",
506     "AML",
507     "APSL-1.0",
508     "APSL-1.1",
509     "APSL-1.2",
510     "APSL-2.0",
511     "Artistic-1.0",
512     "Artistic-1.0-Perl",
513     "Artistic-1.0-cl8",
514     "Artistic-2.0",
515     "AAL",
516     "Bahyph",
517     "Barr",
518     "Beerware",
519     "BitTorrent-1.0",
520     "BitTorrent-1.1",
521     "BSL-1.0",
522     "Borceux",
523     "BSD-2-Clause",
524     "BSD-2-Clause-FreeBSD",
525     "BSD-2-Clause-NetBSD",
526     "BSD-3-Clause",
527     "BSD-3-Clause-Clear",
528     "BSD-3-Clause-No-Nuclear-License",
529     "BSD-3-Clause-No-Nuclear-License-2014",
530     "BSD-3-Clause-No-Nuclear-Warranty",
531     "BSD-4-Clause",
532     "BSD-Protection",
533     "BSD-Source-Code",
534     "BSD-3-Clause-Attribution",
535     "0BSD",
536     "BSD-4-Clause-UC",
537     "bzip2-1.0.5",
538     "bzip2-1.0.6",
539     "Caldera",
540     "CECILL-1.0",
541     "CECILL-1.1",
542     "CECILL-2.0",
543     "CECILL-2.1",
544     "CECILL-B",
545     "CECILL-C",
546     "ClArtistic",
547     "MIT-CMU",
548     "CNRI-Jython",
549     "CNRI-Python",
550     "CNRI-Python-GPL-Compatible",
551     "CPOL-1.02",
552     "CDDL-1.0",
553     "CDDL-1.1",
554     "CPAL-1.0",
555     "CPL-1.0",
556     "CATOSL-1.1",
557     "Condor-1.1",
558     "CC-BY-1.0",
559     "CC-BY-2.0",
560     "CC-BY-2.5",
561     "CC-BY-3.0",
562     "CC-BY-4.0",
563     "CC-BY-ND-1.0",
564     "CC-BY-ND-2.0",
565     "CC-BY-ND-2.5",
566     "CC-BY-ND-3.0",
567     "CC-BY-ND-4.0",
568     "CC-BY-NC-1.0",
569     "CC-BY-NC-2.0",
570     "CC-BY-NC-2.5",
571     "CC-BY-NC-3.0",
572     "CC-BY-NC-4.0",
573     "CC-BY-NC-ND-1.0",
574     "CC-BY-NC-ND-2.0",
575     "CC-BY-NC-ND-2.5",
576     "CC-BY-NC-ND-3.0",
577     "CC-BY-NC-ND-4.0",
578     "CC-BY-NC-SA-1.0",
579     "CC-BY-NC-SA-2.0",
580     "CC-BY-NC-SA-2.5",
581     "CC-BY-NC-SA-3.0",
582     "CC-BY-NC-SA-4.0",
583     "CC-BY-SA-1.0",
584     "CC-BY-SA-2.0",
585     "CC-BY-SA-2.5",
586     "CC-BY-SA-3.0",
587     "CC-BY-SA-4.0",
588     "CC0-1.0",
589     "Crossword",
590     "CrystalStacker",
591     "CUA-OPL-1.0",
592     "Cube",
593     "curl",
594     "D-FSL-1.0",
595     "diffmark",
596     "WTFPL",
597     "DOC",
598     "Dotseqn",
599     "DSDP",
600     "dvipdfm",
601     "EPL-1.0",
602     "ECL-1.0",
603     "ECL-2.0",
604     "eGenix",
605     "EFL-1.0",
606     "EFL-2.0",
607     "MIT-advertising",
608     "MIT-enna",
609     "Entessa",
610     "ErlPL-1.1",
611     "EUDatagrid",
612     "EUPL-1.0",
613     "EUPL-1.1",
614     "Eurosym",
615     "Fair",
616     "MIT-feh",
617     "Frameworx-1.0",
618     "FreeImage",
619     "FTL",
620     "FSFAP",
621     "FSFUL",
622     "FSFULLR",
623     "Giftware",
624     "GL2PS",
625     "Glulxe",
626     "AGPL-3.0",
627     "GFDL-1.1",
628     "GFDL-1.2",
629     "GFDL-1.3",
630     "GPL-1.0",
631     "GPL-2.0",
632     "GPL-3.0",
633     "LGPL-2.1",
634     "LGPL-3.0",
635     "LGPL-2.0",
636     "gnuplot",
637     "gSOAP-1.3b",
638     "HaskellReport",
639     "HPND",
640     "IBM-pibs",
641     "IPL-1.0",
642     "ICU",
643     "ImageMagick",
644     "iMatix",
645     "Imlib2",
646     "IJG",
647     "Info-ZIP",
648     "Intel-ACPI",
649     "Intel",
650     "Interbase-1.0",
651     "IPA",
652     "ISC",
653     "JasPer-2.0",
654     "JSON",
655     "LPPL-1.0",
656     "LPPL-1.1",
657     "LPPL-1.2",
658     "LPPL-1.3a",
659     "LPPL-1.3c",
660     "Latex2e",
661     "BSD-3-Clause-LBNL",
662     "Leptonica",
663     "LGPLLR",
664     "Libpng",
665     "libtiff",
666     "LAL-1.2",
667     "LAL-1.3",
668     "LiLiQ-P-1.1",
669     "LiLiQ-Rplus-1.1",
670     "LiLiQ-R-1.1",
671     "LPL-1.02",
672     "LPL-1.0",
673     "MakeIndex",
674     "MTLL",
675     "MS-PL",
676     "MS-RL",
677     "MirOS",
678     "MITNFA",
679     "MIT",
680     "Motosoto",
681     "MPL-1.0",
682     "MPL-1.1",
683     "MPL-2.0",
684     "MPL-2.0-no-copyleft-exception",
685     "mpich2",
686     "Multics",
687     "Mup",
688     "NASA-1.3",
689     "Naumen",
690     "NBPL-1.0",
691     "Net-SNMP",
692     "NetCDF",
693     "NGPL",
694     "NOSL",
695     "NPL-1.0",
696     "NPL-1.1",
697     "Newsletr",
698     "NLPL",
699     "Nokia",
700     "NPOSL-3.0",
701     "NLOD-1.0",
702     "Noweb",
703     "NRL",
704     "NTP",
705     "Nunit",
706     "OCLC-2.0",
707     "ODbL-1.0",
708     "PDDL-1.0",
709     "OCCT-PL",
710     "OGTSL",
711     "OLDAP-2.2.2",
712     "OLDAP-1.1",
713     "OLDAP-1.2",
714     "OLDAP-1.3",
715     "OLDAP-1.4",
716     "OLDAP-2.0",
717     "OLDAP-2.0.1",
718     "OLDAP-2.1",
719     "OLDAP-2.2",
720     "OLDAP-2.2.1",
721     "OLDAP-2.3",
722     "OLDAP-2.4",
723     "OLDAP-2.5",
724     "OLDAP-2.6",
725     "OLDAP-2.7",
726     "OLDAP-2.8",
727     "OML",
728     "OPL-1.0",
729     "OSL-1.0",
730     "OSL-1.1",
731     "OSL-2.0",
732     "OSL-2.1",
733     "OSL-3.0",
734     "OpenSSL",
735     "OSET-PL-2.1",
736     "PHP-3.0",
737     "PHP-3.01",
738     "Plexus",
739     "PostgreSQL",
740     "psfrag",
741     "psutils",
742     "Python-2.0",
743     "QPL-1.0",
744     "Qhull",
745     "Rdisc",
746     "RPSL-1.0",
747     "RPL-1.1",
748     "RPL-1.5",
749     "RHeCos-1.1",
750     "RSCPL",
751     "RSA-MD",
752     "Ruby",
753     "SAX-PD",
754     "Saxpath",
755     "SCEA",
756     "SWL",
757     "SMPPL",
758     "Sendmail",
759     "SGI-B-1.0",
760     "SGI-B-1.1",
761     "SGI-B-2.0",
762     "OFL-1.0",
763     "OFL-1.1",
764     "SimPL-2.0",
765     "Sleepycat",
766     "SNIA",
767     "Spencer-86",
768     "Spencer-94",
769     "Spencer-99",
770     "SMLNJ",
771     "SugarCRM-1.1.3",
772     "SISSL",
773     "SISSL-1.2",
774     "SPL-1.0",
775     "Watcom-1.0",
776     "TCL",
777     "TCP-wrappers",
778     "Unlicense",
779     "TMate",
780     "TORQUE-1.1",
781     "TOSL",
782     "Unicode-DFS-2015",
783     "Unicode-DFS-2016",
784     "Unicode-TOU",
785     "UPL-1.0",
786     "NCSA",
787     "Vim",
788     "VOSTROM",
789     "VSL-1.0",
790     "W3C-20150513",
791     "W3C-19980720",
792     "W3C",
793     "Wsuipa",
794     "Xnet",
795     "X11",
796     "Xerox",
797     "XFree86-1.1",
798     "xinetd",
799     "xpp",
800     "XSkat",
801     "YPL-1.0",
802     "YPL-1.1",
803     "Zed",
804     "Zend-2.0",
805     "Zimbra-1.3",
806     "Zimbra-1.4",
807     "Zlib",
808     "zlib-acknowledgement",
809     "ZPL-1.1",
810     "ZPL-2.0",
811     "ZPL-2.1",
812 ]
813
814 if __name__ == "__main__":
815     main()