-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples.html
More file actions
145 lines (126 loc) Β· 7.04 KB
/
examples.html
File metadata and controls
145 lines (126 loc) Β· 7.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Plotance - Examples</title>
<script type="application/yaml">
!inclusion
selector: head > *:not([charset])
</script>
<link rel="stylesheet" href="examples.css"/>
</head>
<body>
<script type="application/yaml">
!inclusion
selector: header
</script>
<main>
<h1>Examples</h1>
<p><small>The thumbnail images are SVG files exported from PowerPoint with font adjustments. The text in the thumbnails may appear differently depending on the fonts installed on your system.</small></p>
<section>
<h2>Hello!</h2>
<ul class="files">
<li><a href="./examples/hello/hello.pptx"><img src="./examples/hello/hello.svg" alt="hello.pptx"/></a></li>
<li><a href="./examples/hello/hello.md">hello.md</a></li>
<li><a href="./examples/hello/hello.csv">hello.csv</a></li>
</ul>
</section>
<section>
<h2>Variables and Template file</h2>
<ul class="files">
<li><a href="./examples/pageviews/pageviews.pptx"><img src="./examples/pageviews/pageviews.svg" alt="pageviews.pptx"/></a></li>
<li><a href="./examples/pageviews/pageviews.md">pageviews.md</a></li>
<li><a href="./examples/pageviews/access_2025-01.csv.gz">access_2025-01.csv.gz</a></li>
<li><a href="./examples/pageviews/theme.pptx">theme.pptx</a></li>
<li>
<x-blockcode class="example-box">
<x-l><span class="code-comment"># command</span></x-l>
<x-l><span class="code-identifier">plotance</span> <span class="code-keyword">--template</span> theme.pptx <span class="code-keyword">--arg</span> <span class="code-key">year</span>=2025 <span class="code-keyword">--arg</span> <span class="code-key">month</span>=01 pageviews.md</x-l>
</x-blockcode>
</li>
</ul>
</section>
<section>
<h2>Grid Layout</h2>
<ul class="files">
<li><a href="./examples/grid/grid.pptx"><img src="./examples/grid/grid.svg" alt="grid.pptx"/></a></li>
<li><a href="./examples/grid/grid.md">grid.md</a></li>
<li><a href="./examples/grid/grid1.csv">grid1.csv</a></li>
<li><a href="./examples/grid/grid2.csv">grid2.csv</a></li>
</ul>
</section>
<section>
<h2>Sections</h2>
<ul class="files">
<li><a href="./examples/title_and_sections/title_and_sections.pptx"><img src="./examples/title_and_sections/title_and_sections/slide1.svg" alt="title_and_sections.pptx"/> <img src="./examples/title_and_sections/title_and_sections/slide2.svg" alt=""/> <img src="./examples/title_and_sections/title_and_sections/slide3.svg" alt=""/> <img src="./examples/title_and_sections/title_and_sections/slide4.svg" alt=""/></a></li>
<li><a href="./examples/title_and_sections/title_and_sections.md">title_and_sections.md</a></li>
</ul>
</section>
<section>
<h2>Charts</h2>
<ul class="files">
<li><a href="./examples/chart_types/chart_types.pptx"><img src="./examples/chart_types/chart_types.svg" alt="chart_types.pptx"/></a></li>
<li><a href="./examples/chart_types/chart_types.md">chart_types.md</a></li>
<li><a href="./examples/chart_types/bar.csv">bar.csv</a></li>
<li><a href="./examples/chart_types/line.csv">line.csv</a></li>
<li><a href="./examples/chart_types/area.csv">area.csv</a></li>
<li><a href="./examples/chart_types/scatter.csv">scatter.csv</a></li>
<li><a href="./examples/chart_types/bubble.csv">bubble.csv</a></li>
<li><a href="./examples/chart_types/percentage.csv">percentage.csv</a></li>
</ul>
</section>
<section>
<h2>Text Styles</h2>
<ul class="files">
<li><a href="./examples/text_styles/text_styles.pptx"><img src="./examples/text_styles/text_styles/slide1.svg" alt="text_styles.pptx"/> <img src="./examples/text_styles/text_styles/slide2.svg" alt=""/></a></li>
<li><a href="./examples/text_styles/text_styles.md">text_styles.md</a></li>
<li><a href="./examples/text_styles/image.jpg">image.jpg</a></li>
</ul>
</section>
<section>
<h2>Data Table</h2>
<ul class="files">
<li><a href="./examples/table/table.pptx"><img src="./examples/table/table.svg" alt="table.pptx"/></a></li>
<li><a href="./examples/table/table.md">table.md</a></li>
<li><a href="./examples/table/table.csv">table.csv</a></li>
</ul>
</section>
<section>
<h2>Using Plotance as a Tool</h2>
<p>Plotance can be used as a tool for generating .pptx files in Bash/PowerShell scripts. This example generates a catalog of Azure service icons. Due to license restrictions for Azure icons, we do not provide the resulting file.</p>
<p>The PowerShell script <code>Generate-AzureIconsSlides.ps1</code> performs the following steps:</p>
<ol>
<li>Downloads the ZIP archive of icons and extracts the files.</li>
<li>Downloads the Plotance executable.</li>
<li>Generates the Markdown file.</li>
<li>Converts the Markdown file to the presentation file.</li>
</ol>
<p>On windows, you may need to adjust the execution policy to run PowerShell scripts:</p>
<x-blockcode class="example-box">
<x-l><span class="code-comment"># Save the current execution policy for the current shell session.</span></x-l>
<x-l><span class="code-key">$oldExecutionPolicy</span> = <span class="code-identifier">Get-ExecutionPolicy</span> <span class="code-keyword">-Scope</span> Process</x-l>
<x-l></x-l>
<x-l><span class="code-comment"># Set the policy to "RemoteSigned", allowing local scripts and signed downloaded scripts to run.</span></x-l>
<x-l><span class="code-identifier">Set-ExecutionPolicy</span> RemoteSigned <span class="code-keyword">-Scope</span> Process</x-l>
<x-l></x-l>
<x-l><span class="code-comment"># Unblock the script to allow execution.</span></x-l>
<x-l><span class="code-identifier">Unblock-File</span> Generate-AzureIconsSlides.ps1</x-l>
<x-l></x-l>
<x-l><span class="code-comment"># Execute the script.</span></x-l>
<x-l><span class="code-identifier">.\Generate-AzureIconsSlides.ps1</span></x-l>
<x-l></x-l>
<x-l><span class="code-comment"># Restore the original execution policy.</span></x-l>
<x-l><span class="code-identifier">Set-ExecutionPolicy</span> <span class="code-key">$oldExecutionPolicy</span> <span class="code-keyword">-Scope</span> Process</x-l>
</x-blockcode>
<ul class="files">
<li><img src="./examples/azure_icons/azure_icons.svg" alt=""/></li>
<li><a href="./examples/azure_icons/Generate-AzureIconsSlides.ps1">Generate-AzureIconsSlides.ps1</a></li>
</ul>
</section>
</main>
<script type="application/yaml">
!inclusion
selector: footer
</script>
</body>
</html>