refactor: adapt to nuspec requirement for gallery publishing

This commit is contained in:
Rodweil, Theodor 2023-08-07 03:45:19 +02:00
parent 2019f8c959
commit 69c2684ee7
No known key found for this signature in database
GPG key ID: F8BC1B0EB1F9CCF5
29 changed files with 84 additions and 20 deletions

14
.nuspec
View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>ConfluencePublisher</id>
<version>1.1.0</version>
<description>Übergangslösung für die Integration von sphinx-confluencebuilder generierter Confluence Dokumentation</description>
<authors>tiara.rodney@adesso.de</authors>
<owners>irina.ternovykh@vkb.de</owners>
<license type="expression">UNLICENSED</license>
<readme>README.md</readme>
<copyright>VKBit Betrieb GmbH</copyright>
<title>Powershell Confluence Publisher</title>
</metadata>
</package>

14
PSConfluencePublisher.nuspec Executable file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>PSConfluencePublisher</id>
<version>1.1.0</version>
<description>standalone publisher for xconfluencebuilder</description>
<authors>theodor.rodweil@victory-k.it</authors>
<owners>Theodor Rodweil</owners>
<license type="expression">DL-DE-BY-2.0</license>
<readme>README.md</readme>
<copyright>Victory Karma IT</copyright>
<title>Powershell Confluence Publisher</title>
</metadata>
</package>

View file

@ -1,7 +1,8 @@
# PSConfluencePublisher
This program is a standalone publisher component for the
`sphinxcontrib.confluencebuilder` Sphinx extension.
[victorykit-xconfluencebuilder](https://bitbucket.org/victorykit/xconfluencebuilder)
Sphinx extension.
It consumes, a JSON-formatted manifest of a *Sphinx build* dump generated by
the ``sphinxcontrib.xconfluencebuilder`` and unidirectionally synchronizes
@ -24,11 +25,12 @@ to reduce the amount of remote data retrieval. This includes hashing of page and
attachments content in addition to tracking publishing versions and remote ids.
Through a JSONSchema, it is made sure that the manifest stays consistent for
interchange with the original manifest producer system
(```sphinxcontrib.xconfluencebuilder``).
(`victorykit-xconfluencebuilder`).
## Usage
You can install the module via [nuget](https://www.nuget.org).
You will be able to install the module via [nuget](https://www.nuget.org). This
however is not yet possible.
```
Install-Module victorykit.PSConfluencePublisher
@ -45,7 +47,7 @@ PS> git clone git@bitbucket.org:victorykit/psconfluencepublisher.git
```
PS> # universal import statement compatible with PowerShell Core & Desktop
PS> Import-Module (Join-Path 'PSConfluencePublisher'
PS> Import-Module (Join-Path 'tools'
'PSConfluencePublisher.psd1')
```
@ -102,9 +104,9 @@ This program requires [Pester](https://pester.dev/) to execute it's test suite.
You can execute the following from within a PowerShell session.
``PS> Invoke-Pester PSConfluencePublisher/*.Tests.ps1 -Show 'All'``
``PS> Invoke-Pester tools/*.Tests.ps1 -Show 'All'``
or the following, from within a POSIX shell and PowerShell Core being present:
``$ pwsh -c "Invoke-Pester PSConfluencePublisher/*.Tests.ps1 -Show 'All'"``
``$ pwsh -c "Invoke-Pester tools/*.Tests.ps1 -Show 'All'"``

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -0,0 +1,33 @@
{
"Pages": [
{
"Title": "Default Sample~",
"Ref": "pages/Default+Sample~.xml"
},
{
"Title": "Cats",
"Ref": "pages/Cats.xml",
"AncestorTitle": "Default Sample~"
}
],
"Attachments": [
{
"Name": "pexels-just-a-couple-photos-3777622.jpg",
"ContainerPageTitle": "Cats",
"MimeType": "image/jpeg",
"Ref": "attachments/pexels-just-a-couple-photos-3777622.jpg"
},
{
"Name": "pexels-sami-aksu-14356302.jpg",
"ContainerPageTitle": "Cats",
"MimeType": "image/jpeg",
"Ref": "attachments/pexels-sami-aksu-14356302.jpg"
},
{
"Name": "objects.inv",
"ContainerPageTitle": "Default Sample~",
"MimeType": "application/octet-stream",
"Ref": "attachments/objects.inv"
}
]
}

View file

@ -0,0 +1,5 @@
<p>What can we say… They secretly rule the world.</p><ac:image>
<ri:attachment ri:filename="pexels-just-a-couple-photos-3777622.jpg"></ri:attachment>
</ac:image><p>photo by: <a href="https://www.pexels.com/@jacp/">https://www.pexels.com/@jacp/</a></p><ac:image>
<ri:attachment ri:filename="pexels-sami-aksu-14356302.jpg"></ri:attachment>
</ac:image><p>photo by: <a href="https://www.pexels.com/@sami-aksu-48867324/">https://www.pexels.com/@sami-aksu-48867324/</a></p>

View file

@ -0,0 +1,24 @@
<ac:structured-macro ac:name="info">
<ac:rich-text-body><p><code>confluence_conf.py</code> is not required, its just a helper module to be able to configure <code>sphinxcontrib.confluencebuilder</code> through environment variables.</p></ac:rich-text-body>
</ac:structured-macro>
<p>To run this sample, <a href="https://pypi.org/project/pipenv/">pipenv</a> is required.</p><p>First, install the <em>venv</em> by executing the following command from within the <code>samples/default/</code> directory:</p><ac:structured-macro ac:name="code">
<ac:parameter ac:name="language">python</ac:parameter>
<ac:parameter ac:name="linenumbers">false</ac:parameter>
<ac:plain-text-body><![CDATA[$ python3 -m pipenv install]]></ac:plain-text-body>
</ac:structured-macro>
<ac:structured-macro ac:name="info">
<ac:rich-text-body><p>To contain the virtual environment within the current directory, create an empty directory named <code>.venv</code>.</p></ac:rich-text-body>
</ac:structured-macro>
<p>Afterwards, execute the following command:</p><ac:structured-macro ac:name="code">
<ac:parameter ac:name="language">python</ac:parameter>
<ac:parameter ac:name="linenumbers">false</ac:parameter>
<ac:plain-text-body><![CDATA[$ python3 -m pipenv run build-sphinx]]></ac:plain-text-body>
</ac:structured-macro>
<p>The backend for the command can be inspected in <code>Pipfile</code>.</p><p>You should now have a directory</p><p style="clear: both;">Important Content</p>
<ul>
<li>
<ac:link>
<ri:page ri:content-title="Cats" />
<ac:link-body>Cats</ac:link-body>
</ac:link></li>
</ul>