licenseme 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- licenseme-0.1.0/LICENSE +10 -0
- licenseme-0.1.0/PKG-INFO +58 -0
- licenseme-0.1.0/README.md +47 -0
- licenseme-0.1.0/licenseme/__init__.py +1 -0
- licenseme-0.1.0/licenseme/main.py +77 -0
- licenseme-0.1.0/licenseme.egg-info/PKG-INFO +58 -0
- licenseme-0.1.0/licenseme.egg-info/SOURCES.txt +11 -0
- licenseme-0.1.0/licenseme.egg-info/dependency_links.txt +1 -0
- licenseme-0.1.0/licenseme.egg-info/entry_points.txt +2 -0
- licenseme-0.1.0/licenseme.egg-info/requires.txt +1 -0
- licenseme-0.1.0/licenseme.egg-info/top_level.txt +1 -0
- licenseme-0.1.0/pyproject.toml +13 -0
- licenseme-0.1.0/setup.cfg +4 -0
licenseme-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
|
|
4
|
+
|
|
5
|
+
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
|
|
6
|
+
successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
9
|
+
|
|
10
|
+
For more information, please refer to <http://unlicense.org/>
|
licenseme-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: licenseme
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: License your files with ease!
|
|
5
|
+
License-Expression: Unlicense
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: requests>=2.34.2
|
|
10
|
+
Dynamic: license-file
|
|
11
|
+
|
|
12
|
+
### Overview
|
|
13
|
+
`licenseme` is a simple program for copyrighting your work.
|
|
14
|
+
|
|
15
|
+
### Installing
|
|
16
|
+
|
|
17
|
+
You can install licenseme using pip.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install licenseme
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Usage
|
|
24
|
+
|
|
25
|
+
You can use licenseme from your terminal with one simple command.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# File Path defaults to "LICENSE"
|
|
29
|
+
licenseme <LicenseName> [FilePath]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Available Licenses
|
|
33
|
+
|
|
34
|
+
| License | Link |
|
|
35
|
+
| ------------ | ----------------------------------------------------------------------------------- |
|
|
36
|
+
| GPL-3.0 | https://www.gnu.org/licenses/gpl-3.0.txt |
|
|
37
|
+
| GPL-2.0 | https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
|
|
38
|
+
| LGPL-3.0 | https://www.gnu.org/licenses/lgpl-3.0.txt |
|
|
39
|
+
| LGPL-2.1 | https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt |
|
|
40
|
+
| AGPL-3.0 | https://www.gnu.org/licenses/agpl-3.0.txt |
|
|
41
|
+
| MIT | https://raw.githubusercontent.com/spdx/license-list-data/main/text/MIT.txt |
|
|
42
|
+
| Apache-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/Apache-2.0.txt |
|
|
43
|
+
| BSD-2-Clause | https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-2-Clause.txt |
|
|
44
|
+
| BSD-3-Clause | https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-3-Clause.txt |
|
|
45
|
+
| ISC | https://raw.githubusercontent.com/spdx/license-list-data/main/text/ISC.txt |
|
|
46
|
+
| MPL-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/MPL-2.0.txt |
|
|
47
|
+
| CDDL-1.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/CDDL-1.0.txt |
|
|
48
|
+
| EPL-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/EPL-2.0.txt |
|
|
49
|
+
| Unlicense | https://raw.githubusercontent.com/spdx/license-list-data/main/text/Unlicense.txt |
|
|
50
|
+
| CC0-1.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/CC0-1.0.txt |
|
|
51
|
+
|
|
52
|
+
### Contributing
|
|
53
|
+
|
|
54
|
+
Anybody is allowed to contribute as long as the PR adds something of value, like a bug fix or a new link. Don't submit a PR just for a comment!
|
|
55
|
+
|
|
56
|
+
### Licensing
|
|
57
|
+
|
|
58
|
+
This project is under the unlicense, and anybody may use it as they wish. Go wild!
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
### Overview
|
|
2
|
+
`licenseme` is a simple program for copyrighting your work.
|
|
3
|
+
|
|
4
|
+
### Installing
|
|
5
|
+
|
|
6
|
+
You can install licenseme using pip.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install licenseme
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Usage
|
|
13
|
+
|
|
14
|
+
You can use licenseme from your terminal with one simple command.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# File Path defaults to "LICENSE"
|
|
18
|
+
licenseme <LicenseName> [FilePath]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Available Licenses
|
|
22
|
+
|
|
23
|
+
| License | Link |
|
|
24
|
+
| ------------ | ----------------------------------------------------------------------------------- |
|
|
25
|
+
| GPL-3.0 | https://www.gnu.org/licenses/gpl-3.0.txt |
|
|
26
|
+
| GPL-2.0 | https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
|
|
27
|
+
| LGPL-3.0 | https://www.gnu.org/licenses/lgpl-3.0.txt |
|
|
28
|
+
| LGPL-2.1 | https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt |
|
|
29
|
+
| AGPL-3.0 | https://www.gnu.org/licenses/agpl-3.0.txt |
|
|
30
|
+
| MIT | https://raw.githubusercontent.com/spdx/license-list-data/main/text/MIT.txt |
|
|
31
|
+
| Apache-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/Apache-2.0.txt |
|
|
32
|
+
| BSD-2-Clause | https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-2-Clause.txt |
|
|
33
|
+
| BSD-3-Clause | https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-3-Clause.txt |
|
|
34
|
+
| ISC | https://raw.githubusercontent.com/spdx/license-list-data/main/text/ISC.txt |
|
|
35
|
+
| MPL-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/MPL-2.0.txt |
|
|
36
|
+
| CDDL-1.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/CDDL-1.0.txt |
|
|
37
|
+
| EPL-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/EPL-2.0.txt |
|
|
38
|
+
| Unlicense | https://raw.githubusercontent.com/spdx/license-list-data/main/text/Unlicense.txt |
|
|
39
|
+
| CC0-1.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/CC0-1.0.txt |
|
|
40
|
+
|
|
41
|
+
### Contributing
|
|
42
|
+
|
|
43
|
+
Anybody is allowed to contribute as long as the PR adds something of value, like a bug fix or a new link. Don't submit a PR just for a comment!
|
|
44
|
+
|
|
45
|
+
### Licensing
|
|
46
|
+
|
|
47
|
+
This project is under the unlicense, and anybody may use it as they wish. Go wild!
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from . import main
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# SPDX-License-Identifier: Unlicense
|
|
4
|
+
# This is free and unencumbered software released into the public domain.
|
|
5
|
+
#
|
|
6
|
+
# Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
7
|
+
# distribute this software, either in source code form or as a compiled
|
|
8
|
+
# binary, for any purpose, commercial or non-commercial, and by any
|
|
9
|
+
# means.
|
|
10
|
+
|
|
11
|
+
from requests import get
|
|
12
|
+
from requests.exceptions import ConnectTimeout, ReadTimeout
|
|
13
|
+
from sys import argv, stderr
|
|
14
|
+
|
|
15
|
+
LICENSES = {
|
|
16
|
+
# GNU GPL
|
|
17
|
+
"GPL-3.0": "https://www.gnu.org/licenses/gpl-3.0.txt",
|
|
18
|
+
"GPL-2.0": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt",
|
|
19
|
+
"LGPL-3.0": "https://www.gnu.org/licenses/lgpl-3.0.txt",
|
|
20
|
+
"LGPL-2.1": "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt",
|
|
21
|
+
"AGPL-3.0": "https://www.gnu.org/licenses/agpl-3.0.txt",
|
|
22
|
+
# Permissive
|
|
23
|
+
"MIT": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/MIT.txt",
|
|
24
|
+
"Apache-2.0": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/Apache-2.0.txt",
|
|
25
|
+
"BSD-2-Clause": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-2-Clause.txt",
|
|
26
|
+
"BSD-3-Clause": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-3-Clause.txt",
|
|
27
|
+
"ISC": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/ISC.txt",
|
|
28
|
+
"MPL-2.0": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/MPL-2.0.txt",
|
|
29
|
+
"CDDL-1.0": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/CDDL-1.0.txt",
|
|
30
|
+
"EPL-2.0": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/EPL-2.0.txt",
|
|
31
|
+
"Unlicense": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/Unlicense.txt",
|
|
32
|
+
"CC0-1.0": "https://raw.githubusercontent.com/spdx/license-list-data/main/text/CC0-1.0.txt",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
HELP_MESSAGE = """
|
|
36
|
+
Usage: licenseme <Name> [Path]
|
|
37
|
+
-h, --help show this help message and exit
|
|
38
|
+
-l, --list list available licenses
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def main():
|
|
42
|
+
try:
|
|
43
|
+
url = LICENSES[argv[1]]
|
|
44
|
+
|
|
45
|
+
except IndexError:
|
|
46
|
+
raise TypeError("No license provided.")
|
|
47
|
+
|
|
48
|
+
except KeyError:
|
|
49
|
+
if argv[1] in ["--list", "-l"]:
|
|
50
|
+
print("Available Licenses:")
|
|
51
|
+
|
|
52
|
+
for k in sorted(LICENSES):
|
|
53
|
+
print(k)
|
|
54
|
+
|
|
55
|
+
raise SystemExit(0)
|
|
56
|
+
|
|
57
|
+
elif argv[1] in ["--help", "-h"]:
|
|
58
|
+
print(HELP_MESSAGE)
|
|
59
|
+
|
|
60
|
+
raise SystemExit(0)
|
|
61
|
+
|
|
62
|
+
print("Error: Invalid license", file = stderr)
|
|
63
|
+
raise SystemExit(1)
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
response = get(url, timeout=10)
|
|
67
|
+
response.raise_for_status()
|
|
68
|
+
text = response.text
|
|
69
|
+
|
|
70
|
+
with open(argv[2] if len(argv) > 2 else "LICENSE", 'w', encoding="utf-8") as f:
|
|
71
|
+
f.write(text)
|
|
72
|
+
|
|
73
|
+
except (ConnectTimeout, ReadTimeout):
|
|
74
|
+
raise TimeoutError("Connection Timed Out")
|
|
75
|
+
|
|
76
|
+
if __name__ == "__main__":
|
|
77
|
+
main()
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: licenseme
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: License your files with ease!
|
|
5
|
+
License-Expression: Unlicense
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: requests>=2.34.2
|
|
10
|
+
Dynamic: license-file
|
|
11
|
+
|
|
12
|
+
### Overview
|
|
13
|
+
`licenseme` is a simple program for copyrighting your work.
|
|
14
|
+
|
|
15
|
+
### Installing
|
|
16
|
+
|
|
17
|
+
You can install licenseme using pip.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install licenseme
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Usage
|
|
24
|
+
|
|
25
|
+
You can use licenseme from your terminal with one simple command.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# File Path defaults to "LICENSE"
|
|
29
|
+
licenseme <LicenseName> [FilePath]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Available Licenses
|
|
33
|
+
|
|
34
|
+
| License | Link |
|
|
35
|
+
| ------------ | ----------------------------------------------------------------------------------- |
|
|
36
|
+
| GPL-3.0 | https://www.gnu.org/licenses/gpl-3.0.txt |
|
|
37
|
+
| GPL-2.0 | https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt |
|
|
38
|
+
| LGPL-3.0 | https://www.gnu.org/licenses/lgpl-3.0.txt |
|
|
39
|
+
| LGPL-2.1 | https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt |
|
|
40
|
+
| AGPL-3.0 | https://www.gnu.org/licenses/agpl-3.0.txt |
|
|
41
|
+
| MIT | https://raw.githubusercontent.com/spdx/license-list-data/main/text/MIT.txt |
|
|
42
|
+
| Apache-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/Apache-2.0.txt |
|
|
43
|
+
| BSD-2-Clause | https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-2-Clause.txt |
|
|
44
|
+
| BSD-3-Clause | https://raw.githubusercontent.com/spdx/license-list-data/main/text/BSD-3-Clause.txt |
|
|
45
|
+
| ISC | https://raw.githubusercontent.com/spdx/license-list-data/main/text/ISC.txt |
|
|
46
|
+
| MPL-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/MPL-2.0.txt |
|
|
47
|
+
| CDDL-1.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/CDDL-1.0.txt |
|
|
48
|
+
| EPL-2.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/EPL-2.0.txt |
|
|
49
|
+
| Unlicense | https://raw.githubusercontent.com/spdx/license-list-data/main/text/Unlicense.txt |
|
|
50
|
+
| CC0-1.0 | https://raw.githubusercontent.com/spdx/license-list-data/main/text/CC0-1.0.txt |
|
|
51
|
+
|
|
52
|
+
### Contributing
|
|
53
|
+
|
|
54
|
+
Anybody is allowed to contribute as long as the PR adds something of value, like a bug fix or a new link. Don't submit a PR just for a comment!
|
|
55
|
+
|
|
56
|
+
### Licensing
|
|
57
|
+
|
|
58
|
+
This project is under the unlicense, and anybody may use it as they wish. Go wild!
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
licenseme/__init__.py
|
|
5
|
+
licenseme/main.py
|
|
6
|
+
licenseme.egg-info/PKG-INFO
|
|
7
|
+
licenseme.egg-info/SOURCES.txt
|
|
8
|
+
licenseme.egg-info/dependency_links.txt
|
|
9
|
+
licenseme.egg-info/entry_points.txt
|
|
10
|
+
licenseme.egg-info/requires.txt
|
|
11
|
+
licenseme.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests>=2.34.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
licenseme
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "licenseme"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "License your files with ease!"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "Unlicense"
|
|
7
|
+
requires-python = ">=3.13"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"requests>=2.34.2",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[project.scripts]
|
|
13
|
+
licenseme = "licenseme.main:main"
|