Put the examples in a nice table
- ID
9878d36- date
2021-02-20 23:36:43+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
6541ada- message
Put the examples in a nice table- changed files
4 files, 127 additions, 13 deletions
Changed files
README.md (121 → 335)
diff --git a/README.md b/README.md
index 9dfbe4c..41b809d 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,16 @@
-<img src="snowflake.svg">
+# happybackgrounds
-<img src="starfield.svg">
-
-<img src="mars.svg">
-
-<img src="plants.svg">
-
-<img src="happy.svg">
\ No newline at end of file
+<table>
+ <tr>
+ <td><img src="luna.svg"></td>
+ <td><img src="starfield.svg"></td>
+ </tr>
+ <tr>
+ <td><img src="snowflake.svg"></td>
+ <td><img src="plants.svg"></td>
+ </tr>
+ <tr>
+ <td><img src="mars.svg"></td>
+ <td><img src="happy.svg"></td>
+ </tr>
+</table>
happybackgrounds.py (6968 → 6915)
diff --git a/happybackgrounds.py b/happybackgrounds.py
index 3dc3454..2f87186 100755
--- a/happybackgrounds.py
+++ b/happybackgrounds.py
@@ -132,11 +132,9 @@ def create_svg(
lines.append(
f"""
- <g transform="rotate({rotation_angle} 250 250)">
- <g transform="translate({x_start} {y_start}) scale({scale} {scale})"
- style="fill: {fill_color}">
- {icon_path}
- </g>
+ <g transform="rotate({rotation_angle} 250 250) translate({x_start} {y_start}) scale({scale} {scale})"
+ style="fill: {fill_color}">
+ {icon_path}
</g>"""
)
luna.svg (0 → 10359)
diff --git a/luna.svg b/luna.svg
new file mode 100644
index 0000000..69f2112
--- /dev/null
+++ b/luna.svg
@@ -0,0 +1,103 @@
+<svg viewBox="0 0 1600 900" style="background-color:#a8a8a8" xmlns="http://www.w3.org/2000/svg">
+
+ <!--
+ Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free
+ (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
+ -->
+
+
+ <g transform="rotate(144 250 250) translate(654 294) scale(0.3363868644502957 0.3363868644502957)"
+ style="fill: #969696">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(17 250 250) translate(1319 33) scale(0.34102539941853866 0.34102539941853866)"
+ style="fill: #767676">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(23 250 250) translate(813 -34) scale(0.5270231025873588 0.5270231025873588)"
+ style="fill: #9a9a9a">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(43 250 250) translate(1354 668) scale(0.4068478224169197 0.4068478224169197)"
+ style="fill: #878787">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(252 250 250) translate(1382 440) scale(0.46565456939579575 0.46565456939579575)"
+ style="fill: #9d9d9d">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(184 250 250) translate(1102 200) scale(0.6871913371034953 0.6871913371034953)"
+ style="fill: #7c7c7c">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(175 250 250) translate(1015 813) scale(0.693480769109946 0.693480769109946)"
+ style="fill: #898989">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(143 250 250) translate(666 809) scale(0.8533391392244394 0.8533391392244394)"
+ style="fill: #7a7a7a">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(296 250 250) translate(460 589) scale(0.41621368041817147 0.41621368041817147)"
+ style="fill: #a1a1a1">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(356 250 250) translate(1186 998) scale(0.33851952146505515 0.33851952146505515)"
+ style="fill: #9b9b9b">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(59 250 250) translate(773 352) scale(0.3942883339345857 0.3942883339345857)"
+ style="fill: #9f9f9f">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(282 250 250) translate(1101 284) scale(0.28843265212486824 0.28843265212486824)"
+ style="fill: #a3a3a3">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(274 250 250) translate(1125 197) scale(0.6239240264872976 0.6239240264872976)"
+ style="fill: #828282">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(258 250 250) translate(516 -20) scale(0.9881477411664232 0.9881477411664232)"
+ style="fill: #8c8c8c">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(320 250 250) translate(138 297) scale(0.6266505372017255 0.6266505372017255)"
+ style="fill: #797979">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(315 250 250) translate(900 632) scale(0.24915978447535958 0.24915978447535958)"
+ style="fill: #a5a5a5">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(204 250 250) translate(1196 862) scale(0.6056316987773125 0.6056316987773125)"
+ style="fill: #a0a0a0">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(76 250 250) translate(419 857) scale(0.7387991164558441 0.7387991164558441)"
+ style="fill: #a6a6a6">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+
+ <g transform="rotate(37 250 250) translate(136 596) scale(0.7620734375927807 0.7620734375927807)"
+ style="fill: #a2a2a2">
+ <ns0:path xmlns:ns0="http://www.w3.org/2000/svg" d="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z" />
+ </g>
+</svg>
\ No newline at end of file
run.sh (820 → 957)
diff --git a/run.sh b/run.sh
index 9c619d7..5052dec 100755
--- a/run.sh
+++ b/run.sh
@@ -35,3 +35,9 @@ python3 happybackgrounds.py \
--background="#ffc905" \
--icon_name="grin-beam" \
--out_path="happy.svg"
+
+python3 happybackgrounds.py \
+ --background="#a8a8a8" \
+ --icon_name="moon" \
+ --out_path="luna.svg" \
+ --max_icon_count=20