Skip to content

Commit 4c34554

Browse files
Merge pull request #10 from StartAutomating/PSSVG-initialcheckin
PSSVG initial checkin
2 parents 972c592 + d446746 commit 4c34554

File tree

195 files changed

+110998
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+110998
-0
lines changed

.github/workflows/TestAndPublish.yml

Lines changed: 555 additions & 0 deletions
Large diffs are not rendered by default.

Build.PSSVG.ps1

Lines changed: 664 additions & 0 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### 0.1
2+
* Initial Release of PSSVG, including:
3+
* A command for every SVG element (fixes #1)
4+
* Lots of examples (fixes #2)
5+
* CI/CD (fixes #3) with tests (fixes #4)
6+
* automatically generated documentation (fixes #5), thanks to [HelpOut](https://github.com/StartAutomating/HelpOut)
7+
* A GitHub action (fixes #6), thanks to [PSDevOps](https://github.com/StartAutomating/PSDevOps)
8+
* It's own logo (fixes #7)
9+
* The script used to generate every SVG element (fixes #8)
10+
* [A github page](https://PSSVG.start-automating.com) (fixes #9)
11+
---

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pssvg.start-automating.com

Examples/Animate.PSSVG.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#requires -Module PSSVG
2+
3+
$original = @"
4+
<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
5+
<rect width="10" height="10">
6+
<animate attributeName="rx" values="0;5;0" dur="10s" repeatCount="indefinite" />
7+
</rect>
8+
</svg>
9+
"@
10+
11+
=<svg> -ViewBox 0,0,10,10 (
12+
=<svg.rect> -Width 10 -Height 10 (
13+
=<svg.animate> -AttributeName rx -Values "0;5;0" -Dur "10s" -RepeatCount indefinite
14+
)
15+
) -OutputPath (Join-Path $psScriptRoot Animate.svg)
16+

Examples/Animate.svg

Lines changed: 1 addition & 0 deletions
Loading

Examples/AnimatedShapes.PSSVG.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
=<svg> @(
2+
$animationSettings = @{
3+
Dur = '2s'
4+
RepeatCount='indefinite'
5+
}
6+
=<svg.circle> -CX 25 -CY 25 -r 10 -Fill black @(
7+
=<svg.animate> -values '1;10;1' -AttributeName r @animationSettings
8+
)
9+
=<svg.rect> -X 0 -Y 50 -Width 50 -Height 50 -Fill Black @(
10+
=<svg.animate> -values '0;50;0' -AttributeName width @animationSettings
11+
=<svg.animate> -values '50;0;50' -AttributeName height @animationSettings
12+
)
13+
=<svg.ellipse> -Cx 25 -Cy 100 -Rx 10 -Ry 5 -Fill black @(
14+
=<svg.animate> -values '10;1;10' -AttributeName rx @animationSettings
15+
=<svg.animate> -values '5;10;5' -AttributeName ry @animationSettings
16+
)
17+
) -ViewBox 0, 0, 100, 150 -OutputPath (Join-Path $psScriptRoot Shapes.svg)

Examples/Circles.PSSVG.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#require -Module PSSVG
2+
3+
=<svg> -ViewBox 0,0,200,200 @(
4+
=<svg.circle> -Fill "red" -Cx 100 -Cy 50 -r 5
5+
=<svg.circle> -Fill "green" -cx 100 -cy 100 -r 10
6+
=<svg.circle> -Fill "blue" -cx 100 -cy 150 -Stroke "cyan" -Strokewidth 1 -r 20
7+
) -OutputPath (Join-Path $PSScriptRoot Circles.svg)
8+

Examples/Circles.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#require -Module PS2D
2+
3+
$fileList = @(Get-ChildItem -Path $PSScriptRoot)
4+
$fileListText = $fileList | Select-Object Name | Out-String -Width 1kb
5+
$fileListLines = @($fileListText -split '(?>\r\n|\n)')
6+
7+
$fontSize = 14
8+
9+
=<svg> @(
10+
$ln = 0
11+
foreach ($line in $fileListLines) {
12+
$ln++
13+
$href =
14+
if ($ln -le 2) {
15+
"."
16+
} else {
17+
$file = $fileList[$ln - 3]
18+
$file.Name
19+
}
20+
=<svg.a> -href $href (
21+
=<svg.text> -X 0 -Y ($ln * $fontSize) -Fontsize $fontSize $fileListLines[$ln] -Xmlspace preserve -Fontfamily monospace
22+
)
23+
}
24+
) -OutputPath (Join-Path $PSScriptRoot DirectoryWithLinks.svg)
25+
26+

0 commit comments

Comments
 (0)