Startpage templates download and Setup:Installation Guide/Advanced/Maintenance scripts/export: Difference between pages

(Difference between pages)
No edit summary
Tag: 2017 source edit
 
(Created page with "== Running the script == The script to export wiki pages to PDF is executed from: <syntaxhighlight lang="text"> php {MW_ROOT}/extensions/BlueSpiceUniversalExport/maintenance/e...")
 
Line 1: Line 1:
<ul class="tabs">
== Running the script ==
    <li>[[Templates download|Templates]]</li>
The script to export wiki pages to PDF is executed from: <syntaxhighlight lang="text">
     <li class="current">Startpage templates</li>
php {MW_ROOT}/extensions/BlueSpiceUniversalExport/maintenance/export.php --specification-file=spec.json
</ul>
</syntaxhighlight>The specification file spec.json can have the following content:<syntaxhighlight lang="text">
{
    "module": "pdf",
    "attachments": 1,
    "recursive": 1,
    "title": "PDF",
    "target": "localfilesystem",
    "target-file-name": "All.pdf",
     "target-file-path": "/path/to/target-file"
}
</syntaxhighlight>
{| class="wikitable" style="width: 100%;"
|+
! style="width:200px;" |Key
! style="width:200px;" |Value
!Description
|-
| style="width:200px;" |module
| style="width:200px;" |pdf
|
|-
| style="width:200px;" |attachments
| style="width:200px;" |1
0
|
|-
| style="width:200px;" |recursive
| style="width:200px;" |1
0
|
|-
| style="width:200px;" |title
| style="width:200px;" |string
|
|-
| style="width:200px;" |target
| style="width:200px;" |localfilesystem
|
|-
| style="width:200px;" |target-file-name
| style="width:200px;" |
|
|-
| style="width:200px;" |target-file-path
| style="width:200px;" |
|
|}


__NOTOC__
== Creating a page list for the export ==
Coming with BlueSpice 4.3.
The pages to be exported are defined in the wiki page that is shown as the <code>title</code> in the json-file. (In the example above, this is the page <code>PDF</code> .)
<div class="cards startpages">


<!--start card-----------------
The page <code>PDF</code> now needs to list all pages  that will be exported to PDF.
<div>
 
==[[Startpage templates download/Startpage SME|Startpage SME]]==
This list can be created with an [[SMW queries|SMW inline query]] (BlueSpice free) or with a [[Manual:Extension/DynamicPageList3|DPL3 list]] (BlueSpice free).
<div class="box">
 
<div class="screenshot">[[File:Startpage SME.png|alt=Screenshot of the "Startpage SME"|500x500px|link=Startpage templates download/Startpage SME]]</div>
 
<div class="text">[[Startpage templates download/Startpage SME|For small and medium-sized enterprises]]</div>
Example of an SMW query to create an export for all pages in the categories <code>Process</code> and <code>Work instruction</code>:<syntaxhighlight lang="text">
</div>
==All processes==
</div>
{{#ask:[[Process:+]]|format=ul|limit=99999}}
<!--start card------
 
<div>
==All work instructions==
==Startpage Management System==
{{#ask:[[Work instruction:+]]|format=ul|limit=99999}}
<div class="box">
</syntaxhighlight>The same list can be created with the following DPL3 syntax:<syntaxhighlight lang="text">
<div class="screenshot">[[File:Startpage Management System.png|alt=Screenshot of the "Startpage Management System"|500x500px|link=Startpage templates download/Startpage Management System]]</div>
==All processes==
<div class="text">[[Startpage templates download/Startpage Management System|For management systems]]</div>
{{#dpl:category=Process}}
</div>
 
</div>------------>
==All work instructions==
<!--start card------------
{{#dpl:category=Work instruction}}
<div>
</syntaxhighlight>
==Startpage Software Development==
 
<div class="box">
== Setting up a CronJob ==
<div class="screenshot">[[File:Startpage_Software_Dev.png|500x500px|alt=Screenshot of the "Startpage Software Dev"|link=Startpage templates download/Startpage_Software_Dev]]</div>
To automate the export, the following CronJob is available:<syntaxhighlight lang="text">
<div class="text">[[Startpage templates download/Startpage_Software_Dev|For software development teams]]</div>
CronJob für Export
</div>
 
</div>
php {MW_ROOT}/extensions/BlueSpiceUniversalExport/maintenance/export.php --specification-file={MW_ROOT}/extensions/BlueSpiceFoundation/data/notfall.json
</div>------>
</syntaxhighlight>

Revision as of 09:29, 9 June 2023

Running the script

The script to export wiki pages to PDF is executed from:

php {MW_ROOT}/extensions/BlueSpiceUniversalExport/maintenance/export.php --specification-file=spec.json

The specification file spec.json can have the following content:

{
    "module": "pdf",
    "attachments": 1,
    "recursive": 1,
    "title": "PDF",
    "target": "localfilesystem",
    "target-file-name": "All.pdf",
    "target-file-path": "/path/to/target-file"
}
Key Value Description
module pdf
attachments 1

0

recursive 1

0

title string
target localfilesystem
target-file-name
target-file-path

Creating a page list for the export

The pages to be exported are defined in the wiki page that is shown as the title in the json-file. (In the example above, this is the page PDF .)

The page PDF now needs to list all pages that will be exported to PDF.

This list can be created with an SMW inline query (BlueSpice free) or with a DPL3 list (BlueSpice free).


Example of an SMW query to create an export for all pages in the categories Process and Work instruction:

==All processes==
{{#ask:[[Process:+]]|format=ul|limit=99999}}

==All work instructions==
{{#ask:[[Work instruction:+]]|format=ul|limit=99999}}

The same list can be created with the following DPL3 syntax:

==All processes==
{{#dpl:category=Process}}

==All work instructions==
{{#dpl:category=Work instruction}}

Setting up a CronJob

To automate the export, the following CronJob is available:

CronJob für Export

php {MW_ROOT}/extensions/BlueSpiceUniversalExport/maintenance/export.php --specification-file={MW_ROOT}/extensions/BlueSpiceFoundation/data/notfall.json



To submit feedback about this documentation, visit our community forum.

No categories assignedEdit

Discussions