├── easypypi
├── __init__.py
├── init_template.py
├── easypypi.ico
├── script_template.py
├── test_template.py
├── setup_template.py
├── utils.py
├── shared_functions.py
├── readme_template.md
├── licenses.py
├── test_easypypi.py
├── classifiers.py
├── easypypi.py
└── licenses.json
├── easypypi.png
├── screenshot.png
├── .gitattributes
├── LICENSE
├── .gitignore
├── setup.py
└── README.md
/easypypi/__init__.py:
--------------------------------------------------------------------------------
1 | from .easypypi import *
2 |
--------------------------------------------------------------------------------
/easypypi/init_template.py:
--------------------------------------------------------------------------------
1 | from .{self.name} import *
2 |
--------------------------------------------------------------------------------
/easypypi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PFython/easypypi/HEAD/easypypi.png
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PFython/easypypi/HEAD/screenshot.png
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/easypypi/easypypi.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PFython/easypypi/HEAD/easypypi/easypypi.ico
--------------------------------------------------------------------------------
/easypypi/script_template.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 |
4 | # {self.name}
5 | # Author: {self.author}
6 | # Created:{datetime.datetime.now()}
7 |
--------------------------------------------------------------------------------
/easypypi/test_template.py:
--------------------------------------------------------------------------------
1 | # Tests for {self.name}
2 | import pytest
3 | from .{self.name} import *
4 |
5 | class Test_Initialisation:
6 | def test_something(self):
7 | """ Something should happen when you run something() """
8 | assert something() == something_else
9 |
10 | class Test_Core_Functions:
11 | def test_something(self):
12 | """ Something should happen when you run something() """
13 | assert something() == something_else
14 |
15 | class Test_Edge_Cases:
16 | def test_something(self):
17 | """ Something should happen when you run something() """
18 | assert something() == something_else
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Peter Fison
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/easypypi/setup_template.py:
--------------------------------------------------------------------------------
1 | # Auto-generated by easyPyPI: https://github.com/PFython/easypypi
2 | # Preserve current formatting to ensure easyPyPI compatibility.
3 |
4 | from pathlib import Path
5 | from setuptools import find_packages
6 | from setuptools import setup
7 |
8 | NAME = ""
9 | GITHUB_USERNAME = ""
10 | VERSION = ""
11 | DESCRIPTION = ""
12 | LICENSE = ""
13 | AUTHOR = ""
14 | EMAIL = ""
15 | URL = ""
16 | KEYWORDS = ""
17 | CLASSIFIERS = ""
18 | REQUIREMENTS = ""
19 |
20 |
21 | def comma_split(text: str):
22 | """
23 | Returns a list of strings after splitting original string by commas
24 | Applied to KEYWORDS, CLASSIFIERS, and REQUIREMENTS
25 | """
26 | if type(text) == list:
27 | return [x.strip() for x in text]
28 | return [x.strip() for x in text.split(",")]
29 |
30 |
31 | if __name__ == "__main__":
32 | setup(
33 | name=NAME,
34 | packages=find_packages(),
35 | version=VERSION,
36 | license=LICENSE,
37 | description=DESCRIPTION,
38 | long_description=(Path(__file__).parent / "README.md").read_text(),
39 | long_description_content_type="text/markdown",
40 | author=AUTHOR,
41 | author_email=EMAIL,
42 | url=URL,
43 | download_url=f"{URL}/archive/{VERSION}.tar.gz",
44 | keywords=comma_split(KEYWORDS),
45 | install_requires=comma_split(REQUIREMENTS),
46 | classifiers=comma_split(CLASSIFIERS),
47 | package_data={"": ["*.md", "*.json", "*.png", "*.ico"], NAME: ["*.*"]},
48 | )
49 |
--------------------------------------------------------------------------------
/easypypi/utils.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | """
4 | @created: 09.12.20
5 | @author: felix
6 | """
7 | from pathlib import Path
8 |
9 | from PySimpleGUI.PySimpleGUI import ICON_BUY_ME_A_COFFEE
10 |
11 | # Mapping of variable names used within setup_template.py and final setup.py,
12 | # and Package attribute names.
13 | SETUP_FIELDS = {
14 | "AUTHOR": "author",
15 | "CLASSIFIERS": "classifiers",
16 | "DESCRIPTION": "description",
17 | "EMAIL": "email",
18 | "GITHUB_USERNAME": "Github_username",
19 | "KEYWORDS": "keywords",
20 | "LICENSE": "license_name_github",
21 | "NAME": "name",
22 | "REQUIREMENTS": "requirements",
23 | "URL": "url",
24 | "VERSION": "version",
25 | }
26 |
27 | # Main groups of Classifiers for setup.py; Values are input prompts
28 | GROUP_CLASSIFIERS = {
29 | "Development Status": "Classifiers (Development Status):",
30 | "Intended Audience": "Classifiers (Audience):",
31 | "Operating System": "Classifiers (OS):",
32 | "Programming Language :: Python": "Classifiers (Python Version):",
33 | "Topic": "Classifiers (Topic):",
34 | "License :: OSI Approved ::": "Classifiers (License):",
35 | }
36 |
37 | # Common replacements used to create final LICENSE text
38 | REPLACEMENTS = [
39 | "{self.author}",
40 | "{self.description}",
41 | "{self.email}",
42 | "{self.name}",
43 | "{self.Github_username}" "{datetime.datetime.now()}",
44 | ]
45 |
46 | # Global keyword arguments for PySimpleGUI popups:
47 | SG_KWARGS = {
48 | "title": "easyPyPI",
49 | "keep_on_top": True,
50 | "icon": Path(__file__).parent / "easypypi.ico",
51 | }
52 |
--------------------------------------------------------------------------------
/easypypi/shared_functions.py:
--------------------------------------------------------------------------------
1 | """
2 | Functions shared by easypypi.py and licenses.py
3 | Check: Separate file required to avoid circular import?
4 | """
5 |
6 | import os
7 |
8 |
9 | def create_file(filepath, content, **kwargs):
10 | """
11 | Create a new file using writelines, and backup if filepath==setup.py.
12 | Returns "file exists" if filepath already exists and overwrite = False
13 | """
14 | if isinstance(content, str):
15 | content = content.splitlines(True) # keep line breaks
16 | if filepath.is_file():
17 | if kwargs.get("overwrite"):
18 | if filepath.name == "setup.py":
19 | backup = filepath.with_name(f"{filepath.stem} - old.py")
20 | filepath.replace(backup)
21 | print(f"\n✓ Renamed {filepath.name} to:\n {backup.name}")
22 | else:
23 | os.remove(filepath)
24 | else:
25 | print(f"\nⓘ Existing file preserved:\n {filepath}")
26 | return "file exists"
27 | with filepath.open("a") as file:
28 | file.writelines(content)
29 | print(f"\n✓ Created new file:\n {filepath}")
30 |
31 |
32 | def update_line(script_lines, old_line_starts, new_value):
33 | """ Updates and returns script_lines, ready for writing to setup.py """
34 | for index, line in enumerate(script_lines.copy()):
35 | if line.lstrip().startswith(old_line_starts):
36 | try:
37 | if isinstance(new_value, list):
38 | # Add quotation marks unless list
39 | new_value = ", ".join(new_value)
40 | else:
41 | new_value = f'"{new_value}"'
42 | old_line = script_lines[index]
43 | script_lines[index] = old_line_starts + new_value.rstrip() + "\n"
44 | if old_line != script_lines[index]:
45 | print(
46 | f"\n✓ Updated script line {index + 1}:\n{script_lines[index].rstrip()[:400]}"
47 | )
48 | break # only update first occurrence
49 | except (IndexError, TypeError):
50 | print(new_value, type(new_value))
51 | return script_lines
52 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__
3 | __pycache__/
4 | *.py[cod]
5 | *$py.class
6 | *.pyc
7 |
8 | # C extensions
9 | *.so
10 |
11 | # Distribution / packaging
12 | .Python
13 | build/
14 | develop-eggs/
15 | dist/
16 | downloads/
17 | eggs/
18 | .eggs/
19 | lib/
20 | lib64/
21 | parts/
22 | sdist/
23 | var/
24 | wheels/
25 | pip-wheel-metadata/
26 | share/python-wheels/
27 | *.egg-info/
28 | .installed.cfg
29 | *.egg
30 | MANIFEST
31 |
32 | # PyInstaller
33 | # Usually these files are written by a python script from a template
34 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
35 | *.manifest
36 | *.spec
37 |
38 | # Installer logs
39 | pip-log.txt
40 | pip-delete-this-directory.txt
41 |
42 | # Unit test / coverage reports
43 | htmlcov/
44 | .tox/
45 | .nox/
46 | .coverage
47 | .coverage.*
48 | .cache
49 | nosetests.xml
50 | coverage.xml
51 | *.cover
52 | *.py,cover
53 | .hypothesis/
54 | .pytest_cache/
55 |
56 | # Translations
57 | *.mo
58 | *.pot
59 |
60 | # Django stuff:
61 | *.log
62 | local_settings.py
63 | db.sqlite3
64 | db.sqlite3-journal
65 |
66 | # Flask stuff:
67 | instance/
68 | .webassets-cache
69 |
70 | # Scrapy stuff:
71 | .scrapy
72 |
73 | # Sphinx documentation
74 | docs/_build/
75 |
76 | # PyBuilder
77 | target/
78 |
79 | # Jupyter Notebook
80 | .ipynb_checkpoints
81 |
82 | # IPython
83 | profile_default/
84 | ipython_config.py
85 |
86 | # pyenv
87 | .python-version
88 |
89 | # pipenv
90 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
92 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
93 | # install all needed dependencies.
94 | #Pipfile.lock
95 |
96 | # celery beat schedule file
97 | celerybeat-schedule
98 |
99 | # SageMath parsed files
100 | *.sage.py
101 |
102 | # Environments
103 | .env
104 | .venv
105 | env/
106 | venv/
107 | ENV/
108 | env.bak/
109 | venv.bak/
110 |
111 | # Spyder project settings
112 | .spyderproject
113 | .spyproject
114 |
115 | # Rope project settings
116 | .ropeproject
117 |
118 | # mkdocs documentation
119 | /site
120 |
121 | # mypy
122 | .mypy_cache/
123 | .dmypy.json
124 | dmypy.json
125 |
126 | # Pyre type checker
127 | .pyre/
128 |
129 |
130 | *.pptx
131 | *old.py
132 | *.tmp
133 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | # Auto-generated by easyPyPI: https://github.com/PFython/easypypi
2 | # Preserve current formatting to ensure easyPyPI compatibility.
3 |
4 | from pathlib import Path
5 | from setuptools import find_packages
6 | from setuptools import setup
7 |
8 | HERE = Path(__file__).parent
9 | NAME = "easypypi"
10 | GITHUB_USERNAME = "Pfython"
11 | VERSION = "2.0.5"
12 | DESCRIPTION = "By FAR the easiest and quickest way to publish your Python creations on PyPI so other people can just `pip install your_script`."
13 | LICENSE = "MIT License"
14 | AUTHOR = "Peter Fison"
15 | EMAIL = "peter@southwestlondon.tv"
16 | URL = "https://github.com/Pfython/easypypi"
17 | KEYWORDS = "easypypi, Peter Fison, Pfython, pip, package, publish, share, build, deploy, Python"
18 | CLASSIFIERS = "Development Status :: 5 - Production/Stable, Intended Audience :: Developers, Operating System :: OS Independent, Programming Language :: Python :: 3.6, Programming Language :: Python :: 3.7, Programming Language :: Python :: 3.8, Programming Language :: Python :: 3.9, Topic :: Documentation, Topic :: Software Development, Topic :: Software Development :: Build Tools, Topic :: Software Development :: Documentation, Topic :: Software Development :: Libraries :: Python Modules, Topic :: Software Development :: Version Control, Topic :: Software Development :: Version Control :: Git, Topic :: System :: Archiving :: Packaging, Topic :: System :: Installation/Setup, Topic :: System :: Software Distribution, Topic :: Utilities, License :: OSI Approved :: MIT License"
19 | REQUIREMENTS = "cleverdict, pysimplegui, click, twine, keyring, mechanicalsoup, pep440_version_utils"
20 |
21 |
22 | def comma_split(text: str):
23 | """
24 | Returns a list of strings after splitting original string by commas
25 | Applied to KEYWORDS, CLASSIFIERS, and REQUIREMENTS
26 | """
27 | if type(text) == list:
28 | return [x.strip() for x in text]
29 | return [x.strip() for x in text.split(",")]
30 |
31 |
32 | if __name__ == "__main__":
33 | setup(
34 | name=NAME,
35 | packages=find_packages(),
36 | version=VERSION,
37 | license=LICENSE,
38 | description=DESCRIPTION,
39 | long_description=(Path(__file__).parent / "README.md").read_text(),
40 | long_description_content_type="text/markdown",
41 | author=AUTHOR,
42 | author_email=EMAIL,
43 | url=URL,
44 | download_url=f"{URL}/archive/{VERSION}.tar.gz",
45 | keywords=comma_split(KEYWORDS),
46 | install_requires=comma_split(REQUIREMENTS),
47 | classifiers=comma_split(CLASSIFIERS),
48 | package_data={"": ["*.md", "*.json", "*.png", "*.ico"], NAME: ["*.*"]},
49 | )
50 |
--------------------------------------------------------------------------------
/easypypi/readme_template.md:
--------------------------------------------------------------------------------
1 | # `{self.name}`
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 
16 |
17 | ## CONTENTS
18 |
19 | 1. [OVERVIEW](#1.-OVERVIEW)
20 | 2. [INSTALLATION](#2.-INSTALLATION)
21 | 3. [BASIC USE](#3.-BASIC-USE)
22 | 4. [UNDER THE BONNET](#4.-UNDER-THE-BONNET)
23 | 5. [CONTRIBUTING](#5.-CONTRIBUTING)
24 | 6. [CREDITS](#6.-CREDITS)
25 | 7. [PAYING IT FORWARD](#7.-PAYING-IT-FORWARD)
26 |
27 |
28 | ## 1. OVERVIEW
29 | {self.description}
30 |
31 | ## 2. INSTALLATION
32 |
33 | pip install {self.name}
34 |
35 |
36 | ## 3. BASIC USE
37 |
38 | >>> import {self.name}
39 |
40 |
41 | ## 4. UNDER THE BONNET
42 |
43 | Describe any important inner workings of your Package, including API details.
44 |
45 | ## 5. CONTRIBUTING
46 |
47 | Contact {self.author} {self.email} or feel free to raise Pull Requests / Issue in the normal Github way.
48 |
49 | ## 6. CREDITS
50 |
51 | Who helped you or inspired you? What other packages are you using or have you modified?
52 |
53 | ## 7. PAYING IT FORWARD
54 |
55 | If `{self.name}` helps you save time and focus on more important things, please feel free to to show your appreciation by starring the repository on Github.
56 |
57 | I'd also be delighted if you wanted to:
58 |
59 |
60 |
--------------------------------------------------------------------------------
/easypypi/licenses.py:
--------------------------------------------------------------------------------
1 | import json
2 | from json import JSONDecodeError
3 | from pathlib import Path
4 | from cleverdict import CleverDict
5 | import requests
6 |
7 |
8 | def fetch_license_data():
9 | """
10 | Uses Github API to fetch basic information about popular license choices
11 | Rate limited to 60 queries per hour (unauthenticated).
12 | """
13 | api_links = {
14 | "MIT": "https://api.github.com/licenses/mit",
15 | "GPL": "https://api.github.com/licenses/gpl-3.0",
16 | "LGPL": "https://api.github.com/licenses/lgpl-3.0",
17 | "MPL": "https://api.github.com/licenses/mpl-2.0",
18 | "AGPL": "https://api.github.com/licenses/agpl-3.0",
19 | "Apache": "https://api.github.com/licenses/apache-2.0",
20 | "Unlicense": "https://api.github.com/licenses/unlicense",
21 | "Boost": "https://api.github.com/licenses/bsl-1.0",
22 | }
23 | licenses = [requests.get(api_link).json() for api_link in api_links.values()]
24 | return licenses
25 |
26 |
27 | def load_licenses_json():
28 | """
29 | Loads license metadata from licenses.json and converts each license to
30 | a cleverdict.
31 |
32 | Returns: List of 8 cleverdicts, one for each main license type
33 | """
34 | license_dict_path = Path(__file__).parent / "licenses.json"
35 | if license_dict_path.is_file():
36 | with license_dict_path.open("r") as file:
37 | license_dict = json.load(file)
38 | return [CleverDict(x) for x in license_dict]
39 | else:
40 | return []
41 |
42 |
43 | LICENSES = load_licenses_json()
44 |
45 | LICENSE_NAMES = {
46 | "MIT": "MIT License",
47 | "GPL-3.0": "GNU General Public License v3 (GPLv3)",
48 | "LGPL-3.0": "GNU Lesser General Public License v3 (LGPLv3)",
49 | "MPL-2.0": "Mozilla Public License 2.0 (MPL 2.0)",
50 | "AGPL-3.0": "GNU Affero General Public License v3",
51 | "Apache-2.0": "Apache Software License",
52 | "Unlicense": "The Unlicense (Unlicense)",
53 | "BSL-1.0": "Boost Software License 1.0 (BSL-1.0)",
54 | }
55 | # Key: spdx_id from licenses.json
56 | # Value: PyPI license name under 'License :: OSI Approved ::' Classifier.
57 |
58 | if __name__ == "__main__":
59 | """
60 | When run rather than imported, fetches the latest data for popluar software
61 | licenses and updates this script, starting "licenses_dict = ".
62 |
63 | licenses.json is imported by the main module easypypi.py
64 | """
65 | print("\n> Executing: licenses.py\n")
66 | HERE = Path(LICENSES_FILENAME).parent
67 | file = Path(LICENSES_FILENAME)
68 | valid_json = True
69 |
70 | try:
71 | json.load(file.open("r"))
72 | except JSONDecodeError:
73 | valid_json = False
74 |
75 | if file.exists() and valid_json:
76 | print(f"\nⓘ Existing file preserved:\n {file}")
77 | else:
78 | with file.open("w") as file:
79 | json.dump(fetch_license_data(), file)
80 | print(f"\n✓ Created new file:\n {file}")
81 |
--------------------------------------------------------------------------------
/easypypi/test_easypypi.py:
--------------------------------------------------------------------------------
1 | # Tests for easypypi
2 | import pytest
3 | from easypypi.easypypi import *
4 |
5 | sg.change_look_and_feel("DarkAmber")
6 |
7 |
8 | def backup_config():
9 | """
10 | Backs up current config file then deletes it to simulute first time use
11 | """
12 | global backup_filepath, kwargs_backup
13 | kwargs_backup = sg_kwargs.copy()
14 | if sg_kwargs.get("title"):
15 | del sg_kwargs["title"]
16 | backup_filepath = Package.config_filepath.with_name("config_backup.json")
17 | try:
18 | Package.config_filepath.replace(backup_filepath)
19 | print(f"\n ⓘ config.json moved to {backup_filepath}")
20 | except FileNotFoundError:
21 | print(
22 | f"\n ⓘ {Package.config_filepath} doesn't exist yet - no backup required."
23 | )
24 |
25 |
26 | def restore_config():
27 | """ Restores previously copied config file """
28 | global sg_kwargs
29 | sg_kwargs = kwargs_backup.copy()
30 | backup_filepath.replace(Package.config_filepath)
31 | print("\n ⓘ Original config.json restored.")
32 |
33 |
34 | def notify(prompt):
35 | """ Popup an auto-close notification with instructions about a test """
36 | sg.popup_auto_close(prompt, title="Testing", **sg_kwargs, auto_close_duration=8)
37 |
38 |
39 | def check_credentials(package, account):
40 | assert getattr(package, f"{account}_username") == "testuser"
41 | assert getattr(package, f"{account}_password") == "testpw"
42 | assert (
43 | keyring.get_password(account, getattr(package, account + "_username"))
44 | == "testpw"
45 | )
46 |
47 |
48 | def breakdown_credentials(package, account):
49 | """ Deletes username/password attributes and removes from keyring """
50 | # Get a copy of username before deleting:
51 | username = getattr(package, f"{account}_username")
52 | package.delete_credentials(account)
53 | assert not hasattr(package, f"{account}_username")
54 | assert not hasattr(package, f"{account}_password")
55 | assert not keyring.get_password(account, username)
56 |
57 |
58 | class Test_First_Time_Use:
59 | def test_defaults(self):
60 | """ Check initial default values are conformant """
61 | backup_config()
62 | notify(
63 | "When prompted, please click OK twice to select\nthe default NAME and PARENT FOLDER..."
64 | )
65 | package = Package(_break=True)
66 | assert package.name == "as_easy_as_pie"
67 | assert package.version == "0.1"
68 | assert len(package.script_lines) == 47 # Depends on setup_template.py
69 | assert package.setup_filepath_str.endswith("setup.py")
70 | assert sorted(package.get_aliases()) == [
71 | "name",
72 | "script_lines",
73 | "setup_filepath_str",
74 | "version",
75 | ]
76 | restore_config()
77 |
78 | def test_defaults_with_name(self):
79 | """ Check initial default values when name is supplied as argument """
80 | backup_config()
81 | notify("When prompted, click OK once\nto select the default PARENT FOLDER...")
82 | package = Package("test", _break=True)
83 | assert package.name == "test"
84 | assert package.version == "0.1"
85 | assert len(package.script_lines) == 47 # Depends on setup_template.py
86 | assert package.setup_filepath_str.endswith("setup.py")
87 | assert sorted(package.get_aliases()) == [
88 | "name",
89 | "script_lines",
90 | "setup_filepath_str",
91 | "version",
92 | ]
93 | restore_config()
94 |
95 | def test_defaults_values(self):
96 | """ Check derived default values. """
97 | backup_config()
98 | notify("When prompted, click OK once\nto select the default PARENT FOLDER...")
99 | package = Package("test", _break=True)
100 | assert package.get_default_version() == "0.1"
101 | package.Github_username = "testuser"
102 | assert package.get_default_url() == "https://github.com/testuser/test"
103 | assert package.name in package.get_default_keywords()
104 | assert package.author in package.get_default_keywords()
105 | assert package.Github_username in package.get_default_keywords()
106 | assert "cleverdict" in package.get_default_requirements()
107 | restore_config()
108 |
109 | def test_Test_PyPI_credentials(self):
110 | """
111 | upload_with_twine should prompt for username & password if it can't
112 | find them in `keyring`
113 | """
114 | backup_config()
115 | notify("When prompted, click OK once\nto select the default PARENT FOLDER...")
116 | package = Package("test", _break=True)
117 | notify(
118 | f"1st Run: Click the 'Test PyPI' button then enter:\n'testuser' and 'testpw' for username and password"
119 | )
120 | package.upload_with_twine()
121 | notify(f"Expected error:\n\nCannot find file (or expand pattern): ...")
122 | check_credentials(package, "Test_PyPI")
123 | notify(
124 | f"2nd Run: Click the 'Test PyPI' button.\n\nYou shouldn't need to re-enter username or password"
125 | )
126 | package.upload_with_twine()
127 | breakdown_credentials(package, "Test_PyPI")
128 | restore_config()
129 |
130 | def test_PyPI_credentials(self):
131 | """
132 | upload_with_twine should prompt for username & password if it can't
133 | find them in `keyring`
134 | """
135 | backup_config()
136 | notify("When prompted, click OK once\nto select the default PARENT FOLDER...")
137 | package = Package("test", _break=True)
138 | notify(
139 | f"1st Run: Click the 'PyPI' button then enter:\n'testuser' and 'testpw' for username and password"
140 | )
141 | package.upload_with_twine()
142 | notify(f"Expected error:\n\nCannot find file (or expand pattern): ...")
143 | check_credentials(package, "PyPI")
144 | notify(
145 | f"2nd Run: Click the 'PyPI' button.\n\nYou shouldn't need to re-enter username or password"
146 | )
147 | package.upload_with_twine()
148 | breakdown_credentials(package, "PyPI")
149 | restore_config()
150 |
151 | def test_Github_credentials(self):
152 | """
153 | upload_with_twine should prompt for username & password if it can't
154 | find them in `keyring`
155 | """
156 | backup_config()
157 | notify("When prompted, click OK once\nto select the default PARENT FOLDER...")
158 | package = Package("test", _break=True)
159 | package.url = "https://github.com/PFython/easypypi"
160 | notify(
161 | f"1st Run: Click the 'Yes' button then enter:\n'testuser' and 'testpw' for username and password"
162 | )
163 | try:
164 | package.create_github_repository()
165 | except LinkNotFoundError:
166 | notify(f"Expected error - not real login credentials")
167 | check_credentials(package, account)
168 | notify(
169 | f"2nd Run: Click the 'Yes' button.\n\nYou shouldn't need to re-enter username or password"
170 | )
171 | try:
172 | package.create_github_repository()
173 | except LinkNotFoundError:
174 | notify(f"Expected error - not real login credentials")
175 | breakdown_credentials(package, "Github")
176 | restore_config()
177 |
178 | def test_load_defaults(self):
179 | """ Tests the Entry Point: load_defaults() """
180 | # Requires an existing setup.py file
181 | # Should NOT prompt for name again?
182 | # Check for creation of package folder
183 |
184 | def test_review(self):
185 | """ Tests the Entry Point: review() """
186 | pass
187 |
188 | def test_generate(self):
189 | """ Tests the Entry Point: generate() """
190 | pass
191 |
192 | def test_upload(self):
193 | """ Tests the Entry Point: upload() """
194 | pass
195 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # `easyPyPI`
2 | 
3 | `easyPyPI` (Pronounced "Easy Pie-Pea-Eye") is a quick, simple, one-size-fits-all solution for sharing your Python creations on the [Python Package Index](https://pypi.org/) (**PyPI**) so others can just `pip install your_script` with no fuss.
4 |
5 | `easyPyPI` is mainly intended for Pythonistas who've been put off publishing to **PyPI** before now or tried it but, like the author (pictured below) thought:
6 |
7 | > "*There **must** be an easier way to do this!*"
8 |
9 | 
10 |
11 | Well now there is! With `easyPyPI` you don't have to spend hours...
12 |
13 | - Reading tutorials about `distutils` only to realise `setuptools` is what you need.
14 | - Reading yet more tutorials just to work out the essential steps (below).
15 | - Manually creating a folder structure and moving your script(s) there.
16 | - Manually creating a skeleton `README.md`
17 | - Manually creating a skeleton `__init__.py`
18 | - Manually creating a skeleton `test_yourscript.py`
19 | - Manually creating and updating a `LICENSE`
20 | - Manually creating a `setup.py` script and wondering what on earth to put in it
21 | - Remembering to update your Version number each time you publish
22 | - Running `setup.py` in just the right way to create your distribution files
23 | - Installing and running `twine` in just the right way to publish your package to **Test PyPI** then **PyPI**
24 | - Creating a new Repository on Github and uploading the folders and files you just created.
25 | - Setting environment variables or creating a `.pypirc` file for `twine` to use
26 | - Getting your **Test PyPI** and **PyPI** credentials mixed up
27 |
28 | Enjoy!
29 |
30 | # 1. QUICKSTART
31 |
32 | c:\> pip install easypypi
33 |
34 | >>> from easypypi import Package
35 | >>> package = Package()
36 |
37 | # or:
38 | >>> package = Package("your_package_name")
39 |
40 | Then just follow the prompts to provide the information required to describe your package on **PyPI**. No knowledge of `setuptools`, `twine`, or how to write a `setup.py` script required.
41 |
42 | 
43 |
44 | Once you've gone through the creation process fully (or even partially), your responses are stored in a JSON config file located in the 'usual' settings folder for your Operating System. When you start again `easyPyPI` will helpfully remember your previous answers.
45 |
46 | 
47 |
48 | When you've added all the information you want to include with your package, click the `Upversion` button to update your [PEP440](https://www.python.org/dev/peps/pep-0440/) compliant version number as required, then click the `Generate` button to create a basic folder structure and populate it with all the standard files you'll need such as a README and LICENSE.
49 |
50 | The next time you run `easyPyPI` with an existing package name and folder location, it will automatically import the contents of the latest `setup.py` file it finds (in preference to `config.json`), so if you want you can make updates directly to `setup.py` but be careful to keep the same basic format so `easyPyPI` has a chance of finding what it needs!
51 |
52 | Finally, when you're ready you can `Publish` your package folders and files to PyPI and/or Test PyPI, and even automatically create an initial Repository on Github. There are buttons for quickly Registering for a PyPI, Test PyPI, and/or Github account if you don't already have that sorted, and also for installing Git if it's your first time using that too.
53 |
54 | # 2. UPDATING YOUR PACKAGE
55 |
56 | For more precise control you can close the GUI after creating your `package` object, and manually get and set all of the data encapsulated in it. Thanks to the magic of [`cleverdict`](https://github.com/pfython/cleverdict) you can do this *either* using `object.attribute` or `dictionary['key']` notation, whichever you prefer:
57 |
58 | >>> package.name
59 | 'as_easy_as_pie'
60 |
61 | >>> package['email'] = "new@name.com"
62 |
63 | >>> package['license_dict'].name
64 | 'MIT License'
65 |
66 | >>> package.version = "2.0.1a1"
67 |
68 | # 3. OTHER FEATURES
69 |
70 | To find where `easyPyPI` and its default templates were installed:
71 |
72 | >>> package.easypypi_dirpath
73 |
74 | To find the location of your JSON config file to manually inspect, edit, or `os.remove()` it:
75 |
76 | >>> package.config_path
77 | # This should be under the default Settings folder for your Operating System.
78 |
79 | To locate your package's `setup.py`:
80 |
81 | >>> package.setup_filepath
82 |
83 | If you have extra files which you want to copy into the new folder structure, including the main script file you might have already created before deciding to make it into a package:
84 |
85 | >>> package.copy_other_files()
86 |
87 | To see what else you can play with using your `Package` object:
88 |
89 | >>> package.keys()
90 | # You can then get/set values using object.attribute or dictionary['key'] notation
91 |
92 | `esyPyPI` uses `keyring` to store credentials. To manage these credentials manually:
93 |
94 | >>> account = "Github" # or "PyPI" or "Test_PyPI"
95 | >>> package.Github_username = "testuser"
96 |
97 | >>> package.get_username(account) == package.Github_username == "testuser"
98 | True
99 |
100 | >>> package.set_password(account, "testpw") # Prompts for pw if none given
101 | True
102 |
103 | >>> package.Github_password
104 | 'testpw'
105 |
106 | >>> package.delete_credentials(account)
107 |
108 | # 4. CONTRIBUTING
109 | `easyPyPI` was developed in the author's spare time and is hopefully at a stage where it works well and reliably for the original use case. If you'd like to get get involved please do log any Issues (bugs or feature requests) on Github, or if you feel motiviated to work on any of the existing Issues that would be brilliant!
110 |
111 | If you're tinkering with the code and have just **Cloned** it, you'll probably need to be in the parent directory/parent under which you copied `easyPyPI` and use the following `import` incantation:
112 |
113 | >>> from easypypi.easypypi import *
114 |
115 | If you excited enough by the potential of this package to contribute some code, please follow this simple process:
116 |
117 | - **Fork** this repository. Also STAR this repository for bonus karma!
118 | - Create a new **Branch** for the issue or feature you're working on.
119 | - Create a separate `test_xyz.py` script to accompany any changes you make, and document your tests (and any new code) clearly enough that they'll tell us everything we need to know about your rationale and implementation approach.
120 | - When you're ready and the new code passes all your tests, create a **Pull Request** from your **Branch** back to the **Main Branch** of this repository.
121 |
122 | If you'd be kind enough to follow that approach it'll help speed things on their way and cause less brain-ache all round. Thank you, and we can't wait to hear people's ideas!
123 |
124 | You can also get in contact on [Twitter](https://twitter.com/appawsom), and we're currently dabbling with the [CodeStream](https://marketplace.visualstudio.com/items?itemName=CodeStream.codestream) extension for VS Code which seems to have some helpful collaborative features, so perhaps we can connect with that too?
125 |
126 | # 5. CREDITS
127 |
128 | Many thanks to the creators of the following awesome packages that `easyPyPI` makes use of 'under the bonnet':
129 |
130 | - [`PySimpleGUI`- ](https://github.com/PySimpleGUI/PySimpleGUI) - used to built a nice interface that makes things even quicker and easier.
131 | - [`Click`- ](https://github.com/pallets/click) - used to get the most suitable (platform specific) folder path for storing config.json.
132 | - [`MechanicalSoup`- ](https://github.com/MechanicalSoup/MechanicalSoup) - used to automatically login to Github and create/push an initial repository.
133 | - [`Keyring`- ](https://github.com/jaraco/keyring) - used to store and retrieve account credentials securely.
134 | - [`pep440_version_utils`- ](https://github.com/m-vdb/pep440-version-utils)` -`- used to automatically upversion micro, minor, and major version numbers.
135 | - [`Twine`](https://github.com/pypa/twine) - the "Go To" utility for uploading packages securely to PyPI and Test PyPI.
136 |
137 | # 6. PAYING IT FORWARD
138 |
139 | If `easyPyPI` helps you save time and focus on more important things, please show your appreciation by at least starring this repository on Github or even better:
140 |
141 |
142 |
143 | Yummy - thank you!
144 |
145 |
--------------------------------------------------------------------------------
/easypypi/classifiers.py:
--------------------------------------------------------------------------------
1 | import requests
2 |
3 |
4 | def get_classifiers():
5 | """ Returns an up to date list of classifiers from PyPI """
6 | page = requests.get("https://pypi.org/classifiers/").text
7 | page = page.split("List of classifiers
")[1].split('data-clipboard-text="')
8 | return [x.split('"', 1)[0] for x in page[1:]]
9 |
10 |
11 | CLASSIFIER_LIST = [
12 | "Development Status :: 1 - Planning",
13 | "Development Status :: 2 - Pre-Alpha",
14 | "Development Status :: 3 - Alpha",
15 | "Development Status :: 4 - Beta",
16 | "Development Status :: 5 - Production/Stable",
17 | "Development Status :: 6 - Mature",
18 | "Development Status :: 7 - Inactive",
19 | "Environment :: Console",
20 | "Environment :: Console :: Curses",
21 | "Environment :: Console :: Framebuffer",
22 | "Environment :: Console :: Newt",
23 | "Environment :: Console :: svgalib",
24 | "Environment :: GPU",
25 | "Environment :: GPU :: NVIDIA CUDA",
26 | "Environment :: GPU :: NVIDIA CUDA :: 1.0",
27 | "Environment :: GPU :: NVIDIA CUDA :: 1.1",
28 | "Environment :: GPU :: NVIDIA CUDA :: 10.0",
29 | "Environment :: GPU :: NVIDIA CUDA :: 10.1",
30 | "Environment :: GPU :: NVIDIA CUDA :: 10.2",
31 | "Environment :: GPU :: NVIDIA CUDA :: 11.0",
32 | "Environment :: GPU :: NVIDIA CUDA :: 11.1",
33 | "Environment :: GPU :: NVIDIA CUDA :: 2.0",
34 | "Environment :: GPU :: NVIDIA CUDA :: 2.1",
35 | "Environment :: GPU :: NVIDIA CUDA :: 2.2",
36 | "Environment :: GPU :: NVIDIA CUDA :: 2.3",
37 | "Environment :: GPU :: NVIDIA CUDA :: 3.0",
38 | "Environment :: GPU :: NVIDIA CUDA :: 3.1",
39 | "Environment :: GPU :: NVIDIA CUDA :: 3.2",
40 | "Environment :: GPU :: NVIDIA CUDA :: 4.0",
41 | "Environment :: GPU :: NVIDIA CUDA :: 4.1",
42 | "Environment :: GPU :: NVIDIA CUDA :: 4.2",
43 | "Environment :: GPU :: NVIDIA CUDA :: 5.0",
44 | "Environment :: GPU :: NVIDIA CUDA :: 5.5",
45 | "Environment :: GPU :: NVIDIA CUDA :: 6.0",
46 | "Environment :: GPU :: NVIDIA CUDA :: 6.5",
47 | "Environment :: GPU :: NVIDIA CUDA :: 7.0",
48 | "Environment :: GPU :: NVIDIA CUDA :: 7.5",
49 | "Environment :: GPU :: NVIDIA CUDA :: 8.0",
50 | "Environment :: GPU :: NVIDIA CUDA :: 9.0",
51 | "Environment :: GPU :: NVIDIA CUDA :: 9.1",
52 | "Environment :: GPU :: NVIDIA CUDA :: 9.2",
53 | "Environment :: Handhelds/PDA's",
54 | "Environment :: MacOS X",
55 | "Environment :: MacOS X :: Aqua",
56 | "Environment :: MacOS X :: Carbon",
57 | "Environment :: MacOS X :: Cocoa",
58 | "Environment :: No Input/Output (Daemon)",
59 | "Environment :: OpenStack",
60 | "Environment :: Other Environment",
61 | "Environment :: Plugins",
62 | "Environment :: Web Environment",
63 | "Environment :: Web Environment :: Buffet",
64 | "Environment :: Web Environment :: Mozilla",
65 | "Environment :: Web Environment :: ToscaWidgets",
66 | "Environment :: Win32 (MS Windows)",
67 | "Environment :: X11 Applications",
68 | "Environment :: X11 Applications :: GTK",
69 | "Environment :: X11 Applications :: Gnome",
70 | "Environment :: X11 Applications :: KDE",
71 | "Environment :: X11 Applications :: Qt",
72 | "Framework :: AWS CDK",
73 | "Framework :: AWS CDK :: 1",
74 | "Framework :: AiiDA",
75 | "Framework :: AsyncIO",
76 | "Framework :: BEAT",
77 | "Framework :: BFG",
78 | "Framework :: Bob",
79 | "Framework :: Bottle",
80 | "Framework :: Buildout",
81 | "Framework :: Buildout :: Extension",
82 | "Framework :: Buildout :: Recipe",
83 | "Framework :: CastleCMS",
84 | "Framework :: CastleCMS :: Theme",
85 | "Framework :: Chandler",
86 | "Framework :: CherryPy",
87 | "Framework :: CubicWeb",
88 | "Framework :: Dash",
89 | "Framework :: Django",
90 | "Framework :: Django :: 1.10",
91 | "Framework :: Django :: 1.11",
92 | "Framework :: Django :: 1.4",
93 | "Framework :: Django :: 1.5",
94 | "Framework :: Django :: 1.6",
95 | "Framework :: Django :: 1.7",
96 | "Framework :: Django :: 1.8",
97 | "Framework :: Django :: 1.9",
98 | "Framework :: Django :: 2.0",
99 | "Framework :: Django :: 2.1",
100 | "Framework :: Django :: 2.2",
101 | "Framework :: Django :: 3.0",
102 | "Framework :: Django :: 3.1",
103 | "Framework :: Django CMS",
104 | "Framework :: Django CMS :: 3.4",
105 | "Framework :: Django CMS :: 3.5",
106 | "Framework :: Django CMS :: 3.6",
107 | "Framework :: Django CMS :: 3.7",
108 | "Framework :: Django CMS :: 3.8",
109 | "Framework :: Flake8",
110 | "Framework :: Flask",
111 | "Framework :: Hypothesis",
112 | "Framework :: IDLE",
113 | "Framework :: IPython",
114 | "Framework :: Jupyter",
115 | "Framework :: Kedro",
116 | "Framework :: Lektor",
117 | "Framework :: Masonite",
118 | "Framework :: Matplotlib",
119 | "Framework :: Nengo",
120 | "Framework :: Odoo",
121 | "Framework :: Opps",
122 | "Framework :: Paste",
123 | "Framework :: Pelican",
124 | "Framework :: Pelican :: Plugins",
125 | "Framework :: Pelican :: Themes",
126 | "Framework :: Plone",
127 | "Framework :: Plone :: 3.2",
128 | "Framework :: Plone :: 3.3",
129 | "Framework :: Plone :: 4.0",
130 | "Framework :: Plone :: 4.1",
131 | "Framework :: Plone :: 4.2",
132 | "Framework :: Plone :: 4.3",
133 | "Framework :: Plone :: 5.0",
134 | "Framework :: Plone :: 5.1",
135 | "Framework :: Plone :: 5.2",
136 | "Framework :: Plone :: 5.3",
137 | "Framework :: Plone :: 6.0",
138 | "Framework :: Plone :: Addon",
139 | "Framework :: Plone :: Core",
140 | "Framework :: Plone :: Theme",
141 | "Framework :: Pylons",
142 | "Framework :: Pyramid",
143 | "Framework :: Pytest",
144 | "Framework :: Review Board",
145 | "Framework :: Robot Framework",
146 | "Framework :: Robot Framework :: Library",
147 | "Framework :: Robot Framework :: Tool",
148 | "Framework :: Scrapy",
149 | "Framework :: Setuptools Plugin",
150 | "Framework :: Sphinx",
151 | "Framework :: Sphinx :: Extension",
152 | "Framework :: Sphinx :: Theme",
153 | "Framework :: Trac",
154 | "Framework :: Trio",
155 | "Framework :: Tryton",
156 | "Framework :: TurboGears",
157 | "Framework :: TurboGears :: Applications",
158 | "Framework :: TurboGears :: Widgets",
159 | "Framework :: Twisted",
160 | "Framework :: Wagtail",
161 | "Framework :: Wagtail :: 1",
162 | "Framework :: Wagtail :: 2",
163 | "Framework :: ZODB",
164 | "Framework :: Zope",
165 | "Framework :: Zope :: 2",
166 | "Framework :: Zope :: 3",
167 | "Framework :: Zope :: 4",
168 | "Framework :: Zope :: 5",
169 | "Framework :: Zope2",
170 | "Framework :: Zope3",
171 | "Framework :: napari",
172 | "Framework :: tox",
173 | "Intended Audience :: Customer Service",
174 | "Intended Audience :: Developers",
175 | "Intended Audience :: Education",
176 | "Intended Audience :: End Users/Desktop",
177 | "Intended Audience :: Financial and Insurance Industry",
178 | "Intended Audience :: Healthcare Industry",
179 | "Intended Audience :: Information Technology",
180 | "Intended Audience :: Legal Industry",
181 | "Intended Audience :: Manufacturing",
182 | "Intended Audience :: Other Audience",
183 | "Intended Audience :: Religion",
184 | "Intended Audience :: Science/Research",
185 | "Intended Audience :: System Administrators",
186 | "Intended Audience :: Telecommunications Industry",
187 | "License :: Aladdin Free Public License (AFPL)",
188 | "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
189 | "License :: CeCILL-B Free Software License Agreement (CECILL-B)",
190 | "License :: CeCILL-C Free Software License Agreement (CECILL-C)",
191 | "License :: DFSG approved",
192 | "License :: Eiffel Forum License (EFL)",
193 | "License :: Free For Educational Use",
194 | "License :: Free For Home Use",
195 | "License :: Free To Use But Restricted",
196 | "License :: Free for non-commercial use",
197 | "License :: Freely Distributable",
198 | "License :: Freeware",
199 | "License :: GUST Font License 1.0",
200 | "License :: GUST Font License 2006-09-30",
201 | "License :: Netscape Public License (NPL)",
202 | "License :: Nokia Open Source License (NOKOS)",
203 | "License :: OSI Approved",
204 | "License :: OSI Approved :: Academic Free License (AFL)",
205 | "License :: OSI Approved :: Apache Software License",
206 | "License :: OSI Approved :: Apple Public Source License",
207 | "License :: OSI Approved :: Artistic License",
208 | "License :: OSI Approved :: Attribution Assurance License",
209 | "License :: OSI Approved :: BSD License",
210 | "License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)",
211 | "License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)",
212 | "License :: OSI Approved :: Common Development and Distribution License 1.0 (CDDL-1.0)",
213 | "License :: OSI Approved :: Common Public License",
214 | "License :: OSI Approved :: Eclipse Public License 1.0 (EPL-1.0)",
215 | "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)",
216 | "License :: OSI Approved :: Eiffel Forum License",
217 | "License :: OSI Approved :: European Union Public Licence 1.0 (EUPL 1.0)",
218 | "License :: OSI Approved :: European Union Public Licence 1.1 (EUPL 1.1)",
219 | "License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)",
220 | "License :: OSI Approved :: GNU Affero General Public License v3",
221 | "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
222 | "License :: OSI Approved :: GNU Free Documentation License (FDL)",
223 | "License :: OSI Approved :: GNU General Public License (GPL)",
224 | "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
225 | "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
226 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
227 | "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
228 | "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
229 | "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
230 | "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
231 | "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
232 | "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
233 | "License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)",
234 | "License :: OSI Approved :: IBM Public License",
235 | "License :: OSI Approved :: ISC License (ISCL)",
236 | "License :: OSI Approved :: Intel Open Source License",
237 | "License :: OSI Approved :: Jabber Open Source License",
238 | "License :: OSI Approved :: MIT License",
239 | "License :: OSI Approved :: MITRE Collaborative Virtual Workspace License (CVW)",
240 | "License :: OSI Approved :: MirOS License (MirOS)",
241 | "License :: OSI Approved :: Motosoto License",
242 | "License :: OSI Approved :: Mozilla Public License 1.0 (MPL)",
243 | "License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)",
244 | "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
245 | "License :: OSI Approved :: Nethack General Public License",
246 | "License :: OSI Approved :: Nokia Open Source License",
247 | "License :: OSI Approved :: Open Group Test Suite License",
248 | "License :: OSI Approved :: Open Software License 3.0 (OSL-3.0)",
249 | "License :: OSI Approved :: PostgreSQL License",
250 | "License :: OSI Approved :: Python License (CNRI Python License)",
251 | "License :: OSI Approved :: Python Software Foundation License",
252 | "License :: OSI Approved :: Qt Public License (QPL)",
253 | "License :: OSI Approved :: Ricoh Source Code Public License",
254 | "License :: OSI Approved :: SIL Open Font License 1.1 (OFL-1.1)",
255 | "License :: OSI Approved :: Sleepycat License",
256 | "License :: OSI Approved :: Sun Industry Standards Source License (SISSL)",
257 | "License :: OSI Approved :: Sun Public License",
258 | "License :: OSI Approved :: The Unlicense (Unlicense)",
259 | "License :: OSI Approved :: Universal Permissive License (UPL)",
260 | "License :: OSI Approved :: University of Illinois/NCSA Open Source License",
261 | "License :: OSI Approved :: Vovida Software License 1.0",
262 | "License :: OSI Approved :: W3C License",
263 | "License :: OSI Approved :: X.Net License",
264 | "License :: OSI Approved :: Zope Public License",
265 | "License :: OSI Approved :: zlib/libpng License",
266 | "License :: Other/Proprietary License",
267 | "License :: Public Domain",
268 | "License :: Repoze Public License",
269 | "Natural Language :: Afrikaans",
270 | "Natural Language :: Arabic",
271 | "Natural Language :: Basque",
272 | "Natural Language :: Bengali",
273 | "Natural Language :: Bosnian",
274 | "Natural Language :: Bulgarian",
275 | "Natural Language :: Cantonese",
276 | "Natural Language :: Catalan",
277 | "Natural Language :: Chinese (Simplified)",
278 | "Natural Language :: Chinese (Traditional)",
279 | "Natural Language :: Croatian",
280 | "Natural Language :: Czech",
281 | "Natural Language :: Danish",
282 | "Natural Language :: Dutch",
283 | "Natural Language :: English",
284 | "Natural Language :: Esperanto",
285 | "Natural Language :: Finnish",
286 | "Natural Language :: French",
287 | "Natural Language :: Galician",
288 | "Natural Language :: German",
289 | "Natural Language :: Greek",
290 | "Natural Language :: Hebrew",
291 | "Natural Language :: Hindi",
292 | "Natural Language :: Hungarian",
293 | "Natural Language :: Icelandic",
294 | "Natural Language :: Indonesian",
295 | "Natural Language :: Irish",
296 | "Natural Language :: Italian",
297 | "Natural Language :: Japanese",
298 | "Natural Language :: Javanese",
299 | "Natural Language :: Korean",
300 | "Natural Language :: Latin",
301 | "Natural Language :: Latvian",
302 | "Natural Language :: Lithuanian",
303 | "Natural Language :: Macedonian",
304 | "Natural Language :: Malay",
305 | "Natural Language :: Marathi",
306 | "Natural Language :: Nepali",
307 | "Natural Language :: Norwegian",
308 | "Natural Language :: Panjabi",
309 | "Natural Language :: Persian",
310 | "Natural Language :: Polish",
311 | "Natural Language :: Portuguese",
312 | "Natural Language :: Portuguese (Brazilian)",
313 | "Natural Language :: Romanian",
314 | "Natural Language :: Russian",
315 | "Natural Language :: Serbian",
316 | "Natural Language :: Slovak",
317 | "Natural Language :: Slovenian",
318 | "Natural Language :: Spanish",
319 | "Natural Language :: Swedish",
320 | "Natural Language :: Tamil",
321 | "Natural Language :: Telugu",
322 | "Natural Language :: Thai",
323 | "Natural Language :: Tibetan",
324 | "Natural Language :: Turkish",
325 | "Natural Language :: Ukrainian",
326 | "Natural Language :: Urdu",
327 | "Natural Language :: Vietnamese",
328 | "Operating System :: Android",
329 | "Operating System :: BeOS",
330 | "Operating System :: MacOS",
331 | "Operating System :: MacOS :: MacOS 9",
332 | "Operating System :: MacOS :: MacOS X",
333 | "Operating System :: Microsoft",
334 | "Operating System :: Microsoft :: MS-DOS",
335 | "Operating System :: Microsoft :: Windows",
336 | "Operating System :: Microsoft :: Windows :: Windows 10",
337 | "Operating System :: Microsoft :: Windows :: Windows 3.1 or Earlier",
338 | "Operating System :: Microsoft :: Windows :: Windows 7",
339 | "Operating System :: Microsoft :: Windows :: Windows 8",
340 | "Operating System :: Microsoft :: Windows :: Windows 8.1",
341 | "Operating System :: Microsoft :: Windows :: Windows 95/98/2000",
342 | "Operating System :: Microsoft :: Windows :: Windows CE",
343 | "Operating System :: Microsoft :: Windows :: Windows NT/2000",
344 | "Operating System :: Microsoft :: Windows :: Windows Server 2003",
345 | "Operating System :: Microsoft :: Windows :: Windows Server 2008",
346 | "Operating System :: Microsoft :: Windows :: Windows Vista",
347 | "Operating System :: Microsoft :: Windows :: Windows XP",
348 | "Operating System :: OS Independent",
349 | "Operating System :: OS/2",
350 | "Operating System :: Other OS",
351 | "Operating System :: PDA Systems",
352 | "Operating System :: POSIX",
353 | "Operating System :: POSIX :: AIX",
354 | "Operating System :: POSIX :: BSD",
355 | "Operating System :: POSIX :: BSD :: BSD/OS",
356 | "Operating System :: POSIX :: BSD :: FreeBSD",
357 | "Operating System :: POSIX :: BSD :: NetBSD",
358 | "Operating System :: POSIX :: BSD :: OpenBSD",
359 | "Operating System :: POSIX :: GNU Hurd",
360 | "Operating System :: POSIX :: HP-UX",
361 | "Operating System :: POSIX :: IRIX",
362 | "Operating System :: POSIX :: Linux",
363 | "Operating System :: POSIX :: Other",
364 | "Operating System :: POSIX :: SCO",
365 | "Operating System :: POSIX :: SunOS/Solaris",
366 | "Operating System :: PalmOS",
367 | "Operating System :: RISC OS",
368 | "Operating System :: Unix",
369 | "Operating System :: iOS",
370 | "Programming Language :: APL",
371 | "Programming Language :: ASP",
372 | "Programming Language :: Ada",
373 | "Programming Language :: Assembly",
374 | "Programming Language :: Awk",
375 | "Programming Language :: Basic",
376 | "Programming Language :: C",
377 | "Programming Language :: C#",
378 | "Programming Language :: C++",
379 | "Programming Language :: Cold Fusion",
380 | "Programming Language :: Cython",
381 | "Programming Language :: Delphi/Kylix",
382 | "Programming Language :: Dylan",
383 | "Programming Language :: Eiffel",
384 | "Programming Language :: Emacs-Lisp",
385 | "Programming Language :: Erlang",
386 | "Programming Language :: Euler",
387 | "Programming Language :: Euphoria",
388 | "Programming Language :: F#",
389 | "Programming Language :: Forth",
390 | "Programming Language :: Fortran",
391 | "Programming Language :: Haskell",
392 | "Programming Language :: Java",
393 | "Programming Language :: JavaScript",
394 | "Programming Language :: Kotlin",
395 | "Programming Language :: Lisp",
396 | "Programming Language :: Logo",
397 | "Programming Language :: ML",
398 | "Programming Language :: Modula",
399 | "Programming Language :: OCaml",
400 | "Programming Language :: Object Pascal",
401 | "Programming Language :: Objective C",
402 | "Programming Language :: Other",
403 | "Programming Language :: Other Scripting Engines",
404 | "Programming Language :: PHP",
405 | "Programming Language :: PL/SQL",
406 | "Programming Language :: PROGRESS",
407 | "Programming Language :: Pascal",
408 | "Programming Language :: Perl",
409 | "Programming Language :: Pike",
410 | "Programming Language :: Pliant",
411 | "Programming Language :: Prolog",
412 | "Programming Language :: Python",
413 | "Programming Language :: Python :: 2",
414 | "Programming Language :: Python :: 2 :: Only",
415 | "Programming Language :: Python :: 2.3",
416 | "Programming Language :: Python :: 2.4",
417 | "Programming Language :: Python :: 2.5",
418 | "Programming Language :: Python :: 2.6",
419 | "Programming Language :: Python :: 2.7",
420 | "Programming Language :: Python :: 3",
421 | "Programming Language :: Python :: 3 :: Only",
422 | "Programming Language :: Python :: 3.0",
423 | "Programming Language :: Python :: 3.1",
424 | "Programming Language :: Python :: 3.10",
425 | "Programming Language :: Python :: 3.2",
426 | "Programming Language :: Python :: 3.3",
427 | "Programming Language :: Python :: 3.4",
428 | "Programming Language :: Python :: 3.5",
429 | "Programming Language :: Python :: 3.6",
430 | "Programming Language :: Python :: 3.7",
431 | "Programming Language :: Python :: 3.8",
432 | "Programming Language :: Python :: 3.9",
433 | "Programming Language :: Python :: Implementation",
434 | "Programming Language :: Python :: Implementation :: CPython",
435 | "Programming Language :: Python :: Implementation :: IronPython",
436 | "Programming Language :: Python :: Implementation :: Jython",
437 | "Programming Language :: Python :: Implementation :: MicroPython",
438 | "Programming Language :: Python :: Implementation :: PyPy",
439 | "Programming Language :: Python :: Implementation :: Stackless",
440 | "Programming Language :: R",
441 | "Programming Language :: REBOL",
442 | "Programming Language :: Rexx",
443 | "Programming Language :: Ruby",
444 | "Programming Language :: Rust",
445 | "Programming Language :: SQL",
446 | "Programming Language :: Scheme",
447 | "Programming Language :: Simula",
448 | "Programming Language :: Smalltalk",
449 | "Programming Language :: Tcl",
450 | "Programming Language :: Unix Shell",
451 | "Programming Language :: Visual Basic",
452 | "Programming Language :: XBasic",
453 | "Programming Language :: YACC",
454 | "Programming Language :: Zope",
455 | "Topic :: Adaptive Technologies",
456 | "Topic :: Artistic Software",
457 | "Topic :: Communications",
458 | "Topic :: Communications :: BBS",
459 | "Topic :: Communications :: Chat",
460 | "Topic :: Communications :: Chat :: ICQ",
461 | "Topic :: Communications :: Chat :: Internet Relay Chat",
462 | "Topic :: Communications :: Chat :: Unix Talk",
463 | "Topic :: Communications :: Conferencing",
464 | "Topic :: Communications :: Email",
465 | "Topic :: Communications :: Email :: Address Book",
466 | "Topic :: Communications :: Email :: Email Clients (MUA)",
467 | "Topic :: Communications :: Email :: Filters",
468 | "Topic :: Communications :: Email :: Mail Transport Agents",
469 | "Topic :: Communications :: Email :: Mailing List Servers",
470 | "Topic :: Communications :: Email :: Post-Office",
471 | "Topic :: Communications :: Email :: Post-Office :: IMAP",
472 | "Topic :: Communications :: Email :: Post-Office :: POP3",
473 | "Topic :: Communications :: FIDO",
474 | "Topic :: Communications :: Fax",
475 | "Topic :: Communications :: File Sharing",
476 | "Topic :: Communications :: File Sharing :: Gnutella",
477 | "Topic :: Communications :: File Sharing :: Napster",
478 | "Topic :: Communications :: Ham Radio",
479 | "Topic :: Communications :: Internet Phone",
480 | "Topic :: Communications :: Telephony",
481 | "Topic :: Communications :: Usenet News",
482 | "Topic :: Database",
483 | "Topic :: Database :: Database Engines/Servers",
484 | "Topic :: Database :: Front-Ends",
485 | "Topic :: Desktop Environment",
486 | "Topic :: Desktop Environment :: File Managers",
487 | "Topic :: Desktop Environment :: GNUstep",
488 | "Topic :: Desktop Environment :: Gnome",
489 | "Topic :: Desktop Environment :: K Desktop Environment (KDE)",
490 | "Topic :: Desktop Environment :: K Desktop Environment (KDE) :: Themes",
491 | "Topic :: Desktop Environment :: PicoGUI",
492 | "Topic :: Desktop Environment :: PicoGUI :: Applications",
493 | "Topic :: Desktop Environment :: PicoGUI :: Themes",
494 | "Topic :: Desktop Environment :: Screen Savers",
495 | "Topic :: Desktop Environment :: Window Managers",
496 | "Topic :: Desktop Environment :: Window Managers :: Afterstep",
497 | "Topic :: Desktop Environment :: Window Managers :: Afterstep :: Themes",
498 | "Topic :: Desktop Environment :: Window Managers :: Applets",
499 | "Topic :: Desktop Environment :: Window Managers :: Blackbox",
500 | "Topic :: Desktop Environment :: Window Managers :: Blackbox :: Themes",
501 | "Topic :: Desktop Environment :: Window Managers :: CTWM",
502 | "Topic :: Desktop Environment :: Window Managers :: CTWM :: Themes",
503 | "Topic :: Desktop Environment :: Window Managers :: Enlightenment",
504 | "Topic :: Desktop Environment :: Window Managers :: Enlightenment :: Epplets",
505 | "Topic :: Desktop Environment :: Window Managers :: Enlightenment :: Themes DR15",
506 | "Topic :: Desktop Environment :: Window Managers :: Enlightenment :: Themes DR16",
507 | "Topic :: Desktop Environment :: Window Managers :: Enlightenment :: Themes DR17",
508 | "Topic :: Desktop Environment :: Window Managers :: FVWM",
509 | "Topic :: Desktop Environment :: Window Managers :: FVWM :: Themes",
510 | "Topic :: Desktop Environment :: Window Managers :: Fluxbox",
511 | "Topic :: Desktop Environment :: Window Managers :: Fluxbox :: Themes",
512 | "Topic :: Desktop Environment :: Window Managers :: IceWM",
513 | "Topic :: Desktop Environment :: Window Managers :: IceWM :: Themes",
514 | "Topic :: Desktop Environment :: Window Managers :: MetaCity",
515 | "Topic :: Desktop Environment :: Window Managers :: MetaCity :: Themes",
516 | "Topic :: Desktop Environment :: Window Managers :: Oroborus",
517 | "Topic :: Desktop Environment :: Window Managers :: Oroborus :: Themes",
518 | "Topic :: Desktop Environment :: Window Managers :: Sawfish",
519 | "Topic :: Desktop Environment :: Window Managers :: Sawfish :: Themes 0.30",
520 | "Topic :: Desktop Environment :: Window Managers :: Sawfish :: Themes pre-0.30",
521 | "Topic :: Desktop Environment :: Window Managers :: Waimea",
522 | "Topic :: Desktop Environment :: Window Managers :: Waimea :: Themes",
523 | "Topic :: Desktop Environment :: Window Managers :: Window Maker",
524 | "Topic :: Desktop Environment :: Window Managers :: Window Maker :: Applets",
525 | "Topic :: Desktop Environment :: Window Managers :: Window Maker :: Themes",
526 | "Topic :: Desktop Environment :: Window Managers :: XFCE",
527 | "Topic :: Desktop Environment :: Window Managers :: XFCE :: Themes",
528 | "Topic :: Documentation",
529 | "Topic :: Documentation :: Sphinx",
530 | "Topic :: Education",
531 | "Topic :: Education :: Computer Aided Instruction (CAI)",
532 | "Topic :: Education :: Testing",
533 | "Topic :: Games/Entertainment",
534 | "Topic :: Games/Entertainment :: Arcade",
535 | "Topic :: Games/Entertainment :: Board Games",
536 | "Topic :: Games/Entertainment :: First Person Shooters",
537 | "Topic :: Games/Entertainment :: Fortune Cookies",
538 | "Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)",
539 | "Topic :: Games/Entertainment :: Puzzle Games",
540 | "Topic :: Games/Entertainment :: Real Time Strategy",
541 | "Topic :: Games/Entertainment :: Role-Playing",
542 | "Topic :: Games/Entertainment :: Side-Scrolling/Arcade Games",
543 | "Topic :: Games/Entertainment :: Simulation",
544 | "Topic :: Games/Entertainment :: Turn Based Strategy",
545 | "Topic :: Home Automation",
546 | "Topic :: Internet",
547 | "Topic :: Internet :: File Transfer Protocol (FTP)",
548 | "Topic :: Internet :: Finger",
549 | "Topic :: Internet :: Log Analysis",
550 | "Topic :: Internet :: Name Service (DNS)",
551 | "Topic :: Internet :: Proxy Servers",
552 | "Topic :: Internet :: WAP",
553 | "Topic :: Internet :: WWW/HTTP",
554 | "Topic :: Internet :: WWW/HTTP :: Browsers",
555 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
556 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries",
557 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Content Management System",
558 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Message Boards",
559 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: News/Diary",
560 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Page Counters",
561 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Wiki",
562 | "Topic :: Internet :: WWW/HTTP :: HTTP Servers",
563 | "Topic :: Internet :: WWW/HTTP :: Indexing/Search",
564 | "Topic :: Internet :: WWW/HTTP :: Session",
565 | "Topic :: Internet :: WWW/HTTP :: Site Management",
566 | "Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking",
567 | "Topic :: Internet :: WWW/HTTP :: WSGI",
568 | "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
569 | "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
570 | "Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
571 | "Topic :: Internet :: XMPP",
572 | "Topic :: Internet :: Z39.50",
573 | "Topic :: Multimedia",
574 | "Topic :: Multimedia :: Graphics",
575 | "Topic :: Multimedia :: Graphics :: 3D Modeling",
576 | "Topic :: Multimedia :: Graphics :: 3D Rendering",
577 | "Topic :: Multimedia :: Graphics :: Capture",
578 | "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera",
579 | "Topic :: Multimedia :: Graphics :: Capture :: Scanners",
580 | "Topic :: Multimedia :: Graphics :: Capture :: Screen Capture",
581 | "Topic :: Multimedia :: Graphics :: Editors",
582 | "Topic :: Multimedia :: Graphics :: Editors :: Raster-Based",
583 | "Topic :: Multimedia :: Graphics :: Editors :: Vector-Based",
584 | "Topic :: Multimedia :: Graphics :: Graphics Conversion",
585 | "Topic :: Multimedia :: Graphics :: Presentation",
586 | "Topic :: Multimedia :: Graphics :: Viewers",
587 | "Topic :: Multimedia :: Sound/Audio",
588 | "Topic :: Multimedia :: Sound/Audio :: Analysis",
589 | "Topic :: Multimedia :: Sound/Audio :: CD Audio",
590 | "Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Playing",
591 | "Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Ripping",
592 | "Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Writing",
593 | "Topic :: Multimedia :: Sound/Audio :: Capture/Recording",
594 | "Topic :: Multimedia :: Sound/Audio :: Conversion",
595 | "Topic :: Multimedia :: Sound/Audio :: Editors",
596 | "Topic :: Multimedia :: Sound/Audio :: MIDI",
597 | "Topic :: Multimedia :: Sound/Audio :: Mixers",
598 | "Topic :: Multimedia :: Sound/Audio :: Players",
599 | "Topic :: Multimedia :: Sound/Audio :: Players :: MP3",
600 | "Topic :: Multimedia :: Sound/Audio :: Sound Synthesis",
601 | "Topic :: Multimedia :: Sound/Audio :: Speech",
602 | "Topic :: Multimedia :: Video",
603 | "Topic :: Multimedia :: Video :: Capture",
604 | "Topic :: Multimedia :: Video :: Conversion",
605 | "Topic :: Multimedia :: Video :: Display",
606 | "Topic :: Multimedia :: Video :: Non-Linear Editor",
607 | "Topic :: Office/Business",
608 | "Topic :: Office/Business :: Financial",
609 | "Topic :: Office/Business :: Financial :: Accounting",
610 | "Topic :: Office/Business :: Financial :: Investment",
611 | "Topic :: Office/Business :: Financial :: Point-Of-Sale",
612 | "Topic :: Office/Business :: Financial :: Spreadsheet",
613 | "Topic :: Office/Business :: Groupware",
614 | "Topic :: Office/Business :: News/Diary",
615 | "Topic :: Office/Business :: Office Suites",
616 | "Topic :: Office/Business :: Scheduling",
617 | "Topic :: Other/Nonlisted Topic",
618 | "Topic :: Printing",
619 | "Topic :: Religion",
620 | "Topic :: Scientific/Engineering",
621 | "Topic :: Scientific/Engineering :: Artificial Intelligence",
622 | "Topic :: Scientific/Engineering :: Artificial Life",
623 | "Topic :: Scientific/Engineering :: Astronomy",
624 | "Topic :: Scientific/Engineering :: Atmospheric Science",
625 | "Topic :: Scientific/Engineering :: Bio-Informatics",
626 | "Topic :: Scientific/Engineering :: Chemistry",
627 | "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
628 | "Topic :: Scientific/Engineering :: GIS",
629 | "Topic :: Scientific/Engineering :: Human Machine Interfaces",
630 | "Topic :: Scientific/Engineering :: Hydrology",
631 | "Topic :: Scientific/Engineering :: Image Processing",
632 | "Topic :: Scientific/Engineering :: Image Recognition",
633 | "Topic :: Scientific/Engineering :: Information Analysis",
634 | "Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator",
635 | "Topic :: Scientific/Engineering :: Mathematics",
636 | "Topic :: Scientific/Engineering :: Medical Science Apps.",
637 | "Topic :: Scientific/Engineering :: Physics",
638 | "Topic :: Scientific/Engineering :: Visualization",
639 | "Topic :: Security",
640 | "Topic :: Security :: Cryptography",
641 | "Topic :: Sociology",
642 | "Topic :: Sociology :: Genealogy",
643 | "Topic :: Sociology :: History",
644 | "Topic :: Software Development",
645 | "Topic :: Software Development :: Assemblers",
646 | "Topic :: Software Development :: Bug Tracking",
647 | "Topic :: Software Development :: Build Tools",
648 | "Topic :: Software Development :: Code Generators",
649 | "Topic :: Software Development :: Compilers",
650 | "Topic :: Software Development :: Debuggers",
651 | "Topic :: Software Development :: Disassemblers",
652 | "Topic :: Software Development :: Documentation",
653 | "Topic :: Software Development :: Embedded Systems",
654 | "Topic :: Software Development :: Internationalization",
655 | "Topic :: Software Development :: Interpreters",
656 | "Topic :: Software Development :: Libraries",
657 | "Topic :: Software Development :: Libraries :: Application Frameworks",
658 | "Topic :: Software Development :: Libraries :: Java Libraries",
659 | "Topic :: Software Development :: Libraries :: PHP Classes",
660 | "Topic :: Software Development :: Libraries :: Perl Modules",
661 | "Topic :: Software Development :: Libraries :: Pike Modules",
662 | "Topic :: Software Development :: Libraries :: Python Modules",
663 | "Topic :: Software Development :: Libraries :: Ruby Modules",
664 | "Topic :: Software Development :: Libraries :: Tcl Extensions",
665 | "Topic :: Software Development :: Libraries :: pygame",
666 | "Topic :: Software Development :: Localization",
667 | "Topic :: Software Development :: Object Brokering",
668 | "Topic :: Software Development :: Object Brokering :: CORBA",
669 | "Topic :: Software Development :: Pre-processors",
670 | "Topic :: Software Development :: Quality Assurance",
671 | "Topic :: Software Development :: Testing",
672 | "Topic :: Software Development :: Testing :: Acceptance",
673 | "Topic :: Software Development :: Testing :: BDD",
674 | "Topic :: Software Development :: Testing :: Mocking",
675 | "Topic :: Software Development :: Testing :: Traffic Generation",
676 | "Topic :: Software Development :: Testing :: Unit",
677 | "Topic :: Software Development :: User Interfaces",
678 | "Topic :: Software Development :: Version Control",
679 | "Topic :: Software Development :: Version Control :: Bazaar",
680 | "Topic :: Software Development :: Version Control :: CVS",
681 | "Topic :: Software Development :: Version Control :: Git",
682 | "Topic :: Software Development :: Version Control :: Mercurial",
683 | "Topic :: Software Development :: Version Control :: RCS",
684 | "Topic :: Software Development :: Version Control :: SCCS",
685 | "Topic :: Software Development :: Widget Sets",
686 | "Topic :: System",
687 | "Topic :: System :: Archiving",
688 | "Topic :: System :: Archiving :: Backup",
689 | "Topic :: System :: Archiving :: Compression",
690 | "Topic :: System :: Archiving :: Mirroring",
691 | "Topic :: System :: Archiving :: Packaging",
692 | "Topic :: System :: Benchmark",
693 | "Topic :: System :: Boot",
694 | "Topic :: System :: Boot :: Init",
695 | "Topic :: System :: Clustering",
696 | "Topic :: System :: Console Fonts",
697 | "Topic :: System :: Distributed Computing",
698 | "Topic :: System :: Emulators",
699 | "Topic :: System :: Filesystems",
700 | "Topic :: System :: Hardware",
701 | "Topic :: System :: Hardware :: Hardware Drivers",
702 | "Topic :: System :: Hardware :: Mainframes",
703 | "Topic :: System :: Hardware :: Symmetric Multi-processing",
704 | "Topic :: System :: Installation/Setup",
705 | "Topic :: System :: Logging",
706 | "Topic :: System :: Monitoring",
707 | "Topic :: System :: Networking",
708 | "Topic :: System :: Networking :: Firewalls",
709 | "Topic :: System :: Networking :: Monitoring",
710 | "Topic :: System :: Networking :: Monitoring :: Hardware Watchdog",
711 | "Topic :: System :: Networking :: Time Synchronization",
712 | "Topic :: System :: Operating System",
713 | "Topic :: System :: Operating System Kernels",
714 | "Topic :: System :: Operating System Kernels :: BSD",
715 | "Topic :: System :: Operating System Kernels :: GNU Hurd",
716 | "Topic :: System :: Operating System Kernels :: Linux",
717 | "Topic :: System :: Power (UPS)",
718 | "Topic :: System :: Recovery Tools",
719 | "Topic :: System :: Shells",
720 | "Topic :: System :: Software Distribution",
721 | "Topic :: System :: System Shells",
722 | "Topic :: System :: Systems Administration",
723 | "Topic :: System :: Systems Administration :: Authentication/Directory",
724 | "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP",
725 | "Topic :: System :: Systems Administration :: Authentication/Directory :: NIS",
726 | "Topic :: Terminals",
727 | "Topic :: Terminals :: Serial",
728 | "Topic :: Terminals :: Telnet",
729 | "Topic :: Terminals :: Terminal Emulators/X Terminals",
730 | "Topic :: Text Editors",
731 | "Topic :: Text Editors :: Documentation",
732 | "Topic :: Text Editors :: Emacs",
733 | "Topic :: Text Editors :: Integrated Development Environments (IDE)",
734 | "Topic :: Text Editors :: Text Processing",
735 | "Topic :: Text Editors :: Word Processors",
736 | "Topic :: Text Processing",
737 | "Topic :: Text Processing :: Filters",
738 | "Topic :: Text Processing :: Fonts",
739 | "Topic :: Text Processing :: General",
740 | "Topic :: Text Processing :: Indexing",
741 | "Topic :: Text Processing :: Linguistic",
742 | "Topic :: Text Processing :: Markup",
743 | "Topic :: Text Processing :: Markup :: HTML",
744 | "Topic :: Text Processing :: Markup :: LaTeX",
745 | "Topic :: Text Processing :: Markup :: Markdown",
746 | "Topic :: Text Processing :: Markup :: SGML",
747 | "Topic :: Text Processing :: Markup :: VRML",
748 | "Topic :: Text Processing :: Markup :: XML",
749 | "Topic :: Text Processing :: Markup :: reStructuredText",
750 | "Topic :: Utilities",
751 | "Typing :: Typed",
752 | ]
753 |
--------------------------------------------------------------------------------
/easypypi/easypypi.py:
--------------------------------------------------------------------------------
1 | from .classifiers import CLASSIFIER_LIST
2 | from .licenses import LICENSE_NAMES
3 | from .licenses import LICENSES
4 | from .shared_functions import create_file
5 | from .shared_functions import update_line
6 | from .utils import GROUP_CLASSIFIERS
7 | from .utils import REPLACEMENTS
8 | from .utils import SETUP_FIELDS
9 | from .utils import SG_KWARGS
10 | from cleverdict import CleverDict
11 | from keyring.errors import PasswordDeleteError
12 | from mechanicalsoup.utils import LinkNotFoundError
13 | from pathlib import Path
14 | from pep440_version_utils import Version
15 | from PySimpleGUI import ICON_BUY_ME_A_COFFEE
16 | import click
17 | import datetime
18 | import getpass
19 | import json
20 | import keyring
21 | import mechanicalsoup
22 | import os
23 | from pprint import pprint
24 | import PySimpleGUI as sg
25 | import shutil
26 | import webbrowser
27 |
28 |
29 | class Package(CleverDict):
30 | """
31 | Methods and data relating to a Python module/package in preparation for
32 | publishing on the Python Package Index (PyPI).
33 |
34 | Makes use of CleverDict's auto-save feature to store values in a config
35 | file, and .get_aliases() to keep a track of newly created attributes.
36 |
37 | Exits early if review is False or _break is True
38 |
39 | redirect : Send stdout and stderr to PySimpleGUI Debug Window
40 |
41 | """
42 |
43 | sg.change_look_and_feel("DarkAmber")
44 | easypypi_dirpath = Path(__file__).parent
45 | config_filepath = Path(click.get_app_dir("easyPyPI")) / ("config.json")
46 |
47 | def __init__(self, name=None, **kwargs):
48 | options, kwargs = self.get_options_from_kwargs(**kwargs)
49 | # ⚠ If kwargs are supplied, autosave will overwrite JSON config
50 | super().__init__(**kwargs)
51 | if name:
52 | self.name = name
53 | self.load_defaults()
54 | print(
55 | f"\n ⓘ easyPyPI template files are located in:\n {self.__class__.easypypi_dirpath}",
56 | **options if kwargs.get("redirect") else {},
57 | )
58 | print(
59 | f"\n ⓘ Your easyPyPI config file is:\n {self.__class__.config_filepath}"
60 | )
61 | if options["_break"] is True:
62 | return
63 | # As above... must Load before Setting any other values with autosave on
64 | if self.name and self.get("setup_filepath_str"):
65 | self.get_user_input()
66 |
67 | def __str__(self):
68 | output = self.info(as_str=True)
69 | return output.replace("CleverDict", type(self).__name__, 1)
70 |
71 | def save(self, name=None, value=None):
72 | """
73 | This method is called by CleverDict whenever a value or attribute
74 | changes. Used here to update the config file automatically.
75 |
76 | NB because values are loaded from the config file into attributes during
77 | __init__, if you want to DELETE an entry from the config file e.g.
78 | during debugging you'll need to delete the attribute then run .save:
79 |
80 | del self.x
81 | self.save()
82 | """
83 |
84 | if not self.__class__.config_filepath.parent.exists():
85 | """
86 | Creates the parent folder for config_filepath to
87 | prevent FileError when opening
88 | """
89 | self.__class__.config_filepath.parent.mkdir()
90 |
91 | with open(self.__class__.config_filepath, "w") as file:
92 | # CleverDict.get_aliases finds attributes created after __init__:
93 | fields_dict = {
94 | x: self.get(x)
95 | for x in self.get_aliases()
96 | if "password" not in x.lower()
97 | }
98 | json.dump(fields_dict, file, indent=4)
99 | if name:
100 | if "password" in name.lower():
101 | location = "memory but NOT saved to file"
102 | else:
103 | location = self.__class__.config_filepath
104 |
105 | def get_options_from_kwargs(self, **kwargs):
106 | """ Separate actionable options from general data in kwargs."""
107 | options = {}
108 | for key, default_value in {"_break": False}.items():
109 | if isinstance(kwargs.get(key), bool):
110 | options[key] = kwargs.get(key)
111 | del kwargs[key]
112 | else:
113 | options[key] = default_value
114 | return options, kwargs
115 |
116 | def load_defaults(self):
117 | """
118 | Entry point for loading default Package values as attributes.
119 | Choose between last updated JSON config file, and setup.py if it exists.
120 | """
121 | name = self.get('name')
122 | self.create_skeleton_config_file()
123 | self.load_defaults_from_config_file()
124 | if not name:
125 | # i.e. no name previously saved in config.json and none supplied
126 | self.name = sg.popup_get_text(
127 | "Please enter a name for this package (all lowercase, underscores if needed):",
128 | default_text=self.get("name") or "as_easy_as_pie",
129 | **SG_KWARGS,
130 | )
131 | elif name:
132 | # i.e. name supplied -> use instead of previously saved name
133 | self.name = name
134 | self.create_folder_structure()
135 | if self.setup_filepath.is_file() and self.setup_filepath.stat().st_size:
136 | # If setup.py exists & isn't empty, overwrite default values
137 | self.load_defaults_from_setup_py()
138 |
139 | def load_defaults_from_config_file(self):
140 | """
141 | Loads default metadata from last updated config file.
142 | Creates .scriptlines as a copy of setup_template.py
143 | """
144 | with open(self.__class__.config_filepath, "r") as file:
145 | values = json.load(file)
146 | for key, value in values.items():
147 | self[key] = value
148 | setup = self.__class__.easypypi_dirpath / "setup_template.py"
149 | with open(setup, "r") as file:
150 | self.script_lines = file.readlines()
151 |
152 | def load_defaults_from_setup_py(self):
153 | """
154 | Loads default metadata from previously created setup.py
155 | Creates .scriptlines as a copy of setup.py
156 | """
157 | with open(self.setup_filepath, "r") as file:
158 | lines = file.readlines()
159 | for line in lines:
160 | for field, attribute in SETUP_FIELDS.items():
161 | if line.startswith(field.upper() + " = "):
162 | # Use eval in case the value isn't simply a string:
163 | self[attribute] = eval(line.split(" = ")[-1])
164 | with open(self.setup_filepath, "r") as file:
165 | self.script_lines = file.readlines()
166 |
167 | def create_skeleton_config_file(self):
168 | """
169 | Uses click to find & create a platform-appropriate easyPyPI folder, then
170 | creates a skeleton json file there to store persistent data (if one
171 | doesn't already exist or if the current one is empty).
172 | """
173 | if (
174 | self.__class__.config_filepath.is_file()
175 | and self.__class__.config_filepath.stat().st_size
176 | ):
177 | return
178 | try:
179 | os.makedirs(self.__class__.config_filepath.parent)
180 | print(f"\n ⓘ Folder created:\n {self.__class__.config_filepath.parent}")
181 | except FileExistsError:
182 | pass
183 | with open(self.__class__.config_filepath, "w") as file:
184 | json.dump({"version": "0.1"}, file) # Create skeleton .json file
185 | print(
186 | f"\n ⚠ Skeleton config file created:\n {self.__class__.config_filepath}"
187 | )
188 |
189 | def create_folder_structure(self):
190 | """
191 | Creates skeleton folder structure for a package and starter files.
192 | Creates .setup_filepath_str.
193 | """
194 | parent_path_str = ""
195 | while not parent_path_str:
196 | parent_path_str = sg.popup_get_folder(
197 | "Please select the parent folder for your package i.e. WITHOUT the package name",
198 | default_path=self.get_default_filepath(),
199 | **SG_KWARGS,
200 | )
201 | if parent_path_str is None:
202 | return
203 | setup_dirpath = Path(parent_path_str) / self.name
204 | self.setup_filepath_str = str(setup_dirpath / "setup.py")
205 | try:
206 | os.makedirs(setup_dirpath / self.name)
207 | print(f"\n✓ Created package folder:\n {setup_dirpath}")
208 | except FileExistsError:
209 | print(f"\n ⓘ Package folder already exists:\n {setup_dirpath}")
210 |
211 | def get_username(self, account, prompt=True):
212 | """
213 | Loads username for a given account from `keyring` or if prompt == True,prompts for a value.
214 |
215 | Parameters:
216 | account -> "Github", "PyPI" or "Test_PyPI"
217 | prompt
218 |
219 | Sets:
220 | .{account}_username if a username is found or supplied
221 |
222 | Returns:
223 | True if successful
224 | False if no username is found in keyring and none supplied when prompted
225 | """
226 | if not self.get(f"{account}_username"):
227 | try:
228 | username = keyring.get_credential(account, None).username
229 | except AttributeError:
230 | if prompt:
231 | username = sg.popup_get_text(
232 | f'Please enter your {account.replace("_", " ")} username (saved securely with `keyring`):',
233 | default_text=self.get("Github_username"),
234 | **SG_KWARGS,
235 | )
236 | else:
237 | username = None
238 | if not username:
239 | return False
240 | self[f"{account}_username"] = username
241 | return self.get(f"{account}_username")
242 |
243 | def set_password(self, account, pw=""):
244 | """
245 | Sets a new value for .account_password and also in `keyring`.
246 | If no pw is supplied, prompts for a new password.
247 |
248 | Sets:
249 | keyring credentials
250 | .{account}_password
251 |
252 | Returns:
253 |
254 | True if password is set successsfully,
255 | False if password is not set successfully.
256 | """
257 | if not pw:
258 | pw = sg.popup_get_text(
259 | f'Please enter your {account.replace("_", " ")} password (not saved to file):',
260 | password_char="*",
261 | **SG_KWARGS,
262 | )
263 | if not pw:
264 | return False
265 | keyring.set_password(account, getattr(self, account + "_username"), pw)
266 | self[f"{account}_password"] = pw
267 | return True
268 |
269 | def check_password(self, account):
270 | """
271 | Checks that a password exists as an attribute and if not, looks in
272 | `keyring` for a value, and sets it.
273 |
274 | Parameters:
275 | account -> "Github", "PyPI" or "Test_PyPI"
276 |
277 | Sets:
278 | .{account}_password (if keyring value exists)
279 |
280 | Returns:
281 | True if password exists
282 | False if no pw exists as an attribute or in keyring.
283 | """
284 | pw = self.get(f"{account}_password")
285 | if not pw:
286 | pw = keyring.get_password(account, getattr(self, account + "_username"))
287 | if not pw:
288 | return self.set_password(account)
289 | self[f"{account}_password"] = pw
290 | return True
291 |
292 | def delete_credentials(self, account, username=None):
293 | """
294 | Delete password AND username from keyring.
295 | .username remains in memory but .password was only ever an @property.
296 | """
297 | if not username:
298 | username = self.get(f"{account}_username")
299 | if not username:
300 | username = keyring.get_credential(account, None).username
301 | choice = sg.popup_yes_no(
302 | f"Do you really want to delete {account} credentials for {username}?",
303 | **SG_KWARGS,
304 | )
305 | if choice == "Yes":
306 | self.set_password(account, "x") # pw needs to exist to avoid error
307 | for key in [f"{account}_username", f"{account}_password"]:
308 | if self.get(key):
309 | del self[key]
310 | try:
311 | keyring.delete_password(account, username)
312 | except PasswordDeleteError:
313 | print(
314 | "\n ⓘ keyring Credentials couldn't be deleted. Perhaps they already were?"
315 | )
316 |
317 | @property
318 | def setup_filepath(self):
319 | """
320 | json.dump can't serialise pathlib objects so this method creates them
321 | from setup_filepath_str.
322 |
323 | This approach ensures the property doesn't appear in .get_aliases which
324 | is used for deciding what attributes get auto-saved to the config file.
325 | """
326 | return Path(self.setup_filepath_str)
327 |
328 | def get_default_filepath(self):
329 | # Default path should be the parent of self.name and not include it
330 | path = self.get("setup_filepath_str")
331 | if path:
332 | return str(Path(self.get("setup_filepath_str")).parent.parent)
333 | else:
334 | return os.getcwd()
335 |
336 |
337 | def get_default_version(self):
338 | return "0.0.1a1"
339 |
340 | def get_default_url(self):
341 | username = self.get_username("Github")
342 | default = f"https://github.com/{username or 'username'}"
343 | return default + f"/{self.name}"
344 |
345 | def get_default_author(self):
346 | return getpass.getuser()
347 |
348 | def get_default_email(self):
349 | return f"{getpass.getuser().lower()}@gmail.com"
350 |
351 | def get_default_keywords(self):
352 | default = f"{self.name}, "
353 | default += f"{self.author}, "
354 | return default + f"{self.Github_username}, "
355 |
356 | def get_default_requirements(self):
357 | return "cleverdict, "
358 |
359 | def get_main_layout_inputs(self):
360 | """
361 | Generates input boxes as part of the main layout.
362 | Returns: layout (PySimpleGUI list)
363 | """
364 | prompts = {
365 | "name": "Package Name (all lowercase, underscores if needed):",
366 | "version": "Latest Version number:",
367 | "Github_username": "Your Github (or other repository) Username:",
368 | "PyPI_username": "Your PyPI Username:",
369 | "Test_PyPI_username": "Your Test PyPI Username:",
370 | "url": "Link to the Package Repository:",
371 | "description": "Description (with escape characters for \\ \" ' etc.):",
372 | "author": "Full Name of the Author:",
373 | "email": "E-mail Address for the Author:",
374 | "keywords": "Keywords (separated by a comma):",
375 | "requirements": "Any additional packages/modules required:",
376 | }
377 | self.version = self.get("version") or self.get_default_version()
378 | self.get_username("Github") # .Github_username created in place
379 | self.get_username("PyPI", False) # Don't prompt for username yet
380 | self.get_username("Test_PyPI", False) # Don't prompt for username yet
381 | self.url = self.get_default_url()
382 | self.description = self.get("description")
383 | self.author = self.get("author") or self.get_default_author()
384 | self.email = self.get("email") or self.get_default_email()
385 | self.keywords = self.get("keywords") or self.get_default_keywords()
386 | self.requirements = self.get("requirements") or self.get_default_requirements()
387 | layout = [[sg.Text(" " * 200, font="calibri 6")]]
388 | for key, prompt in prompts.items():
389 | default = self.get(key)
390 | layout += [
391 | [
392 | sg.Text(prompt, size=(40, 0)),
393 | sg.Input(self.get(key), key=key, size=(50, 0)),
394 | ]
395 | ]
396 | return layout
397 |
398 | def get_main_layout_classifiers(self, layout):
399 | """
400 | Adds input boxes for Classifier lists to the main window layout.
401 | Returns: layout (PySimpleGUI list), choices, selected_choices
402 | """
403 | choices = {}
404 | selected_choices = {}
405 | layout += [[sg.Text(" " * 200, font="calibri 6")]]
406 | for group, group_text in GROUP_CLASSIFIERS.items():
407 | choices[group] = [x for x in CLASSIFIER_LIST if x.startswith(group)]
408 | self.classifiers = self.get("classifiers") or ""
409 | selected_choices[group] = [
410 | x for x in self.classifiers.split(", ") if x.startswith(group)
411 | ]
412 | if (
413 | group == "Programming Language :: Python"
414 | and not selected_choices[group]
415 | ):
416 | selected_choices[group] = [
417 | x
418 | for x in choices[group]
419 | if any([x.endswith(y) for y in ["3.6", "3.7", "3.8", "3.9"]])
420 | ]
421 | if group == "License :: OSI Approved ::":
422 | # License names aren't identical between PyPI and Github
423 | choices[group] = [
424 | x
425 | for x in choices[group]
426 | if any([x.endswith(y) for y in LICENSE_NAMES.values()])
427 | ]
428 | if not selected_choices[group]:
429 | selected_choices[group] = ["License :: OSI Approved :: MIT License"]
430 | for group_name, default in {
431 | "Operating System": "OS Independent",
432 | "Development Status": "- Alpha",
433 | "Intended Audience": "Developers",
434 | }.items():
435 | if group == group_name and not selected_choices[group]:
436 | selected_choices[group] = [
437 | x for x in choices[group] if x.endswith(default)
438 | ]
439 | layout += [
440 | [
441 | sg.Text(group_text, size=(40, 0)),
442 | sg.Text(
443 | "\n".join(selected_choices[group]),
444 | key=("classifiers", group),
445 | enable_events=True,
446 | size=(44, 0),
447 | background_color=sg.theme_input_background_color(),
448 | text_color=sg.theme_text_color(),
449 | ),
450 | ]
451 | ]
452 | return layout, choices, selected_choices
453 |
454 | def get_main_layout_buttons(self, layout):
455 | """
456 | Adds action buttons to the main window layout.
457 | Returns: layout (PySimpleGUI list)
458 | """
459 | layout += [
460 | [sg.Text(" " * 200, font="calibri 6")],
461 | [
462 | sg.ButtonMenu(
463 | "1) Upversion",
464 | [
465 | "",
466 | [
467 | "Next Alpha",
468 | "Next Beta",
469 | "Next Release Candidate",
470 | "Next Micro",
471 | "Next Minor",
472 | "Next Major",
473 | ],
474 | ],
475 | key="1) Upversion",
476 | tooltip="Update Version number incrementally.",
477 | ),
478 | sg.Button(
479 | "2) Generate",
480 | tooltip="Create/update setup.py, tar.gz, and other files ready for publishing.",
481 | ),
482 | sg.ButtonMenu(
483 | "3) Publish",
484 | ["", ["Test PyPI", "PyPI", "Github"]],
485 | key="3) Publish",
486 | tooltip="Upload/update package on PyPI and/or TestPyPI, or create initial Github repository.",
487 | ),
488 | sg.Button(
489 | image_data=ICON_BUY_ME_A_COFFEE,
490 | key="Coffee",
491 | tooltip="Show your appreciation for all the time you're saving with easyPyPI.",
492 | ),
493 | sg.ButtonMenu(
494 | "Create Accounts",
495 | [
496 | "",
497 | [
498 | "Register for Github",
499 | "Register for PyPI",
500 | "Register for Test PyPI",
501 | ],
502 | ],
503 | key="Create Accounts",
504 | tooltip="Create an account on PyPI, TestPyPI and/or Github.",
505 | ),
506 | sg.Button(
507 | "Download Git",
508 | tooltip="Download Git, the most widely used (and free) distributed version control system.",
509 | ),
510 | sg.ButtonMenu(
511 | "Browse Files",
512 | [
513 | "",
514 | [
515 | "easyPyPI README",
516 | "easyPyPI templates",
517 | "config.json",
518 | self.name,
519 | ],
520 | ],
521 | key="Browse Files",
522 | tooltip="Open/Edit individual files used by easyPyPI.",
523 | ),
524 | ],
525 | ]
526 | return layout
527 |
528 | def get_user_input(self):
529 | """
530 | Check config file for previous values. If no value is set, prompts for
531 | a value and updates the relevant Package attribute.
532 | """
533 | layout = self.get_main_layout_inputs()
534 | layout, choices, selected_choices = self.get_main_layout_classifiers(layout)
535 | layout = self.get_main_layout_buttons(layout)
536 | window = sg.Window(
537 | "easyPyPI",
538 | layout,
539 | keep_on_top=SG_KWARGS["keep_on_top"],
540 | icon=SG_KWARGS["icon"],
541 | element_justification="center",
542 | )
543 | while True:
544 | set_menu_colours(window)
545 | event, values = window.read()
546 | if event is None:
547 | window.close()
548 | return False
549 | if event == "1) Upversion":
550 | version = Version(str(values["version"]))
551 | step = values["1) Upversion"]
552 | step = step.replace("Next ", "").lower().replace(" ", "_")
553 | next_version = getattr(Version, f"next_{step}")
554 | self.version = str(next_version(version))
555 | window["version"].update(value=self.version)
556 | values["version"] = self.version
557 | if event == "2) Generate":
558 | self.save_user_input(values, selected_choices)
559 | self.generate_files_and_folders()
560 | if event == "3) Publish":
561 | if "Github" in values["3) Publish"]:
562 | print("Github!")
563 | self.create_github_repository()
564 | else:
565 | self.upload_with_twine(values["3) Publish"])
566 | if event == "Create Accounts":
567 | account = values["Create Accounts"].replace("Register for ", "")
568 | self.register_accounts(account.replace(" ", "_"))
569 | window["Github_username"].update(value=self.get("Github_username"))
570 | window["Test_PyPI_username"].update(
571 | value=self.get("Test_PyPI_username")
572 | )
573 | window["PyPI_username"].update(value=self.get("PyPI_username"))
574 | if event == "Browse Files":
575 | choice = values["Browse Files"]
576 | if choice == "easyPyPI templates" or choice == self.name:
577 | if choice == "easyPyPI templates":
578 | path = self.easypypi_dirpath
579 | if choice == self.name:
580 | path = self.setup_filepath.parent
581 | sg.popup_get_file(
582 | "",
583 | no_window=True,
584 | initial_folder=path,
585 | **SG_KWARGS,
586 | )
587 | else:
588 | if choice == "config.json":
589 | choice = self.config_filepath
590 | if choice == "easyPyPI README":
591 | choice = (
592 | r"https://github.com/PFython/easypypi/blob/main/README.md"
593 | )
594 | webbrowser.open(str(choice))
595 | if event == "Coffee":
596 | webbrowser.open("https://www.buymeacoffee.com/pfython")
597 | if event == "Download Git":
598 | webbrowser.open("https://git-scm.com/downloads")
599 | if isinstance(event, tuple):
600 | group = event[1]
601 | prompt_with_choices(
602 | group,
603 | choices=choices[group],
604 | selected_choices=selected_choices[group],
605 | )
606 | window[event].update(value="\n".join(selected_choices[group]))
607 | if values:
608 | self.save_user_input(values, selected_choices)
609 |
610 | def save_user_input(self, values, selected_choices):
611 | """
612 | Update package attributes based on main window input
613 |
614 | """
615 | for key, value in values.items():
616 | self[key] = value
617 | self.classifiers = []
618 | for value in selected_choices.values():
619 | self.classifiers.extend(value)
620 | self.classifiers = ", ".join(self.classifiers)
621 | self.license_name_pypi = selected_choices["License :: OSI Approved ::"]
622 | self.license_name_pypi = self.license_name_pypi[0].split(":: ")[-1]
623 | for spdx_id, pypi_name in LICENSE_NAMES.items():
624 | if self.license_name_pypi.endswith(pypi_name):
625 | self.license_name_github = [
626 | x.name for x in LICENSES if x.spdx_id == spdx_id
627 | ][0]
628 | break
629 | self.create_license()
630 | self.update_script_lines()
631 |
632 | def create_license(self):
633 | """
634 | Use Classifiers/License as key to create LICENSE data from licenses.json
635 |
636 | Sets:
637 |
638 | .license_text and makes common substitutions e.g. data and author.
639 | """
640 | license_dict = [x for x in LICENSES if x.name == self.license_name_github][0]
641 | year = str(datetime.datetime.now().year)
642 | replacements = dict()
643 | self.license_text = license_dict.body
644 | if license_dict.key == "lgpl-3.0":
645 | self.license_text += (
646 | "\nThis license is an additional set of permissions to the "
647 | 'GNU GPLv3 license which is reproduced below:\n\n'
648 | )
649 | gpl3 = [x for x in LICENSES if x.key == "gpl-3.0"][0]
650 | self.license_text += gpl3.body
651 | if license_dict.key == "mit":
652 | replacements = {"[year]": year, "[fullname]": self.author}
653 | if license_dict.key in ["gpl-3.0", "lgpl-3.0", "agpl-3.0"]:
654 | replacements = {
655 | "": year,
656 | "": self.author,
657 | "": self.name,
658 | "Also add information on how to contact you by electronic and paper mail.": f" Contact email: {self.email}",
659 | "": f"{self.name}: {self.description}",
660 | }
661 | if license_dict.key == "apache-2.0":
662 | replacements = {"[yyyy]": year, "[name of copyright owner]": self.author}
663 | if replacements:
664 | for old, new in replacements.items():
665 | self.license_text = self.license_text.replace(old, new)
666 |
667 | def update_script_lines(self):
668 | for keyword, attribute_name in SETUP_FIELDS.items():
669 | old_line_starts = keyword.upper() + " = "
670 | new_value = getattr(self, attribute_name)
671 | self.script_lines = update_line(
672 | self.script_lines, old_line_starts, new_value
673 | )
674 |
675 | def register_accounts(self, account=None):
676 | """
677 | Prompts for TestPyPI/PyPI account names for twine to use.
678 |
679 | This approach avoids the need for a .pypirc config file:
680 | https://packaging.python.org/specifications/pypirc/#common-configurations
681 |
682 | Creates one or more of the following attributes in place:
683 |
684 | .pypi_username
685 | .pypi_test_username
686 | .github_username
687 |
688 | account : restricts the function to the account specified
689 | """
690 | url = r"https://pypi.org/account/register/"
691 | accounts = {
692 | "Github": "https://github.com/join",
693 | "PyPI": url,
694 | "Test_PyPI": url.replace("pypi", "test.pypi"),
695 | }
696 | if account:
697 | accounts = {k: v for k, v in accounts.items() if k == account}
698 | for account, url in accounts.items():
699 | if not self.get(account + "_username"):
700 | response = sg.popup_yes_no(
701 | f"Do you need to register online for an account on {account}?",
702 | **SG_KWARGS,
703 | )
704 | if response is None:
705 | return
706 | if response == "Yes":
707 | webbrowser.open(url)
708 | username = sg.popup_get_text(
709 | f"Please register for a {account} account online, "
710 | f"then enter your username below:",
711 | default_text=self.get(account + "_username"),
712 | **SG_KWARGS,
713 | )
714 | if not username:
715 | return False
716 | self[f"{account}_username"] = username
717 | self.set_password(account)
718 |
719 | def generate_files_and_folders(self):
720 | """
721 | Recreates setup.py & creates a new tar.gz package ready for publishing.
722 | """
723 | self.copy_other_files()
724 | choice = sg.popup_yes_no(
725 | "Do you want to generate new package files "
726 | "(setup.py, README, LICENSE, tar.gz, etc) from the current metadata?\n",
727 | **SG_KWARGS,
728 | )
729 | if choice != "Yes":
730 | return
731 | self.create_essential_files()
732 | self.run_setup_py()
733 | print("\n ✓ Files and folders generated ready for publishing.")
734 |
735 | def copy_other_files(self):
736 | """
737 | Prompts for additional files to copy over into the newly created folder:
738 | \package_name\package_name
739 | """
740 | files = sg.popup_get_file(
741 | f"Please select any other files or 'package data' to copy to the new folder:\n\n{self.setup_filepath.with_name(self.name)}\n",
742 | **SG_KWARGS,
743 | default_path="",
744 | multiple_files=True,
745 | )
746 | if not files:
747 | return False
748 | for file in [Path(x) for x in files.split(";")]:
749 | new_file = self.setup_filepath.parent / self.name / file.name
750 | if new_file.is_file():
751 | response = sg.popup_yes_no(
752 | f"WARNING\n\n{file.name} already exists in\n{new_file.parent}\n\n Overwrite?",
753 | **SG_KWARGS,
754 | )
755 | if response == "No":
756 | continue
757 | if file.is_file():
758 | shutil.copy(file, new_file)
759 | print(f"\n✓ Copied {file.name} to:\n {new_file.parent}")
760 |
761 | def create_essential_files(self):
762 | """
763 | Creates essential files for the new package:
764 | /setup.py
765 | /README.md
766 | /LICENSE
767 | /package_name/__init__.py
768 | /package_name/package_name.py
769 | /package_name/test_PACKAGE_NAME.py
770 | """
771 | sfp = self.setup_filepath.parent
772 | # setup.py and LICENSE can be be overwritten as they're most likely to
773 | # be changed by user after publishing, and no code changes will be lost:
774 | print(self.license_text)
775 | create_file(sfp / "LICENSE", self.license_text, overwrite=True)
776 | create_file(self.setup_filepath, self.script_lines, overwrite=True)
777 | # Other files are just bare-bones initially, imported from templates:
778 | templates = {
779 | "readme_template.md": sfp / "README.md",
780 | "init_template.py": sfp / self.name / "__init__.py",
781 | "script_template.py": sfp / self.name / (self.name + ".py"),
782 | "test_template.py": sfp / self.name / ("test_" + self.name + ".py"),
783 | }
784 | # Read in, make replacements, create in new folder structure
785 | for template_filepath, destination_path in templates.items():
786 | template_filepath = self.easypypi_dirpath / template_filepath
787 | with open(template_filepath, "r") as file:
788 | text = file.read()
789 | for replacement in REPLACEMENTS:
790 | text = text.replace(replacement, eval(f"f'{replacement}'"))
791 | create_file(destination_path, text)
792 |
793 | def run_setup_py(self):
794 | """ Creates a .tar.gz distribution file with setup.py """
795 | try:
796 | import setuptools
797 | import twine
798 | except ImportError:
799 | print("\n> Installing setuptools and twine if not already present...")
800 | os.system('cmd /c "python -m pip install setuptools wheel twine"')
801 | os.chdir(self.setup_filepath.parent)
802 | print(f"\n> Running {self.setup_filepath / 'setup.py'}...")
803 | os.system('cmd /c "setup.py sdist"')
804 |
805 | def upload_with_twine(self, account=None):
806 | """ Uploads to PyPI or Test PyPI with twine """
807 | if not account:
808 | account = sg.popup(
809 | f"Do you want to upload {self.name} to\nTest PyPI, or go FULLY PUBLIC on the real PyPI?\n",
810 | **SG_KWARGS,
811 | custom_text=("Test PyPI", "PyPI"),
812 | )
813 | if not account:
814 | return
815 | if account == "PyPI":
816 | params = "pypi"
817 | if account == "Test PyPI":
818 | params = "testpypi"
819 | account = "Test_PyPI"
820 | if not self.get_username(account):
821 | return False
822 | username = getattr(self, f"{account}_username")
823 | if not self.check_password(account):
824 | self.set_password(account)
825 | params += f" dist/*-{self.version}.tar.gz "
826 | os.chdir(self.setup_filepath.parent)
827 | if os.system(
828 | f'cmd /c "python -m twine upload '
829 | f"--repository {params} "
830 | f"-u {username} "
831 | f'-p {keyring.get_password(account, username)}"'
832 | ):
833 | # A return value of 1 (True) indicates an error
834 | print("\n ⚠ Problem uploading with Twine; probably either:")
835 | print(" - An authentication issue. Check your username and password?")
836 | print(" - Using an existing version number. Try a new version number?")
837 | else:
838 | url = "https://" if account == "PyPI" else "https://test."
839 | webbrowser.open(f"{url}pypi.org/project/{self.name}/{self.version}")
840 | response = sg.popup_yes_no(
841 | "Fantastic! Your package should now be available in your webbrowser, "
842 | "although you might need to wait a few minutes before it registers as the 'latest' version.\n\n"
843 | "Do you want to install it now using pip?\n",
844 | **SG_KWARGS,
845 | )
846 | if response == "Yes":
847 | self.pip_install(account)
848 |
849 | def pip_install(self, account):
850 | """ Auto-install from pip using latest version and account. """
851 | url = "https://" if account == "PyPI" else "https://test."
852 | print()
853 | command = f"python -m pip install -i {url}pypi.org/simple/ {self.name}=={self.version}"
854 | if not os.system(f'cmd /c "{command}"'):
855 | # A return value of 1 indicates an error, 0 indicates success
856 | print(
857 | f"\n ⓘ You can view your package's details using 'pip show {self.name}':\n"
858 | )
859 | os.system(f'cmd /c "pip show {self.name}"')
860 | print()
861 | else:
862 | print("\n ⚠ Installation failed. Perhaps try again shortly?")
863 | print(f"\n {command}\n\n or...")
864 | print(f" >>> package.pip_install('{account}')\n")
865 |
866 | def publish_to_github(self):
867 | """ Uploads initial package to Github using Git"""
868 | if not self.get_username("Github"):
869 | return False
870 | commands = f"""
871 | git init
872 | git add *.*
873 | git commit -m "Committing version {self.version}"
874 | git branch -M main
875 | git remote add origin https://github.com/{self.Github_username}/{self.name}.git
876 | git push -u origin main
877 | """
878 | choice = sg.popup_yes_no(
879 | f"Do you want to upload (Push) your package to Github?\n\n ⚠ CAUTION - "
880 | f"Only recommended when creating your repository for the first time! "
881 | f"This automation requires Git and will run the following commands:\n\n{commands}",
882 | **SG_KWARGS,
883 | )
884 | if choice != "Yes":
885 | return False
886 | os.chdir(self.setup_filepath.parent)
887 | for command in commands.splitlines()[1:]: # Ignore first blank line
888 | if not os.system(f"cmd /c {command}"):
889 | # A return value of 1 indicates an error, 0 indicates success
890 | print(f"\n ⓘ Your package is now online at:\n {self.url}':\n")
891 |
892 | def create_github_repository(self):
893 | """ Creates an empty repository on Github """
894 | if not self.get_username("Github"):
895 | return False
896 | if not self.check_password("Github"):
897 | self.set_password("Github")
898 | browser = mechanicalsoup.StatefulBrowser(
899 | soup_config={"features": "lxml"},
900 | raise_on_404=True,
901 | user_agent="MyBot/0.1: mysite.example.com/bot_info",
902 | )
903 | browser.open("https://github.com/login")
904 | browser.select_form("#login form")
905 | browser["login"] = self.Github_username
906 | browser["password"] = self.Github_password
907 | resp = browser.submit_selected()
908 | browser.open("https://github.com/new")
909 | try:
910 | browser.select_form('form[action="/repositories"]')
911 | except LinkNotFoundError:
912 | print(
913 | f"\n ⚠ Unable to log in to Github with username {self.Github_username}. Please resubmit Github password, double check your username, and try again..."
914 | )
915 | self.set_password("Github")
916 | browser.close()
917 | return False
918 | browser["repository[name]"] = self.name
919 | browser["repository[description]"] = self.description
920 | browser["repository[visibility]"] = "private"
921 | resp = browser.submit_selected()
922 | self.publish_to_github()
923 | webbrowser.open(self.url)
924 | # browser.launch_browser()
925 |
926 |
927 | def set_menu_colours(window):
928 | """ Sets the colours of MenuButton menu options """
929 | background = "#2c2825"
930 | foreground = "#fdcb52"
931 | try:
932 | for menu in [
933 | "1) Upversion",
934 | "3) Publish",
935 | "Create Accounts",
936 | "Browse Files",
937 | ]:
938 | window[menu].TKMenu.configure(
939 | fg=foreground,
940 | bg=background,
941 | )
942 | except:
943 | pass # This workaround attempts to change a non-existent menu
944 |
945 |
946 | def prompt_with_choices(group, choices, selected_choices):
947 | """
948 | Creates a scrollable popup using PySimpleGui checkboxes or radio buttons.
949 | Returns a set of selected choices, or and empty set
950 | """
951 | if group in ["Development Status", "License :: OSI Approved ::"]:
952 | layout = [
953 | [
954 | sg.Radio(
955 | text=choice,
956 | group_id=group,
957 | key=choice,
958 | default=choice in selected_choices,
959 | )
960 | ]
961 | for choice in choices
962 | ]
963 | else:
964 | layout = [
965 | [sg.Checkbox(text=choice, key=choice, default=choice in selected_choices)]
966 | for choice in choices
967 | ]
968 | buttons = [sg.Button("Accept"), sg.Button("Cancel")]
969 | if group == "License :: OSI Approved ::":
970 | buttons += [sg.Button("License Help")]
971 | choices_window = sg.Window(
972 | f"Classifiers for the {group.title()} group",
973 | [
974 | "",
975 | [
976 | sg.Column(
977 | layout + [buttons],
978 | scrollable=True,
979 | vertical_scroll_only=True,
980 | size=(600, 300),
981 | )
982 | ],
983 | ],
984 | size=(600, 300),
985 | resizable=True,
986 | keep_on_top=SG_KWARGS["keep_on_top"],
987 | icon=SG_KWARGS["icon"],
988 | )
989 | while True:
990 | event, values = choices_window.read(close=False)
991 | if event == "Accept":
992 | selected_choices.clear()
993 | selected_choices.extend(k for k in choices if values[k])
994 | choices_window.close()
995 | return True
996 | if event == "License Help":
997 | webbrowser.open("https://choosealicense.com/licenses/")
998 | if event is None or event == "Cancel":
999 | choices_window.close()
1000 | return False
1001 |
--------------------------------------------------------------------------------
/easypypi/licenses.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "key": "bsl-1.0",
4 | "name": "Boost Software License 1.0",
5 | "spdx_id": "BSL-1.0",
6 | "url": "https://api.github.com/licenses/bsl-1.0",
7 | "node_id": "MDc6TGljZW5zZTI4",
8 | "html_url": "http://choosealicense.com/licenses/bsl-1.0/",
9 | "description": "A simple permissive license only requiring preservation of copyright and license notices for source (and not binary) distribution. Licensed works, modifications, and larger works may be distributed under different terms and without source code.",
10 | "implementation": "Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.",
11 | "permissions": [
12 | "commercial-use",
13 | "modifications",
14 | "distribution",
15 | "private-use"
16 | ],
17 | "conditions": [
18 | "include-copyright--source"
19 | ],
20 | "limitations": [
21 | "liability",
22 | "warranty"
23 | ],
24 | "body": "Boost Software License - Version 1.0 - August 17th, 2003\n\nPermission is hereby granted, free of charge, to any person or organization\nobtaining a copy of the software and accompanying documentation covered by\nthis license (the \"Software\") to use, reproduce, display, distribute,\nexecute, and transmit the Software, and to prepare derivative works of the\nSoftware, and to permit third-parties to whom the Software is furnished to\ndo so, all subject to the following:\n\nThe copyright notices in the Software and this entire statement, including\nthe above license grant, this restriction and the following disclaimer,\nmust be included in all copies of the Software, in whole or in part, and\nall derivative works of the Software, unless such copies or derivative\nworks are solely in the form of machine-executable object code generated by\na source language processor.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\nSHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\nFOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n",
25 | "featured": false
26 | },
27 | {
28 | "key": "mit",
29 | "name": "MIT License",
30 | "spdx_id": "MIT",
31 | "url": "https://api.github.com/licenses/mit",
32 | "node_id": "MDc6TGljZW5zZTEz",
33 | "html_url": "http://choosealicense.com/licenses/mit/",
34 | "description": "A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.",
35 | "implementation": "Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.",
36 | "permissions": [
37 | "commercial-use",
38 | "modifications",
39 | "distribution",
40 | "private-use"
41 | ],
42 | "conditions": [
43 | "include-copyright"
44 | ],
45 | "limitations": [
46 | "liability",
47 | "warranty"
48 | ],
49 | "body": "MIT License\n\nCopyright (c) [year] [fullname]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
50 | "featured": true
51 | },
52 | {
53 | "key": "gpl-3.0",
54 | "name": "GNU General Public License v3.0",
55 | "spdx_id": "GPL-3.0",
56 | "url": "https://api.github.com/licenses/gpl-3.0",
57 | "node_id": "MDc6TGljZW5zZTk=",
58 | "html_url": "http://choosealicense.com/licenses/gpl-3.0/",
59 | "description": "Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.",
60 | "implementation": "Create a text file (typically named COPYING, as per GNU conventions) in the root of your source code and copy the text of the license into the file.",
61 | "permissions": [
62 | "commercial-use",
63 | "modifications",
64 | "distribution",
65 | "patent-use",
66 | "private-use"
67 | ],
68 | "conditions": [
69 | "include-copyright",
70 | "document-changes",
71 | "disclose-source",
72 | "same-license"
73 | ],
74 | "limitations": [
75 | "liability",
76 | "warranty"
77 | ],
78 | "body": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n.\n",
79 | "featured": true
80 | },
81 | {
82 | "key": "lgpl-3.0",
83 | "name": "GNU Lesser General Public License v3.0",
84 | "spdx_id": "LGPL-3.0",
85 | "url": "https://api.github.com/licenses/lgpl-3.0",
86 | "node_id": "MDc6TGljZW5zZTEy",
87 | "html_url": "http://choosealicense.com/licenses/lgpl-3.0/",
88 | "description": "Permissions of this copyleft license are conditioned on making available complete source code of licensed works and modifications under the same license or the GNU GPLv3. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work through interfaces provided by the licensed work may be distributed under different terms and without source code for the larger work.",
89 | "implementation": "This license is an additional set of permissions to the GNU GPLv3 license. Follow the instructions to apply the GNU GPLv3, in the root of your source code. Then add another file named COPYING.LESSER and copy the text.",
90 | "permissions": [
91 | "commercial-use",
92 | "modifications",
93 | "distribution",
94 | "patent-use",
95 | "private-use"
96 | ],
97 | "conditions": [
98 | "include-copyright",
99 | "disclose-source",
100 | "document-changes",
101 | "same-license--library"
102 | ],
103 | "limitations": [
104 | "liability",
105 | "warranty"
106 | ],
107 | "body": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\n This version of the GNU Lesser General Public License incorporates\nthe terms and conditions of version 3 of the GNU General Public\nLicense, supplemented by the additional permissions listed below.\n\n 0. Additional Definitions.\n\n As used herein, \"this License\" refers to version 3 of the GNU Lesser\nGeneral Public License, and the \"GNU GPL\" refers to version 3 of the GNU\nGeneral Public License.\n\n \"The Library\" refers to a covered work governed by this License,\nother than an Application or a Combined Work as defined below.\n\n An \"Application\" is any work that makes use of an interface provided\nby the Library, but which is not otherwise based on the Library.\nDefining a subclass of a class defined by the Library is deemed a mode\nof using an interface provided by the Library.\n\n A \"Combined Work\" is a work produced by combining or linking an\nApplication with the Library. The particular version of the Library\nwith which the Combined Work was made is also called the \"Linked\nVersion\".\n\n The \"Minimal Corresponding Source\" for a Combined Work means the\nCorresponding Source for the Combined Work, excluding any source code\nfor portions of the Combined Work that, considered in isolation, are\nbased on the Application, and not on the Linked Version.\n\n The \"Corresponding Application Code\" for a Combined Work means the\nobject code and/or source code for the Application, including any data\nand utility programs needed for reproducing the Combined Work from the\nApplication, but excluding the System Libraries of the Combined Work.\n\n 1. Exception to Section 3 of the GNU GPL.\n\n You may convey a covered work under sections 3 and 4 of this License\nwithout being bound by section 3 of the GNU GPL.\n\n 2. Conveying Modified Versions.\n\n If you modify a copy of the Library, and, in your modifications, a\nfacility refers to a function or data to be supplied by an Application\nthat uses the facility (other than as an argument passed when the\nfacility is invoked), then you may convey a copy of the modified\nversion:\n\n a) under this License, provided that you make a good faith effort to\n ensure that, in the event an Application does not supply the\n function or data, the facility still operates, and performs\n whatever part of its purpose remains meaningful, or\n\n b) under the GNU GPL, with none of the additional permissions of\n this License applicable to that copy.\n\n 3. Object Code Incorporating Material from Library Header Files.\n\n The object code form of an Application may incorporate material from\na header file that is part of the Library. You may convey such object\ncode under terms of your choice, provided that, if the incorporated\nmaterial is not limited to numerical parameters, data structure\nlayouts and accessors, or small macros, inline functions and templates\n(ten or fewer lines in length), you do both of the following:\n\n a) Give prominent notice with each copy of the object code that the\n Library is used in it and that the Library and its use are\n covered by this License.\n\n b) Accompany the object code with a copy of the GNU GPL and this license\n document.\n\n 4. Combined Works.\n\n You may convey a Combined Work under terms of your choice that,\ntaken together, effectively do not restrict modification of the\nportions of the Library contained in the Combined Work and reverse\nengineering for debugging such modifications, if you also do each of\nthe following:\n\n a) Give prominent notice with each copy of the Combined Work that\n the Library is used in it and that the Library and its use are\n covered by this License.\n\n b) Accompany the Combined Work with a copy of the GNU GPL and this license\n document.\n\n c) For a Combined Work that displays copyright notices during\n execution, include the copyright notice for the Library among\n these notices, as well as a reference directing the user to the\n copies of the GNU GPL and this license document.\n\n d) Do one of the following:\n\n 0) Convey the Minimal Corresponding Source under the terms of this\n License, and the Corresponding Application Code in a form\n suitable for, and under terms that permit, the user to\n recombine or relink the Application with a modified version of\n the Linked Version to produce a modified Combined Work, in the\n manner specified by section 6 of the GNU GPL for conveying\n Corresponding Source.\n\n 1) Use a suitable shared library mechanism for linking with the\n Library. A suitable mechanism is one that (a) uses at run time\n a copy of the Library already present on the user's computer\n system, and (b) will operate properly with a modified version\n of the Library that is interface-compatible with the Linked\n Version.\n\n e) Provide Installation Information, but only if you would otherwise\n be required to provide such information under section 6 of the\n GNU GPL, and only to the extent that such information is\n necessary to install and execute a modified version of the\n Combined Work produced by recombining or relinking the\n Application with a modified version of the Linked Version. (If\n you use option 4d0, the Installation Information must accompany\n the Minimal Corresponding Source and Corresponding Application\n Code. If you use option 4d1, you must provide the Installation\n Information in the manner specified by section 6 of the GNU GPL\n for conveying Corresponding Source.)\n\n 5. Combined Libraries.\n\n You may place library facilities that are a work based on the\nLibrary side by side in a single library together with other library\nfacilities that are not Applications and are not covered by this\nLicense, and convey such a combined library under terms of your\nchoice, if you do both of the following:\n\n a) Accompany the combined library with a copy of the same work based\n on the Library, uncombined with any other library facilities,\n conveyed under the terms of this License.\n\n b) Give prominent notice with the combined library that part of it\n is a work based on the Library, and explaining where to find the\n accompanying uncombined form of the same work.\n\n 6. Revised Versions of the GNU Lesser General Public License.\n\n The Free Software Foundation may publish revised and/or new versions\nof the GNU Lesser General Public License from time to time. Such new\nversions will be similar in spirit to the present version, but may\ndiffer in detail to address new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nLibrary as you received it specifies that a certain numbered version\nof the GNU Lesser General Public License \"or any later version\"\napplies to it, you have the option of following the terms and\nconditions either of that published version or of any later version\npublished by the Free Software Foundation. If the Library as you\nreceived it does not specify a version number of the GNU Lesser\nGeneral Public License, you may choose any version of the GNU Lesser\nGeneral Public License ever published by the Free Software Foundation.\n\n If the Library as you received it specifies that a proxy can decide\nwhether future versions of the GNU Lesser General Public License shall\napply, that proxy's public statement of acceptance of any version is\npermanent authorization for you to choose that version for the\nLibrary.\n",
108 | "featured": false
109 | },
110 | {
111 | "key": "mpl-2.0",
112 | "name": "Mozilla Public License 2.0",
113 | "spdx_id": "MPL-2.0",
114 | "url": "https://api.github.com/licenses/mpl-2.0",
115 | "node_id": "MDc6TGljZW5zZTE0",
116 | "html_url": "http://choosealicense.com/licenses/mpl-2.0/",
117 | "description": "Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.",
118 | "implementation": "Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.",
119 | "permissions": [
120 | "commercial-use",
121 | "modifications",
122 | "distribution",
123 | "patent-use",
124 | "private-use"
125 | ],
126 | "conditions": [
127 | "disclose-source",
128 | "include-copyright",
129 | "same-license--file"
130 | ],
131 | "limitations": [
132 | "liability",
133 | "trademark-use",
134 | "warranty"
135 | ],
136 | "body": "Mozilla Public License Version 2.0\n==================================\n\n1. Definitions\n--------------\n\n1.1. \"Contributor\"\n means each individual or legal entity that creates, contributes to\n the creation of, or owns Covered Software.\n\n1.2. \"Contributor Version\"\n means the combination of the Contributions of others (if any) used\n by a Contributor and that particular Contributor's Contribution.\n\n1.3. \"Contribution\"\n means Covered Software of a particular Contributor.\n\n1.4. \"Covered Software\"\n means Source Code Form to which the initial Contributor has attached\n the notice in Exhibit A, the Executable Form of such Source Code\n Form, and Modifications of such Source Code Form, in each case\n including portions thereof.\n\n1.5. \"Incompatible With Secondary Licenses\"\n means\n\n (a) that the initial Contributor has attached the notice described\n in Exhibit B to the Covered Software; or\n\n (b) that the Covered Software was made available under the terms of\n version 1.1 or earlier of the License, but not also under the\n terms of a Secondary License.\n\n1.6. \"Executable Form\"\n means any form of the work other than Source Code Form.\n\n1.7. \"Larger Work\"\n means a work that combines Covered Software with other material, in\n a separate file or files, that is not Covered Software.\n\n1.8. \"License\"\n means this document.\n\n1.9. \"Licensable\"\n means having the right to grant, to the maximum extent possible,\n whether at the time of the initial grant or subsequently, any and\n all of the rights conveyed by this License.\n\n1.10. \"Modifications\"\n means any of the following:\n\n (a) any file in Source Code Form that results from an addition to,\n deletion from, or modification of the contents of Covered\n Software; or\n\n (b) any new file in Source Code Form that contains any Covered\n Software.\n\n1.11. \"Patent Claims\" of a Contributor\n means any patent claim(s), including without limitation, method,\n process, and apparatus claims, in any patent Licensable by such\n Contributor that would be infringed, but for the grant of the\n License, by the making, using, selling, offering for sale, having\n made, import, or transfer of either its Contributions or its\n Contributor Version.\n\n1.12. \"Secondary License\"\n means either the GNU General Public License, Version 2.0, the GNU\n Lesser General Public License, Version 2.1, the GNU Affero General\n Public License, Version 3.0, or any later versions of those\n licenses.\n\n1.13. \"Source Code Form\"\n means the form of the work preferred for making modifications.\n\n1.14. \"You\" (or \"Your\")\n means an individual or a legal entity exercising rights under this\n License. For legal entities, \"You\" includes any entity that\n controls, is controlled by, or is under common control with You. For\n purposes of this definition, \"control\" means (a) the power, direct\n or indirect, to cause the direction or management of such entity,\n whether by contract or otherwise, or (b) ownership of more than\n fifty percent (50%) of the outstanding shares or beneficial\n ownership of such entity.\n\n2. License Grants and Conditions\n--------------------------------\n\n2.1. Grants\n\nEach Contributor hereby grants You a world-wide, royalty-free,\nnon-exclusive license:\n\n(a) under intellectual property rights (other than patent or trademark)\n Licensable by such Contributor to use, reproduce, make available,\n modify, display, perform, distribute, and otherwise exploit its\n Contributions, either on an unmodified basis, with Modifications, or\n as part of a Larger Work; and\n\n(b) under Patent Claims of such Contributor to make, use, sell, offer\n for sale, have made, import, and otherwise transfer either its\n Contributions or its Contributor Version.\n\n2.2. Effective Date\n\nThe licenses granted in Section 2.1 with respect to any Contribution\nbecome effective for each Contribution on the date the Contributor first\ndistributes such Contribution.\n\n2.3. Limitations on Grant Scope\n\nThe licenses granted in this Section 2 are the only rights granted under\nthis License. No additional rights or licenses will be implied from the\ndistribution or licensing of Covered Software under this License.\nNotwithstanding Section 2.1(b) above, no patent license is granted by a\nContributor:\n\n(a) for any code that a Contributor has removed from Covered Software;\n or\n\n(b) for infringements caused by: (i) Your and any other third party's\n modifications of Covered Software, or (ii) the combination of its\n Contributions with other software (except as part of its Contributor\n Version); or\n\n(c) under Patent Claims infringed by Covered Software in the absence of\n its Contributions.\n\nThis License does not grant any rights in the trademarks, service marks,\nor logos of any Contributor (except as may be necessary to comply with\nthe notice requirements in Section 3.4).\n\n2.4. Subsequent Licenses\n\nNo Contributor makes additional grants as a result of Your choice to\ndistribute the Covered Software under a subsequent version of this\nLicense (see Section 10.2) or under the terms of a Secondary License (if\npermitted under the terms of Section 3.3).\n\n2.5. Representation\n\nEach Contributor represents that the Contributor believes its\nContributions are its original creation(s) or it has sufficient rights\nto grant the rights to its Contributions conveyed by this License.\n\n2.6. Fair Use\n\nThis License is not intended to limit any rights You have under\napplicable copyright doctrines of fair use, fair dealing, or other\nequivalents.\n\n2.7. Conditions\n\nSections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted\nin Section 2.1.\n\n3. Responsibilities\n-------------------\n\n3.1. Distribution of Source Form\n\nAll distribution of Covered Software in Source Code Form, including any\nModifications that You create or to which You contribute, must be under\nthe terms of this License. You must inform recipients that the Source\nCode Form of the Covered Software is governed by the terms of this\nLicense, and how they can obtain a copy of this License. You may not\nattempt to alter or restrict the recipients' rights in the Source Code\nForm.\n\n3.2. Distribution of Executable Form\n\nIf You distribute Covered Software in Executable Form then:\n\n(a) such Covered Software must also be made available in Source Code\n Form, as described in Section 3.1, and You must inform recipients of\n the Executable Form how they can obtain a copy of such Source Code\n Form by reasonable means in a timely manner, at a charge no more\n than the cost of distribution to the recipient; and\n\n(b) You may distribute such Executable Form under the terms of this\n License, or sublicense it under different terms, provided that the\n license for the Executable Form does not attempt to limit or alter\n the recipients' rights in the Source Code Form under this License.\n\n3.3. Distribution of a Larger Work\n\nYou may create and distribute a Larger Work under terms of Your choice,\nprovided that You also comply with the requirements of this License for\nthe Covered Software. If the Larger Work is a combination of Covered\nSoftware with a work governed by one or more Secondary Licenses, and the\nCovered Software is not Incompatible With Secondary Licenses, this\nLicense permits You to additionally distribute such Covered Software\nunder the terms of such Secondary License(s), so that the recipient of\nthe Larger Work may, at their option, further distribute the Covered\nSoftware under the terms of either this License or such Secondary\nLicense(s).\n\n3.4. Notices\n\nYou may not remove or alter the substance of any license notices\n(including copyright notices, patent notices, disclaimers of warranty,\nor limitations of liability) contained within the Source Code Form of\nthe Covered Software, except that You may alter any license notices to\nthe extent required to remedy known factual inaccuracies.\n\n3.5. Application of Additional Terms\n\nYou may choose to offer, and to charge a fee for, warranty, support,\nindemnity or liability obligations to one or more recipients of Covered\nSoftware. However, You may do so only on Your own behalf, and not on\nbehalf of any Contributor. You must make it absolutely clear that any\nsuch warranty, support, indemnity, or liability obligation is offered by\nYou alone, and You hereby agree to indemnify every Contributor for any\nliability incurred by such Contributor as a result of warranty, support,\nindemnity or liability terms You offer. You may include additional\ndisclaimers of warranty and limitations of liability specific to any\njurisdiction.\n\n4. Inability to Comply Due to Statute or Regulation\n---------------------------------------------------\n\nIf it is impossible for You to comply with any of the terms of this\nLicense with respect to some or all of the Covered Software due to\nstatute, judicial order, or regulation then You must: (a) comply with\nthe terms of this License to the maximum extent possible; and (b)\ndescribe the limitations and the code they affect. Such description must\nbe placed in a text file included with all distributions of the Covered\nSoftware under this License. Except to the extent prohibited by statute\nor regulation, such description must be sufficiently detailed for a\nrecipient of ordinary skill to be able to understand it.\n\n5. Termination\n--------------\n\n5.1. The rights granted under this License will terminate automatically\nif You fail to comply with any of its terms. However, if You become\ncompliant, then the rights granted under this License from a particular\nContributor are reinstated (a) provisionally, unless and until such\nContributor explicitly and finally terminates Your grants, and (b) on an\nongoing basis, if such Contributor fails to notify You of the\nnon-compliance by some reasonable means prior to 60 days after You have\ncome back into compliance. Moreover, Your grants from a particular\nContributor are reinstated on an ongoing basis if such Contributor\nnotifies You of the non-compliance by some reasonable means, this is the\nfirst time You have received notice of non-compliance with this License\nfrom such Contributor, and You become compliant prior to 30 days after\nYour receipt of the notice.\n\n5.2. If You initiate litigation against any entity by asserting a patent\ninfringement claim (excluding declaratory judgment actions,\ncounter-claims, and cross-claims) alleging that a Contributor Version\ndirectly or indirectly infringes any patent, then the rights granted to\nYou by any and all Contributors for the Covered Software under Section\n2.1 of this License shall terminate.\n\n5.3. In the event of termination under Sections 5.1 or 5.2 above, all\nend user license agreements (excluding distributors and resellers) which\nhave been validly granted by You or Your distributors under this License\nprior to termination shall survive termination.\n\n************************************************************************\n* *\n* 6. Disclaimer of Warranty *\n* ------------------------- *\n* *\n* Covered Software is provided under this License on an \"as is\" *\n* basis, without warranty of any kind, either expressed, implied, or *\n* statutory, including, without limitation, warranties that the *\n* Covered Software is free of defects, merchantable, fit for a *\n* particular purpose or non-infringing. The entire risk as to the *\n* quality and performance of the Covered Software is with You. *\n* Should any Covered Software prove defective in any respect, You *\n* (not any Contributor) assume the cost of any necessary servicing, *\n* repair, or correction. This disclaimer of warranty constitutes an *\n* essential part of this License. No use of any Covered Software is *\n* authorized under this License except under this disclaimer. *\n* *\n************************************************************************\n\n************************************************************************\n* *\n* 7. Limitation of Liability *\n* -------------------------- *\n* *\n* Under no circumstances and under no legal theory, whether tort *\n* (including negligence), contract, or otherwise, shall any *\n* Contributor, or anyone who distributes Covered Software as *\n* permitted above, be liable to You for any direct, indirect, *\n* special, incidental, or consequential damages of any character *\n* including, without limitation, damages for lost profits, loss of *\n* goodwill, work stoppage, computer failure or malfunction, or any *\n* and all other commercial damages or losses, even if such party *\n* shall have been informed of the possibility of such damages. This *\n* limitation of liability shall not apply to liability for death or *\n* personal injury resulting from such party's negligence to the *\n* extent applicable law prohibits such limitation. Some *\n* jurisdictions do not allow the exclusion or limitation of *\n* incidental or consequential damages, so this exclusion and *\n* limitation may not apply to You. *\n* *\n************************************************************************\n\n8. Litigation\n-------------\n\nAny litigation relating to this License may be brought only in the\ncourts of a jurisdiction where the defendant maintains its principal\nplace of business and such litigation shall be governed by laws of that\njurisdiction, without reference to its conflict-of-law provisions.\nNothing in this Section shall prevent a party's ability to bring\ncross-claims or counter-claims.\n\n9. Miscellaneous\n----------------\n\nThis License represents the complete agreement concerning the subject\nmatter hereof. If any provision of this License is held to be\nunenforceable, such provision shall be reformed only to the extent\nnecessary to make it enforceable. Any law or regulation which provides\nthat the language of a contract shall be construed against the drafter\nshall not be used to construe this License against a Contributor.\n\n10. Versions of the License\n---------------------------\n\n10.1. New Versions\n\nMozilla Foundation is the license steward. Except as provided in Section\n10.3, no one other than the license steward has the right to modify or\npublish new versions of this License. Each version will be given a\ndistinguishing version number.\n\n10.2. Effect of New Versions\n\nYou may distribute the Covered Software under the terms of the version\nof the License under which You originally received the Covered Software,\nor under the terms of any subsequent version published by the license\nsteward.\n\n10.3. Modified Versions\n\nIf you create software not governed by this License, and you want to\ncreate a new license for such software, you may create and use a\nmodified version of this License if you rename the license and remove\nany references to the name of the license steward (except to note that\nsuch modified license differs from this License).\n\n10.4. Distributing Source Code Form that is Incompatible With Secondary\nLicenses\n\nIf You choose to distribute Source Code Form that is Incompatible With\nSecondary Licenses under the terms of this version of the License, the\nnotice described in Exhibit B of this License must be attached.\n\nExhibit A - Source Code Form License Notice\n-------------------------------------------\n\n This Source Code Form is subject to the terms of the Mozilla Public\n License, v. 2.0. If a copy of the MPL was not distributed with this\n file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nIf it is not possible or desirable to put the notice in a particular\nfile, then You may include the notice in a location (such as a LICENSE\nfile in a relevant directory) where a recipient would be likely to look\nfor such a notice.\n\nYou may add additional accurate notices of copyright ownership.\n\nExhibit B - \"Incompatible With Secondary Licenses\" Notice\n---------------------------------------------------------\n\n This Source Code Form is \"Incompatible With Secondary Licenses\", as\n defined by the Mozilla Public License, v. 2.0.\n",
137 | "featured": false
138 | },
139 | {
140 | "key": "agpl-3.0",
141 | "name": "GNU Affero General Public License v3.0",
142 | "spdx_id": "AGPL-3.0",
143 | "url": "https://api.github.com/licenses/agpl-3.0",
144 | "node_id": "MDc6TGljZW5zZTE=",
145 | "html_url": "http://choosealicense.com/licenses/agpl-3.0/",
146 | "description": "Permissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.",
147 | "implementation": "Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.",
148 | "permissions": [
149 | "commercial-use",
150 | "modifications",
151 | "distribution",
152 | "patent-use",
153 | "private-use"
154 | ],
155 | "conditions": [
156 | "include-copyright",
157 | "document-changes",
158 | "disclose-source",
159 | "network-use-disclose",
160 | "same-license"
161 | ],
162 | "limitations": [
163 | "liability",
164 | "warranty"
165 | ],
166 | "body": " GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU Affero General Public License is a free, copyleft license for\nsoftware and other kinds of works, specifically designed to ensure\ncooperation with the community in the case of network server software.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nour General Public Licenses are intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n Developers that use our General Public Licenses protect your rights\nwith two steps: (1) assert copyright on the software, and (2) offer\nyou this License which gives you legal permission to copy, distribute\nand/or modify the software.\n\n A secondary benefit of defending all users' freedom is that\nimprovements made in alternate versions of the program, if they\nreceive widespread use, become available for other developers to\nincorporate. Many developers of free software are heartened and\nencouraged by the resulting cooperation. However, in the case of\nsoftware used on network servers, this result may fail to come about.\nThe GNU General Public License permits making a modified version and\nletting the public access it on a server without ever releasing its\nsource code to the public.\n\n The GNU Affero General Public License is designed specifically to\nensure that, in such cases, the modified source code becomes available\nto the community. It requires the operator of a network server to\nprovide the source code of the modified version running there to the\nusers of that server. Therefore, public use of a modified version, on\na publicly accessible server, gives the public access to the source\ncode of the modified version.\n\n An older license, called the Affero General Public License and\npublished by Affero, was designed to accomplish similar goals. This is\na different license, not a version of the Affero GPL, but Affero has\nreleased a new version of the Affero GPL which permits relicensing under\nthis license.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU Affero General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Remote Network Interaction; Use with the GNU General Public License.\n\n Notwithstanding any other provision of this License, if you modify the\nProgram, your modified version must prominently offer all users\ninteracting with it remotely through a computer network (if your version\nsupports such interaction) an opportunity to receive the Corresponding\nSource of your version by providing access to the Corresponding Source\nfrom a network server at no charge, through some standard or customary\nmeans of facilitating copying of software. This Corresponding Source\nshall include the Corresponding Source for any work covered by version 3\nof the GNU General Public License that is incorporated pursuant to the\nfollowing paragraph.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the work with which it is combined will remain governed by version\n3 of the GNU General Public License.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU Affero General Public License from time to time. Such new versions\nwill be similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU Affero General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU Affero General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU Affero General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Affero General Public License as published\n by the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Affero General Public License for more details.\n\n You should have received a copy of the GNU Affero General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If your software can interact with users remotely through a computer\nnetwork, you should also make sure that it provides a way for users to\nget its source. For example, if your program is a web application, its\ninterface could display a \"Source\" link that leads users to an archive\nof the code. There are many ways you could offer source, and different\nsolutions will be better for different programs; see section 13 for the\nspecific requirements.\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU AGPL, see\n.\n",
167 | "featured": false
168 | },
169 | {
170 | "key": "apache-2.0",
171 | "name": "Apache License 2.0",
172 | "spdx_id": "Apache-2.0",
173 | "url": "https://api.github.com/licenses/apache-2.0",
174 | "node_id": "MDc6TGljZW5zZTI=",
175 | "html_url": "http://choosealicense.com/licenses/apache-2.0/",
176 | "description": "A permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed under different terms and without source code.",
177 | "implementation": "Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.",
178 | "permissions": [
179 | "commercial-use",
180 | "modifications",
181 | "distribution",
182 | "patent-use",
183 | "private-use"
184 | ],
185 | "conditions": [
186 | "include-copyright",
187 | "document-changes"
188 | ],
189 | "limitations": [
190 | "trademark-use",
191 | "liability",
192 | "warranty"
193 | ],
194 | "body": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright [yyyy] [name of copyright owner]\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n",
195 | "featured": true
196 | },
197 | {
198 | "key": "unlicense",
199 | "name": "The Unlicense",
200 | "spdx_id": "Unlicense",
201 | "url": "https://api.github.com/licenses/unlicense",
202 | "node_id": "MDc6TGljZW5zZTE1",
203 | "html_url": "http://choosealicense.com/licenses/unlicense/",
204 | "description": "A license with no conditions whatsoever which dedicates works to the public domain. Unlicensed works, modifications, and larger works may be distributed under different terms and without source code.",
205 | "implementation": "Create a text file (typically named UNLICENSE or UNLICENSE.txt) in the root of your source code and copy the text of the license disclaimer into the file.",
206 | "permissions": [
207 | "private-use",
208 | "commercial-use",
209 | "modifications",
210 | "distribution"
211 | ],
212 | "conditions": [],
213 | "limitations": [
214 | "liability",
215 | "warranty"
216 | ],
217 | "body": "This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to \n",
218 | "featured": false
219 | }
220 | ]
221 |
--------------------------------------------------------------------------------