|
| 1 | +# Comparing `tmp/dicebear-cli-1.0.2.tar.gz` & `tmp/dicebear-cli-1.1.0.tar.gz` |
| 2 | + |
| 3 | +## filetype from file(1) |
| 4 | + |
| 5 | +```diff |
| 6 | +@@ -1 +1 @@ |
| 7 | +-gzip compressed data, was "dicebear-cli-1.0.2.tar", last modified: Tue Jan 24 15:49:10 2023, max compression |
| 8 | ++gzip compressed data, was "dicebear-cli-1.1.0.tar", last modified: Tue May 21 21:53:12 2024, max compression |
| 9 | +``` |
| 10 | + |
| 11 | +## Comparing `dicebear-cli-1.0.2.tar` & `dicebear-cli-1.1.0.tar` |
| 12 | + |
| 13 | +### file list |
| 14 | + |
| 15 | +```diff |
| 16 | +@@ -1,17 +1,17 @@ |
| 17 | +-drwxrwxrwx 0 0 0 0 2023-01-24 15:49:10.260849 dicebear-cli-1.0.2/ |
| 18 | +--rw-rw-rw- 0 0 0 1095 2022-09-08 14:16:35.000000 dicebear-cli-1.0.2/LICENSE |
| 19 | +--rw-rw-rw- 0 0 0 3170 2023-01-24 15:49:10.259870 dicebear-cli-1.0.2/PKG-INFO |
| 20 | +--rw-rw-rw- 0 0 0 2285 2022-09-08 14:16:35.000000 dicebear-cli-1.0.2/README.md |
| 21 | +-drwxrwxrwx 0 0 0 0 2023-01-24 15:49:10.247524 dicebear-cli-1.0.2/dicebear_cli/ |
| 22 | +--rw-rw-rw- 0 0 0 1161 2023-01-24 15:31:53.000000 dicebear-cli-1.0.2/dicebear_cli/__init__.py |
| 23 | +--rw-rw-rw- 0 0 0 3672 2023-01-24 15:43:24.000000 dicebear-cli-1.0.2/dicebear_cli/__main__.py |
| 24 | +-drwxrwxrwx 0 0 0 0 2023-01-24 15:49:10.257850 dicebear-cli-1.0.2/dicebear_cli.egg-info/ |
| 25 | +--rw-rw-rw- 0 0 0 3170 2023-01-24 15:49:10.000000 dicebear-cli-1.0.2/dicebear_cli.egg-info/PKG-INFO |
| 26 | +--rw-rw-rw- 0 0 0 309 2023-01-24 15:49:10.000000 dicebear-cli-1.0.2/dicebear_cli.egg-info/SOURCES.txt |
| 27 | +--rw-rw-rw- 0 0 0 1 2023-01-24 15:49:10.000000 dicebear-cli-1.0.2/dicebear_cli.egg-info/dependency_links.txt |
| 28 | +--rw-rw-rw- 0 0 0 55 2023-01-24 15:49:10.000000 dicebear-cli-1.0.2/dicebear_cli.egg-info/entry_points.txt |
| 29 | +--rw-rw-rw- 0 0 0 15 2023-01-24 15:49:10.000000 dicebear-cli-1.0.2/dicebear_cli.egg-info/requires.txt |
| 30 | +--rw-rw-rw- 0 0 0 13 2023-01-24 15:49:10.000000 dicebear-cli-1.0.2/dicebear_cli.egg-info/top_level.txt |
| 31 | +--rw-rw-rw- 0 0 0 108 2022-09-08 14:16:35.000000 dicebear-cli-1.0.2/pyproject.toml |
| 32 | +--rw-rw-rw- 0 0 0 42 2023-01-24 15:49:10.260849 dicebear-cli-1.0.2/setup.cfg |
| 33 | +--rw-rw-rw- 0 0 0 2507 2023-01-24 15:48:36.000000 dicebear-cli-1.0.2/setup.py |
| 34 | ++drwxrwxrwx 0 0 0 0 2024-05-21 21:53:12.959846 dicebear-cli-1.1.0/ |
| 35 | ++-rw-rw-rw- 0 0 0 1095 2024-05-21 21:48:09.000000 dicebear-cli-1.1.0/LICENSE |
| 36 | ++-rw-rw-rw- 0 0 0 4718 2024-05-21 21:53:12.958650 dicebear-cli-1.1.0/PKG-INFO |
| 37 | ++-rw-rw-rw- 0 0 0 2614 2024-05-21 21:46:54.000000 dicebear-cli-1.1.0/README.md |
| 38 | ++drwxrwxrwx 0 0 0 0 2024-05-21 21:53:12.922216 dicebear-cli-1.1.0/dicebear_cli/ |
| 39 | ++-rw-rw-rw- 0 0 0 1186 2024-05-21 21:28:51.000000 dicebear-cli-1.1.0/dicebear_cli/__init__.py |
| 40 | ++-rw-rw-rw- 0 0 0 3953 2024-05-21 21:50:47.000000 dicebear-cli-1.1.0/dicebear_cli/__main__.py |
| 41 | ++drwxrwxrwx 0 0 0 0 2024-05-21 21:53:12.958650 dicebear-cli-1.1.0/dicebear_cli.egg-info/ |
| 42 | ++-rw-rw-rw- 0 0 0 4718 2024-05-21 21:53:12.000000 dicebear-cli-1.1.0/dicebear_cli.egg-info/PKG-INFO |
| 43 | ++-rw-rw-rw- 0 0 0 309 2024-05-21 21:53:12.000000 dicebear-cli-1.1.0/dicebear_cli.egg-info/SOURCES.txt |
| 44 | ++-rw-rw-rw- 0 0 0 1 2024-05-21 21:53:12.000000 dicebear-cli-1.1.0/dicebear_cli.egg-info/dependency_links.txt |
| 45 | ++-rw-rw-rw- 0 0 0 55 2024-05-21 21:53:12.000000 dicebear-cli-1.1.0/dicebear_cli.egg-info/entry_points.txt |
| 46 | ++-rw-rw-rw- 0 0 0 15 2024-05-21 21:53:12.000000 dicebear-cli-1.1.0/dicebear_cli.egg-info/requires.txt |
| 47 | ++-rw-rw-rw- 0 0 0 13 2024-05-21 21:53:12.000000 dicebear-cli-1.1.0/dicebear_cli.egg-info/top_level.txt |
| 48 | ++-rw-rw-rw- 0 0 0 108 2022-09-08 14:16:35.000000 dicebear-cli-1.1.0/pyproject.toml |
| 49 | ++-rw-rw-rw- 0 0 0 42 2024-05-21 21:53:12.959846 dicebear-cli-1.1.0/setup.cfg |
| 50 | ++-rw-rw-rw- 0 0 0 3943 2024-05-21 21:37:22.000000 dicebear-cli-1.1.0/setup.py |
| 51 | +``` |
| 52 | + |
| 53 | +### Comparing `dicebear-cli-1.0.2/LICENSE` & `dicebear-cli-1.1.0/LICENSE` |
| 54 | + |
| 55 | + * *Files 2% similar despite different names* |
| 56 | + |
| 57 | +```diff |
| 58 | +@@ -1,10 +1,10 @@ |
| 59 | + MIT License |
| 60 | + |
| 61 | +-Copyright (c) 2021 jvherck (on GitHub) |
| 62 | ++Copyright (c) 2024 jvherck (on GitHub) |
| 63 | + |
| 64 | + Permission is hereby granted, free of charge, to any person obtaining a copy |
| 65 | + of this software and associated documentation files (the "Software"), to deal |
| 66 | + in the Software without restriction, including without limitation the rights |
| 67 | + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 68 | + copies of the Software, and to permit persons to whom the Software is |
| 69 | + furnished to do so, subject to the following conditions: |
| 70 | +``` |
| 71 | + |
| 72 | +### Comparing `dicebear-cli-1.0.2/dicebear_cli/__init__.py` & `dicebear-cli-1.1.0/dicebear_cli/__init__.py` |
| 73 | + |
| 74 | + * *Files 22% similar despite different names* |
| 75 | + |
| 76 | +```diff |
| 77 | +@@ -1,10 +1,10 @@ |
| 78 | + # MIT License |
| 79 | + # |
| 80 | +-# Copyright (c) 2022 jvherck (https://jvherck.github.io/dicebear/) |
| 81 | ++# Copyright (c) 2024 jvherck (https://jvherck.github.io/dicebear/) |
| 82 | + # |
| 83 | + # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 84 | + # of this software and associated documentation files (the "Software"), to deal |
| 85 | + # in the Software without restriction, including without limitation the rights |
| 86 | + # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 87 | + # copies of the Software, and to permit persons to whom the Software is |
| 88 | + # furnished to do so, subject to the following conditions: |
| 89 | +@@ -15,7 +15,9 @@ |
| 90 | + # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 91 | + # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 92 | + # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 93 | + # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 94 | + # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 95 | + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 96 | + # SOFTWARE. |
| 97 | ++ |
| 98 | ++__version__ = "1.1.0" |
| 99 | +``` |
| 100 | + |
| 101 | +### Comparing `dicebear-cli-1.0.2/dicebear_cli/__main__.py` & `dicebear-cli-1.1.0/dicebear_cli/__main__.py` |
| 102 | + |
| 103 | + * *Files 5% similar despite different names* |
| 104 | + |
| 105 | +```diff |
| 106 | +@@ -1,10 +1,10 @@ |
| 107 | + # MIT License |
| 108 | + # |
| 109 | +-# Copyright (c) 2022 jvherck (https://jvherck.github.io/dicebear/) |
| 110 | ++# Copyright (c) 2024 jvherck (on GitHub) |
| 111 | + # |
| 112 | + # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 113 | + # of this software and associated documentation files (the "Software"), to deal |
| 114 | + # in the Software without restriction, including without limitation the rights |
| 115 | + # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 116 | + # copies of the Software, and to permit persons to whom the Software is |
| 117 | + # furnished to do so, subject to the following conditions: |
| 118 | +@@ -15,58 +15,70 @@ |
| 119 | + # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 120 | + # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 121 | + # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 122 | + # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 123 | + # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 124 | + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 125 | + # SOFTWARE. |
| 126 | ++ |
| 127 | + import click |
| 128 | ++from string import ascii_letters, digits |
| 129 | ++from random import choices |
| 130 | + from dicebear import * |
| 131 | + |
| 132 | ++from __init__ import __version__ |
| 133 | ++ |
| 134 | + |
| 135 | + @click.group() |
| 136 | +-@click.version_option(None, "--version", "-v") |
| 137 | ++@click.version_option(__version__, "--version", "-v") |
| 138 | + @click.help_option("--help", "-h") |
| 139 | + def cli(): pass |
| 140 | + |
| 141 | + |
| 142 | + @cli.command(name="create", help="Create one or more new avatars (no customising possible through CLI).") |
| 143 | + @click.argument("style", type=click.STRING, default=None, required=False) |
| 144 | + # help="The style of the avatar. All styles can be found on https://avatars.dicebear.com/styles or `DStyle.list`") |
| 145 | + @click.option("--seed", "-s", show_default=True, type=click.STRING, default=None, |
| 146 | + help="The string to create the avatar (USE QUOTATION MARKS IF YOU WANT A MULTIPLE WORD SEED). Every unique string has their own unique avatar.") |
| 147 | + @click.option("--count", "-c", show_default=True, type=click.INT, default=1, |
| 148 | + help="The amount of avatars to make at once (they will all have the same style and seed if you add these to the command line, " |
| 149 | + "leaving these options blank will create multiple random avatars.") |
| 150 | + @click.option("--format", "-f", show_default=True, type=click.STRING, default=DFormat.svg, |
| 151 | +- help="The format of the avatar. All formats can be found on https://github.com/jvherck/dicebear#formats or `DFormat.list`") |
| 152 | ++ help="The format of the avatar. Get a list of all formats with `dicebear formats`.") |
| 153 | + @click.help_option("--help", "-h") |
| 154 | + def create(seed: str, style: str, count: int, format: str): |
| 155 | + avs = [] |
| 156 | + try: |
| 157 | + if count > 1 and style and seed: |
| 158 | + click.echo("Both a style and seed have been given, generating multiple avatars just gives the same result. " |
| 159 | + "(that's why only 1 is returned)") |
| 160 | + count = 1 |
| 161 | + for _ in range(count): |
| 162 | ++ if seed is None: |
| 163 | ++ seed = "".join(choices(ascii_letters+digits, k=8)) |
| 164 | + av = DAvatar(DStyle.random() if style is None else DStyle.from_str(str(style)), seed) |
| 165 | + if format == DFormat.svg: avs.append(av.url_svg) |
| 166 | + elif format == DFormat.png: avs.append(av.url_png) |
| 167 | + elif format == DFormat.jpg: avs.append(av.url_jpg) |
| 168 | + elif format == DFormat.json: avs.append(av.url_json) |
| 169 | + else: |
| 170 | +- log_error(ImageError("This format is not supported. Check https://github.com/jvherck/dicebear-cli#styles to see all supported formats.")) |
| 171 | ++ log_error(ImageError("This format is not supported. Use `dicebear formats` to see all supported formats.")) |
| 172 | + return |
| 173 | + except Error as e: |
| 174 | + log_error(e) |
| 175 | + return |
| 176 | + for x in avs: click.echo(x) |
| 177 | + |
| 178 | + |
| 179 | + @cli.command(name="styles", help="See a list of all available styles.") |
| 180 | + @click.help_option("--help", "-h") |
| 181 | + def styles(): |
| 182 | +- for style in DStyle.list: click.echo(style) |
| 183 | ++ for s in DStyle.list: click.echo(s) |
| 184 | ++ |
| 185 | ++@cli.command(name="formats", help="See a list of all available formats.") |
| 186 | ++@click.help_option("--help", "-h") |
| 187 | ++def formats(): |
| 188 | ++ for f in DFormat.list: click.echo(f) |
| 189 | + |
| 190 | + |
| 191 | + if __name__ == '__main__': |
| 192 | + cli() |
| 193 | +``` |
| 194 | + |
0 commit comments