User:Pedro Sá Couto/TW/REPUBLISHING FLOW: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
=STEPS=
=STEPS=
====Republishing is separated into 6 steps:====
====Republishing is separated into 6 steps:====
'''1.''' Moving the book from the webserver to a work place<br>
'''1.''' Move the book from the webserver to a work directory<br>
:'''1.1''' Replacing all spaces with underscores<br>
:'''1.1''' Replacing all spaces with underscores<br>
'''2.''' Creating the watermark from the gathered form in Tactical Watermarks<br>
'''2.''' Creating the watermark from the gathered form in Tactical Watermarks<br>
Line 7: Line 7:
:'''2.2''' Convert to a png<br>
:'''2.2''' Convert to a png<br>
'''3.''' Append the watermark to the pdf<br>
'''3.''' Append the watermark to the pdf<br>
:'''3.1''' Burst the pdf into pages<br>
:'''3.1''' Burst the pdf cover<br>
:'''3.2''' Rotate the watermark with PIL<br>
:'''3.2''' Rotate the watermark with PIL<br>
:'''3.3''' Overlay the watermark with PIL<br>
:'''3.3''' Overlay the watermark with PIL<br>

Revision as of 16:26, 6 June 2020

STEPS

Republishing is separated into 6 steps:

1. Move the book from the webserver to a work directory

1.1 Replacing all spaces with underscores

2. Creating the watermark from the gathered form in Tactical Watermarks

2.1 Create the watermark in pdf with reportlab
2.2 Convert to a png

3. Append the watermark to the pdf

3.1 Burst the pdf cover
3.2 Rotate the watermark with PIL
3.3 Overlay the watermark with PIL
3.4 Merge all images into a PDF

4. OCR the pdf if not OCRed already
5. Save the file in a directory open to Library Genesis Staff
6. Delete all the unwanted traces

FLOW

RUN.SH

To activate the stream I use ./run.sh

sudo chmod 777 *
./movebookfolder.sh
./watermarkformtxt.sh
./appendwatermarktopdf.sh
./republish.sh
./deletetraces.sh


1. Moving the book from the webserver to a work place


2. Creating the watermark from the gathered form in Tactical Watermarks


3. Append the watermark to the pdf


4. OCR the pdf if not OCRed already


5. Save the file in a directory open to Library Genesis Staff


6. Delete all the unwanted traces



RESULTS IN EACH STEP

2. Watermark from ReportLab

The watermark is created from the .txt input

3. Overlaying the pages

Burst the pdf into pages

Rotate the watermark with PIL

Overlay the watermark to the cover with PIL