File: SConscript

package info (click to toggle)
pdfposter 0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 808 kB
  • sloc: python: 1,354; makefile: 45; sh: 40
file content (52 lines) | stat: -rw-r--r-- 2,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- mode: python ; coding: utf-8 -*-
#
# Copyright (C) 2008-2025 Hartmut Goebel <h.goebel@crazy-compilers.com>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# Build requirements
# - pdf2ps (comes with ghostscript)
# - poster 
#

Import('*')

env.Command('testpages-a4.pdf', 'gen-testpages.py',
            'python $SOURCE $TARGET')
env.Command('testpage-a4-v.ps', 'testpages-a4.pdf',
            'pdf2ps -dFirstPage=1 -dLastPage=1 $SOURCE $TARGET')
env.Command('testpage-a4-h.ps', 'testpages-a4.pdf',
            'pdf2ps -dFirstPage=2 -dLastPage=2 $SOURCE $TARGET')

for mediasize in ('a4', 'a3'):
    for postersize in ('a3',):
        for orientation in ('h', 'v'):
            env.Command('poster-%s-%s-on-%s.ps' % (orientation, postersize, mediasize),
                        'testpage-a4-%s.ps' % orientation,
                        'poster -m %s -p %s $SOURCE -o $TARGET' % (mediasize, postersize))

env.Command('chessboard.pdf', 'gen-chessboard.py',
            'python $SOURCE $TARGET')
env.Command('chessboard.ps', 'chessboard.pdf',
            'pdf2ps -dFirstPage=1 -dLastPage=1 $SOURCE $TARGET')
env.Command('chessboard-poster.ps', 'chessboard.ps',
            'poster -vv -m 21x29+5,10cm $SOURCE -o $TARGET')

env.Command(['allboxes-noboxes.pdf', 'allboxes.pdf'],
            'gen-allboxespage.py',
            'python $SOURCE $TARGETS')
env.Command('trimmedpage.pdf', 'gen-trimmedpage.py',
            'python $SOURCE $TARGET')