This file is indexed.

/usr/bin/relational is in relational 1.2-2.

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

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
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# coding=UTF-8
# Relational
# Copyright (C) 2008  Salvo "LtWorf" Tomaselli
#
# Relational 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 <http://www.gnu.org/licenses/>.
#
# author Salvo "LtWorf" Tomaselli <tiposchi@tiscali.it>

import sys
import os
import os.path
import getopt
from relational import relation, parser
version = "1.2"


def printver(exit=True):
    print "Relational %s" % version
    print "Copyright (C) 2008 Salvo 'LtWorf' Tomaselli."
    print
    print "This program comes with ABSOLUTELY NO WARRANTY."
    print "This is free software, and you are welcome to redistribute it"
    print "under certain conditions."
    print "For details see the GPLv3 Licese."
    print
    print "Written by Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>"
    print
    print "https://github.com/ltworf/relational/"
    if exit:
        sys.exit(0)


def printhelp(code=0):
    print "Relational"
    print
    print "Usage: %s [options] [files]" % sys.argv[0]
    print
    print "  -v            Print version and exits"
    print "  -h            Print this help and exits"

    if sys.argv[0].endswith('relational-cli'):
        print "  -q            Uses QT user interface"
        print "  -r            Uses readline user interface (default)"
    else:
        print "  -q            Uses QT user interface (default)"
        print "  -r            Uses readline user interface"
    sys.exit(code)

if __name__ == "__main__":
    if sys.argv[0].endswith('relational-cli'):
        x11 = False
    else:
        x11 = True  # Will try to use the x11 interface

    # Getting command line
    try:
        switches, files = getopt.getopt(sys.argv[1:], "vhqr")
    except:
        printhelp(1)

    for i in switches:
        if i[0] == '-v':
            printver()
        elif i[0] == '-h':
            printhelp()
        elif i[0] == '-q':
            x11 = True
        elif i[0] == '-r':
            x11 = False

    if x11:

        import sip  # needed on windows
        from PyQt4 import QtGui
        try:
            from relational_gui import maingui, guihandler, about, surveyForm
        except:
            print >> sys.stderr, "Module relational_gui is missing.\nPlease install relational package."
            sys.exit(3)

        about.version = version
        surveyForm.version = version
        guihandler.version = version

        app = QtGui.QApplication(sys.argv)
        app.setOrganizationName('None')
        app.setApplicationName('relational')

        ui = maingui.Ui_MainWindow()
        Form = guihandler.relForm(ui)

        # if os.name=='nt':
        Form.setFont(QtGui.QFont("Dejavu Sans Bold"))

        ui.setupUi(Form)
        Form.restore_settings()

        for i in range(len(files)):
            if not os.path.isfile(files[i]):
                print >> sys.stderr, "%s is not a file" % files[i]
                printhelp(12)
            f = files[i].split('/')
            defname = f[len(f) - 1].lower()
            if defname.endswith(".csv"):  # removes the extension
                defname = defname[:-4]
            print 'Loading file "%s" with name "%s"' % (files[i], defname)
            Form.loadRelation(files[i], defname)

        Form.show()
        sys.exit(app.exec_())
    else:
        printver(False)
        try:
            import relational_readline.linegui
        except:
            print >> sys.stderr, "Module relational_readline is missing.\nPlease install relational-cli package."
            sys.exit(3)
        relational_readline.linegui.version = version
        relational_readline.linegui.main(files)