Skip to content

Commit c526bfc

Browse files
committed
Retitled StaineGlass -> Impressionist
1 parent 6d0ddce commit c526bfc

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

StainedGlass/__main__.py renamed to Impressionist/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# StainedGlass/__main__.py
1+
# Impressionist/__main__.py
22
# From Fun Computer Science Projects in Python
33
# Copyright 2024 David Kopec
44
#
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
from argparse import ArgumentParser
17-
from StainedGlass.stainedglass import StainedGlass, ColorMethod, ShapeType
17+
from Impressionist.impressionist import Impressionist, ColorMethod, ShapeType
1818

1919
if __name__ == "__main__":
2020
# Parse the file argument
@@ -39,5 +39,5 @@
3939
arguments = argument_parser.parse_args()
4040
method = ColorMethod[arguments.method.upper()]
4141
shape_type = ShapeType[arguments.shape.upper()]
42-
StainedGlass(arguments.image_file, arguments.output_file, arguments.trials, method,
42+
Impressionist(arguments.image_file, arguments.output_file, arguments.trials, method,
4343
shape_type, arguments.length, arguments.vector, arguments.animate)

StainedGlass/stainedglass.py renamed to Impressionist/impressionist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# StainedGlass/stainedglass.py
1+
# Impressionist/impressionist.py
22
# From Fun Computer Science Projects in Python
33
# Copyright 2024 David Kopec
44
#
@@ -19,7 +19,7 @@
1919
import random
2020
from math import trunc
2121
from timeit import default_timer as timer
22-
from StainedGlass.svg import SVG
22+
from Impressionist.svg import SVG
2323

2424
ColorMethod = Enum("ColorMethod", "RANDOM AVERAGE COMMON")
2525
ShapeType = Enum("ShapeType", "ELLIPSE TRIANGLE QUADRILATERAL LINE")
@@ -32,7 +32,7 @@ def get_most_common_color(image: Image.Image) -> tuple[int, int, int]:
3232
return max(colors, key=lambda item: item[0])[1] # type: ignore
3333

3434

35-
class StainedGlass:
35+
class Impressionist:
3636
def __init__(self, file_name: str, output_file: str, trials: int, method: ColorMethod,
3737
shape_type: ShapeType, length: int, vector: bool, animation_length: int):
3838
self.method = method

StainedGlass/svg.py renamed to Impressionist/svg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# StainedGlass/svg.py
1+
# Impressionist/svg.py
22
# From Fun Computer Science Projects in Python
33
# Copyright 2024 David Kopec
44
#

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Additional options:
7272

7373
`-g` output a .gif format version as well
7474

75-
### StainedGlass (Chapter 4)
75+
### Impressionist (Chapter 4)
7676

7777
Computationally draws abstract approximations of images using vector shapes.
7878

@@ -82,11 +82,11 @@ Computationally draws abstract approximations of images using vector shapes.
8282

8383
#### Running
8484

85-
`python -m StainedGlass <input_file_name> <output_file_name>`
85+
`python -m Impressionist <input_file_name> <output_file_name>`
8686

8787
For example:
8888

89-
`python -m StainedGlass swing.jpeg swing.png`
89+
`python -m Impressionist swing.jpeg swing.png`
9090

9191
Additional options:
9292

0 commit comments

Comments
 (0)