Skip to content

Commit

Permalink
build based on 64435fe
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed May 8, 2024
1 parent d9f5d2d commit 16fd173
Show file tree
Hide file tree
Showing 14 changed files with 1,361 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable
1 change: 1 addition & 0 deletions v0.7
1 change: 1 addition & 0 deletions v0.7.0/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documenter":{"julia_version":"1.6.7","generation_timestamp":"2024-05-08T06:50:36","documenter_version":"1.4.1"}}
108 changes: 108 additions & 0 deletions v0.7.0/api/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>API Reference · PPTX.jl</title><meta name="title" content="API Reference · PPTX.jl"/><meta property="og:title" content="API Reference · PPTX.jl"/><meta property="twitter:title" content="API Reference · PPTX.jl"/><meta name="description" content="Documentation for PPTX.jl."/><meta property="og:description" content="Documentation for PPTX.jl."/><meta property="twitter:description" content="Documentation for PPTX.jl."/><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../search_index.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">PPTX.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li class="is-active"><a class="tocitem" href>API Reference</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>API Reference</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>API Reference</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/ASML-Labs/PPTX.jl/blob/main/docs/src/api.md#" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="API-reference"><a class="docs-heading-anchor" href="#API-reference">API reference</a><a id="API-reference-1"></a><a class="docs-heading-anchor-permalink" href="#API-reference" title="Permalink"></a></h1><ul><li><a href="#PPTX.Picture"><code>PPTX.Picture</code></a></li><li><a href="#PPTX.Presentation"><code>PPTX.Presentation</code></a></li><li><a href="#PPTX.Slide"><code>PPTX.Slide</code></a></li><li><a href="#PPTX.Table"><code>PPTX.Table</code></a></li><li><a href="#PPTX.TextBox"><code>PPTX.TextBox</code></a></li></ul><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="PPTX.Picture" href="#PPTX.Picture"><code>PPTX.Picture</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Picture(source::String; top::Int=0, left::Int=0, size::Int = 40)</code></pre><ul><li><code>source::String</code> path of image file</li><li><code>top::Int</code> mm from the top</li><li><code>left::Int</code> mm from the left</li></ul><p>Internally the sizes are converted EMUs.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; using PPTX

julia&gt; img = Picture(joinpath(PPTX.ASSETS_DIR, &quot;cauliflower.jpg&quot;))
Picture
source is &quot;./cauliflower.jpg&quot;
offset_x is 0 EMUs
offset_y is 0 EMUs
size_x is 1440000 EMUs
size_y is 1475072 EMUs
</code></pre><p>Optionally, you can set the <code>size_x</code> and <code>size_y</code> manually for filetypes not supported by FileIO, such as SVG.</p><pre><code class="language-julia hljs">julia&gt; using PPTX

julia&gt; img = Picture(joinpath(PPTX.ASSETS_DIR, &quot;julia_logo.svg&quot;); size_x=40, size_y=30)
Picture
source is &quot;./julia_logo.svg&quot;
offset_x is 0 EMUs
offset_y is 0 EMUs
size_x is 1440000 EMUs
size_y is 1080000 EMUs
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ASML-Labs/PPTX.jl/blob/64435fe29a9e50c366be5f8067f8e6b4199a8f30/src/Picture.jl#L3-L41">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="PPTX.Presentation" href="#PPTX.Presentation"><code>PPTX.Presentation</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Presentation(
slides::Vector{Slide}=Slide[];
title::String=&quot;unknown&quot;,
author::String=&quot;unknown&quot;,
)</code></pre><p>Type to contain the final presentation you want to write to .pptx.</p><p>If <code>isempty(slides)</code> then we add a first slide with the Title slide layout.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using PPTX

julia&gt; pres = Presentation(; title = &quot;My Presentation&quot;)
Presentation with 1 slide
title is &quot;My Presentation&quot;
author is &quot;unknown&quot;
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ASML-Labs/PPTX.jl/blob/64435fe29a9e50c366be5f8067f8e6b4199a8f30/src/Presentation.jl#L12-L35">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="PPTX.Slide" href="#PPTX.Slide"><code>PPTX.Slide</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Slide(
shapes::Vector{AbstractShape}=AbstractShape[];
title::String=&quot;&quot;,
layout::Int=1,
)</code></pre><ul><li><code>shapes::Vector{AbstractShape}</code> shapes to add to the PowerPoint, can also be pushed afterwards</li><li><code>title::String</code> title text placed inside the title textbox found in the slide layout</li><li><code>layout::Int</code> which slide layout to use. Typically 1 is the title slide and 2 is the text slide.</li></ul><p>Make a Slide for a powerpoint Presentation.</p><p>You can <code>push!</code> any <code>AbstractShape</code> types into this slide, such as a <code>TextBox</code> or <code>Picture</code>.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">julia&gt; using PPTX

julia&gt; slide = Slide(; title=&quot;Hello Title&quot;, layout=2)
Slide(&quot;Hello Title&quot;, PPTX.AbstractShape[], 0, 2)

julia&gt; text = TextBox(&quot;Hello world!&quot;)
TextBox
content is &quot;Hello world!&quot;
offset_x is 1800000 EMUs
offset_y is 1800000 EMUs
size_x is 1440000 EMUs
size_y is 1080000 EMUs

julia&gt; push!(slide, text);

julia&gt; slide
Slide(&quot;Hello Title&quot;, PPTX.AbstractShape[TextBox], 0, 2)
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ASML-Labs/PPTX.jl/blob/64435fe29a9e50c366be5f8067f8e6b4199a8f30/src/Slide.jl#L1-L39">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="PPTX.Table" href="#PPTX.Table"><code>PPTX.Table</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Table(;
content,
offset_x::Real = 50,
offset_y::Real = 50,
size_x::Real = 150,
size_y::Real = 100,
)</code></pre><p>A Table to be used on a Slide.</p><p>The content can be anything that adheres to a <code>Tables.jl</code> interface.</p><p>Offsets and sizes are in millimeters, but will be converted to EMU.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using PPTX, DataFrames

julia&gt; df = DataFrame(a = [1,2], b = [3,4], c = [5,6])
2×3 DataFrame
Row │ a b c
│ Int64 Int64 Int64
─────┼─────────────────────
1 │ 1 3 5
2 │ 2 4 6

julia&gt; t = Table(content=df, size_x=30)
Table
content isa DataFrames.DataFrame
offset_x is 1800000 EMUs
offset_y is 1800000 EMUs
size_x is 1080000 EMUs
size_y is 3600000 EMUs
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ASML-Labs/PPTX.jl/blob/64435fe29a9e50c366be5f8067f8e6b4199a8f30/src/Tables.jl#L1-L39">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="PPTX.TextBox" href="#PPTX.TextBox"><code>PPTX.TextBox</code></a><span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">TextBox(;
content::String = &quot;&quot;,
offset_x::Real = 50,
offset_y::Real = 50,
size_x::Real = 40,
size_y::Real = 30,
style::Dict = Dict(&quot;bold&quot; =&gt; false, &quot;italic&quot; =&gt; false),
)</code></pre><p>A TextBox to be used on a Slide. Offsets and sizes are in millimeters, but will be converted to EMU.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using PPTX

julia&gt; text = TextBox(content=&quot;Hello world!&quot;, size_x=30)
TextBox
content is &quot;Hello world!&quot;
offset_x is 1800000 EMUs
offset_y is 1800000 EMUs
size_x is 1080000 EMUs
size_y is 1080000 EMUs
</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ASML-Labs/PPTX.jl/blob/64435fe29a9e50c366be5f8067f8e6b4199a8f30/src/TextBox.jl#L31-L59">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Base.write-Tuple{String, Presentation}" href="#Base.write-Tuple{String, Presentation}"><code>Base.write</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">Base.write(
filepath::String,
p::Presentation;
overwrite::Bool=false,
open_ppt::Bool=true,
template_path::String=&quot;no-slides.pptx&quot;,
)</code></pre><ul><li><code>filepath::String</code> Desired presentation filepath.</li><li><code>pres::Presentation</code> Presentation object to write.</li><li><code>overwrite = false</code> argument for overwriting existing file.</li><li><code>open_ppt = true</code> open powerpoint after it is written.</li><li><code>template_path::String</code> path to an (empty) pptx that serves as template.</li></ul><p><strong>Examples</strong></p><pre><code class="nohighlight hljs">julia&gt; using PPTX

julia&gt; slide = Slide()

julia&gt; text = TextBox(&quot;Hello world!&quot;)

julia&gt; push!(slide, text)

julia&gt; pres = Presentation()

julia&gt; push!(pres, slide)

julia&gt; write(&quot;hello_world.pptx&quot;, pres)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/ASML-Labs/PPTX.jl/blob/64435fe29a9e50c366be5f8067f8e6b4199a8f30/src/write.jl#L105-L138">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.4.1 on <span class="colophon-date" title="Wednesday 8 May 2024 06:50">Wednesday 8 May 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 16fd173

Please sign in to comment.