This wikilog article is a draft, it was not published yet.

Stampit reading from file

⇠ Back to Blog:Hacks
m
m
 
Line 1: Line 1:
For the [[PLMCN24]]'s abstract book, I patched [[stampit]] to read information from a file as opposed to from the filename.
+
For the [[PLMCN24]]'s abstract book, I patched [[stampit]] to read information from a file as opposed to from the filename. This allowed to include more relevant information, like the Session or the time at which the talk is scheduled.
 
--more--
 
--more--
  
Line 7: Line 7:
 
pdftk abstracts/*.pdf cat output all-abstracts.pdf
 
pdftk abstracts/*.pdf cat output all-abstracts.pdf
 
</pre>
 
</pre>
 +
 +
In this directory, I have the abstracts as ordered from the program, along with auxiliary pages (like day-summaries, linked from other folders):
 +
 +
<center><wz tip="Screenshot of what's inside the 'abstracts' folder.">[[File:Screenshot_20240407_170002.png|400px]]</wz></center>
  
 
I then append the Introductory material :
 
I then append the Introductory material :
Line 24: Line 28:
  
 
<pre>
 
<pre>
cd program-booklet/pages/
+
e</pre>
</pre>
+
  
 
I have [[stampit]] v0°2, along with <tt>stamp.svg</tt> and <tt>pages.txt</tt> which is of this type:
 
I have [[stampit]] v0°2, along with <tt>stamp.svg</tt> and <tt>pages.txt</tt> which is of this type:
Line 45: Line 48:
 
pg_0016.pdf 14
 
pg_0016.pdf 14
 
pg_0017.pdf 15      
 
pg_0017.pdf 15      
pg_0018.pdf 16  S1 Invited  
+
pg_0018.pdf 16  S1 Invited Tue 10:00
pg_0019.pdf 17  S1    
+
pg_0019.pdf 17  S1 Tue 10:45
pg_0020.pdf 18  S1    
+
pg_0020.pdf 18  S1 Tue 11:10
pg_0021.pdf 19 S1        
+
pg_0021.pdf 19   S1 Tue 11:35
pg_0022.pdf 20  S2 Invited
+
pg_0022.pdf 20  S2 Invited Tue 13:30
pg_0023.pdf 21  S2    
+
pg_0023.pdf 21  S2 Tue 14:15
pg_0024.pdf 22  S2    
+
pg_0024.pdf 22  S2 Tue 14:40
pg_0025.pdf 23  S2        
+
pg_0025.pdf 23  S2 Tue 15:05
pg_0026.pdf 24  S3 Invited
+
pg_0026.pdf 24  S3 Invited Tue 16:00
pg_0027.pdf 25  S3    
+
pg_0027.pdf 25  S3 Tue 16:45
pg_0028.pdf 26  S3    
+
pg_0028.pdf 26  S3 Tue 17:10
pg_0029.pdf 27   S3         
+
pg_0029.pdf 27
pg_0030.pdf 28      
+
pg_0030.pdf 28   Keynote Wed 8:40          
pg_0031.pdf 29   Keynote    
+
pg_0031.pdf 29    S4 Invited Wed 10:00
pg_0032.pdf 30   S4 Invited
+
...
pg_0033.pdf 31    S4    
+
 
</pre>
 
</pre>
 +
 +
meaning the first 15 pages will be numbered only, while others will start featuring header content, like so:
 +
 +
<center><wz tip="A stamped PLMCN24 page.">[[File:PLMCN24--pg_0026.png|400px]]</wz></center>
  
 
Then running stampit
 
Then running stampit

Latest revision as of 13:38, 7 April 2024

For the PLMCN24's abstract book, I patched stampit to read information from a file as opposed to from the filename. This allowed to include more relevant information, like the Session or the time at which the talk is scheduled. First, from the core plmcn folder that contains one subfolder of abstracts, I join all of them:

pdftk abstracts/*.pdf cat output all-abstracts.pdf

In this directory, I have the abstracts as ordered from the program, along with auxiliary pages (like day-summaries, linked from other folders):

Screenshot 20240407 170002.png

I then append the Introductory material :

pdftk program-booklet/booklet.pdf all-abstracts.pdf cat output full-book.pdf

which I burst into single pages again:

rm program-booklet/pages/pg_*.*
pdftk full-book.pdf burst output program-booklet/pages/

There in this directory,

e

I have stampit v0°2, along with stamp.svg and pages.txt which is of this type:

pg_0003.pdf	 1 
pg_0004.pdf	 2 
pg_0005.pdf	 3 
pg_0006.pdf	 4 
pg_0007.pdf	 5 
pg_0008.pdf	 6 
pg_0009.pdf	 7 
pg_0010.pdf	 8 
pg_0011.pdf	 9 
pg_0012.pdf	10 
pg_0013.pdf	11 
pg_0014.pdf	12 
pg_0015.pdf	13  	
pg_0016.pdf	14
pg_0017.pdf	15		    
pg_0018.pdf	16   	S1 Invited	Tue 10:00
pg_0019.pdf	17   	S1 	Tue 10:45
pg_0020.pdf	18   	S1 	Tue 11:10
pg_0021.pdf	19   	S1 	Tue 11:35
pg_0022.pdf	20   	S2 Invited  	Tue 13:30
pg_0023.pdf	21   	S2 	Tue 14:15
pg_0024.pdf	22   	S2 	Tue 14:40
pg_0025.pdf	23   	S2 	Tue 15:05
pg_0026.pdf	24   	S3 Invited  	Tue 16:00
pg_0027.pdf	25   	S3 	Tue 16:45
pg_0028.pdf	26   	S3 	Tue 17:10
pg_0029.pdf	27
pg_0030.pdf	28   	Keynote		Wed 8:40	       		    
pg_0031.pdf	29    	S4 Invited 	Wed 10:00
...

meaning the first 15 pages will be numbered only, while others will start featuring header content, like so:

PLMCN24--pg 0026.png

Then running stampit

./stampit

and reassembling (in "stamped" directory)

cd stamped/
pdftk *.pdf cat output ../../../PLMCN24.pdf 

gives the final product!