Skip to content

Commit

Permalink
Ensure unique file names
Browse files Browse the repository at this point in the history
  • Loading branch information
emlyn committed Nov 21, 2024
1 parent ff3e2e5 commit 9fdf466
Show file tree
Hide file tree
Showing 98 changed files with 142 additions and 134 deletions.
10 changes: 5 additions & 5 deletions docs/assets/fractals/abstract/_info.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
fractals:
- file: abstract2
- file: ominous-bubbles
name: Ominous Bubbles
year: 2021
tags: [D1, Colour, New]
- file: abstract3
- file: branching-balls
name: Branching Balls
year: 2021
tags: [Z1, Colour, New]
- file: abstract4
- file: angel
name: Angel
year: 2021
tags: [Z1, B&W, New]
- file: abstract6
- file: herd
name: Fractal Herd
tags: [D1, Monochrome, New]
- file: cross
- file: minkowski-cross
name: Cross
tags: [Z4, Colour, Variation]
links:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/assets/fractals/curves/_info.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fractals:
- file: koch
- file: koch-curve
name: Koch Curve
year: 2021
dimension: log(4) / log(3)
Expand All @@ -24,15 +24,15 @@ fractals:
url: https://en.wikipedia.org/wiki/Dragon_curve#Heighway_dragon
- name: Larry Scott > Heighway Dragon
url: https://larryriddle.agnesscott.org/ifs/heighway/heighway.htm
- file: golden
- file: golden-dragon
name: Golden Dragon Curve
year: 2021
dimension: phi
tags: [Z1, B&W, Known]
links:
- name: Larry Riddle > Golden Dragon
url: https://larryriddle.agnesscott.org/ifs/heighway/goldenDragon.htm
- file: golden2
- file: golden
name: Golden
tags: [Z1, Monochrome, Variation]
- file: twindragon
Expand Down
Binary file added docs/assets/fractals/curves/golden-dragon.pptx
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/fractals/curves/golden-dragon_600.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/fractals/curves/golden.pptx
Binary file not shown.
Binary file removed docs/assets/fractals/curves/golden2.pptx
Binary file not shown.
Binary file removed docs/assets/fractals/curves/golden2_1200.png
Binary file not shown.
Binary file removed docs/assets/fractals/curves/golden2_2400.png
Binary file not shown.
Binary file removed docs/assets/fractals/curves/golden2_600.png
Binary file not shown.
Binary file modified docs/assets/fractals/curves/golden_1200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/fractals/curves/golden_2400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/fractals/curves/golden_600.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions docs/assets/fractals/hexagons/_info.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fractals:
- file: sierpinski
- file: sierpinski-hexagon
name: Sierpiński Hexagon
dimension: log(6) / log(3)
tags: [D6, B&W, Known, Tile]
Expand All @@ -19,7 +19,7 @@ fractals:
- file: sierpinski-rotated-shaded
name: Rotated Shaded Sierpinski Hexagon
tags: [D6, Monochrome, Variation, Tile]
- file: koch
- file: koch-snowflake
name: Koch Snowflake
year: 2021
dimension: 2
Expand Down
File renamed without changes.
File renamed without changes
4 changes: 2 additions & 2 deletions docs/assets/fractals/linear/_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ fractals:
- file: powerlines
name: Power Lines
tags: [Z1, Colour, New]
- file: dots
name: Dots
- file: ruler
name: Ruler
tags: [D2, Grey, New]
- file: circles
name: Circles
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 2 additions & 2 deletions docs/assets/fractals/pentagons/_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fractals:
url: https://en.wikipedia.org/wiki/N-flake#Pentaflake
- name: Larry Riddle > Durer's Pentagons
url: https://larryriddle.agnesscott.org/ifs/pentagon/Durer.htm
- file: sierpinski
- file: sierpinski-pentagon
name: Sierpiński Pentagon
year: 2021
dimension: log(5) / log(1 + phi)
Expand All @@ -21,7 +21,7 @@ fractals:
- file: rotated-pentaflake
name: Rotated Pentaflake
tags: [D5, B&W, Known]
- file: rotated-sierpinski
- file: rotated-pentagons
name: Rotated Sierpiński Pentagon
dimension: log(5) / log(1 + phi)
tags: [D5, B&W, Known]
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/fractals/spirals/_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fractals:
- file: fire
name: Fire Spiral
tags: [Z3, Colour, Inspired]
- file: golden
- file: golden-spiral
name: Golden Spiral
tags: [Z1, Colour, Inspired]
- file: blossom
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/assets/fractals/squares/_info.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fractals:
- file: sierpinski
- file: sierpinski-carpet
name: Sierpiński Carpet
year: 2021
description: >-
Expand Down Expand Up @@ -72,7 +72,7 @@ fractals:
name: Fractal Castle
dimension: log(8) / log(3)
tags: [D1, B&W, Variation]
- file: cross
- file: jerusalem-cross
name: Jerusalem Cross
dimension: log((sqrt(2) - 1) / 2) / log(sqrt(2) - 1)
tags: [D4, Monochrome, Known, Tile]
Expand All @@ -90,7 +90,7 @@ fractals:
- file: distorted
name: Distorted Carpet
tags: [D2, Monochrome, Variation]
- file: dots
- file: coloured-dots
name: Dots
tags: [D2, Colour, Inspired, Tile]
- file: window
Expand Down
Binary file added docs/assets/fractals/squares/coloured-dots.pptx
Binary file not shown.
Binary file removed docs/assets/fractals/squares/dots.pptx
Binary file not shown.
Binary file removed docs/assets/fractals/squares/dots_1200.png
Diff not rendered.
Binary file removed docs/assets/fractals/squares/dots_2400.png
Diff not rendered.
Binary file removed docs/assets/fractals/squares/dots_600.png
Diff not rendered.
File renamed without changes.
File renamed without changes
10 changes: 5 additions & 5 deletions docs/assets/fractals/triangles/_info.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fractals:
- file: sierpinski
name: Sierpiński Triangle
- file: sierpinski-gasket
name: Sierpiński Gasket
year: 2021
description: >-
The classic Sierpiński Gasket (triangle)
Expand All @@ -26,7 +26,7 @@ fractals:
- file: rgb
name: Colour shaded Sierpiński Triangle
tags: [Z1, Colour, Variation, Tile]
- file: circles
- file: circle-triangle
name: Sierpiński Triangle made of circles
tags: [D3, Grey, Variation]
- file: cmy
Expand Down Expand Up @@ -56,8 +56,8 @@ fractals:
name: Alternating Sierpinski Triangle
dimension: 2
tags: [D3, B&W, Inspired, Tile]
- file: rotated-sierpinski
name: Rotated Sierpiński
- file: rotated-triangles
name: Rotated Sierpiński Triangle
tags: [D3, Grey, Inspired]
- file: triflake
name: Triflake
Expand Down
File renamed without changes.
218 changes: 109 additions & 109 deletions docs/index.html

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions scripts/tasks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@
:tag-groups
(mapcat :tags)
(map :name)
frequencies)]
frequencies)
files (->> info
:fractals
(map #(select-keys % [:file :category :name]))
(group-by :file)
(filter #(> (count (val %)) 1))
seq)]
(when (> nils 1)
(throw (ex-info "There should only be one unnamed tag group" {:num nils})))
(when-let [dup-tags (->> tags
Expand All @@ -232,7 +238,9 @@
:let [bad-tags (seq (remove tags (:tags frac)))]
:when bad-tags]
(throw (ex-info "Fractal has unknown tags" (assoc (select-keys frac [:name :file :category :tags])
:bad-tags bad-tags)))))
:bad-tags bad-tags))))
(when files
(throw (ex-info "Duplicate filenames" {:files files}))))
info)

(defn read-info
Expand Down

0 comments on commit 9fdf466

Please sign in to comment.