This file is indexed.

/usr/share/scribus/samples/golden-mean.py is in scribus-data 1.4.6+dfsg-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""Golden Mean for Scribus.

This script creates supplementary guides on the page to
help design the "right" layout in golden mean (golden
ratio).

See scribus.net and CVS for fresh versions to come...

REQUIREMENTS:
Scribus - CVS version later 02/24/2004 or later release 1.5

MORE INFO:
See e.g.
http://home.att.net/~vmueller/prop/theo.html
or Google for more theory :)

CONTACT:
email : petr@yarpen.cz
Feature requests and bug reports welcomed


LICENSE:

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 2 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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""

import sys

try:
    from scribus import *
except ImportError:
    print "This script only runs from within Scribus."
    sys.exit(1)

from math import sqrt


def goldenMean(aSize=0):
    """x = (?5-1)/2"""
    return aSize * ((sqrt(5) - 1)/2)


def main():
    # remember user settings
    unit = getUnit()
    # set my environment - points needed
    setUnit(0)
    # Paper format
    paper = pageDimension()
    # set the guides. The get* functions are for "remembering" the old ones...
    setVGuides(getVGuides() + [goldenMean(paper[0]), paper[0] - goldenMean(paper[0])])
    setHGuides(getHGuides() + [goldenMean(paper[1]), paper[1] - goldenMean(paper[1])])
    # restore user settings
    setUnit(unit)

if __name__ == '__main__':
    if haveDoc():
        main()
    else:
        messageBox("Golden Mean.py", "Please run this script with a document already open", ICON_INFORMATION);