Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 530

Reordenacion directorio aplicaciones

Ver diferencias:

etiquetas-portatiles/LEEME
Repositorio movido a https://github.com/manumora/laptop-labels
actividadextraescolar/listado.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Tiétar 20-12-2012
import time
import os
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.pagesizes import A4,letter,A5
from reportlab.lib.styles import ParagraphStyle as PS
from reportlab.platypus import SimpleDocTemplate, PageBreak, Paragraph, Spacer, Frame,Table,TableStyle
from reportlab.lib.units import cm
from reportlab.lib.enums import TA_JUSTIFY, TA_CENTER, TA_RIGHT
story = []
actividad = ''
alumnos = []
curso = ''
prof = ''
width, height = A4
#~ DIA DE HOY Y CONVERTIRLO A ESPAÑOL
dia=time.localtime()
mes=dia.tm_mon
mes_sp=['Enero', 'Febrero', 'Marzo',
'Abril', 'Mayo', 'Junio',
'Julio', 'Agosto', 'Septiembre',
'Octubre', 'Noviembre', 'Diciembre']
hoy=''#'%i %s %d' % (dia[2], mes_sp[mes-1], dia.tm_year)
#Estilos para el texto
h1 = PS (name = 'Heading 1', fontSize = 16, leading = 16, alignment=TA_CENTER)
h2 = PS (name = 'Heading 2', fontSize = 14, leading = 14)
body = PS (name = 'Body', fontSize = 12, leading = 12, firstLineIndent = 45, leftIndent= 50, rightIndent= 25, alignment = TA_JUSTIFY)
def cabecera():
story.append(Spacer(1,1*cm))
P = Paragraph('Actividad Extraescolar '+actividad + hoy, h1)
story.append(P)
story.append(Spacer(0,1*cm))
def contenido():
cabecera()
t = Table(alumnos,colWidths=(6*cm,6*cm,6*cm),splitByRow=1)
story.append(t)
c.save()
doc = SimpleDocTemplate ('ActividadExtraescolar.pdf', pagesize=letter, showBoundary=0)
doc.build(story)
actividadextraescolar/Leeme
Requiere python-reportlab, python-ldap y python-wxgtk2.6 instalados.
Este programa permite escoger alumnos de todos los cursos
del centro y lo imprime. Su utilidad es para las salidas
del centro, para que los profesores puedan saber que alumnos
de un curso dado han salido del centro.
Usa ldap para extraer cursos y alumnos.
Tietar 20-12-2012
actividadextraescolar/actividadExtraescolar.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Thu Apr 19 10:05:25 2012
# Tiétar 20-12-2012
import wx, ldap, listado
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.pagesizes import A4
import subprocess, os
import unicodedata
# begin wxGlade: extracode
# end wxGlade
class excursiones(wx.Frame):
tabla = []
def __init__(self, *args, **kwds):
# begin wxGlade: excursiones.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.label_1 = wx.StaticText(self, -1, "Actividad", style=wx.ST_NO_AUTORESIZE)
self.text_ctrl_1 = wx.TextCtrl(self, -1, "")
self.label_2 = wx.StaticText(self, -1, "Fecha")
self.datepicker_ctrl_1 = wx.DatePickerCtrl(self, -1)
self.label_3 = wx.StaticText(self, -1, "Curso")
self.label_4 = wx.StaticText(self, -1, "Alumnos")
self.label_5 = wx.StaticText(self, -1, "Incluidos")
self.listCurso = wx.ListBox(self, -1, choices=[], style=wx.LB_SORT)
self.listAlumnos = wx.ListBox(self, -1, choices=[], style=wx.LB_SORT)
self.listSeleccionados = wx.ListBox(self, -1, choices=[], style=wx.LB_SORT)
self.btPrint = wx.Button(self, -1, "Imprimir")
self.btExit = wx.Button(self, -1, "Terminar")
self.__set_properties()
self.__do_layout()
self.listCurso.InsertItems(self.consulta('cursos',''),0)
self.Bind(wx.EVT_LISTBOX, self.cursoClic, self.listCurso)
self.Bind(wx.EVT_LISTBOX, self.alumClic, self.listAlumnos)
self.Bind(wx.EVT_LISTBOX, self.borraIncluido, self.listSeleccionados)
self.Bind(wx.EVT_BUTTON, self.imprime, self.btPrint)
self.Bind(wx.EVT_BUTTON, self.salir, self.btExit)
# end wxGlade
def __set_properties(self):
# begin wxGlade: excursiones.__set_properties
self.SetTitle("Actividad Extraescolar")
self.SetSize((850, 800))
self.text_ctrl_1.SetMinSize((480, 29))
self.listCurso.SetMinSize((100, 584))
self.listCurso.SetToolTipString("Clic para escoger curso")
self.listAlumnos.SetMinSize((308, 584))
self.listAlumnos.SetToolTipString("Clic para escoger alumno")
self.listSeleccionados.SetMinSize((308, 584))
self.listSeleccionados.SetToolTipString("Clic para borrar alumno")
self.datepicker_ctrl_1.SetMinSize((200,29))
# end wxGlade
def __do_layout(self):
# begin wxGlade: excursiones.__do_layout
sizer_1 = wx.FlexGridSizer(3,1,5,5)
sizer_1.AddGrowableCol(1)
botones = wx.BoxSizer(wx.HORIZONTAL)
cursoAlumnos = wx.FlexGridSizer(3, 3, 0, 5)
titulofecha = wx.FlexGridSizer(1,4,5,5)
titulofecha.Add(self.label_1, 0, 0, 0)
titulofecha.Add(self.text_ctrl_1, 1, 0, 0)
titulofecha.Add(self.label_2, 0, 0, 0)
titulofecha.Add(self.datepicker_ctrl_1, 1, wx.ALIGN_RIGHT, 0)
titulofecha.AddGrowableCol(1,3)
sizer_1.Add(titulofecha, 0, wx.EXPAND, 0)
cursoAlumnos.Add(self.label_3, 0, 0, 0)
cursoAlumnos.Add(self.label_4, 0, 0, 0)
cursoAlumnos.Add(self.label_5, 0, 0, 0)
cursoAlumnos.Add(self.listCurso, 0, 0, 0)
cursoAlumnos.Add(self.listAlumnos, 0, 0, 0)
cursoAlumnos.Add(self.listSeleccionados, 0, 0, 0)
sizer_1.Add(cursoAlumnos, 3, wx.EXPAND, 0)
botones.Add(self.btPrint, 0, 0, 0)
botones.Add(self.btExit, 0, 0, 0)
sizer_1.Add(botones, 0, wx.ADJUST_MINSIZE, 0)
self.SetSizer(sizer_1)
#self.Maximize()
self.Layout()
# end wxGlade
def cursoClic(self, event): # wxGlade: excursiones.<event_handler>
#1ªclic no hay alumnos seleccionados
self.listAlumnos.Clear()
nombres = self.rellenaList(self.listCurso.GetStringSelection())
self.listAlumnos.InsertItems(nombres,0)
if self.listSeleccionados.GetStrings():
self.otroCurso()
self.tabla.append([self.listCurso.GetStringSelection(),[],[]])
event.Skip()
def alumClic(self, event): # wxGlade: excursiones.<event_handler>
self.listSeleccionados.Append(self.listAlumnos.GetStringSelection().encode('utf-8'))
def borraIncluido(self, event):
self.listSeleccionados.Delete(self.listSeleccionados.GetSelection())
event.Skip()
def otroCurso(self): # wxGlade: excursiones.<event_handler>
#self.tabla.append([self.listCurso.GetStringSelection().encode('utf-8'),''])
tmp = []
indice = 0
for i in self.listSeleccionados.GetStrings():
if i <> '':
tmp.append(i)
indice +=1
#creo listas de 3 elementos para mandar 3 columnas al table
if indice > 2 :
self.tabla.append(tmp)
tmp = []
indice = 0
while len(tmp) < 3:
tmp.append([])
self.tabla.append(tmp)
self.listSeleccionados.Clear()
#event.Skip()
def imprime(self, event):
self.otroCurso()
year = self.datepicker_ctrl_1.GetValue().GetYear()
dia = self.datepicker_ctrl_1.GetValue().GetDay()
mes = wx.DateTime.GetMonthName(int(self.datepicker_ctrl_1.GetValue().GetMonth()))
listado.hoy = ' ' +str(dia) + ' de ' + mes + ' de '+ str(year)
listado.c = Canvas('ActividadExtraescolar.pdf',pagesize=A4)
listado.actividad = self.text_ctrl_1.GetValue()
listado.alumnos = self.tabla
listado.contenido()
mivar = subprocess.Popen(['evince',os.path.realpath('ActividadExtraescolar.pdf')])
while mivar.poll() <> 0:
pass
event.Skip()
def salir(self, event): # wxGlade: excursiones.<event_handler>
self.Close(True)
event.Skip()
#lista de alumnos
def rellenaList(self,curso):
allcurso = []
nombres = []
allcurso.append(self.consulta('alumnocurso',curso))
for i in allcurso[0][0]:
if i != '':
nombres.append(self.consulta('nombre',i)[0])
return nombres
def consulta(self,datoResultado,datoUsuario):
datosConsulta = []
# NO SIRVE ? BORRAR cursos = []
tipo = datoResultado
usuarioCurso = datoUsuario
searchScope = ldap.SCOPE_SUBTREE
#opcion de ricardo para ldaps
try:
l = ldap.initialize("ldaps://ldap")
l.protocol_version = ldap.VERSION3
#l = ldap.open("ldap")
username = "cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es"
password = "xxxxxxx"
l.simple_bind(username,password)
except ldap.LDAPError, e:
print e
return "ERRORLDAP"
if tipo == 'cursos':
#cursos
base_dn = 'ou=Group,dc=instituto,dc=extremadura,dc=es'
searchFilter = '(&(objectClass=posixGroup)(groupType=school_class))'
retrieveAttributes = ['cn']
elif tipo == 'alumnocurso':
base_dn= 'ou=Group,dc=instituto,dc=extremadura,dc=es'
searchFilter = '(&(&(objectClass=posixGroup)(groupType=school_class))(cn=' + usuarioCurso + '))'
retrieveAttributes = ['memberUid'] #Extraer miembros
elif tipo == 'profesores':
base_dn = 'ou=Group,dc=instituto,dc=extremadura,dc=es '
searchFilter = "(&(objectClass=posixGroup)(cn=teachers))"
retrieveAttributes = ['memberUid']
elif tipo == 'nombre':#Nombre de usuario
base_dn= 'ou=People,dc=instituto,dc=extremadura,dc=es'
searchFilter = '(uid=' + usuarioCurso +')'
retrieveAttributes = ['cn']
elif tipo == 'nif':
base_dn= 'ou=People,dc=instituto,dc=extremadura,dc=es'
searchFilter = '(uid=' + usuarioCurso +')'
retrieveAttributes = ['employeeNumber']
elif tipo == 'nie':
base_dn= 'ou=People,dc=instituto,dc=extremadura,dc=es'
searchFilter = '(employeeNumber=' + usuarioCurso +')'
retrieveAttributes = ['uid']
else :
pass
try:
ldap_result_id = l.search(base_dn, searchScope, searchFilter, retrieveAttributes)
result_type, result_data = l.result(ldap_result_id)
if tipo == 'cursos':
for i in result_data:
datosConsulta.append(i[1]['cn'][0])
elif tipo == 'alumnocurso' or tipo == 'profesores' :
datosConsulta.append(result_data[0][1]['memberUid'])
elif tipo == 'nombre':
datosConsulta.append(result_data[0][1]['cn'][0])
elif tipo == 'nif':
if result_data[0][1] != {}:
datosConsulta.append(result_data[0][1]['employeeNumber'][0])
elif tipo == 'nie':
if result_data[0][1] != {}:
datosConsulta.append(result_data[0][1]['uid'][0])
else :
pass
except ldap.LDAPError, e:
print e
print "ERRORLDAP"
return datosConsulta
# end of class excursiones
if __name__ == "__main__":
app = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
Principal = excursiones(None, -1, "")
app.SetTopWindow(Principal)
Principal.Show()
app.MainLoop()
scanies/trunk/frmnmap.class
' Gambas class file
' 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
' IS provided AS IS, WITHOUT ANY WARRANTY; without even the implied
' warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
' NON-INFRINGEMENT. See the GNU General PUBLIC License FOR more details.
'
' You should READ the GNU General PUBLIC License
' IF you have non, WRITE TO the Free Software
' Foundation, INC., 59 Temple Place - Suite 330, Boston,
' # MA 02111-1307, USA.
' ----------------------------------------------------------------------------
' ################################################
' # file name : frmnmap.class
' # created in project : scanies
' # created by : Francisco Paniagua Sánchez
' # mail : adminies.franciscodeorellana@edu.juntaextremadura.net
' # created at : 12/11/2006
' # last test with : gambas-2.7-1
' ################################################
PRIVATE indice AS Integer
PUBLIC pasarnombre AS String
PRIVATE hset AS Settings
PUBLIC SUB iniciar_formulario()
DIM fichero AS String
btnsalir.picture = Stock["16/quit"]
lista.Columns.Count = 2
lista.Columns[0].Width = 125
lista.Columns[1].Width = 200
lista.Columns[0].Text = "Dirección IP"
lista.Columns[1].text = "Dispositivo"
fichero = User.home & "/.scanies-nmap"
IF NOT Exist(fichero) THEN SHELL "touch " & fichero WAIT
hset = NEW Settings(fichero)
END
PUBLIC SUB Form_Open()
ME.Center
iniciar_formulario()
cargar_datos()
END
PRIVATE FUNCTION obtener_nombre(dato AS String) AS String
RETURN hset[dato]
END
PRIVATE SUB cargar_datos()
DIM fichero AS String
DIM fdispositivos AS File
DIM linea AS String
DIM contador AS Integer
DIM ip AS String
DIM nombre AS String
IF (lista.Exist(0)) THEN lista.Clear
fichero = "/tmp/encendidos-nmap"
contador = 0
TRY SHELL "nmap -n -sP " & fprincipal.rango & " | grep appears | cut -f2 -d\" \" > " & fichero WAIT
TRY OPEN fichero FOR READ AS #fdispositivos
WHILE NOT Eof(fdispositivos)
LINE INPUT #fdispositivos, linea
nombre = obtener_nombre(linea)
IF (nombre = "") THEN nombre = "Dispositivo"
lista.Add(contador, linea)
lista[contador][1] = nombre
contador = contador + 1
WEND
CLOSE #fdispositivos
CATCH
Message.Info("Existe algún problema por el cual no se puede ejecutar la aplicación, revisa la configuración")
END
PUBLIC SUB lista_Click()
indice = lista.Current.Key
END
PUBLIC SUB lista_Menu()
'DIM tocado AS Boolean
' TRY tocado = LAST.current.selected
' IF NOT ERROR THEN
mnupopup.Popup
' indice = LAST.item.key
' ENDIF
END
PUBLIC SUB mnunombre_Click()
pasarnombre = lista[indice][1]
frmnombre.pasardireccion = lista[indice][0]
frmnombre.ShowModal
lista[indice][1] = pasarnombre
hset[lista[indice][0]] = pasarnombre
hset.Save
END
PUBLIC SUB mnunavegador_Click()
SHELL "firefox " & lista[indice][0] WAIT
END
PUBLIC SUB mnupdf_Click()
DIM fecha AS String
DIM fichero AS String
DIM ficheropdf AS String
DIM x AS Integer
DIM y AS Integer
DIM yinc1 AS Integer
DIM yinc2 AS Integer
DIM xinc1 AS Integer
DIM xinc2 AS Integer
DIM i AS Integer
DIM snombre AS String
DIM sdireccionip AS String
DIM smac AS String
DIM npagina AS Integer
'generar un fichero con los datos de los equipos
fecha = Now() 'Format(Now, "dd-mm-yyyy")
fichero = "/tmp/redscanies-report.ps"
ficheropdf = User.home & "/Desktop/redscanies-report.pdf"
npagina = 1
Printer.copies = 1
Printer.name = ""
Printer.size = "A4"
Printer.file = fichero
Draw.Begin(printer)
Draw.Font.name = "FreeSans"
'cabecera *****************************************************************
x = 250
y = 200
Draw.Font.size = 6
Draw.Text("Documento generado: " & fecha & " --- Página " & npagina, x + 3250, y - 100)
Draw.Font.size = 24
Draw.Font.Bold = TRUE
Draw.Text("*** Elementos de Red - ScanIES ***", x + 600, y)
Draw.Font.size = 10
yinc1 = 200
xinc1 = 1800
xinc2 = 3700
y = y + yinc1 + yinc1
Draw.Font.size = 16
Draw.Text("Nombre", x, y)
Draw.Text("Dirección IP", x + xinc2, y)
'cuerpo *************************************************************
y = y + yinc1
yinc2 = 100
Draw.Font.size = 10
Draw.Font.bold = FALSE
FOR i = 0 TO lista.Count
IF (lista.Exist(i)) THEN
snombre = lista[i][1]
sdireccionip = lista[i][0]
Draw.Text(snombre, x, y)
Draw.Text(sdireccionip, x + xinc2, y)
y = y + yinc2
IF (y > 6400) THEN 'debemos comenzar una nueva página *******************************
'incluimos la cabecera y modificamos el valor de y **********************************
printer.NewPage
npagina = npagina + 1
Draw.Font.size = 6
Draw.Text("Documento generado: " & fecha & " --- Página " & npagina, x + 3250, 100)
y = 400
Draw.Font.size = 16
Draw.Font.Bold = TRUE
Draw.Text("Nombre", x, y)
Draw.Text("Dirección IP", x + xinc2, y)
Draw.Font.size = 10
Draw.Font.bold = FALSE
y = y + yinc1
ENDIF
ENDIF
NEXT
Draw.End
'convertimos el fichero ps a pdf
SHELL "ps2pdf " & fichero & " " & ficheropdf WAIT
Message.Info("Fichero generado en el escritorio")
END
PUBLIC SUB btnsalir_Click()
ME.Close
END
scanies/trunk/leeme.txt
Aplicación que sirve para llevar el control del número de equipos
encendidos en una red.
Esta versión está adaptada para poder reconocer equipos de las
aulas LTSP, mediante la instalación de scanies-ltsp, un demonio
que nos informará a través del servidor del aula de los equipos
que están encendidos en ese aula.
En la pantalla principal se mostrarán todos los equipos del IES
con sistema gnu/linux, así como una utilidad para encender de
forma remota los servidores de aula.
Se ha incluido de nuevo en esta versión una opción "Examinar Red"
para detectar tanto equipos no linux como equipos de la electronica
de red.
-----------------------
Requerimientos mínimos
-----------------------
Tener instalado
-avahi-utils 0.6.23-3
-ldap-utils 2.4.11-1
-nmap 4.62-1
-wakeonlan 0.41-10
-gambas2 2.7-1
Las librerias de gambas que utiliza son:
-gambas2-gb-settings 2.7-1
-gambas2-gb-qt 2.7-1
scanies/trunk/copying
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
scanies/trunk/frmayuda.form
# Gambas Form File 2.0
{ Form Form
MoveScaled(26,6,66,72)
Text = ("Ayuda")
Icon = Picture["imagenes/red.png"]
Border = Window.Fixed
{ btnsalir Button
MoveScaled(22,67,22,4)
Font = Font["Bitstream Vera Sans,10"]
Text = ("Salir")
}
{ Label1 Label
MoveScaled(2,58,62,4)
Font = Font["Bitstream Vera Sans,10"]
Text = ("Autor: Francisco Paniagua S\xC3\xA1nchez")
Alignment = Align.Center
}
{ Label2 Label
MoveScaled(2,62,62,4)
Font = Font["Bitstream Vera Sans,10"]
Text = ("IES Francisco de Orellana (Trujillo)")
Alignment = Align.Center
}
{ Label3 Label
MoveScaled(10,2,50,7)
Font = Font["Bold,32"]
Text = ("ScanIES 0.4.5")
Alignment = Align.Center
}
{ PictureBox1 PictureBox
MoveScaled(3,2,7,6)
Picture = Picture["imagenes/red.png"]
}
{ Separator1 Separator
MoveScaled(2,10,62,1)
}
{ Separator2 Separator
MoveScaled(1,56,63,1)
}
{ TextArea1 TextArea
MoveScaled(2,12,62,43)
Background = &HFFFFDF&
Text = ("Aplicaci\xC3\xB3n que sirve para llevar el control del n\xC3\xBAmero de equipos\nencendidos en una red.\n\nEsta versi\xC3\xB3n est\xC3\xA1 adaptada para poder reconocer equipos de las \naulas LTSP, mediante la instalaci\xC3\xB3n de scanies-ltsp, un demonio\nque nos informar\xC3\xA1 a trav\xC3\xA9s del servidor del aula de los equipos\nque est\xC3\xA1n encendidos en ese aula.\n\nEn la pantalla principal se mostrar\xC3\xA1n todos los equipos del IES\ncon sistema gnu/linux, as\xC3\xAD como una utilidad para encender de \nforma remota los servidores de aula.\n\nSe ha incluido de nuevo en esta versi\xC3\xB3n una opci\xC3\xB3n \"Examinar Red\"\npara detectar tanto equipos no linux como equipos de la electronica\nde red.\n\n-------------------------------------\nRequerimientos m\xC3\xADnimos\n-------------------------------------\nTener instalado\n -avahi-utils 0.6.23-3\n -ldap-utils 2.4.11-1\t\n -nmap 4.62-1\n -wakeonlan 0.41-10\n -gambas2 2.7-1\n\nLas librerias de gambas que utiliza son:\n -gambas2-gb-settings 2.7-1\n -gambas2-gb-qt 2.7-1 \n")
}
}
scanies/trunk/frmayuda.class
' Gambas class file
' 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
' IS provided AS IS, WITHOUT ANY WARRANTY; without even the implied
' warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
' NON-INFRINGEMENT. See the GNU General PUBLIC License FOR more details.
'
' You should READ the GNU General PUBLIC License
' IF you have non, WRITE TO the Free Software
' Foundation, INC., 59 Temple Place - Suite 330, Boston,
' # MA 02111-1307, USA.
' ----------------------------------------------------------------------------
' ################################################
' # file name : frmayuda.class
' # created in project : scanies
' # created by : Francisco Paniagua Sánchez
' # mail : adminies.franciscodeorellana@edu.juntaextremadura.net
' # created at : 12/11/2006
' # last test with : gambas-2.7-1
' ################################################
PUBLIC SUB Form_Open()
DIM fichero AS String
ME.Center
btnsalir.Picture = stock["16/quit"]
END
PUBLIC SUB btnsalir_Click()
ME.Close(0)
END
scanies/trunk/.settings
[Breakpoints]
Count=0
[DebugWindow]
Count=0
[FFind]
SearchIn="Module"
CaseSensitive=False
SearchWord=False
SearchComment=False
SearchString=True
[OpenFile]
File[1]="fprincipal.form"
File[2]="fprincipal.class:387.18"
Active=2
File[3]="frmconfiguracion.form"
File[4]="frmconfiguracion.class:73.1"
Count=4
[Watches]
Count=4
Watch[1]="temporal"
Watch[2]="fprofesores"
Watch[3]="fichero"
Watch[4]="rango"
[YWindows]
Count=0
scanies/trunk/.directory
[Desktop Entry]
Icon=./.icon.png
scanies/trunk/.project
# Gambas Project File 2.0
Title=scanies
Startup=fprincipal
Icon=imagenes/red.png
Version=0.4.12
Library=gb.qt
Library=gb.form
Library=gb.qt.ext
Library=gb.settings
TabSize=2
Maintainer=francis
Address=francis@lenix
License=General Public Licence
Systems=debian
Menus=Apps/Programming
Categories=
Groups=Networking
scanies/trunk/changelog
scanies-0.4.5
* Generar documentos PDF con los datos de los equipos
* Posibilidad de abrir una direcci?n ip con el navegador web
desde "Examinar Red"
* Cambiadas las librer?as de gtk a qt para poder utilizar la
opci?n de generar documentos en PDF
---------------------------------------------------------------
scanies-0.4.4
* Adaptación para detectar aulas LTSP
* Incluido de nuevo nmap para detectar electronica de red y equipos no linux
---------------------------------------------------------------
scanies-0.4.1
* Cubierto bug en ayuda que cerraba toda la aplicación
(gracias a Victor Martínez)
* Añadido contactar a un equipo por ssh
* Resuelve nombre mediante avahi
---------------------------------------------------------------
scanies-0.4
* Cambiado el servicio nmap por avahi, mucho más rápido
---------------------------------------------------------------
scanies 0.3-2
* Nueva representacion para equipos sin nombre asignado
(gracias a Antonio Abasolo)
---------------------------------------------------------------
scanies 0.3-1
* Añadidos iconos a botones y opciones de menu
---------------------------------------------------------------
scanies 0.3
* Añadido bloque para apagar / encender aulas
* Añadido botón para encender pc profesor
* Apagado individual de equipos
* Menu Ayuda
---------------------------------------------------------------
scanies 0.2
* Añadido bloque para estadisticas de equipos
* Añadido bloque para representar los equipos encendidos
---------------------------------------------------------------
scanies 0.1
* Versión inicial
---------------------------------------------------------------
scanies/trunk/frmnombre.form
# Gambas Form File 2.0
{ Form Form
MoveScaled(0,0,58,13)
Text = ("Poner nombre ")
Icon = Picture["imagenes/red.png"]
{ TextLabel1 TextLabel
MoveScaled(1,2,10,3)
Text = ("Direcci\xC3\xB3n IP")
}
{ TextLabel2 TextLabel
MoveScaled(1,7,10,3)
Text = ("Nombre")
}
{ txtdireccion TextBox
MoveScaled(12,2,27,3)
Text = ("")
}
{ txtnombre TextBox
MoveScaled(12,7,27,3)
Text = ("")
}
{ btnaceptar Button
MoveScaled(42,2,13,3)
Text = ("Aceptar")
}
{ btncancelar Button
MoveScaled(42,7,13,3)
Text = ("Cancelar")
}
}
scanies/trunk/fprincipal.form
# Gambas Form File 2.0
{ Form Form
MoveScaled(15.625,5,92,69)
Font = Font["Bitstream Vera Sans,10"]
Text = ("ScanIES")
Icon = Picture["imagenes/red.png"]
Border = Window.Fixed
{ mnuArchivo Menu
Text = ("&Archivo")
{ mnuRefrescar Menu
Text = ("Refrescar")
}
{ mnuSalir Menu
Text = ("Salir")
}
}
{ mnuConfiguracion Menu
Text = ("&Configuracion")
{ mnuConfiguracion2 Menu
Text = ("Menu de Configuraci\xC3\xB3n")
}
}
{ mnuAyuda Menu
Text = ("A&yuda")
{ mnuAyuda2 Menu
Text = ("Ayuda")
}
}
{ mnupopup Menu
Text = ("Popup")
Visible = False
{ mnuconectar Menu
Text = ("Conectar por ssh")
Picture = Picture["imagenes/gnome-terminal.png"]
}
{ mnupdf Menu
Text = ("Generar datos PDF")
Picture = Picture["imagenes/pdf.png"]
}
}
{ listapcs ColumnView
MoveScaled(1,1,58,60)
Font = Font["Bitstream Vera Sans,10"]
}
{ Frame2 Frame
MoveScaled(60,0,31,30)
Font = Font["Bitstream Vera Sans,10"]
Text = (" Equipos de Profesor ")
{ cmbaulas ComboBox
MoveScaled(12,3,16.375,4)
Text = (" ")
ReadOnly = True
}
{ TextLabel3 TextLabel
MoveScaled(4,4,7,3)
Text = ("Equipos")
}
{ btnprofon Button
MoveScaled(3,14,26,5)
Text = ("Encender PC profesor")
Picture = Picture["imagenes/despierta.png"]
}
{ btnproftodoson Button
MoveScaled(3,21,26,6)
Text = ("Encender todos los \nPC's de profesores")
Picture = Picture["imagenes/apagar.png"]
}
{ lblaula TextLabel
MoveScaled(3,8,25,4)
Text = ("")
Alignment = Align.Center
}
}
{ btnsalir Button
MoveScaled(76,60,15,4)
Font = Font["Bitstream Vera Sans,10"]
Text = ("Salir")
}
{ btnrefrescar Button
MoveScaled(60,60,15,4)
Font = Font["Bitstream Vera Sans,10"]
Text = ("Refrescar")
}
{ lblnequipos Label
MoveScaled(1,61,58,3)
Text = ("")
Alignment = Align.Center
Border = Border.Etched
}
{ Frame1 Frame
MoveScaled(60,32,31,26)
Text = (" Examinar otros elementos de la red ")
{ TextLabel1 TextLabel
MoveScaled(2,6,26,7)
Text = ("Detectar electr\xC3\xB3nica de red y equipos con otros sistemas operativos encendidos")
Alignment = Align.Center
}
{ btnnmap Button
MoveScaled(4,19,24,4)
Text = ("Examinar Red")
Picture = Picture["imagenes/red16.png"]
}
}
}
... Diferencia truncada por exceder el máximo tamaño visualizable.

Exportar a: Unified diff