refactor: adapt to nuspec requirement for gallery publishing
This commit is contained in:
parent
2019f8c959
commit
69c2684ee7
29 changed files with 84 additions and 20 deletions
14
.nuspec
14
.nuspec
|
|
@ -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
14
PSConfluencePublisher.nuspec
Executable 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>
|
||||||
14
README.md
14
README.md
|
|
@ -1,7 +1,8 @@
|
||||||
# PSConfluencePublisher
|
# PSConfluencePublisher
|
||||||
|
|
||||||
This program is a standalone publisher component for the
|
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
|
It consumes, a JSON-formatted manifest of a *Sphinx build* dump generated by
|
||||||
the ``sphinxcontrib.xconfluencebuilder`` and unidirectionally synchronizes
|
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.
|
attachments content in addition to tracking publishing versions and remote ids.
|
||||||
Through a JSONSchema, it is made sure that the manifest stays consistent for
|
Through a JSONSchema, it is made sure that the manifest stays consistent for
|
||||||
interchange with the original manifest producer system
|
interchange with the original manifest producer system
|
||||||
(```sphinxcontrib.xconfluencebuilder``).
|
(`victorykit-xconfluencebuilder`).
|
||||||
|
|
||||||
## Usage
|
## 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
|
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> # universal import statement compatible with PowerShell Core & Desktop
|
||||||
PS> Import-Module (Join-Path 'PSConfluencePublisher'
|
PS> Import-Module (Join-Path 'tools'
|
||||||
'PSConfluencePublisher.psd1')
|
'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.
|
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:
|
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'"``
|
||||||
|
|
|
||||||
BIN
samples/default/confluence.out/._.DS_Store
Executable file
BIN
samples/default/confluence.out/._.DS_Store
Executable file
Binary file not shown.
BIN
samples/default/confluence.out/._manifest.json
Executable file
BIN
samples/default/confluence.out/._manifest.json
Executable file
Binary file not shown.
Binary file not shown.
BIN
samples/default/confluence.out/attachments/._pexels-sami-aksu-14356302.jpg
Executable file
BIN
samples/default/confluence.out/attachments/._pexels-sami-aksu-14356302.jpg
Executable file
Binary file not shown.
BIN
samples/default/confluence.out/attachments/objects.inv
Executable file
BIN
samples/default/confluence.out/attachments/objects.inv
Executable file
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.8 MiB |
BIN
samples/default/confluence.out/attachments/pexels-sami-aksu-14356302.jpg
Executable file
BIN
samples/default/confluence.out/attachments/pexels-sami-aksu-14356302.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
33
samples/default/confluence.out/manifest.json
Executable file
33
samples/default/confluence.out/manifest.json
Executable 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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
5
samples/default/confluence.out/pages/Cats.xml
Executable file
5
samples/default/confluence.out/pages/Cats.xml
Executable 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>
|
||||||
24
samples/default/confluence.out/pages/Default+Sample~.xml
Executable file
24
samples/default/confluence.out/pages/Default+Sample~.xml
Executable file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<ac:structured-macro ac:name="info">
|
||||||
|
<ac:rich-text-body><p><code>confluence_conf.py</code> is not required, it’s 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>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue