Browse Source

adding tools to the repo + documentation in the README

master
mb 2 years ago
parent
commit
e8d2f50053
  1. 127
      README.md
  2. 6
      command-line/css/print.css
  3. BIN
      command-line/multi-remix/multi-remix-stamp.pdf
  4. BIN
      command-line/multi-remix/multi-remix-web-stamp.pdf
  5. BIN
      command-line/multi-remix/multi-remix-web.pdf
  6. 76
      command-line/multi-remix/multi-remix-web.svg
  7. 7
      command-line/tools/convert-to-PDFX-3-2002.sh
  8. 22
      command-line/tools/forceblack.ps
  9. 25
      command-line/tools/rgb2cmyk-overprint.sh
  10. 16
      command-line/tools/rgb2cmyk.sh
  11. 8
      command-line/tools/separatecolors.sh
  12. 10
      command-line/update.py

127
README.md

@ -42,3 +42,130 @@ The choice to work with Mediawiki and web-to-print techniques, continues practic
* DiVersions (Constant, OSP) https://www.books.constantvzw.org/home/diversions-v2, https://diversions.constantvzw.org/, https://diversions.constantvzw.org/wiki/index.php?title=PublicationUnfolded, http://osp.kitchen/work/diversions/, https://gitlab.constantvzw.org/osp/work.diversions * DiVersions (Constant, OSP) https://www.books.constantvzw.org/home/diversions-v2, https://diversions.constantvzw.org/, https://diversions.constantvzw.org/wiki/index.php?title=PublicationUnfolded, http://osp.kitchen/work/diversions/, https://gitlab.constantvzw.org/osp/work.diversions
* Mondoteque (Constant, André Castro, Alexia de Visscher) https://www.books.constantvzw.org/home/mondotheque, https://www.mondotheque.be/wiki/index.php?title=The_radiated_book * Mondoteque (Constant, André Castro, Alexia de Visscher) https://www.books.constantvzw.org/home/mondotheque, https://www.mondotheque.be/wiki/index.php?title=The_radiated_book
* html2print (OSP), http://osp.kitchen/tools/html2print/ * html2print (OSP), http://osp.kitchen/tools/html2print/
## Other tools used for Volumetric Regimes
Most of these tools are used for PDF manipulation.
With a big thanks to OSP's PDFUTILS! <http://osp.kitchen/tools/pdfutils/>
### OSP-tools.pdfutils: `color_convert.sh`
**Convert PDF RGB to only-Black**
This will convert an RGB PDF (even if it appears only black) to `input-K.pdf`.
./color_convert.sh black input.pdf input-K.pdf
Link: <http://osp.kitchen/tools/pdfutils/>
### OSP-tools.pdfutils: `rgb2cmyk.sh`
**Convert PDF from RGB to CMYK**
Dependencies:
- `gs` (Ghostscript)
- `pdftops`
- `control.txt`
- `apple_to_jNP_photo.icc`
- `apple_to_jNP_neutral.icc`
This will convert a PDF to `input-cmyk.pdf`.
Usage:
./rgb2cmyk.sh input.pdf
Link: <http://osp.kitchen/tools/pdfutils/>
### OSP-tools.pdfutils: `rgb2cmyk-overprint.sh`
**Convert PDF from RGB to CMYK, with overprint enabled on the whole document**
Dependencies:
- `gs` (Ghostscript)
- `pdftops`
- `control.txt`
- `apple_to_jNP_photo.icc`
- `apple_to_jNP_neutral.icc`
This will convert a PDF to `input-CMYK-op.pdf`.
Usage:
./rgb2cmyk-overprint.sh input.pdf
Link: <http://osp.kitchen/tools/pdfutils/>
### OSP-tools: `resample.sh`
Dependencies:
- `gs` (Ghostscript)
This will change the resolution of a PDF.
Usage:
./resample input.pdf 150
### Custom VR tools: `make-images-bw.sh`
Dependencies:
- `imagemagick`
This will create a copy of an image folder, with all images converted to BW.
Usage:
./make-images-bw.sh ./images-folder/
### Custom VR tools: `convert-to-PDFX-3-2002.sh`
Dependencies:
- `texlive-xetex` (xelatex)
This will convert a PDF into the PDFX/3:2002 format + edit the PDF metadata.
Edit PDF metadata:
Open the xelatex template (`xelatex-PDFX-3-2002.template.tex`) and edit the metadata on line 7-12.
Usage:
convert-to-PDFX-3-2002.sh input.pdf output.pdf
### Custom VR tools: `separatecolors.sh`
Dependencies:
- `gs` (Ghostscript)
This will convert the PDF into a set of TIFF files, which is useful to inspect how the colors are spread over the different color "plates".
The script generates one TIFF for:
- full color
- cyan plate
- magenta plate
- yellow plate
- black plate
Usage:
./simulateoverprint.sh input.pdf
### Other useful tools
- Check metadata of PDF: `pdfinfo filename.pdf`
- Check color space of PDF: `pdfimages -list filename.pdf`
- Check colors of PDF: `identify -verbose filename.pdf`

6
command-line/css/print.css

@ -96,7 +96,7 @@ body{
/*size: 164mm 237mm;*/ /* Size of the physical printed DB06 book */ /*size: 164mm 237mm;*/ /* Size of the physical printed DB06 book */
/*size: 576px 864px;*/ /*size: 576px 864px;*/
size: 152mm 229mm; size: 152mm 229mm;
bleed: 3mm; /* ON for final print files */ /*bleed: 3mm;*/ /* ON for final print files */
/*marks: crop;*/ /* OFF for the final print files */ /*marks: crop;*/ /* OFF for the final print files */
@bottom-center{ @bottom-center{
@ -165,9 +165,9 @@ body{
} }
@page section{ @page section{
/* section title pages -- color */ /* section title pages -- color */
/*background: linear-gradient(180deg, #3741ea, #c0c1e7);*/ background: linear-gradient(180deg, #3741ea, #c0c1e7);
/* section title pages -- black and white */ /* section title pages -- black and white */
background: linear-gradient(180deg, #444444, #d1d1d1); /*background: linear-gradient(180deg, #444444, #d1d1d1);*/
color: white !important; color: white !important;
@top-center{ @top-center{

BIN
command-line/multi-remix/multi-remix-stamp.pdf

Binary file not shown.

BIN
command-line/multi-remix/multi-remix-web-stamp.pdf

Binary file not shown.

BIN
command-line/multi-remix/multi-remix-web.pdf

Binary file not shown.

76
command-line/multi-remix/multi-remix-web.svg

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="600"
height="600"
viewBox="0 0 158.75 158.75"
version="1.1"
id="svg879"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
sodipodi:docname="multi-remix-web.svg">
<defs
id="defs873" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="317.75723"
inkscape:cy="242.04214"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
showguides="true" />
<metadata
id="metadata876">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g899"
transform="matrix(1.0458966,0,0,1.0458966,-0.11622165,-8.8130678)">
<rect
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke-width:1;stroke-linecap:round;stroke-linejoin:round"
id="rect28"
width="26.485571"
height="4.225781"
x="30.137449"
y="46.457333" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 114.34754,50.330639 h 8.4005 v 7.37232 l -4.96538,7.96844 h -6.73909 l 3.136,-8.53983 z"
id="path30" />
<path
id="path32"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke-width:1.08715;stroke-linecap:round;stroke-linejoin:round"
d="m 77.077113,93.197279 a 14.490818,14.490818 0 0 0 -14.450801,14.490581 14.490818,14.490818 0 0 0 14.491101,14.49111 14.490818,14.490818 0 0 0 14.49059,-14.49111 14.490818,14.490818 0 0 0 -14.49059,-14.490581 14.490818,14.490818 0 0 0 -0.0403,0 z m 0.14831,2.53524 a 11.992875,11.992875 0 0 1 11.99255,11.992551 11.992875,11.992875 0 0 1 -11.99255,11.99307 11.992875,11.992875 0 0 1 -11.993068,-11.99307 11.992875,11.992875 0 0 1 11.993068,-11.992551 z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

7
command-line/tools/convert-to-PDFX-3-2002.sh

@ -1,6 +1,9 @@
# Read first argument from command line: input folder name # Use: sh convert-to-PDFX-3-2002.sh filename.pdf
bn=$(basename $1 ".pdf")
INPUT_PDF=$1 INPUT_PDF=$1
OUTPUT_PDF=$2 OUTPUT_PDF=$bn-PDFX-3-2022.pdf
# Make a tmp copy of the tex template with the input PDF filename # Make a tmp copy of the tex template with the input PDF filename
sed "s/XXX/$INPUT_PDF/g" xelatex-PDFX-3-2002.template.tex > xelatex-PDFX-3-2002.tmp.tex sed "s/XXX/$INPUT_PDF/g" xelatex-PDFX-3-2002.template.tex > xelatex-PDFX-3-2002.tmp.tex

22
command-line/tools/forceblack.ps

@ -0,0 +1,22 @@
%!
/sys_setcolorspace /setcolorspace load def
/sys_setcolor /setcolor load def
userdict/is_rgb false put
/setcolorspace
{
sys_setcolorspace
currentcolorspace 0 get /DeviceRGB eq
userdict/is_rgb 3 -1 roll put
}bind def
/setcolor
{
userdict/is_rgb get not
{sys_setcolor}
{
3 copy
2 copy eq 4 1 roll eq exch pop and
{setgray pop pop (!\n)print flush}
{/DeviceRGB sys_setcolorspace sys_setcolor}ifelse
}ifelse
}bind def
%

25
command-line/tools/rgb2cmyk-overprint.sh

@ -0,0 +1,25 @@
#! /bin/bash
# CONVERTS RGB PDF TO CMYK PDF PRESERVING TRUE BLACK FOR VECTORS
# OVERPRINT FEATURE IS AVAILABLE WITH AN OPTION
# USAGE:
# ./rgb2cmyk.sh input.pdf
# ./rgb2cmyk.sh input.pdf overprint
# OUTPUT:
# input-cmyk.pdf
# input-cmyk-op.pdf (in case of overprint)
bn=$(basename $1 ".pdf")
gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt $1
# OVERPRINT COMMANDS BELOW
pdftops -level2sep ${bn}-CMYK.pdf
sed -e "s/false \(op\)/true \1/gI" ${bn}-CMYK.ps > ${bn}-CMYK-op.ps
#gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${bn}-CMYK-op.pdf ./forceblack.ps ${bn}-CMYK-op.ps
gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK-op.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt ${bn}-CMYK-op.ps
#rm ${bn}-CMYK.pdf
rm ${bn}-CMYK.ps

16
command-line/tools/rgb2cmyk.sh

@ -1,30 +1,14 @@
#! /bin/bash #! /bin/bash
# CONVERTS RGB PDF TO CMYK PDF PRESERVING TRUE BLACK FOR VECTORS # CONVERTS RGB PDF TO CMYK PDF PRESERVING TRUE BLACK FOR VECTORS
# OVERPRINT FEATURE IS AVAILABLE WITH AN OPTION
# USAGE: # USAGE:
# ./rgb2cmyk.sh input.pdf # ./rgb2cmyk.sh input.pdf
# ./rgb2cmyk.sh input.pdf overprint
# OUTPUT: # OUTPUT:
# input-cmyk.pdf # input-cmyk.pdf
# input-cmyk-op.pdf (in case of overprint)
bn=$(basename $1 ".pdf") bn=$(basename $1 ".pdf")
op=${2:-knockout}
gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt $1 gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt $1
if [ $op == overprint ]
then
pdftops -level2sep ${bn}-CMYK.pdf
sed -e "s/false \(op\)/true \1/gI" ${bn}-CMYK.ps > ${bn}-CMYK-op.ps
#gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${bn}-CMYK-op.pdf ./forceblack.ps ${bn}-CMYK-op.ps
gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK-op.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt ${bn}-CMYK-op.ps
rm ${bn}-CMYK.pdf
rm ${bn}-CMYK.ps
fi

8
command-line/tools/separatecolors.sh

@ -0,0 +1,8 @@
# From: https://stackoverflow.com/questions/30518547/cmyk-overprinting-and-knockout-in-ghostscript
bn=$(basename $1 ".pdf")
gs -dBATCH -dNOPAUSE -dSAFER \
-sDEVICE=tiffsep \
-sOutputFile=$bn.tif \
$1

10
command-line/update.py

@ -234,8 +234,8 @@ def tweaking(html):
# print(match) # print(match)
# html = html.replace(match, f'{ match }<wbr>') # html = html.replace(match, f'{ match }<wbr>')
html = html.replace('.png', '.jpg') # Using only jpg version of the images in the BW version, June 2022 # html = html.replace('.png', '.jpg') # Using only jpg version of the images in the BW version, June 2022
html = html.replace('.gif', '.jpg') # Using only jpg version of the images in the BW version, June 2022 # html = html.replace('.gif', '.jpg') # Using only jpg version of the images in the BW version, June 2022
html = html.replace('Topology-typography-1A.jpg', 'Topology-typography-1A.png') # Using png's for Spec, Aug 2022 html = html.replace('Topology-typography-1A.jpg', 'Topology-typography-1A.png') # Using png's for Spec, Aug 2022
html = html.replace('Topology-typography-1B.jpg', 'Topology-typography-1B.png') # Using png's for Spec, Aug 2022 html = html.replace('Topology-typography-1B.jpg', 'Topology-typography-1B.png') # Using png's for Spec, Aug 2022
html = html.replace('Topology-typography-2A.jpg', 'Topology-typography-2A.png') # Using png's for Spec, Aug 2022 html = html.replace('Topology-typography-2A.jpg', 'Topology-typography-2A.png') # Using png's for Spec, Aug 2022
@ -244,8 +244,10 @@ def tweaking(html):
html = html.replace('sky is black <br />and the ground is yellow.<br /><br />', 'sky is black <br />and the ground is yellow.<br />') # Aug 2022 html = html.replace('sky is black <br />and the ground is yellow.<br /><br />', 'sky is black <br />and the ground is yellow.<br />') # Aug 2022
html = html.replace('<div class="contribution 2.5d-romance">', '<div class="contribution romance">') # Aug 2022 html = html.replace('<div class="contribution 2.5d-romance">', '<div class="contribution romance">') # Aug 2022
html = html.replace('''</p><p>3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimization, normalization and hegemonic world order. The legacies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension between “the probable” and “the possible”. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of contemporary hyper-computation. html = html.replace(
</p><p>This book brings together diverse materials from an ongoing trans<span class="star"></span>feminist conversation between artists, software developers and theorists working with <br>techniques and technologies for detecting, tracking, capturing, printing, modeling and rendering volumes.''', '''</p><p>3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimiza-<br>tion, normalization and hegemonic world order. The lega-<br>cies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension <br>between the probable and the possible. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of <br>contemporary hyper-computation. '''</p><p>3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimization, normalization and hegemonic world order. The legacies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension between “the probable” and “the possible”. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of contemporary hyper-computation.
</p><p>This book brings together diverse materials from an ongoing trans<span class="star"></span>feminist conversation between artists, software developers and theorists working with techniques and technologies for detecting, tracking, capturing, printing, modeling and rendering volumes.''',
'''</p><p>3D computation has historically co-evolved with Modern technosciences, and aligned with the regimes of optimiza-<br>tion, normalization and hegemonic world order. The lega-<br>cies and projections of industrial development leave traces of that imaginary and tell the stories of a lively tension <br>between “the probable” and “the possible”. Defined as the techniques for measuring volumes, volumetrics all too easily (re)produce and accentuate the probable, and this process is intensified within the technocratic realm of <br>contemporary hyper-computation.
</p><p>This book brings together diverse materials from an ongoing trans<span class="star"></span>feminist conversation between artists, software developers and theorists working with <br>techniques and technologies for detecting, tracking, capturing, printing, modeling and rendering volumes.''') # Aug 2022 </p><p>This book brings together diverse materials from an ongoing trans<span class="star"></span>feminist conversation between artists, software developers and theorists working with <br>techniques and technologies for detecting, tracking, capturing, printing, modeling and rendering volumes.''') # Aug 2022
return html return html

Loading…
Cancel
Save