Wiki-to-print: Difference between revisions

From creative crowd wiki
Jump to navigation Jump to search
No edit summary
 
(23 intermediate revisions by 2 users not shown)
Line 12: Line 12:
* Hackers and Designers'<ref>https://hackersanddesigners.nl</ref> version ''wiki2print''<ref>https://github.com/hackersanddesigners/wiki2print</ref> that was produced for the book Making Matters<ref>https://hackersanddesigners.nl/s/Publishing/p/Making_Matters._A_Vocabulary_of_Collective_Arts</ref>
* Hackers and Designers'<ref>https://hackersanddesigners.nl</ref> version ''wiki2print''<ref>https://github.com/hackersanddesigners/wiki2print</ref> that was produced for the book Making Matters<ref>https://hackersanddesigners.nl/s/Publishing/p/Making_Matters._A_Vocabulary_of_Collective_Arts</ref>


So, wiki-to-print/wiki-to-pdf/wiki2print is not standalone, but part of a continuum of projects that see software as something to learn from, adapt, transform and change. The code that is used for making this journal is released as yet another version of this network of connected practices<ref>https://git.vvvvvvaria.org/varia/wiki-to-print</ref>.  
So, wiki-to-print/wiki-to-pdf/wiki2print is not standalone, but part of a continuum of projects that see software as something to learn from, adapt, transform and change. You can find the code of the version that is running on this wiki here<ref>https://git.vvvvvvaria.org/CC/wiki-to-print</ref>.


This wiki-to-print is hosted at CC<ref>https://cc.vvvvvvaria.org</ref> (''creative crowds''). While moving from ''cloud'' to ''crowds'', CC is a thinking device for us how to hand over ways of working and share a space for publishing experiments with others.
This wiki-to-print is hosted at CC<ref>https://cc.vvvvvvaria.org</ref> (''creative crowds''). While moving from ''cloud'' to ''crowds'', CC is a thinking device for us how to hand over ways of working and share a space for publishing experiments with others.
Line 26: Line 26:
==Links to get started with==
==Links to get started with==


* [[Editing Guide]]
* [[Editing Guide]] (writing)
* [[Pdf:XXX|Example wiki-to-print content page boilerplate (with annotations)]]
* [[How to work with wiki-to-print?]] (editing, layout making)
* [[PdfCSS:XXX|Example wiki-to-print stylesheet boilerplate (with annotations)]]
* [[How is wiki-to-print made?]] (developing)
* [[Running_wiki-to-print_on_the_server|How to run wiki-to-print on a server?]] (sysadmin)


==How to work with wiki-to-print?==
==Wiki-to-print boilerplates==


Wikis are great for (a-sync) collaborative writing and editing, which is why the MediaWiki software is a part of wiki-to-print. Alongside this, concepts such as [https://www.mediawiki.org/wiki/Transclusion transclusion] are useful in allowing you to collate a publication from many differently authored pages by referring to them in hypertext. Simply put, transclusion is including a part of a document into another one by hypertext reference, rather than copying it. Pages (or parts of them) can be transcluded into another wiki page, as so:
* APRJA Boilerplate: [[APRJA Example Article|Example Article (5000 words)]], [[Pdf:APRJA Boilerplate|APRJA journal boilerplate]], [[PdfCSS:APRJA Boilerplate|CSS stylesheet]], [https://cc.vvvvvvaria.org/wiki-to-print/pdf/APRJA_Boilerplate PDF preview]
 
<code>
<nowiki>{{:name of page to be transcluded}}</nowiki>
</code>
 
Wiki-to-print uses the <code>Pdf</code> namespace to make an environment in which PDFs can be written, edited and designed by multiple people simultaneously. After creating a wiki-to-print environment in the <code>Pdf</code> namespace, some useful wiki-to-print features are automatically added that allow you to render a wiki page into a HTML page and PDF document.
 
So once you have made a new wiki-to-print environment, a range of <span style="color: magenta;">pink</span> buttons are added to the navigation bar, which include:
 
===CSS!===
 
Here you can add the style for your print layout.
 
The Talk pages in the <code>Pdf</code> namespace are turned into CSS stylesheets for each particular wiki-to-print environment. So, once you have created a new wiki-to-print environment, an empty CSS stylesheet is also made.
 
===View HTML===
 
Here you can inspect the HTML and CSS of your page.
 
If you want to preview the content as HTML, you can do this by clicking this button. This can be helpful to do when, for example, something unexpected happened in your layout and you want to figure out what is happening. You can also see the CSS alongside the rendered HTML in the same browser window.
 
===View PDF===
 
Here you can preview your PDF.
 
Clicking this button allows you to preview the content as a PDF in a new browser tab. Here, your content and the page layout you specified in your CSS are rendered by the JavaScript library Paged.js to look like a PDF. If you are satisfied with this, you can export the PDF from this browser tab simply by pressing <code>ctrl/command + p</code>. If you have any problems seeing the layout, it's useful to check that your content and CSS is written correctly by viewing and inspecting how the HTML is rendered.
 
===Update text===
 
Here you can update your text after making changes.
 
Any changes to text in your wiki-to-print environment (such as in content, or CSS) need to be updated before you can view them in the PDF. This also applies to any pages that are transcluded into your wiki-to-print environment. Clicking this button opens a new browser tab, as a sign that you have now updated the text. You can safely close it afterwards.
 
===Update Media===
 
Here you can update your text + media after making changes.
 
Any changes to media in your wiki-to-print environment (such as new images you upload) need to be updated before you can view them in the PDF. This also applies to any pages that are transcluded into your wiki-to-print environment. Clicking this button opens a new browser tab, as a sign that you have now updated the media. You can safely close it afterwards.
 
==How does wiki-to-print work?==
 
Technically seen, wiki-to-print is a web application made with [https://flask.palletsprojects.com/en/2.3.x/ Flask], that can be installed on the same server as where the MediaWiki is installed.
 
In practice, it's a DIY configuration that glues different things together: it takes a wiki page and a CSS stylesheet as input sources and renders them into a HTML page and a PDF preview page.
 
The source code can be found at: https://git.vvvvvvaria.org/varia/wiki-to-print/
 
To install wiki-to-print:
 
* <code>make setup</code>: makes a virtual environment and installs all the requirements
* edit <code>config.json</code>
 
To run wiki-to-print:
 
* <code>make local</code>: runs the Flask application locally
* <code>make server</code>: runs the Flask application remotely with Gunicorn, which we used to work with a subdirectory (we use https://cc.vvvvvvaria.org/wiki-to-print/ as the root of this Flask application)
 
The Flask application is based around the following URLs/routes:
 
{| class="wikitable" style=""
|-
! button !! URL/route !! Flask action
|-
| CSS || https://cc.vvvvvvaria.org/wiki-to-print/static/Test.css || renders PdfCSS:Test as CSS stylesheet
|-
| HTML || https://cc.vvvvvvaria.org/wiki-to-print/html/Test || renders Pdf:Test as HTML page, using PdfCSS:Test as CSS stylesheet
|-
| PDF || https://cc.vvvvvvaria.org/wiki-to-print/pdf/Test || renders Pdf:Test as PDF preview page (using Paged.js), using PdfCSS:Test as CSS stylesheet
|-
| Update text || https://cc.vvvvvvaria.org/wiki-to-print/update/Test || downloads all the text from Pdf:Test using the Mediawiki API and saves it to Test.json (in HTML)
|-
| Update Media || https://cc.vvvvvvaria.org/wiki-to-print/update/Test?full=true || downloads all the text + images from Pdf:Test using the Mediawiki API and saves them to <code>./static/images/</code>
|}
 
For more installation guides, see: [[Running wiki-to-print on the server]]


==Created wiki-to-print environments==
==Created wiki-to-print environments==
Line 114: Line 40:


{{Special:AllPages/Pdf:}}
{{Special:AllPages/Pdf:}}
==Publications made with wiki-to-print==
* [[Toward a Minor Tech]] (2023)
* [[Content-Form|Content/Form]] (2024)


==wiki-to-print log==
==wiki-to-print log==


See the issue tracker of the git repository: https://git.vvvvvvaria.org/varia/wiki-to-print/issues
See the issue tracker of the git repository: https://git.vvvvvvaria.org/CC/wiki-to-print/issues
 
[[Category:Wiki-to-print]]

Latest revision as of 13:34, 25 September 2024

About wiki-to-print

Wiki-to-print is a collective publishing environment based on MediaWiki software[1], Paged Media CSS[2] techniques and the JavaScript library Paged.js[3], which renders a preview of the PDF in the browser. Using wiki-to-print allows us to work shoulder-to-shoulder as collaborative writers, editors, designers, developers, in a non-linear publishing workflow where design and content unfolds at the same time, allowing the one to shape the other.

Following the idea of "boilerplate code" which is written to be reused, we like to think of wiki-to-print as a boilerplate as well, instead of thinking of it as a product, platform or tool. The code that is running in the background is a version of previous wiki-printing instances, including:

  • the work on the Diversions[4] publications by Constant[5] and OSP[6]
  • the book Volumetric Regimes[7] by Possible Bodies[8] and Manetta Berends[9]
  • TITiPI's[10] wiki-to-pdf environments[11] by Martino Morandi
  • Hackers and Designers'[12] version wiki2print[13] that was produced for the book Making Matters[14]

So, wiki-to-print/wiki-to-pdf/wiki2print is not standalone, but part of a continuum of projects that see software as something to learn from, adapt, transform and change. You can find the code of the version that is running on this wiki here[15].

This wiki-to-print is hosted at CC[16] (creative crowds). While moving from cloud to crowds, CC is a thinking device for us how to hand over ways of working and share a space for publishing experiments with others.

Create a wiki-to-print environment


 


Links to get started with

Wiki-to-print boilerplates

Created wiki-to-print environments

These are some wiki-to-print environments that have been used so far:

Publications made with wiki-to-print

wiki-to-print log

See the issue tracker of the git repository: https://git.vvvvvvaria.org/CC/wiki-to-print/issues