Index: etiquetas-portatiles/LEEME
===================================================================
--- etiquetas-portatiles/LEEME	(revision 529)
+++ etiquetas-portatiles/LEEME	(nonexistent)
@@ -1 +0,0 @@
-Repositorio movido a https://github.com/manumora/laptop-labels
Index: actividadextraescolar/actividadextraescolar.tgz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: actividadextraescolar/actividadextraescolar.tgz
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: actividadextraescolar/actividadExtraescolar.py
===================================================================
--- actividadextraescolar/actividadExtraescolar.py	(revision 529)
+++ actividadextraescolar/actividadExtraescolar.py	(nonexistent)
@@ -1,232 +0,0 @@
-#!/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()

Property changes on: actividadextraescolar/actividadExtraescolar.py
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: actividadextraescolar/listado.py
===================================================================
--- actividadextraescolar/listado.py	(revision 529)
+++ actividadextraescolar/listado.py	(nonexistent)
@@ -1,46 +0,0 @@
-#!/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)
-
Index: actividadextraescolar/Leeme
===================================================================
--- actividadextraescolar/Leeme	(revision 529)
+++ actividadextraescolar/Leeme	(nonexistent)
@@ -1,10 +0,0 @@
-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
Index: scanies/trunk/.directory
===================================================================
--- scanies/trunk/.directory	(revision 529)
+++ scanies/trunk/.directory	(nonexistent)
@@ -1,2 +0,0 @@
-[Desktop Entry]
-Icon=./.icon.png

Property changes on: scanies/trunk/.directory
___________________________________________________________________
Deleted: svn:executable
Index: scanies/trunk/.project
===================================================================
--- scanies/trunk/.project	(revision 529)
+++ scanies/trunk/.project	(nonexistent)
@@ -1,17 +0,0 @@
-# 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
Index: scanies/trunk/changelog
===================================================================
--- scanies/trunk/changelog	(revision 529)
+++ scanies/trunk/changelog	(nonexistent)
@@ -1,40 +0,0 @@
-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
----------------------------------------------------------------

Property changes on: scanies/trunk/changelog
___________________________________________________________________
Deleted: svn:executable
Index: scanies/trunk/imagenes/konsoleOn.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/konsoleOn.png
___________________________________________________________________
Deleted: svn:executable
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/imagenes/pdf.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/pdf.png
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/imagenes/red.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/red.png
___________________________________________________________________
Deleted: svn:executable
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/imagenes/apagar.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/apagar.png
___________________________________________________________________
Deleted: svn:executable
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/imagenes/gnome-terminal.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/gnome-terminal.png
___________________________________________________________________
Deleted: svn:executable
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/imagenes/pdf16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/pdf16.png
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/imagenes/despierta.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/despierta.png
___________________________________________________________________
Deleted: svn:executable
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/imagenes/red16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/imagenes/red16.png
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/frmnombre.form
===================================================================
--- scanies/trunk/frmnombre.form	(revision 529)
+++ scanies/trunk/frmnombre.form	(nonexistent)
@@ -1,31 +0,0 @@
-# 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")
-  }
-}
Index: scanies/trunk/.icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/.icon.png
___________________________________________________________________
Deleted: svn:executable
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/fprincipal.form
===================================================================
--- scanies/trunk/fprincipal.form	(revision 529)
+++ scanies/trunk/fprincipal.form	(nonexistent)
@@ -1,105 +0,0 @@
-# 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"]
-    }
-  }
-}
Index: scanies/trunk/frmnombre.class
===================================================================
--- scanies/trunk/frmnombre.class	(revision 529)
+++ scanies/trunk/frmnombre.class	(nonexistent)
@@ -1,57 +0,0 @@
-' 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
-' ################################################
-
-PUBLIC pasardireccion AS String
-
-
-PUBLIC SUB Form_Open()
-
-  ME.Center
-  btnaceptar.Picture = Stock["16/apply"]
-  btncancelar.Picture = Stock["16/cancel"]
-  txtdireccion.text = pasardireccion
-  txtdireccion.enabled = FALSE
-  txtnombre.text = frmnmap.pasarnombre
-    
-END
-
-PUBLIC SUB btncancelar_Click()
-
-  ME.Close
-
-END
-
-PUBLIC SUB btnaceptar_Click()
-
-  IF (txtnombre.text = "") THEN 
-   frmnmap.pasarnombre = "Dispositivo"
-  ELSE 
-   frmnmap.pasarnombre = txtnombre.Text
-  ENDIF 
-  
-  ME.Close
-
-END
Index: scanies/trunk/fprincipal.class
===================================================================
--- scanies/trunk/fprincipal.class	(revision 529)
+++ scanies/trunk/fprincipal.class	(nonexistent)
@@ -1,510 +0,0 @@
-' 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               : fprincipal.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 hset AS Settings
-PUBLIC servidordns AS String
-PUBLIC rango AS String
-PUBLIC datosldap AS Boolean
-PRIVATE aula AS String
-PRIVATE indice AS Integer
-PRIVATE nequipos AS Integer
-
-
-PUBLIC SUB Form_Open()
-DIM fichero AS String
-
- fichero = user.Home & "/.scanies4"
- ME.Center
-
- IF NOT comprobar_configuracion() THEN
-  frmconfiguracion.ShowModal
-  
- 'ELSE
-  ' cargar_datos()
- ENDIF
- hset = NEW Settings(fichero)
- rango = hset["Rango de Red"]
- datosldap = hset["ldap"]
-
- IF (datosldap) THEN 
-  cargar_datos()
- ELSE  
-  deshabilitar_ldap(FALSE)
- ENDIF 
-  
- iniciar_programa()
-END
-
-
-PUBLIC SUB deshabilitar_ldap(valor AS Boolean)
-  
-  frame2.enabled = valor
-  btnprofon.enabled = valor
-  btnproftodoson.Enabled = valor
-  cmbaulas.Enabled = valor
-  
-END
-
-
-
-PUBLIC SUB Form_Close()
-
-  
-END
-
-
-PUBLIC FUNCTION comprobar_configuracion() AS Boolean
-DIM fichero AS String
-DIM retorno AS Boolean
-
-  fichero = user.Home & "/.scanies4"
-
-  IF NOT Exist(fichero) THEN
-   SHELL "touch " & fichero WAIT
-   message.Info("La aplicación no está configurada")
-   retorno = FALSE
-  ELSE
-   hset = NEW Settings(fichero)
-   rango = hset["Rango de Red"]
-   datosldap = hset["ldap"]
-   retorno = TRUE
-  ENDIF
-  RETURN retorno
-  
-END
-
-
-PUBLIC SUB iconos()
-
- btnrefrescar.Picture = stock["16/refresh"]
- btnsalir.Picture = stock["16/quit"]
- mnusalir.picture = stock["16/quit"]
- mnurefrescar.Picture = stock["16/refresh"]
- mnuconfiguracion2.Picture = stock["16/properties"]
- mnuayuda2.Picture = stock["16/help"]  
-  
-END
-
-
-
-
-PUBLIC SUB cargar_datos()
-DIM fichero AS file
-DIM fauxiliar AS File
-DIM temporal AS String
-DIM fprofesores AS String
-DIM linea AS String
-DIM nombre AS String
-DIM mac AS String
-
- 
- 'realizar un fichero mediante ldapsearch con los nombres de los equipos de profesor
- temporal = "/tmp/datos-prof"
- TRY SHELL "ldapsearch -xLLL -h ldap -b dc=instituto,dc=extremadura,dc=es \"(&(objectClass=dhcpHost)(cn=a*-pro))\" | egrep \"cn:|ethernet\" | awk '{ print $2 $3 }' > " & temporal WAIT
-   
- fprofesores = "/tmp/profesores-ldap"
- cmbaulas.add("Elige un equipo ...")
-
- TRY OPEN fprofesores FOR CREATE AS #fauxiliar
-
- TRY OPEN temporal FOR READ AS #fichero
- WHILE NOT Eof(fichero)
-  
-  LINE INPUT #fichero, linea
-  nombre = linea
-  LINE INPUT #fichero, linea
-  mac = Right(linea, 17)
-  
-  cmbaulas.Add(nombre)
-  PRINT #fauxiliar, nombre & " " & mac
-  
- WEND
- CLOSE #fichero
- 
- CLOSE #fauxiliar
- 
- habilitar_botones(FALSE)
-
- 
- CATCH 
-  message.Error("No se puedieron obtener los datos de los equipos de profesor")
-
-END
-
-
-PUBLIC SUB iniciar_programa()
-  
- 'cargamos la lista de equipos encendidos
- iconos()
- inicia_lista()
- btnRefrescar_click()
-  
-END
-
-
-PUBLIC SUB habilitar_botones(valor AS Boolean)
-
- btnprofon.Enabled = valor
-
-END
-
-
-
-PUBLIC SUB cmbaulas_Click()
-
- IF (cmbaulas.Text = "Elige un equipo ...") THEN
-  habilitar_botones(FALSE)
-  lblaula.text = "No hay ningún equipo seleccionado"
- ELSE
-  aula = cmbaulas.Text
-  habilitar_botones(TRUE)
-  lblaula.text = "Esta seleccionado el equipo " & aula
- ENDIF
-
-END
-
-
-PUBLIC SUB habilitar(valor AS Boolean)
-
-'  frame1.Enabled = valor
-  frame2.Enabled = valor
-  listapcs.Enabled = valor
-  IF (valor) THEN
-   ME.Mouse = mouse.Default
-  ELSE
-   ME.mouse = mouse.Wait
-  ENDIF
-
-END
-
-PUBLIC SUB inicia_lista()
-
-  listapcs.Columns.Count = 4
-  listapcs.Columns[0].Width = 200
-  listapcs.Columns[1].Width = 125
-  listapcs.Columns[2].width = 180
-  listapcs.Columns[0].Text = "Nombre"
-  listapcs.Columns[1].Text = "Dirección IP"
-  listapcs.Columns[2].text = "MAC"
-  listapcs.Columns[3].text = "   "
-    
-END
-
-
-'****************************************************************************************************
-'****************************************************************************************************
-' opciones menu y botones
-'****************************************************************************************************
-'****************************************************************************************************
-
-
-PUBLIC FUNCTION obtener_mac(cadena AS String[]) AS String
-  
-  RETURN Right(cadena[2], 2) & ":" & Right(cadena[3], 2) & ":" & Right(cadena[4], 2) & ":" & Right(cadena[5], 2) & ":" & Right(cadena[6], 2) & ":" & Right(cadena[7], 2)
-    
-END
-
-
-PUBLIC SUB btnrefrescar_Click()
-DIM fichero1 AS String
-DIM fichero2 AS String
-DIM fichero3 AS String
-DIM ficherounion AS String
-DIM fencendidos AS File
-DIM linea AS String
-DIM tratalinea01 AS String[]
-DIM tratalinea02 AS String[]
-DIM nombre AS String
-DIM ip AS String
-DIM mac AS String
-DIM contador AS Integer
-DIM tipo AS String
-
-  
-  IF (listapcs.Exist(0)) THEN listapcs.Clear
-  
-  inicia_lista()
-  contador = 0
-  habilitar(FALSE)
-  fichero1 = "/tmp/equipos-workstation"
-  fichero2 = "/tmp/equipos-scanies"
-
-  
-'Se crea un fichero con los pc's que están encendidos
-SHELL "avahi-browse _workstation._tcp -fkprt | grep = | grep IPv4 > " & fichero1 WAIT
-SHELL "avahi-browse _scanies._tcp -fkprt | grep = | grep IPv4 > " & fichero2 WAIT 
-
-'Uno los dos ficheros y los ordeno por nombre
-ficherounion = "/tmp/equipos-union"
-SHELL "cat " & fichero1 & " " & fichero2 & " > " & ficherounion WAIT 
-fichero3 = "/tmp/encendidos"
-SHELL "sort -t\";\" -k 4 " & ficherounion & " > " & fichero3 WAIT
-
-
-'Saco los datos de los pc's encendidos 
-TRY OPEN fichero3 FOR READ AS #fencendidos
-   WHILE NOT Eof(fencendidos)
-    LINE INPUT #fencendidos, linea  
-
-    tratalinea01 = Split(linea, ";") 'dividimos linea en campos
-    
-    'diferenciamos si es workstation o scanies
-    tipo = tratalinea01[4]
-    
-    'workstation
-    IF (tipo = "_workstation._tcp") THEN 
-        tratalinea02 = Split(tratalinea01[3], "\\") 'dividimos campo 3 que contiene el nombre y la mac"
-        nombre = tratalinea02[0]
-        mac = obtener_mac(tratalinea02)
-        ip = tratalinea01[7]
-    ENDIF 
-    
-    'scanies
-    IF (tipo = "_scanies._tcp") THEN 
-        nombre = tratalinea01[3]
-        tratalinea02 = Split(tratalinea01[9], "#")
-        ip = Replace(tratalinea02[0], "\"", "")
-        mac = Replace(tratalinea02[1], "\"", "")
-    ENDIF 
-    
-    listapcs.Add(contador, nombre)
-    listapcs[contador][1] = ip
-    listapcs[contador][2] = mac
-    
-    IF (tipo = "_workstation._tcp") THEN 
-     listapcs[contador][3] = "x"
-    ELSE 
-     listapcs[contador][3] = " "
-    ENDIF 
-    
-    contador = contador + 1
-       
-   WEND 
-
-  CLOSE #fencendidos
-  lblnequipos.text = "Numero de equipos encendidos: " & contador
-  habilitar(TRUE)
-
-END
-
-
-PUBLIC SUB mnuConfiguracion2_Click()
-
- frmconfiguracion.Show
-
-END
-
-PUBLIC SUB btnsalir_Click()
-
- ME.Close
-
-END
-
-PUBLIC SUB mnuRefrescar_Click()
-
- btnrefrescar_click()
-
-END
-
-PUBLIC SUB mnuSalir_Click()
-
- btnsalir_Click()
-
-END
-
-PUBLIC SUB mnuAyuda2_Click()
-
-  frmayuda.Show
-  
-END
-
-PUBLIC SUB listapcs_Click()
-  
-  indice = listapcs.Current.Key
-  
-END
-
-
-PUBLIC SUB listapcs_Menu()
-'DIM tocado AS Boolean
-
-'   TRY tocado = LAST.current.selected
-'   IF NOT ERROR THEN
-     mnupopup.Popup
-'     indice = LAST.item.key
-'   ENDIF
-
-END
-
-PUBLIC SUB mnuconectar_Click()
-DIM direccion AS String
-  
-  IF (listapcs[indice][3] = " ") THEN  
-   message.Info("No hay conexión a esa red")
-  ELSE  
-   direccion = listapcs[indice][1]
-   SHELL "gnome-terminal -x ssh root@" & direccion
-  ENDIF    
-  
-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/scanies-report.ps"
-  ficheropdf = User.home & "/Desktop/scanies-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("*** ScanIES ***", x + 1500, 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 + xinc1, y)
-  Draw.Text("MAC", x + xinc2, y) 
-  
-  
-  'cuerpo *************************************************************
-  y = y + yinc1
-  yinc2 = 100
-  Draw.Font.size = 10
-  Draw.Font.bold = FALSE
-  
-  FOR i = 0 TO listapcs.Count
-   
-    IF (listapcs.Exist(i)) THEN 
-      snombre = listapcs[i][0]
-      sdireccionip = listapcs[i][1]
-      smac = listapcs[i][2]
-      
-      Draw.Text(snombre, x, y)
-      Draw.Text(sdireccionip, x + xinc1, y)
-      Draw.Text(smac, 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 + xinc1, y)
-       Draw.Text("MAC", 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 btnnmap_Click()
-
-  frmnmap.ShowModal
-
-END
-
-PUBLIC SUB btnproftodoson_Click()
-DIM profesores AS String
-DIM temporal AS String
-
- temporal = Temp()
- profesores = "/tmp/profesores-ldap"
- SHELL "awk '{ print $2 }' " & profesores & " > " & temporal WAIT  
- SHELL "wakeonlan -f " & temporal WAIT  
- message.Info("Enviada señal de encendido a todos los equipos de profesor")
-
-END
-
-
-PUBLIC SUB btnprofon_Click()
-DIM profesores AS String
-DIM temporal AS String
-DIM mac AS String
-
-  temporal = Temp()
-  profesores = "/tmp/profesores-ldap"
-  SHELL "grep " & cmbaulas.text & " " & profesores & " | cut -f2 -d\" \"  > " & temporal WAIT 
-  
-  TRY mac = file.Load(temporal)
-  SHELL "wakeonlan " & mac
-  message.Info("Enviada señal de encendido al equipo " & cmbaulas.text)
-
-END
Index: scanies/trunk/frmconfiguracion.form
===================================================================
--- scanies/trunk/frmconfiguracion.form	(revision 529)
+++ scanies/trunk/frmconfiguracion.form	(nonexistent)
@@ -1,41 +0,0 @@
-# Gambas Form File 2.0
-
-{ Form Form
-  MoveScaled(15.625,21.625,76,29)
-  Font = Font["Bitstream Vera Sans,10"]
-  Text = ("Configuracion ScanIES")
-  Icon = Picture["imagenes/red.png"]
-  Border = Window.Fixed
-  { Frame1 Frame
-    MoveScaled(1,13,74,11)
-    Text = (" Opciones para nmap ")
-    { TextLabel1 TextLabel
-      MoveScaled(2,4,12,3)
-      Text = ("Rango de Red")
-    }
-    { txtrango TextBox
-      MoveScaled(15,4,56,3)
-      Text = ("")
-    }
-  }
-  { btnsalir Button
-    MoveScaled(60,25,15,3)
-    Font = Font["Bitstream Vera Sans,10"]
-    Text = ("Salir")
-  }
-  { btnguardar Button
-    MoveScaled(1,25,23,3)
-    Font = Font["Bitstream Vera Sans,10"]
-    Text = ("Guardar Configuraci\xC3\xB3n")
-    Default = True
-  }
-  { Frame2 Frame
-    MoveScaled(1,1,74,10)
-    Text = (" Opciones para ldap ")
-    { chkbxldap CheckBox
-      MoveScaled(3,4,68,3)
-      Text = ("\xC2\xBF Coger datos de los servidores de terminales mediante el servidor ldap ?")
-      Value = CheckBox.True
-    }
-  }
-}
Index: scanies/trunk/frmconfiguracion.class
===================================================================
--- scanies/trunk/frmconfiguracion.class	(revision 529)
+++ scanies/trunk/frmconfiguracion.class	(nonexistent)
@@ -1,82 +0,0 @@
-' 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               : frmconfiguracion.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 hset AS Settings
-
-
-PUBLIC SUB Form_Open()
-
- ME.Center
- hset = NEW settings(user.Home & "/.scanies4")
- iconos()
- comprobar_configuracion()
-
-END
-
-PUBLIC SUB btnsalir_Click()
-
-ME.Close
-
-END
-
-
-PUBLIC SUB iconos()
-
-  btnguardar.Picture = stock["16/apply"]
-  btnsalir.Picture = stock["16/quit"]
-  
-END
-
-
-PUBLIC FUNCTION comprobar_configuracion() AS Boolean
-
-  txtrango.text = hset["Rango de Red"]
-  
-  IF (hset["ldap"] = "") THEN 
-   chkbxldap.value = TRUE
-  ELSE 
-   chkbxldap.value = hset["ldap"]
-  ENDIF 
-  
-   
-END
-
-
-PUBLIC SUB btnguardar_Click()
- 
-  hset["Rango de Red"] = txtrango.Text
-  hset["ldap"] = chkbxldap.Value
-
-  hset.Save
- 
-  fprincipal.rango = txtrango.Text
-  fprincipal.datosldap = chkbxldap.Value
-
-  ME.Close
-
-END
-
-
-
Index: scanies/trunk/frmnmap.form
===================================================================
--- scanies/trunk/frmnmap.form	(revision 529)
+++ scanies/trunk/frmnmap.form	(nonexistent)
@@ -1,31 +0,0 @@
-# Gambas Form File 2.0
-
-{ Form Form
-  MoveScaled(0,0,42,65)
-  Text = ("Electr\xC3\xB3nica de Red ...")
-  Icon = Picture["imagenes/red.png"]
-  { mnupopup Menu
-    Text = ("PopUp")
-    Visible = False
-    { mnunombre Menu
-      Text = ("Poner Nombre")
-      Picture = Picture["icon:/16/edit"]
-    }
-    { mnunavegador Menu
-      Text = ("Abrir con Navegador Web")
-      Picture = Picture["icon:/16/earth"]
-    }
-    { mnupdf Menu
-      Text = ("Generar datos PDF")
-      Picture = Picture["imagenes/pdf16.png"]
-    }
-  }
-  { lista ColumnView
-    MoveScaled(0,0,42,61)
-    ScrollBar = Scroll.Vertical
-  }
-  { btnsalir Button
-    MoveScaled(0,61,42,4)
-    Text = ("Salir")
-  }
-}
Index: scanies/trunk/frmnmap.class
===================================================================
--- scanies/trunk/frmnmap.class	(revision 529)
+++ scanies/trunk/frmnmap.class	(nonexistent)
@@ -1,245 +0,0 @@
-' 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
-
Index: scanies/trunk/leeme.txt
===================================================================
--- scanies/trunk/leeme.txt	(revision 529)
+++ scanies/trunk/leeme.txt	(nonexistent)
@@ -1,29 +0,0 @@
-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 

Property changes on: scanies/trunk/leeme.txt
___________________________________________________________________
Deleted: svn:executable
Index: scanies/trunk/.gambas/FRMAYUDA
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/.gambas/FRMAYUDA
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/.gambas/FRMCONFIGURACION
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/.gambas/FRMCONFIGURACION
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/.gambas/FRMNMAP
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/.gambas/FRMNMAP
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/.gambas/FRMNOMBRE
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/.gambas/FRMNOMBRE
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/.gambas/FPRINCIPAL
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/.gambas/FPRINCIPAL
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/scanies.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies/trunk/scanies.png
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies/trunk/copying
===================================================================
--- scanies/trunk/copying	(revision 529)
+++ scanies/trunk/copying	(nonexistent)
@@ -1,340 +0,0 @@
-		    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.

Property changes on: scanies/trunk/copying
___________________________________________________________________
Deleted: svn:executable
Index: scanies/trunk/frmayuda.form
===================================================================
--- scanies/trunk/frmayuda.form	(revision 529)
+++ scanies/trunk/frmayuda.form	(nonexistent)
@@ -1,46 +0,0 @@
-# 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")
-  }
-}
Index: scanies/trunk/frmayuda.class
===================================================================
--- scanies/trunk/frmayuda.class	(revision 529)
+++ scanies/trunk/frmayuda.class	(nonexistent)
@@ -1,41 +0,0 @@
-' 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
-
Index: scanies/trunk/.settings
===================================================================
--- scanies/trunk/.settings	(revision 529)
+++ scanies/trunk/.settings	(nonexistent)
@@ -1,31 +0,0 @@
-[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
-

Property changes on: scanies/trunk/.settings
___________________________________________________________________
Deleted: svn:executable
Index: autorename/LEEME
===================================================================
--- autorename/LEEME	(revision 529)
+++ autorename/LEEME	(nonexistent)
@@ -1 +0,0 @@
-Repositorio movido a http://github.com/manumora/autorename
Index: profEnAula/profEnAula.py
===================================================================
--- profEnAula/profEnAula.py	(revision 529)
+++ profEnAula/profEnAula.py	(nonexistent)
@@ -1,250 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import wx
-import ldap
-import unicodedata
-from xml.etree import ElementTree
-import time
-import sys,os
-#import horarioXml11
-
-listProfesores = []
-uidNombre = {}
-
-class buscaProf(wx.Frame):
-	
-    def __init__(self, *args, **kwds):
-        kwds["style"] = wx.DEFAULT_FRAME_STYLE
-        wx.Frame.__init__(self, *args, **kwds)
-        self.sizer_1_staticbox = wx.StaticBox(self, -1, "Profesor")
-        #self.aproxList = wx.TextCtrl(self,style = wx.TE_PROCESS_ENTER)
-        self.profesores = wx.ListBox(self, -1, choices=[], style=wx.LB_SORT)
-        self.btBuscar = wx.Button(self, -1, "Refrescar")
-        self.resultado = wx.StaticText(self, -1, "")
-        self.btSalir = wx.Button(self, -1, "Salir")
-        #self.profAula()
-        self.rellenaProf()
-        self.__set_properties()
-        self.__do_layout()
-        self.Bind(wx.EVT_LISTBOX, self.buscaAula, self.profesores)        
-        self.Bind(wx.EVT_BUTTON, self.salir, self.btSalir)
-        #self.Bind(wx.EVT_TEXT, self.desplazaLista, self.aproxList)
-        ahora = time.localtime()    
-    	dia = self.diaSemana(ahora[6])    	
-    	minutos = int(ahora[3]*60+ahora[4])
-        self.Bind(wx.EVT_BUTTON, self.profAula, self.btBuscar)
-        self.rellenaProf()
-        
-        self.profAula(self)
-
-    def __set_properties(self):
-        self.SetTitle("Busca Profesor en aulas")        
-        self.SetPosition([1500,0])
-        #self.aproxList.SetToolTipString("Introduzca la inicial del nombre")
-        
-    def __do_layout(self):
-        sizer_1 = wx.StaticBoxSizer(self.sizer_1_staticbox, wx.VERTICAL)
-        grid_sizer_1 = wx.GridSizer(1, 2, 0, 0)
-        #sizer_1.Add(self.aproxList,0,wx.ADJUST_MINSIZE, 0)
-        sizer_1.Add(self.profesores, 5, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 0)
-        grid_sizer_1.Add(self.btBuscar, 0, wx.ALIGN_BOTTOM, 0)
-        grid_sizer_1.Add(self.resultado, 0, wx.ALIGN_BOTTOM, 0)
-        grid_sizer_1.Add(self.btSalir, 0, wx.ALIGN_BOTTOM, 0)
-        sizer_1.Add(grid_sizer_1, 1, wx.ADJUST_MINSIZE, 0)
-        self.SetSizer(sizer_1)
-        self.Layout()
-        self.SetSize((258, 1322))
-        
-    def salir(self,evento=None):
-        self.Close(True)
-
-    #Tecla en TxtCtrl selecciona prof de lista    
-    def desplazaLista(self,event):   	   	
-    	for i in self.listProfesores:    		
-    		if i[0] ==  self.aproxList.GetValue()[0]:
-    			print 'desplazaLista'
-        		self.profesores.SetStringSelection(i)
-        		self.aproxList.SetValue(i)
-        		break
-              
-    def elCurso(self, minutos, dia):
-        prof = self.profesores.GetStringSelection().encode('utf-8')
-        dia = raiz.find(dia + '.txt')
-        for i in dia:
-          if  i.attrib['nif'] == uidNombre[prof]:
-            profesor = i.getchildren()
-            #buscar la hora
-            for j in profesor:
-              inicio = j.get('inicio')
-              fin = j.get('fin')
-              if int(inicio) <= minutos <= int(fin):
-                curso = j.getchildren()
-                for h in curso:#curso son los alumnos co su nie
-                  #para evitar problema con alumnos que no existen
-                  try:
-                    nieAlumno = self.consulta('nie', h.get('nie'))[0]
-                  except:
-                    nieAlumno = [];continue
-                  #print nieAlumno;print 'antes nif'
-                  if nieAlumno:
-                    print 'sin error'
-                    self.cursoAlumno(nieAlumno)
-                    return 1
-                  else:
-                    print 'error'
-    #Averiguar curso de un alumno dado, busca curso por curso 
-    def cursoAlumno(self,nif):    	        	       	
-    	#COMPROBAR SI SOBRA AQUI Y QUITARLA allcurso = []
-    	for i in self.consulta('cursos',''):    		 
-    		allcurso = []  	   		
-    		allcurso.append(self.consulta('alumnocurso',i))    		
-    		for j in allcurso[0][0]: #LDAP empieza con un usuario vacio, no lo procesamos   			
-    			if j != '' and j == nif:
-					self.resultado.SetLabel('Curso: '+i)
-					#encontrado = True
-					return j
-					break						
-    
-    def buscaAula(self, event):
-    	self.resultado.SetLabel('Buscando')
-    	ahora = time.localtime()    
-    	dia = self.diaSemana(ahora[6])    	
-    	minutos = int(ahora[3]*60+ahora[4])    	    	
-        self.elCurso(minutos,dia)           	
-        event.Skip() 
-
-#Rellenar lista profesores en aula  
-    def profAula(self, event):
-      #self.rellenaProf()
-      print 'entra'
-      ahora = time.localtime()    
-      dia = self.diaSemana(ahora[6])    	
-      minutos = int(ahora[3]*60+ahora[4])
-      self.profesores.Clear()
-      nombres1 = []
-      dia = raiz.find(dia+'.txt')      
-      for i in dia:
-          profesor = i.getchildren()
-              #buscar la hora
-          for j in profesor:
-              inicio = j.get('inicio')
-              fin = j.get('fin')
-              if int(inicio) <= minutos <= int(fin):
-                for h in uidNombre:
-                  if uidNombre[h] == i.attrib['nif']:
-                    nombres1.append(h)
-      self.profesores.InsertItems(nombres1,0)
-
-										   
-    def rellenaProf(self):  
-		allTeacher = []        
-		curso = []
-		nombres = []      	  	
-		allTeacher.append(self.consulta('profesores',''))       	   	 	
-		for i in allTeacher[0][0]:
-			if i != '':
-				nombre = self.consulta('nombre',i)[0]    		
-				nombres.append(nombre)    		
-				dni =   self.consulta('nif',i)    		
-				if dni != []:    			
-					if len(dni[0]) == 9:
-						uidNombre[nombre] = dni[0]#self.consulta('nif',i)[0] 
-					else:
-						aux=dni[0]
-						for i in range(9-len(dni[0])):
-							aux= '0' + aux
-						uidNombre[nombre] = aux
-    					
-    			
-        #self.profesores.InsertItems(nombres,0)  
-		self.listProfesores = nombres
-        #print self.listProfesores
-     	
-    #Consultas a ldap
-    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
-		
-    def diaSemana(self,dia):
-      dias = ['Lunes','Martes','Miercoles','Jueves','Viernes']
-      return dias[dia]		
-
-if __name__ == "__main__":
-	rDir = os.path.split(sys.argv[0])[0]
-	print rDir
-	if rDir:
-		arbolxml = ElementTree.parse(rDir+'/horarios.xml')
-	else :
-		arbolxml = ElementTree.parse('horarios.xml')		
-	raiz = arbolxml.getroot()
-	app = wx.PySimpleApp(0)
-	wx.InitAllImageHandlers()
-	frame_1 = buscaProf(None, -1, "")
-	app.SetTopWindow(frame_1)
-	frame_1.Show()
-	app.MainLoop()

Property changes on: profEnAula/profEnAula.py
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: profEnAula/Leeme
===================================================================
--- profEnAula/Leeme	(revision 529)
+++ profEnAula/Leeme	(nonexistent)
@@ -1,24 +0,0 @@
-Programas necesarios:
-python-ldap
-python-reportlab
-python-wxgtk2.8
-
-Descripción
-profEnAula
-Muestra una lista con los profesores que están actualmente en clase, 
-al seleccionar cualquiera de ellos nos dice en que aula está. Requiere
-fichero horarios.xml generado por importHorarios.
-Necesario modificar en el fichero la variable passwd XXXXXX para que 
-tenga la contraseña de root de ldap.
-
-importHorarios
-Extrae los horarios desde los ficheros de horarios importados desde rayuela
-y los convierte en un xml. Es necesario ejecutarlo cada vez que 
-cambien los horarios. Para su funcionamiento requiere una carpeta 
-llamada datos colocada donde se ejecute el importHorarios, dentro 
-estarán los ficheros importados desde rayuela con nombres en minusculas
-excepto la 1ª letra en Mayusculas, deben borrarse las cabeceras de los
-ficheros dejando solo las lineas con datos.
-
-NOTA: cuando se dan de baja profesores hay que comprobar que no quedan en 
-el grupo teacher de ldap.
Index: profEnAula/importHorarios.py
===================================================================
--- profEnAula/importHorarios.py	(revision 529)
+++ profEnAula/importHorarios.py	(nonexistent)
@@ -1,112 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#       horarioXml.py
-#       
-#       Copyright 2011 Juan Antonio  Cristín<programador@informatico>
-#       
-#       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.
-
-from xml.etree import ElementTree
-from xml.dom.minidom import parse
-import sys,os,time,errno,re
-
-#De linea rayuela crea diccionario
-def extraeDatosLineaRayuela(linea,dia):	
-	datos = linea.split("|")	
-	return { "dni_profesor" : datos[0], "nie_alumno" : datos[1], "inicio" : int(datos[2]), "final" : int(datos[3]), "dia": dia}	
-
-def transformaArchivos(datosrayuela):
-	#comprobar que existe dir y q contiene los ficheros y limpiar linea de los for	
-	if os.path.isdir(datosrayuela):
-		try:
-			archivosRayuela = os.listdir(datosrayuela)
-		except:			
-			return 3
-	print datosrayuela	
-	#Limpiemos las listas de archivos 
-	archivosRayuela = [ archivo for archivo in archivosRayuela if archivo in ["Lunes.txt","Martes.txt","Miercoles.txt","Jueves.txt","Viernes.txt"]]			
-	listaLineas = []	
-	#Procesemos cada archivo de Rayuela
-	for archivoRayuela in archivosRayuela:		
-		filearchivoRayuela = open(os.path.join(datosrayuela,archivoRayuela), 'r')		
-		while True:
-			linea = filearchivoRayuela.readline()							
-			if not linea:
-				break
-			if linea[:6] == "D.N.I.":				
-				continue			
-			datosLineaRayuela = extraeDatosLineaRayuela(linea,archivoRayuela)
-			listaLineas.append(datosLineaRayuela)								
-		filearchivoRayuela.close()
-	return listaLineas
-
-
-#Parametro indice 6 de tupla resultado de: time.localtime()
-def diaSemana(dia):
-	dias = ['Lunes','Martes','Miercoles','Jueves','Viernes']
-	return dias[dia]	
-
-def main():	
-	dias = []
-	ahora = time.localtime()
-	minutoActual = int(ahora[3]*60+ahora[4])
-	diadeSemana = diaSemana(ahora[6])
-	filexml = open('horarios.xml','w')
-	filexml.write("""<?xml version='1.0' encoding='UTF-8'?>
-				   <horarios></horarios>""")
-	filexml.close()	
-	arbolxml = ElementTree.parse('horarios.xml')	
-	raiz = arbolxml.getroot()
-	rDir = os.path.split(sys.argv[0])[0]
-	print rDir
-	if rDir:
-		lineas = transformaArchivos(rDir + "/datos")		
-	else :
-		lineas = transformaArchivos("datos")		
-	for i in lineas:
-		#cada dia un fichero
-		diaProcesado = i['dia']			
-		# = i['dni_profesor']
-		nif = i['dni_profesor'][0:9]
-		inicio = i['inicio']
-		final = i['final']
-		niealumno = i['nie_alumno']
-		inicioFinal = [str(inicio),str(final)]
-		#nuevo (nodo) fichero de dia
-		if not diaProcesado in dias:
-				dia = ElementTree.SubElement(raiz,diaProcesado)
-				dias.append(diaProcesado)
-				profesores = []
-		#nuevo nodo profesor para un dia			
-		if not nif in profesores:
-			profesores.append(nif)			
-			profesor = ElementTree.SubElement(dia,'profesor',{'nif':nif})									
-			horas = []											
-		#nuevo nodo hora
-		if not inicioFinal in horas:
-			alumnos = []								
-			horas.append(inicioFinal)				
-			#comprobar en el nodo si es el 1º hijo
-			hora = ElementTree.SubElement(profesor,'hora',{'inicio':str(inicio),'fin':str(final)})	
-		#nuevo nodo alumno		
-		if not niealumno in alumnos:
-			addAlum = ElementTree.SubElement(hora,'alumno')	
-			addAlum.set('nie',niealumno[0:7])
-		alumnos.append(niealumno)
-	arbolxml.write('horarios.xml', encoding='UTF-8')		
-	return 0
-
-if __name__ == '__main__': main()

Property changes on: profEnAula/importHorarios.py
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: abiesweb/mdb2mysql
===================================================================
--- abiesweb/mdb2mysql	(revision 529)
+++ abiesweb/mdb2mysql	(nonexistent)
@@ -1,464 +0,0 @@
-#!/usr/bin/perl
-##########
-#
-#  File: mdb2mysql
-#
-#  Created By: Bill Lewis (bill@enobis.com)
-#  Created On: Aug 5, 2004
-#
-#  Description:  Perl script to convert MS Access (mdb) files to an import
-#                schema suitable for MySQL.
-#
-#  Requirements: Perl (obvioulsy)
-#                mdbtools (mdbtools.sourceforge.net)
-#
-#  This 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.  You should have received a copy of the GNU
-#  General Public License along with this software; if not, visit:
-#            http://www.gnu.org/copyleft/gpl.html
-#
-#  Revision History:
-#
-#    v1.0 - First version released for use on Oct 14, 2004
-#
-#############################################################################
-use strict;
-use Getopt::Std;
-
-my $VERSION = "MDB2MySQL v1.0";
-my $BASEDATOS = "USE abies;";
-
-##########
-#
-#  Initialize Execution Environment
-#
-#############################################################################
-our %opts;
-
-# Set defaults...
-$opts{"r"} = "_";
-$opts{"U"} = "blob";
-$Getopt::Std::STANDARD_HELP_VERSION=1;
-
-getopts('cdeilhsuxMVo:r:t:U:',\%opts);
-
-if($opts{"h"}) { &VERSION_MESSAGE; &HELP_MESSAGE; exit; }
-if($opts{"V"}) { &VERSION_MESSAGE; exit; }
-
-if(@ARGV < 1) { &VERSION_MESSAGE; &HELP_MESSAGE; exit; }
-my $dataFile = $ARGV[$#ARGV];
-
-if($opts{"x"})
-{
-  $opts{"d"} = 1;
-  $opts{"e"} = 1;
-  $opts{"l"} = 1;
-}
-
-my $delim = "__zz__";
-
-my %mdbversions = ( "JET3" => "Access 97", "JET4" => "Access 2000/XP" );
-
-##########
-#
-#  MDB2MySQL Header Information
-#
-#############################################################################
-
-# Get MDB File Version
-open(VER,"mdb-ver $dataFile|") || die "Error Reading MDB File: $!\n";
-my $dataFileVersion = <VER>;
-close(VER);
-chop $dataFileVersion;
-$dataFileVersion .= " (".$mdbversions{$dataFileVersion}.")";
-
-# Print Header Information
-
-print $BASEDATOS;
-print "\n\n";
-
-##########
-#
-#  Script body
-#
-#############################################################################
-
-# Get List of Tables
-my @tables;
-my $mdbtables = "mdb-tables -d".$delim;
-if($opts{"M"}) { $mdbtables .= " -S"; }
-
-if($opts{"t"})
-{
-  @tables = split(/,/,$opts{"t"});
-}
-else
-{
-  open(TABLES,"$mdbtables $dataFile|") || die "Error Reading Tables: $!\n";
-  if(!$opts{"M"})
-  {
-    $_ = <TABLES>;
-    chop;
-    @tables = split(/$delim/);
-  }
-  else
-  {
-    while(<TABLES>)
-    {
-      chop;
-      push(@tables,$_);
-    }
-  }
-  close(TABLES);
-  if($opts{"o"})
-  {
-    my %hash = ();
-    foreach (@tables,split(/,/,$opts{"o"})) { $hash{$_}++; }
-    @tables = ();
-    foreach (keys %hash) { if($hash{$_} == 1) { push(@tables,$_); } }
-  }
-}
-
-# Loop through the tables to build the MySQL import/SQL format
-my @headers;
-my ($tbl,$record,$firstrecord,$first,$multirow,$startmulti,$endmulti,$values);
-my $mdbexport = "mdb-export -d".$delim." %s %s|";
-foreach $tbl (@tables)
-{
-  if(!$opts{"i"}) { &createTableSchema($dataFile,$tbl); }
-
-  if($opts{"c"}) { next; }
-
-  next if ($tbl eq 'Politica');
-
-  print "--\n--  Dumping data for table \'$tbl\'\n--\n\n";
-
-  # Get Table Data Records
-  open(RECORDS,sprintf($mdbexport,$dataFile,$tbl)) ||
-       die "Error Exporting Record Data: $!\n";
-
-  # Get Headers in case of future development/features...
-  foreach (split(/$delim/,<RECORDS>))
-  {
-    s/[^a-zA-Z0-9_\$]/$opts{"r"}/g;
-    push(@headers,$_);
-  }
-
-  $firstrecord = 1;
-  $multirow = $startmulti = $endmulti = 0;
-  if($opts{"l"}) { print "LOCK TABLES $tbl WRITE;\n"; }
-  if($opts{"e"}) { print "INSERT INTO $tbl VALUES "; }
-  while(<RECORDS>)
-  {
-    if(!$multirow)
-    {
-      chop;
-      $first = 1;
-      $values = "";
-    }
-    foreach (split(/$delim/))
-    {
-      if(!$multirow)
-      {
-        # Strip Quotes from both sides of data value
-        if(substr($_,0,1) eq '"' && substr($_,-1,1) eq '"')
-        {
-          $_ = substr($_,1,$#_);
-        }
-        # Strip out quotes from both sides on an unchoped row resulting
-        # from a multirow data record.
-        elsif(substr($_,0,1) eq '"' && substr($_,-2,1) eq '"')
-        {
-          $_ = substr($_,1,$#_-1);
-        }
-        # Check to see if this data value is the start of a multirow
-        elsif(substr($_,0,1) eq '"')
-        {
-          $_ = substr($_,1);
-          $multirow = 1;
-          $startmulti = 1;
-        }
-      }
-      else
-      {
-        # Check to see if this data is the end of a multirow
-        # Start by verifying that a quotation mark at the end of the
-        # line is not part of the data...
-        if(substr($_,-2) ne '""' || substr($_,-3,2) ne '""')
-        {
-          if(substr($_,-1,1) eq '"')
-          {
-            $_ = substr($_,0,$#_);
-            $multirow = 0;
-            $endmulti = 1;
-          }
-          elsif(substr($_,-2,1) eq '"')
-          {
-            $_ = substr($_,0,$#_-1);
-            $multirow = 0;
-            $endmulti = 1;
-          }
-        }
-      }
-
-      # Need to check if the field is a date type
-      # and convert to acceptable MySQL format if so...
-      if(!$multirow && !$endmulti)
-      {
-        if(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})/ ||
-          /^(\d{1,2})\/(\d{1,2})\/(\d{2,4})/)
-        {
-          $_ = sprintf("%s%02s%02s%02s%02s%02s",$3,$1,$2,$4,$5,$6);
-        }
-      }
-
-      # Escape and convert certain characters for MySQL format
-      s/\\/\\\\/g;
-      s/'/\\'/g;
-      s/""/"/g;
-      s/"/\\"/g;
-
-      # Create MySQL format for dump values
-      if(!$multirow)
-      {
-        if(!$first && !$endmulti) { $values .= ","; }
-
-        if(!$endmulti) { $values .= "'".$_."'"; }
-        else { $values .= $_."'"; $endmulti = 0; }
-      }
-      else
-      {
-        if($startmulti)
-        {
-          if(!$first) { $values .= ","; }
-          $values .= "'".$_;
-          $startmulti = 0;
-        }
-        else
-        {
-          $values .= $_;
-        }
-      }
-
-      $first = 0;
-    }
-    if(!$multirow)
-    {
-      if($opts{"e"})
-      {
-        if(!$firstrecord) { print ","; }
-        print "($values)";
-        $firstrecord = 0;
-      }
-      else
-      {
-        printf("INSERT INTO %s VALUES (%s);\n",$tbl,$values);
-      }
-    }
-  }
-  if($opts{"e"}) { print ";\n"; }
-  if($opts{"l"}) { print "UNLOCK TABLES;\n\n"; }
-
-  close(RECORDS);
-}
-
-exit;
-
-##########
-#
-#  Subroutine: createTableSchema
-#
-#  Description: Creates the table structure in MySQL format.
-#
-#  Arguments: $mdbFile - MDB Database file containing table
-#             $table   - the MDB Database table
-#
-#  Return:  void
-#
-#############################################################################
-
-sub createTableSchema
-{
-  my ($colsDefinition);
-  my ($mdbFile,$table) = @_;
-  my $mdbschema = "echo \"DESCRIBE TABLE \"".$table." | mdb-sql ".$mdbFile;
-
-  # Get Table Schema for the given table
-  open(SCHEMA,"$mdbschema|") || die "Error Reading Table Schema: $!\n";
-  while(<SCHEMA>)
-  {
-    chop;
-    s/\s+//g;
-    if(/^\|(\S+)\|(\S+)\|(\d+)\|/)
-    {
-      $colsDefinition .= &convertColumnType($1,$2,$3);
-    }
-  }
-  close(SCHEMA);
-  chop $colsDefinition;
-  chop $colsDefinition;
-
-  print "--\n--  Table structure for table \'$table\'\n--\n\n";
-  if($opts{"d"}) { print "DROP TABLE IF EXISTS $table;\n"; }
-  print "CREATE TABLE $table (\n";
-  print $colsDefinition, "\n";
-  print ");\n\n";
-}
-
-##########
-#
-#  Subroutine: convertColumnType
-#
-#  Description: Converts the MDB (MS Access) column data type to the
-#               corresponding MySQL data type and creates the column
-#               structure.
-#
-#  Arguments: $field - MDB Database column/field name
-#             $type  - MDB Database data type
-#             $size  - MDB data type size
-#
-#  Return:  The schema for the converted column data type.
-#
-#############################################################################
-
-sub convertColumnType
-{
-  my $def;
-  my ($field,$type,$size) = @_;
-
-  $field =~ s/[^a-zA-Z0-9_\$]/$opts{"r"}/g;
-
-  $def = "  ";
-  if($type eq "Text")
-  {
-    if($size > 2)
-    {
-      $def .= sprintf("%s varchar(%d) NOT NULL default '',\n",$field,$size);
-    }
-    else
-    {
-      $def .= sprintf("%s char(%d) NOT NULL default '',\n",$field,$size);
-    }
-  }
-  elsif($type eq "Memo/Hyperlink")
-  {
-    $def .= sprintf("%s text NOT NULL default '',\n",$field);
-  }
-  elsif($type eq "Byte")
-  {
-    $def .= sprintf("%s tinyint NOT NULL default 0,\n",$field);
-  }
-  elsif($type eq "Integer")
-  {
-    $def .= sprintf("%s smallint NOT NULL default 0,\n",$field);
-  }
-  elsif($type eq "LongInteger")
-  {
-    $def .= sprintf("%s int NOT NULL default 0,\n",$field);
-  }
-  elsif($type eq "Single" || $type eq "Double")
-  {
-    $def .= sprintf("%s double NOT NULL default 0,\n",$field);
-  }
-  elsif($type eq "Numeric")
-  {
-    $def .= sprintf("%s float NOT NULL default 0,\n",$field);
-  }
-  elsif($type eq "Currency")
-  {
-    $def .= sprintf("%s decimal(10,2) NOT NULL default '0.00',\n",$field);
-  }
-  elsif($type eq "DateTime" || $type eq "DateTime(Short)")
-  {
-    $def .= sprintf("%s datetime NOT NULL default '0000-00-00 00:00:00',\n",
-                    $field);
-  }
-  elsif($type eq "Boolean" || $type eq "Bit")
-  {
-    $def .= sprintf("%s enum('1','0') NOT NULL default '1',\n",$field);
-  }
-  elsif($type eq "ReplicationID")
-  {
-    $def .= sprintf("%s tinyblob NOT NULL default '',\n",$field);
-  }
-  elsif($type eq "OLE")
-  {
-    $def .= sprintf("%s longblob NOT NULL default '',\n",$field);
-  }
-  else
-  {
-    if($opts{"u"})
-    {
-      print "??? Unknown Access/MDB Field Data Type!\n";
-      print "??? Field: $field\n";
-      print "??? Data Type: $type($size)\n";
-      print "??? Resolution Options:\n";
-      print "???   1. Change the field to a known data type within Access\n";
-      print "???   2. Let MDB2MySQL use a known MySQL data type instead.\n";
-      print "???      The default replacement is a 'blob' but can be\n";
-      print "???      changed using the -U flag.\n";
-      exit;
-    }
-    else
-    {
-      $def .= sprintf("%s %s NOT NULL default '',\n",$field,$opts{"U"});
-    }
-  }
-
-  return $def;
-}
-
-##########
-#
-#  Subroutine: VERSION_MESSAGE
-#
-#  Description: Displays the version message.  Complies to the Getopts
-#               perl module.
-#
-#  Arguments: none
-#
-#  Return:  void
-#
-#############################################################################
-
-sub VERSION_MESSAGE()
-{
-  print $VERSION, "\n";
-  print "Created By: Bill Lewis (bill\@enobis.com)\n";
-  print "GNU General Public License (http://www.gnu.org/copyleft/gpl.html)\n";
-}
-
-##########
-#
-#  Subroutine: HELP_MESSAGE
-#
-#  Description: Displays the help message.  Complies to the Getopts
-#               perl module.
-#
-#  Arguments: none
-#
-#  Return:  void
-#
-#############################################################################
-
-sub HELP_MESSAGE()
-{
-  print "\nUsage: mdb2mysql [options] <mdb file>\n";
-  print "  -c             Create table structure only, no data.\n";
-  print "  -d             Add a 'drop table' before each create.\n";
-  print "  -e             Use the much faster, extended INSERT syntax.\n";
-  print "  -i             Export data inserts only.\n";
-  print "  -l             Add locks around insert statements.\n";
-  print "  -o <tables>    Omit tables in this comma seperated list.\n";
-  print "  -r <character> Replace illegal characters with given character.\n";
-  print "                 The default character is an underscore.\n";
-  print "  -t <tables>    Export only this list of comma seperated tables.\n";
-  print "  -u             Report unknown Access data type and exit.\n";
-  print "  -x             Same as using -d -e -l combined options.\n";
-  #print "  -M             Convert Access System tables ('MSys') as well.\n";
-  print "  -U <type>      Use the MySQL data type for unknown Access types.\n";
-  print "                 Unless given, 'blob' will be used by default.\n";
-  print "  -h, --help     This message and exit.\n";
-  print "  -V, --version  Output version information and exit.\n";
-}

Property changes on: abiesweb/mdb2mysql
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: abiesweb/web2pyapache
===================================================================
--- abiesweb/web2pyapache	(revision 529)
+++ abiesweb/web2pyapache	(nonexistent)
@@ -1,49 +0,0 @@
-NameVirtualHost *:8000
-
-WSGIRestrictStdout Off
-
-<VirtualHost *:8000>
-  WSGIDaemonProcess web2py user=www-data group=www-data 
-  WSGIProcessGroup web2py
-  WSGIScriptAlias / /var/www/web2py/wsgihandler.py
-
-  <Directory /var/www/web2py>
-    AllowOverride None
-    Order Allow,Deny
-    Deny from all
-    <Files wsgihandler.py>
-      Allow from all
-    </Files>
-  </Directory>
-
-  AliasMatch ^/abiesweb/([^/]+)/static/(.*) \
-           /var/www/web2py/applications/$1/static/$2
-  <Directory /var/www/web2py/applications/*/static/>
-    Order Allow,Deny
-    Allow from all
-  </Directory>
-
-  AliasMatch ^/gesiesweb/([^/]+)/static/(.*) \
-           /var/www/web2py/applications/$1/static/$2
-  <Directory /var/www/web2py/applications/*/static/>
-    Order Allow,Deny
-    Allow from all
-  </Directory>
-
-  AliasMatch ^/([^/]+)/static/(.*) \
-           /var/www/web2py/applications/$1/static/$2
-  <Directory /var/www/web2py/applications/*/static/>
-    Order Allow,Deny
-    Allow from all
-  </Directory>
-
-  <Location /admin>
-  Deny from all
-  </Location>
-
-  <LocationMatch ^/([^/]+)/appadmin>
-  Deny from all
-  </LocationMatch>
-
-</VirtualHost>
-
Index: abiesweb/abies.sh
===================================================================
--- abiesweb/abies.sh	(revision 529)
+++ abiesweb/abies.sh	(nonexistent)
@@ -1,5 +0,0 @@
-#!/bin/sh
-#exportamos a sql de mysql
-./mdb2mysql -d abies.mdb > abies.sql
-#importamos a mysql
-mysql -h mysql --default_character_set utf8 -u abies --password=abies < abies.sql

Property changes on: abiesweb/abies.sh
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: abiesweb/LEEME.txt
===================================================================
--- abiesweb/LEEME.txt	(revision 529)
+++ abiesweb/LEEME.txt	(nonexistent)
@@ -1,112 +0,0 @@
-"""
-Abiesweb - Consultas simples catálogo de abies
-Copyright (C) 2012  Francisco Mora <francisco.mora.sanchez@gmail.com>
-
-License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
-
-"""
-
-Esto es una pequeña utilidad que hice hace tiempo para poder consultar a través de una aplicación web desarrollada con web2py, el catálogo de
-nuestra biblioteca abies. Es muy primitiva, ya que fue cuando comencé con web2py, pero creo que útil quizá para algunos. Los pasos para 
-instalarla son los que describo a continuación. Debemos tener los siguientes archivos, es importante que los scripts mdb2tool y
-abies.sh tengan permisos de ejecución:
-	
-	. abies.mdb -> evidentemente los datos del programa abies
-	. abies.sh -> script que procesa el mdb e incorpora los datos en mysql
-	. mdb2mysql -> script perl que genera el SQL desde el MDB
-	. abiesweb.tar.gz -> aplicación web2py abiesweb
-	. web2pyapache -> configuración apache web2py
-
-PASOS:
-
-1. Debemos crear en nuestro servidor mysql, bien desde la consola mysql o bien desde phpmyadmin,
-una base de datos con las siguientes características:
-
-	nombre: abies
-	codificación: UTF-8 España
-
-
-2. Creación de un usuario con nombre "abies", sin contraseña y permiso de lectura/escritura en esta base de datos.
-
-3. Cada cierto periodo de tiempo procederemos a importar los datos a esta base de datos desde el fichero "abies.mdb"
-de la aplicación abies. Así tendremos actualizada la base de datos hasta el momento en que lo realizamos. Este proceso es el que
-hay que realizar de forma periódica. Es necesario que donde ejecutemos el script tengamos instalado los paquetes debian
-"mdbtools" y "mysql-client", además de y en la misma carpeta esté el archivo abies.mdb. Este script exporta la base de datos de access de abies a un
-formato SQL que entiende mysql e importa a mysql esos datos. Ejecutaremos la orden:
-
-	./abies.sh 
-
-	Podemos ver la base de datos con phpmyadmin.
-
-	Hemos de tener en cuenta que si el proceso lo realizamos en una máquina que no es la que tiene el servidor mysql, hemos de
-configurar el servidor mysql para que acepte peticiones que provengan de máquinas que no sean ella misma, esto se hace editando
-el fichero "/etc/mysql/my.cnf", del ordenador con el servidor mysql, comentando la línea:
-
-	#bind-address           = 127.0.0.1
-
-	Para permitir conexiones de otras máquinas clientes. Una vez hecho esto reiniciamos el servicio mysql para que tome la nueva
-configuración.
-
-4. Lo siguiente consiste en descargar el web2py de la página del proyecto: "http://www.web2py.com/examples/static/web2py_src.zip".
-Descomprimimos este archivo en una carpeta del servidor mysql, por ejemplo "/var/www/web2py". Para arrancar el framework:
-
-	unzip web2py_src.zip
-	chown -R www-data:www-data web2py
-	cd /var/www/web2py
-
-5. Ahora debemos instalar la aplicación abiesweb. Tambien configuraremos la ruta de acceso a la base de datos.
-	Para ello, y siguiendo con la secuencia anterior:
-
-	cd /var/www/web2py/applications	
-	tar xvzf dondetenemosabiesweb.tar.gz .
-
-	Descomprimimos el archivo abiesweb.tar.gz en esa ruta y se habrá creado la carpeta abiesweb.
-	Ahora editaremos el siguiente archivo:
-	
-	/var/www/web2py/applications/abiesweb/models/db.py
-	
-	Buscaremos la línea:
-	
-	    db = DAL('mysql://abies:abies@web/abies',pool_size=10)       # if not, use SQLite or other DB
-	    
-	Reemplazaremos web por el nombre del servidor de la base de datos, o por localhost si está en la misma
-	máquina. Guardaremos el cambio.
-	
-
-6. Para arrancar web2py, con el servidor web que lleva integrado (modo "lento"), lento si el número de peticiones es elevado,
-realizaremos lo siguiente:
-
-	cd /var/www/web2py
-	python web2py.py -a "passwordquequeramosparaadministracion" &
-
-Este comando arrancará un proceso web en el puerto 8000.
-
-7. Ya podremos probar si todo ha ido bien. Para ello abriremos un navegador web e iremos a la siguiente página:
-
-	http://nombremaquina:8000/abiesweb
-
-	Donde nombremaquina tiene que ser sustituido por el nombre de la máquina en que hemos descargado web2py. Una vez aquí podremos buscar
-por título, autor/a, editorial. La caja de texto espera a teclear al menos 4 caracteres y una vez tecleados realiza búsquedas a la base
-de datos apareciendo debajo de la caja de texto el resultado. Cuando pinchamos en un libro nos aparece una pequeña ficha de información,
-que incluye los ejemplares existentes, localización, etc. Además podremos acceder desde aquí a los títulos de la editorial o bien a las
-obras de algún autor/a.
-
-	El proceso web2py se ha quedado funcionando en segundo plano. Si reiniciamos la máquina tendremos que volver a iniciarlo manualmente.
-
-8. (Recomendado) Si queremos mayor velocidad de proceso, la forma que voy a describir hace que sea apache quien sirve la aplicación o aplicaciones que estén metidas
-en web2py. Tendremos que utilizar la extensión WSGI de apache, para que éste procese las peticiones y no el servidor web integrado de web2py, para ello hay que
-hacer varias modificaciones, evidentemente hay que tener instalado apache2 y libapache2-mod-wsgi.
-
-	Ya no es necesario arrancar el proceso web2py (punto 6), si lo está deberemos hacer un kill al proceso para eliminarlo, ya que sino apache se 
-quejará de que hay otro proceso sirviendo en el puerto 8000. Este puerto puede cambiarse sin problema.
-	
-	Copiaremos en /etc/apache2/sites-available el fichero "web2pyapache" y activaremos el sitio:
-	
-	cp dondetenemosweb2pyapache /etc/apache2/sites-available
-	a2ensite web2pyapache
-	service apache2 restart
-
-Si todo ha ido bien visitando el enlace del punto 7, podremos acceder a la misma aplicación pero siendo apache quien la sirve.
-
-
-
Index: abiesweb/abiesweb.tar.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: abiesweb/abiesweb.tar.gz
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: autoclone/trunk/Client/avahiClient.py
===================================================================
--- autoclone/trunk/Client/avahiClient.py	(revision 529)
+++ autoclone/trunk/Client/avahiClient.py	(nonexistent)
@@ -1,63 +0,0 @@
-import dbus, gobject, avahi
-from dbus import DBusException
-from dbus.mainloop.glib import DBusGMainLoop
-from string import split
-import logging
-import os, time
-from urlgrabber.grabber import URLGrabber
-
-LOG_FILENAME = '/var/log/autoclone.log'
-TYPE = "_autoclone_noclassroomname._tcp"
-files = {}
-logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
-
-
-def downloadFile(fileToDownload, source, port):
-	if not os.path.exists(fileToDownload):
-		g = URLGrabber()
-	else:
-		g = URLGrabber(reget="simple")
-
-	url = "http://"+source+":"+port+"/"+fileToDownload
-
-	try:
-		local_filename = g.urlgrab(url)
-	except:
-		logging.debug("No se puede realizar la descarga de "+fileToDownload+" desde "+source+":"+port)
-		time.sleep(600) 
-
-
-def service_resolved(*args):
-	val = str(args[2]).split("@")
-	files[val[1]] = {'address' : str(args[7]), 'port': str(val[0])}
-
-	if len(files)>0:
-		for i in files:
-			downloadFile(i, files[i]['address'], files[i]['port'])
-
-
-def print_error(*args):
-    print 'error_handler'
-    print args[0]
-
-def myhandler(interface, protocol, name, stype, domain, flags):
-    #print "Found service '%s' type '%s' domain '%s' " % (name, stype, domain)
-
-    if flags & avahi.LOOKUP_RESULT_LOCAL:
-            # local service, skip
-            pass
-
-    server.ResolveService(interface, protocol, name, stype, domain, avahi.PROTO_UNSPEC, dbus.UInt32(0), reply_handler=service_resolved, error_handler=print_error)
-
-
-if __name__ == '__main__':
-
-	loop = DBusGMainLoop()
-	bus = dbus.SystemBus(mainloop=loop)
-
-	server = dbus.Interface(bus.get_object(avahi.DBUS_NAME, '/'), 'org.freedesktop.Avahi.Server')
-
-	sbrowser = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, TYPE, 'local', dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_BROWSER)
-	sbrowser.connect_to_signal("ItemNew", myhandler)
-
-	gobject.MainLoop().run()
Index: autoclone/trunk/Server/WebServer.py
===================================================================
--- autoclone/trunk/Server/WebServer.py	(revision 529)
+++ autoclone/trunk/Server/WebServer.py	(nonexistent)
@@ -1,25 +0,0 @@
-from BaseHTTPServer import BaseHTTPRequestHandler
-import os
-import shutil
-import MyUtils
-
-class MyHandler(BaseHTTPRequestHandler):
-
-	def do_GET(self):
-		try:
-			if self.path.endswith(".iso") or self.path.endswith(".md5"):
-				file = "/var/lib/autocloneserver/www/" + self.path
-				f = open(file)
-				s = os.path.getsize(file)
-
-				self.send_response(200)
-				self.send_header('Content-type', MyUtils.getMimeType(self.path))
-				self.send_header('Content-Length', s)
-				self.end_headers()
-
-				shutil.copyfileobj(f, self.wfile)
-				f.close()
-				return
-            
-		except IOError:
-			pass
Index: autoclone/trunk/Server/main.py
===================================================================
--- autoclone/trunk/Server/main.py	(revision 529)
+++ autoclone/trunk/Server/main.py	(nonexistent)
@@ -1,70 +0,0 @@
-import ZeroconfService
-from BaseHTTPServer import HTTPServer
-import logging
-import os
-import time
-import WebServer
-import MyUtils
-import threading
-
-LOG_FILENAME = "/var/log/autocloneserver.log"
-rootPath = "/var/lib/autocloneserver"
-downloadsPath = rootPath + "/www/"
-portWebServer = 8000
-classroomName = MyUtils.getClassroomName()
-
-logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
-
-def checkmd5File(pathFileName):
-	md5File = pathFileName+'.md5'
-	if not os.path.isfile(md5File):
-		md5Hash = MyUtils.getMD5Hash(pathFileName+'.iso')
-		f = open(md5File, 'wt')
-		f.write(md5Hash)
-		f.close()
-
-# publish files (Avahi)
-def publishFiles():
-	published = []
-
-	while True:
-		listFiles = os.listdir(downloadsPath)
-		for i in listFiles:
-			if os.path.isfile(downloadsPath + i) and i.endswith('.iso'):
-				fileName = MyUtils.getFileName(os.path.basename(i))
-				pathFileName = downloadsPath + fileName
-
-				checkmd5File(pathFileName)
-
-				service = ZeroconfService.ZeroconfService(name = str(portWebServer)+"@"+i, port=3000, stype = "_autoclone_"+classroomName+"._tcp") #, domain="replicant", host="localhost", text="Esto es una prueba")
-				service.publish()
-
-				published.append(service)
-
-		time.sleep(300) #refresh in seconds
-		for i in published:
-			i.unpublish()
-
-# Start web server
-def startWebServer():
-	server = HTTPServer(('', portWebServer), WebServer.MyHandler)
-	server.serve_forever()
-
-
-if __name__ == '__main__':
-
-	if not os.path.exists(rootPath):
-		os.mkdir(rootPath)
-
-	if not os.path.exists(downloadsPath):
-		os.mkdir(downloadsPath)
-
-	t = threading.Thread(target=publishFiles)  
-	t.start()  
-
-	t2 = threading.Thread(target=startWebServer)  
-	t2.start()  
-
-	
-#server.socket.close()
-#service.unpublish()
Index: autoclone/trunk/Server/MyUtils.py
===================================================================
--- autoclone/trunk/Server/MyUtils.py	(revision 529)
+++ autoclone/trunk/Server/MyUtils.py	(nonexistent)
@@ -1,39 +0,0 @@
-import hashlib
-import os
-import socket
-
-def getMD5Hash(file, block_size=2**20):
-	f = open(file)
-	md5 = hashlib.md5()
-	while True:
-		data = f.read(block_size)
-		if not data:
-				break
-		md5.update(data)
-	md5Hash = md5.hexdigest()
-	return md5Hash
-
-
-def getFileName(file):
-	basename = os.path.basename(file) 
-	filename = os.path.splitext(basename) 
-	return filename[0]
-
-
-def getMimeType(path):
-	if path.endswith(".iso"):
-		return "application/x-iso9660-image"
-	elif path.endswith(".md5"):
-		return "text/plain"
-
-def getClassroomName():
-	name = socket.gethostname()
-	classname="noclassroomname" 
-	hostname=name.strip().split('.')[0].replace('_','-')
-	items=hostname.split('-')
-
-	if len(items)==2:
-		if len(items[1])==3 and (items[1].upper()=='PRO' or items[1][:1].upper()=='O'):
-			classname= items[0]
-
-	return classname
Index: autoclone/trunk/Server/ZeroconfService.py
===================================================================
--- autoclone/trunk/Server/ZeroconfService.py	(revision 529)
+++ autoclone/trunk/Server/ZeroconfService.py	(nonexistent)
@@ -1,27 +0,0 @@
-import avahi
-import dbus
-
-__all__ = ["ZeroconfService"]
-
-class ZeroconfService:
-
-    def __init__(self, name, port, stype="_http._tcp", domain="", host="", text=""):
-        self.name = name
-        self.stype = stype
-        self.domain = domain
-        self.host = host
-        self.port = port
-        self.text = text
-    
-    def publish(self):
-        bus = dbus.SystemBus()
-        server = dbus.Interface(bus.get_object(avahi.DBUS_NAME, avahi.DBUS_PATH_SERVER), avahi.DBUS_INTERFACE_SERVER)
-
-        g = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.EntryGroupNew()), avahi.DBUS_INTERFACE_ENTRY_GROUP)
-        g.AddService(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC,dbus.UInt32(0), self.name, self.stype, self.domain, self.host, dbus.UInt16(self.port), self.text)
-
-        g.Commit()
-        self.group = g
-    
-    def unpublish(self):
-        self.group.Reset()
Index: controlies/LEEME
===================================================================
--- controlies/LEEME	(revision 529)
+++ controlies/LEEME	(nonexistent)
@@ -1 +0,0 @@
-Proyecto movido a https://github.com/manumora/controlies
Index: scanies-ltsp/trunk/.gambas/SCANIESLTSP
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies-ltsp/trunk/.gambas/SCANIESLTSP
___________________________________________________________________
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies-ltsp/trunk/.icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: scanies-ltsp/trunk/.icon.png
___________________________________________________________________
Deleted: svn:executable
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: scanies-ltsp/trunk/scaniesltsp.class
===================================================================
--- scanies-ltsp/trunk/scaniesltsp.class	(revision 529)
+++ scanies-ltsp/trunk/scaniesltsp.class	(nonexistent)
@@ -1,188 +0,0 @@
-' 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               : scaniesltsp.class
-' # created in project      : scanies-ltsp
-' # created by              : Francisco Paniagua Sánchez
-' # mail                    : adminies.franciscodeorellana@edu.juntaextremadura.net
-' # created at              : 10/03/2009
-' # last test with          : gambas-2.7-1
-' ################################################
-
-STATIC clase AS scaniesltsp
-PRIVATE proceso AS Process
-
-
-STATIC PUBLIC SUB Main()
-  
-  clase = NEW scaniesltsp
-  
-END
-
-PUBLIC SUB _New()
-  
-  proceso = SHELL "avahi-browse _workstation._tcp -frpkl | grep \"eth0;IPv4\"" FOR INPUT 
-  
-END
-
-PRIVATE FUNCTION obtener_mac(cadena AS String[]) AS String
-  
- RETURN Right(cadena[2], 2) & ":" & Right(cadena[3], 2) & ":" & Right(cadena[4], 2) & ":" & Right(cadena[5], 2) & ":" & Right(cadena[6], 2) & ":" & Right(cadena[7], 2) 
-  
-END
-
-PRIVATE FUNCTION esportatil(servidor AS String, cliente AS String) AS String
-DIM aula AS String[]
-DIM caracteres AS Byte
-DIM resultado AS String
-
-  aula = Split(servidor, "-")
-  caracteres = Len(aula[0])
-  
-  IF (aula[0] = Left(cliente, caracteres)) THEN 
-   'es cliente ligero mantenemos nombre
-   resultado = cliente
-  ELSE 'es portatil anexamos nombre clase
-   resultado = servidor & "--" & cliente
-  ENDIF 
-  
-  RETURN resultado
-  
-END
-
-PRIVATE SUB publicar(aula AS String, nombre AS String, direccion AS String, mac AS String)
-DIM texto AS String
-DIM fichero AS String
-DIM dato AS String
-DIM ip AS String[]
-DIM dirip AS String
-DIM nombrefinal AS String
-
- fichero = "/tmp/temporalscan"
-
-'esto es porque a veces se meten direcciones ipv6  
-  IF (Left(direccion, 7) = "192.168") THEN 
-   texto = direccion & "#" & mac
-  ELSE 
-   'Hay que resolverlo a mano
-   SHELL "avahi-resolve-host-name -4 " & nombre & ".local > " & fichero WAIT
-
-   TRY dato = File.Load(fichero)
-      
-   'si el dato es vacio
-    IF (dato <> "") THEN 
-      ip = Split(dato, "\t")
-      dirip = Left(ip[1], Len(ip[1]) - 1)
-    ELSE 
-      dirip = "no-ip"
-    ENDIF 
-   
-   texto = dirip & "#" & mac
-  
-  ENDIF 
-   nombrefinal = esportatil(aula, nombre)
-   SHELL "avahi-publish-service -f " & nombrefinal & " _scanies._tcp 9013 " & texto & " 2>/dev/null &" WAIT 
-  
-END
-
-
-PUBLIC SUB borrar(nombre AS String)
-DIM fichero AS String
-DIM buscar AS String
-
-    fichero = "/tmp/buscar"
-    
-    buscar = nombre & " _scanies._tcp"
-   
-    'lo borro de la red
-    SHELL "ps aux | grep \"" & buscar & "\" | grep -v grep | awk '{print $2}' > " & fichero WAIT 
-    'TRY pid = File.Load(fichero)
-    SHELL "kill -9 `cat " & fichero & "` 2>/dev/null" WAIT 
-                  
-  
-END
-
-
-
-PUBLIC SUB process_read()
-DIM cadena AS String
-DIM campos AS String[]
-DIM mascampos AS String[]
-DIM nombre AS String
-DIM direccionip AS String
-DIM mac AS String
-DIM pid AS String
-DIM nombreservidor AS String
-DIM failedtemp AS String
-DIM failedhost AS String
-DIM aula AS String[]
-
-
-  nombreservidor = Trim(System.host)
-  aula = Split(nombreservidor, ".")
-  
-     
-  TRY LINE INPUT #LAST, cadena
-  
-  IF NOT (Left(cadena, 6) = "Failed") THEN 'si no hay fallo se analiza
-     
-       campos = Split(cadena, ";")
-   
-             IF (campos[0] = "=") THEN 'esta encendido
-   
-               direccionip = campos[7]
-               mascampos = Split(campos[3], "\\") 
-               mac = obtener_mac(mascampos)
-               
-               'publicar
-               publicar(aula[0], mascampos[0], direccionip, mac)           
-               
-   
-             ELSE IF (campos[0] = "-") THEN 'se apaga
-   
-               'fichero = "/tmp/buscar"
-               mascampos = Split(campos[3], "\\")
-               
-               'componer nombre
-               nombre = esportatil(aula[0], mascampos[0])
-               'borrar
-               borrar(nombre)
-                            
-             ELSE 'descartamos 
-              PRINT "Log1 (+): " & cadena 
-             ENDIF 
-  ELSE 
-   'formato es: Failed to resolve service 'nombre-equipo [00:30:05:42:26:35]' of type ... 
-   campos = Split(cadena, " ")
-   failedtemp = campos[4]
-   'obtener solo el nombre
-   mascampos = Split(failedtemp, " ")
-   failedhost = Right(mascampos[0], Len(mascampos[0]) - 1)
-   'y borrar de la lista 
-   nombre = esportatil(aula[0], failedhost)
-   borrar(nombre)
-   
-  ENDIF  
-   
-END
-
-
-PUBLIC SUB _free()
-  
-  proceso.Kill
-  
-END
Index: scanies-ltsp/trunk/.settings
===================================================================
--- scanies-ltsp/trunk/.settings	(revision 529)
+++ scanies-ltsp/trunk/.settings	(nonexistent)
@@ -1,21 +0,0 @@
-[Breakpoints]
-Count=0
-
-[DebugWindow]
-Count=0
-
-[FFind]
-SearchIn="Module"
-CaseSensitive=False
-SearchWord=False
-SearchComment=False
-SearchString=True
-
-[OpenFile]
-File[1]="scaniesltsp.class:150.15"
-Active=1
-Count=1
-
-[Watches]
-Count=0
-

Property changes on: scanies-ltsp/trunk/.settings
___________________________________________________________________
Deleted: svn:executable
Index: scanies-ltsp/trunk/.directory
===================================================================
--- scanies-ltsp/trunk/.directory	(revision 529)
+++ scanies-ltsp/trunk/.directory	(nonexistent)
@@ -1,2 +0,0 @@
-[Desktop Entry]
-Icon=./.icon.png

Property changes on: scanies-ltsp/trunk/.directory
___________________________________________________________________
Deleted: svn:executable
Index: scanies-ltsp/trunk/.project
===================================================================
--- scanies-ltsp/trunk/.project	(revision 529)
+++ scanies-ltsp/trunk/.project	(nonexistent)
@@ -1,5 +0,0 @@
-# Gambas Project File 2.0
-Title=scanies-ltsp
-Startup=scaniesltsp
-Version=0.0.23
-TabSize=2
Index: scanies-ltsp/trunk/scanies-ltsp
===================================================================
--- scanies-ltsp/trunk/scanies-ltsp	(revision 529)
+++ scanies-ltsp/trunk/scanies-ltsp	(nonexistent)
@@ -1,58 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          scanies-ltsp
-# Default-Start:     2 
-# Short-Description: Demonio para scanies
-### END INIT INFO
-#
-# Autor: Francisco Paniagua S�nchez
-#
-
-
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
-DAEMON=/usr/bin/scanies-ltsp.gambas
-NAME=scanies-ltsp
-
-do_start()
-{
- echo -n "Iniciando $NAME ..."
- /usr/bin/scanies-ltsp.gambas &
- echo "."
-}
-
-do_stop()
-{
-  echo -n "Parando $NAME ..."
-  PID=`ps -AF | grep scanies-ltsp.gambas | grep -v grep | awk '{print $2}'`
-  if [ ! -z "$PID" ]; then
-     kill -9 $PID
-  fi
-  PID=`ps -AF | grep _scanies._tcp | grep -v grep | awk '{print $2}'`
-  if [ ! -z "$PID" ]; then
-     kill -9 $PID
-  fi
-  echo "."
-}
-
-case "$1" in
-  start)
-        do_start
-	;;
-	
-  stop)
-        do_stop
-	;;
-
-  restart|reload|force-reload)
-        do_stop 
-	sleep 2
-        do_start
-	;;
-	
-  *)
-	echo "Usage: /etc/init.d/scanies-ltsp {start|stop|restart}" >&2
-	exit 1
-	;;
-esac
-
-exit 0
Index: aplicaciones/abiesweb/LEEME.txt
===================================================================
--- aplicaciones/abiesweb/LEEME.txt	(nonexistent)
+++ aplicaciones/abiesweb/LEEME.txt	(revision 530)
@@ -0,0 +1,112 @@
+"""
+Abiesweb - Consultas simples catálogo de abies
+Copyright (C) 2012  Francisco Mora <francisco.mora.sanchez@gmail.com>
+
+License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
+
+"""
+
+Esto es una pequeña utilidad que hice hace tiempo para poder consultar a través de una aplicación web desarrollada con web2py, el catálogo de
+nuestra biblioteca abies. Es muy primitiva, ya que fue cuando comencé con web2py, pero creo que útil quizá para algunos. Los pasos para 
+instalarla son los que describo a continuación. Debemos tener los siguientes archivos, es importante que los scripts mdb2tool y
+abies.sh tengan permisos de ejecución:
+	
+	. abies.mdb -> evidentemente los datos del programa abies
+	. abies.sh -> script que procesa el mdb e incorpora los datos en mysql
+	. mdb2mysql -> script perl que genera el SQL desde el MDB
+	. abiesweb.tar.gz -> aplicación web2py abiesweb
+	. web2pyapache -> configuración apache web2py
+
+PASOS:
+
+1. Debemos crear en nuestro servidor mysql, bien desde la consola mysql o bien desde phpmyadmin,
+una base de datos con las siguientes características:
+
+	nombre: abies
+	codificación: UTF-8 España
+
+
+2. Creación de un usuario con nombre "abies", sin contraseña y permiso de lectura/escritura en esta base de datos.
+
+3. Cada cierto periodo de tiempo procederemos a importar los datos a esta base de datos desde el fichero "abies.mdb"
+de la aplicación abies. Así tendremos actualizada la base de datos hasta el momento en que lo realizamos. Este proceso es el que
+hay que realizar de forma periódica. Es necesario que donde ejecutemos el script tengamos instalado los paquetes debian
+"mdbtools" y "mysql-client", además de y en la misma carpeta esté el archivo abies.mdb. Este script exporta la base de datos de access de abies a un
+formato SQL que entiende mysql e importa a mysql esos datos. Ejecutaremos la orden:
+
+	./abies.sh 
+
+	Podemos ver la base de datos con phpmyadmin.
+
+	Hemos de tener en cuenta que si el proceso lo realizamos en una máquina que no es la que tiene el servidor mysql, hemos de
+configurar el servidor mysql para que acepte peticiones que provengan de máquinas que no sean ella misma, esto se hace editando
+el fichero "/etc/mysql/my.cnf", del ordenador con el servidor mysql, comentando la línea:
+
+	#bind-address           = 127.0.0.1
+
+	Para permitir conexiones de otras máquinas clientes. Una vez hecho esto reiniciamos el servicio mysql para que tome la nueva
+configuración.
+
+4. Lo siguiente consiste en descargar el web2py de la página del proyecto: "http://www.web2py.com/examples/static/web2py_src.zip".
+Descomprimimos este archivo en una carpeta del servidor mysql, por ejemplo "/var/www/web2py". Para arrancar el framework:
+
+	unzip web2py_src.zip
+	chown -R www-data:www-data web2py
+	cd /var/www/web2py
+
+5. Ahora debemos instalar la aplicación abiesweb. Tambien configuraremos la ruta de acceso a la base de datos.
+	Para ello, y siguiendo con la secuencia anterior:
+
+	cd /var/www/web2py/applications	
+	tar xvzf dondetenemosabiesweb.tar.gz .
+
+	Descomprimimos el archivo abiesweb.tar.gz en esa ruta y se habrá creado la carpeta abiesweb.
+	Ahora editaremos el siguiente archivo:
+	
+	/var/www/web2py/applications/abiesweb/models/db.py
+	
+	Buscaremos la línea:
+	
+	    db = DAL('mysql://abies:abies@web/abies',pool_size=10)       # if not, use SQLite or other DB
+	    
+	Reemplazaremos web por el nombre del servidor de la base de datos, o por localhost si está en la misma
+	máquina. Guardaremos el cambio.
+	
+
+6. Para arrancar web2py, con el servidor web que lleva integrado (modo "lento"), lento si el número de peticiones es elevado,
+realizaremos lo siguiente:
+
+	cd /var/www/web2py
+	python web2py.py -a "passwordquequeramosparaadministracion" &
+
+Este comando arrancará un proceso web en el puerto 8000.
+
+7. Ya podremos probar si todo ha ido bien. Para ello abriremos un navegador web e iremos a la siguiente página:
+
+	http://nombremaquina:8000/abiesweb
+
+	Donde nombremaquina tiene que ser sustituido por el nombre de la máquina en que hemos descargado web2py. Una vez aquí podremos buscar
+por título, autor/a, editorial. La caja de texto espera a teclear al menos 4 caracteres y una vez tecleados realiza búsquedas a la base
+de datos apareciendo debajo de la caja de texto el resultado. Cuando pinchamos en un libro nos aparece una pequeña ficha de información,
+que incluye los ejemplares existentes, localización, etc. Además podremos acceder desde aquí a los títulos de la editorial o bien a las
+obras de algún autor/a.
+
+	El proceso web2py se ha quedado funcionando en segundo plano. Si reiniciamos la máquina tendremos que volver a iniciarlo manualmente.
+
+8. (Recomendado) Si queremos mayor velocidad de proceso, la forma que voy a describir hace que sea apache quien sirve la aplicación o aplicaciones que estén metidas
+en web2py. Tendremos que utilizar la extensión WSGI de apache, para que éste procese las peticiones y no el servidor web integrado de web2py, para ello hay que
+hacer varias modificaciones, evidentemente hay que tener instalado apache2 y libapache2-mod-wsgi.
+
+	Ya no es necesario arrancar el proceso web2py (punto 6), si lo está deberemos hacer un kill al proceso para eliminarlo, ya que sino apache se 
+quejará de que hay otro proceso sirviendo en el puerto 8000. Este puerto puede cambiarse sin problema.
+	
+	Copiaremos en /etc/apache2/sites-available el fichero "web2pyapache" y activaremos el sitio:
+	
+	cp dondetenemosweb2pyapache /etc/apache2/sites-available
+	a2ensite web2pyapache
+	service apache2 restart
+
+Si todo ha ido bien visitando el enlace del punto 7, podremos acceder a la misma aplicación pero siendo apache quien la sirve.
+
+
+
Index: aplicaciones/abiesweb/abiesweb.tar.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/abiesweb/abiesweb.tar.gz
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/abiesweb/mdb2mysql
===================================================================
--- aplicaciones/abiesweb/mdb2mysql	(nonexistent)
+++ aplicaciones/abiesweb/mdb2mysql	(revision 530)
@@ -0,0 +1,464 @@
+#!/usr/bin/perl
+##########
+#
+#  File: mdb2mysql
+#
+#  Created By: Bill Lewis (bill@enobis.com)
+#  Created On: Aug 5, 2004
+#
+#  Description:  Perl script to convert MS Access (mdb) files to an import
+#                schema suitable for MySQL.
+#
+#  Requirements: Perl (obvioulsy)
+#                mdbtools (mdbtools.sourceforge.net)
+#
+#  This 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.  You should have received a copy of the GNU
+#  General Public License along with this software; if not, visit:
+#            http://www.gnu.org/copyleft/gpl.html
+#
+#  Revision History:
+#
+#    v1.0 - First version released for use on Oct 14, 2004
+#
+#############################################################################
+use strict;
+use Getopt::Std;
+
+my $VERSION = "MDB2MySQL v1.0";
+my $BASEDATOS = "USE abies;";
+
+##########
+#
+#  Initialize Execution Environment
+#
+#############################################################################
+our %opts;
+
+# Set defaults...
+$opts{"r"} = "_";
+$opts{"U"} = "blob";
+$Getopt::Std::STANDARD_HELP_VERSION=1;
+
+getopts('cdeilhsuxMVo:r:t:U:',\%opts);
+
+if($opts{"h"}) { &VERSION_MESSAGE; &HELP_MESSAGE; exit; }
+if($opts{"V"}) { &VERSION_MESSAGE; exit; }
+
+if(@ARGV < 1) { &VERSION_MESSAGE; &HELP_MESSAGE; exit; }
+my $dataFile = $ARGV[$#ARGV];
+
+if($opts{"x"})
+{
+  $opts{"d"} = 1;
+  $opts{"e"} = 1;
+  $opts{"l"} = 1;
+}
+
+my $delim = "__zz__";
+
+my %mdbversions = ( "JET3" => "Access 97", "JET4" => "Access 2000/XP" );
+
+##########
+#
+#  MDB2MySQL Header Information
+#
+#############################################################################
+
+# Get MDB File Version
+open(VER,"mdb-ver $dataFile|") || die "Error Reading MDB File: $!\n";
+my $dataFileVersion = <VER>;
+close(VER);
+chop $dataFileVersion;
+$dataFileVersion .= " (".$mdbversions{$dataFileVersion}.")";
+
+# Print Header Information
+
+print $BASEDATOS;
+print "\n\n";
+
+##########
+#
+#  Script body
+#
+#############################################################################
+
+# Get List of Tables
+my @tables;
+my $mdbtables = "mdb-tables -d".$delim;
+if($opts{"M"}) { $mdbtables .= " -S"; }
+
+if($opts{"t"})
+{
+  @tables = split(/,/,$opts{"t"});
+}
+else
+{
+  open(TABLES,"$mdbtables $dataFile|") || die "Error Reading Tables: $!\n";
+  if(!$opts{"M"})
+  {
+    $_ = <TABLES>;
+    chop;
+    @tables = split(/$delim/);
+  }
+  else
+  {
+    while(<TABLES>)
+    {
+      chop;
+      push(@tables,$_);
+    }
+  }
+  close(TABLES);
+  if($opts{"o"})
+  {
+    my %hash = ();
+    foreach (@tables,split(/,/,$opts{"o"})) { $hash{$_}++; }
+    @tables = ();
+    foreach (keys %hash) { if($hash{$_} == 1) { push(@tables,$_); } }
+  }
+}
+
+# Loop through the tables to build the MySQL import/SQL format
+my @headers;
+my ($tbl,$record,$firstrecord,$first,$multirow,$startmulti,$endmulti,$values);
+my $mdbexport = "mdb-export -d".$delim." %s %s|";
+foreach $tbl (@tables)
+{
+  if(!$opts{"i"}) { &createTableSchema($dataFile,$tbl); }
+
+  if($opts{"c"}) { next; }
+
+  next if ($tbl eq 'Politica');
+
+  print "--\n--  Dumping data for table \'$tbl\'\n--\n\n";
+
+  # Get Table Data Records
+  open(RECORDS,sprintf($mdbexport,$dataFile,$tbl)) ||
+       die "Error Exporting Record Data: $!\n";
+
+  # Get Headers in case of future development/features...
+  foreach (split(/$delim/,<RECORDS>))
+  {
+    s/[^a-zA-Z0-9_\$]/$opts{"r"}/g;
+    push(@headers,$_);
+  }
+
+  $firstrecord = 1;
+  $multirow = $startmulti = $endmulti = 0;
+  if($opts{"l"}) { print "LOCK TABLES $tbl WRITE;\n"; }
+  if($opts{"e"}) { print "INSERT INTO $tbl VALUES "; }
+  while(<RECORDS>)
+  {
+    if(!$multirow)
+    {
+      chop;
+      $first = 1;
+      $values = "";
+    }
+    foreach (split(/$delim/))
+    {
+      if(!$multirow)
+      {
+        # Strip Quotes from both sides of data value
+        if(substr($_,0,1) eq '"' && substr($_,-1,1) eq '"')
+        {
+          $_ = substr($_,1,$#_);
+        }
+        # Strip out quotes from both sides on an unchoped row resulting
+        # from a multirow data record.
+        elsif(substr($_,0,1) eq '"' && substr($_,-2,1) eq '"')
+        {
+          $_ = substr($_,1,$#_-1);
+        }
+        # Check to see if this data value is the start of a multirow
+        elsif(substr($_,0,1) eq '"')
+        {
+          $_ = substr($_,1);
+          $multirow = 1;
+          $startmulti = 1;
+        }
+      }
+      else
+      {
+        # Check to see if this data is the end of a multirow
+        # Start by verifying that a quotation mark at the end of the
+        # line is not part of the data...
+        if(substr($_,-2) ne '""' || substr($_,-3,2) ne '""')
+        {
+          if(substr($_,-1,1) eq '"')
+          {
+            $_ = substr($_,0,$#_);
+            $multirow = 0;
+            $endmulti = 1;
+          }
+          elsif(substr($_,-2,1) eq '"')
+          {
+            $_ = substr($_,0,$#_-1);
+            $multirow = 0;
+            $endmulti = 1;
+          }
+        }
+      }
+
+      # Need to check if the field is a date type
+      # and convert to acceptable MySQL format if so...
+      if(!$multirow && !$endmulti)
+      {
+        if(/^(\d{1,2})\/(\d{1,2})\/(\d{2,4})\s+(\d{1,2}):(\d{1,2}):(\d{1,2})/ ||
+          /^(\d{1,2})\/(\d{1,2})\/(\d{2,4})/)
+        {
+          $_ = sprintf("%s%02s%02s%02s%02s%02s",$3,$1,$2,$4,$5,$6);
+        }
+      }
+
+      # Escape and convert certain characters for MySQL format
+      s/\\/\\\\/g;
+      s/'/\\'/g;
+      s/""/"/g;
+      s/"/\\"/g;
+
+      # Create MySQL format for dump values
+      if(!$multirow)
+      {
+        if(!$first && !$endmulti) { $values .= ","; }
+
+        if(!$endmulti) { $values .= "'".$_."'"; }
+        else { $values .= $_."'"; $endmulti = 0; }
+      }
+      else
+      {
+        if($startmulti)
+        {
+          if(!$first) { $values .= ","; }
+          $values .= "'".$_;
+          $startmulti = 0;
+        }
+        else
+        {
+          $values .= $_;
+        }
+      }
+
+      $first = 0;
+    }
+    if(!$multirow)
+    {
+      if($opts{"e"})
+      {
+        if(!$firstrecord) { print ","; }
+        print "($values)";
+        $firstrecord = 0;
+      }
+      else
+      {
+        printf("INSERT INTO %s VALUES (%s);\n",$tbl,$values);
+      }
+    }
+  }
+  if($opts{"e"}) { print ";\n"; }
+  if($opts{"l"}) { print "UNLOCK TABLES;\n\n"; }
+
+  close(RECORDS);
+}
+
+exit;
+
+##########
+#
+#  Subroutine: createTableSchema
+#
+#  Description: Creates the table structure in MySQL format.
+#
+#  Arguments: $mdbFile - MDB Database file containing table
+#             $table   - the MDB Database table
+#
+#  Return:  void
+#
+#############################################################################
+
+sub createTableSchema
+{
+  my ($colsDefinition);
+  my ($mdbFile,$table) = @_;
+  my $mdbschema = "echo \"DESCRIBE TABLE \"".$table." | mdb-sql ".$mdbFile;
+
+  # Get Table Schema for the given table
+  open(SCHEMA,"$mdbschema|") || die "Error Reading Table Schema: $!\n";
+  while(<SCHEMA>)
+  {
+    chop;
+    s/\s+//g;
+    if(/^\|(\S+)\|(\S+)\|(\d+)\|/)
+    {
+      $colsDefinition .= &convertColumnType($1,$2,$3);
+    }
+  }
+  close(SCHEMA);
+  chop $colsDefinition;
+  chop $colsDefinition;
+
+  print "--\n--  Table structure for table \'$table\'\n--\n\n";
+  if($opts{"d"}) { print "DROP TABLE IF EXISTS $table;\n"; }
+  print "CREATE TABLE $table (\n";
+  print $colsDefinition, "\n";
+  print ");\n\n";
+}
+
+##########
+#
+#  Subroutine: convertColumnType
+#
+#  Description: Converts the MDB (MS Access) column data type to the
+#               corresponding MySQL data type and creates the column
+#               structure.
+#
+#  Arguments: $field - MDB Database column/field name
+#             $type  - MDB Database data type
+#             $size  - MDB data type size
+#
+#  Return:  The schema for the converted column data type.
+#
+#############################################################################
+
+sub convertColumnType
+{
+  my $def;
+  my ($field,$type,$size) = @_;
+
+  $field =~ s/[^a-zA-Z0-9_\$]/$opts{"r"}/g;
+
+  $def = "  ";
+  if($type eq "Text")
+  {
+    if($size > 2)
+    {
+      $def .= sprintf("%s varchar(%d) NOT NULL default '',\n",$field,$size);
+    }
+    else
+    {
+      $def .= sprintf("%s char(%d) NOT NULL default '',\n",$field,$size);
+    }
+  }
+  elsif($type eq "Memo/Hyperlink")
+  {
+    $def .= sprintf("%s text NOT NULL default '',\n",$field);
+  }
+  elsif($type eq "Byte")
+  {
+    $def .= sprintf("%s tinyint NOT NULL default 0,\n",$field);
+  }
+  elsif($type eq "Integer")
+  {
+    $def .= sprintf("%s smallint NOT NULL default 0,\n",$field);
+  }
+  elsif($type eq "LongInteger")
+  {
+    $def .= sprintf("%s int NOT NULL default 0,\n",$field);
+  }
+  elsif($type eq "Single" || $type eq "Double")
+  {
+    $def .= sprintf("%s double NOT NULL default 0,\n",$field);
+  }
+  elsif($type eq "Numeric")
+  {
+    $def .= sprintf("%s float NOT NULL default 0,\n",$field);
+  }
+  elsif($type eq "Currency")
+  {
+    $def .= sprintf("%s decimal(10,2) NOT NULL default '0.00',\n",$field);
+  }
+  elsif($type eq "DateTime" || $type eq "DateTime(Short)")
+  {
+    $def .= sprintf("%s datetime NOT NULL default '0000-00-00 00:00:00',\n",
+                    $field);
+  }
+  elsif($type eq "Boolean" || $type eq "Bit")
+  {
+    $def .= sprintf("%s enum('1','0') NOT NULL default '1',\n",$field);
+  }
+  elsif($type eq "ReplicationID")
+  {
+    $def .= sprintf("%s tinyblob NOT NULL default '',\n",$field);
+  }
+  elsif($type eq "OLE")
+  {
+    $def .= sprintf("%s longblob NOT NULL default '',\n",$field);
+  }
+  else
+  {
+    if($opts{"u"})
+    {
+      print "??? Unknown Access/MDB Field Data Type!\n";
+      print "??? Field: $field\n";
+      print "??? Data Type: $type($size)\n";
+      print "??? Resolution Options:\n";
+      print "???   1. Change the field to a known data type within Access\n";
+      print "???   2. Let MDB2MySQL use a known MySQL data type instead.\n";
+      print "???      The default replacement is a 'blob' but can be\n";
+      print "???      changed using the -U flag.\n";
+      exit;
+    }
+    else
+    {
+      $def .= sprintf("%s %s NOT NULL default '',\n",$field,$opts{"U"});
+    }
+  }
+
+  return $def;
+}
+
+##########
+#
+#  Subroutine: VERSION_MESSAGE
+#
+#  Description: Displays the version message.  Complies to the Getopts
+#               perl module.
+#
+#  Arguments: none
+#
+#  Return:  void
+#
+#############################################################################
+
+sub VERSION_MESSAGE()
+{
+  print $VERSION, "\n";
+  print "Created By: Bill Lewis (bill\@enobis.com)\n";
+  print "GNU General Public License (http://www.gnu.org/copyleft/gpl.html)\n";
+}
+
+##########
+#
+#  Subroutine: HELP_MESSAGE
+#
+#  Description: Displays the help message.  Complies to the Getopts
+#               perl module.
+#
+#  Arguments: none
+#
+#  Return:  void
+#
+#############################################################################
+
+sub HELP_MESSAGE()
+{
+  print "\nUsage: mdb2mysql [options] <mdb file>\n";
+  print "  -c             Create table structure only, no data.\n";
+  print "  -d             Add a 'drop table' before each create.\n";
+  print "  -e             Use the much faster, extended INSERT syntax.\n";
+  print "  -i             Export data inserts only.\n";
+  print "  -l             Add locks around insert statements.\n";
+  print "  -o <tables>    Omit tables in this comma seperated list.\n";
+  print "  -r <character> Replace illegal characters with given character.\n";
+  print "                 The default character is an underscore.\n";
+  print "  -t <tables>    Export only this list of comma seperated tables.\n";
+  print "  -u             Report unknown Access data type and exit.\n";
+  print "  -x             Same as using -d -e -l combined options.\n";
+  #print "  -M             Convert Access System tables ('MSys') as well.\n";
+  print "  -U <type>      Use the MySQL data type for unknown Access types.\n";
+  print "                 Unless given, 'blob' will be used by default.\n";
+  print "  -h, --help     This message and exit.\n";
+  print "  -V, --version  Output version information and exit.\n";
+}

Property changes on: aplicaciones/abiesweb/mdb2mysql
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: aplicaciones/abiesweb/web2pyapache
===================================================================
--- aplicaciones/abiesweb/web2pyapache	(nonexistent)
+++ aplicaciones/abiesweb/web2pyapache	(revision 530)
@@ -0,0 +1,49 @@
+NameVirtualHost *:8000
+
+WSGIRestrictStdout Off
+
+<VirtualHost *:8000>
+  WSGIDaemonProcess web2py user=www-data group=www-data 
+  WSGIProcessGroup web2py
+  WSGIScriptAlias / /var/www/web2py/wsgihandler.py
+
+  <Directory /var/www/web2py>
+    AllowOverride None
+    Order Allow,Deny
+    Deny from all
+    <Files wsgihandler.py>
+      Allow from all
+    </Files>
+  </Directory>
+
+  AliasMatch ^/abiesweb/([^/]+)/static/(.*) \
+           /var/www/web2py/applications/$1/static/$2
+  <Directory /var/www/web2py/applications/*/static/>
+    Order Allow,Deny
+    Allow from all
+  </Directory>
+
+  AliasMatch ^/gesiesweb/([^/]+)/static/(.*) \
+           /var/www/web2py/applications/$1/static/$2
+  <Directory /var/www/web2py/applications/*/static/>
+    Order Allow,Deny
+    Allow from all
+  </Directory>
+
+  AliasMatch ^/([^/]+)/static/(.*) \
+           /var/www/web2py/applications/$1/static/$2
+  <Directory /var/www/web2py/applications/*/static/>
+    Order Allow,Deny
+    Allow from all
+  </Directory>
+
+  <Location /admin>
+  Deny from all
+  </Location>
+
+  <LocationMatch ^/([^/]+)/appadmin>
+  Deny from all
+  </LocationMatch>
+
+</VirtualHost>
+
Index: aplicaciones/abiesweb/abies.sh
===================================================================
--- aplicaciones/abiesweb/abies.sh	(nonexistent)
+++ aplicaciones/abiesweb/abies.sh	(revision 530)
@@ -0,0 +1,5 @@
+#!/bin/sh
+#exportamos a sql de mysql
+./mdb2mysql -d abies.mdb > abies.sql
+#importamos a mysql
+mysql -h mysql --default_character_set utf8 -u abies --password=abies < abies.sql

Property changes on: aplicaciones/abiesweb/abies.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: aplicaciones/controlies/LEEME
===================================================================
--- aplicaciones/controlies/LEEME	(nonexistent)
+++ aplicaciones/controlies/LEEME	(revision 530)
@@ -0,0 +1 @@
+Proyecto movido a https://github.com/manumora/controlies
Index: aplicaciones/actividadextraescolar/actividadextraescolar.tgz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/actividadextraescolar/actividadextraescolar.tgz
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/actividadextraescolar/Leeme
===================================================================
--- aplicaciones/actividadextraescolar/Leeme	(nonexistent)
+++ aplicaciones/actividadextraescolar/Leeme	(revision 530)
@@ -0,0 +1,10 @@
+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
Index: aplicaciones/actividadextraescolar/listado.py
===================================================================
--- aplicaciones/actividadextraescolar/listado.py	(nonexistent)
+++ aplicaciones/actividadextraescolar/listado.py	(revision 530)
@@ -0,0 +1,46 @@
+#!/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)
+
Index: aplicaciones/actividadextraescolar/actividadExtraescolar.py
===================================================================
--- aplicaciones/actividadextraescolar/actividadExtraescolar.py	(nonexistent)
+++ aplicaciones/actividadextraescolar/actividadExtraescolar.py	(revision 530)
@@ -0,0 +1,232 @@
+#!/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()

Property changes on: aplicaciones/actividadextraescolar/actividadExtraescolar.py
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: aplicaciones/scanies/trunk/frmayuda.form
===================================================================
--- aplicaciones/scanies/trunk/frmayuda.form	(nonexistent)
+++ aplicaciones/scanies/trunk/frmayuda.form	(revision 530)
@@ -0,0 +1,46 @@
+# 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")
+  }
+}
Index: aplicaciones/scanies/trunk/frmayuda.class
===================================================================
--- aplicaciones/scanies/trunk/frmayuda.class	(nonexistent)
+++ aplicaciones/scanies/trunk/frmayuda.class	(revision 530)
@@ -0,0 +1,41 @@
+' 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
+
Index: aplicaciones/scanies/trunk/.settings
===================================================================
--- aplicaciones/scanies/trunk/.settings	(nonexistent)
+++ aplicaciones/scanies/trunk/.settings	(revision 530)
@@ -0,0 +1,31 @@
+[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
+

Property changes on: aplicaciones/scanies/trunk/.settings
___________________________________________________________________
Added: svn:executable
Index: aplicaciones/scanies/trunk/.directory
===================================================================
--- aplicaciones/scanies/trunk/.directory	(nonexistent)
+++ aplicaciones/scanies/trunk/.directory	(revision 530)
@@ -0,0 +1,2 @@
+[Desktop Entry]
+Icon=./.icon.png

Property changes on: aplicaciones/scanies/trunk/.directory
___________________________________________________________________
Added: svn:executable
Index: aplicaciones/scanies/trunk/.project
===================================================================
--- aplicaciones/scanies/trunk/.project	(nonexistent)
+++ aplicaciones/scanies/trunk/.project	(revision 530)
@@ -0,0 +1,17 @@
+# 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
Index: aplicaciones/scanies/trunk/changelog
===================================================================
--- aplicaciones/scanies/trunk/changelog	(nonexistent)
+++ aplicaciones/scanies/trunk/changelog	(revision 530)
@@ -0,0 +1,40 @@
+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
+---------------------------------------------------------------

Property changes on: aplicaciones/scanies/trunk/changelog
___________________________________________________________________
Added: svn:executable
Index: aplicaciones/scanies/trunk/imagenes/pdf.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/pdf.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/imagenes/red.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/red.png
___________________________________________________________________
Added: svn:executable
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/imagenes/apagar.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/apagar.png
___________________________________________________________________
Added: svn:executable
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/imagenes/gnome-terminal.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/gnome-terminal.png
___________________________________________________________________
Added: svn:executable
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/imagenes/despierta.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/despierta.png
___________________________________________________________________
Added: svn:executable
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/imagenes/pdf16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/pdf16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/imagenes/red16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/red16.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/imagenes/konsoleOn.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/imagenes/konsoleOn.png
___________________________________________________________________
Added: svn:executable
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/frmnombre.form
===================================================================
--- aplicaciones/scanies/trunk/frmnombre.form	(nonexistent)
+++ aplicaciones/scanies/trunk/frmnombre.form	(revision 530)
@@ -0,0 +1,31 @@
+# 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")
+  }
+}
Index: aplicaciones/scanies/trunk/.icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/.icon.png
___________________________________________________________________
Added: svn:executable
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/fprincipal.form
===================================================================
--- aplicaciones/scanies/trunk/fprincipal.form	(nonexistent)
+++ aplicaciones/scanies/trunk/fprincipal.form	(revision 530)
@@ -0,0 +1,105 @@
+# 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"]
+    }
+  }
+}
Index: aplicaciones/scanies/trunk/fprincipal.class
===================================================================
--- aplicaciones/scanies/trunk/fprincipal.class	(nonexistent)
+++ aplicaciones/scanies/trunk/fprincipal.class	(revision 530)
@@ -0,0 +1,510 @@
+' 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               : fprincipal.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 hset AS Settings
+PUBLIC servidordns AS String
+PUBLIC rango AS String
+PUBLIC datosldap AS Boolean
+PRIVATE aula AS String
+PRIVATE indice AS Integer
+PRIVATE nequipos AS Integer
+
+
+PUBLIC SUB Form_Open()
+DIM fichero AS String
+
+ fichero = user.Home & "/.scanies4"
+ ME.Center
+
+ IF NOT comprobar_configuracion() THEN
+  frmconfiguracion.ShowModal
+  
+ 'ELSE
+  ' cargar_datos()
+ ENDIF
+ hset = NEW Settings(fichero)
+ rango = hset["Rango de Red"]
+ datosldap = hset["ldap"]
+
+ IF (datosldap) THEN 
+  cargar_datos()
+ ELSE  
+  deshabilitar_ldap(FALSE)
+ ENDIF 
+  
+ iniciar_programa()
+END
+
+
+PUBLIC SUB deshabilitar_ldap(valor AS Boolean)
+  
+  frame2.enabled = valor
+  btnprofon.enabled = valor
+  btnproftodoson.Enabled = valor
+  cmbaulas.Enabled = valor
+  
+END
+
+
+
+PUBLIC SUB Form_Close()
+
+  
+END
+
+
+PUBLIC FUNCTION comprobar_configuracion() AS Boolean
+DIM fichero AS String
+DIM retorno AS Boolean
+
+  fichero = user.Home & "/.scanies4"
+
+  IF NOT Exist(fichero) THEN
+   SHELL "touch " & fichero WAIT
+   message.Info("La aplicación no está configurada")
+   retorno = FALSE
+  ELSE
+   hset = NEW Settings(fichero)
+   rango = hset["Rango de Red"]
+   datosldap = hset["ldap"]
+   retorno = TRUE
+  ENDIF
+  RETURN retorno
+  
+END
+
+
+PUBLIC SUB iconos()
+
+ btnrefrescar.Picture = stock["16/refresh"]
+ btnsalir.Picture = stock["16/quit"]
+ mnusalir.picture = stock["16/quit"]
+ mnurefrescar.Picture = stock["16/refresh"]
+ mnuconfiguracion2.Picture = stock["16/properties"]
+ mnuayuda2.Picture = stock["16/help"]  
+  
+END
+
+
+
+
+PUBLIC SUB cargar_datos()
+DIM fichero AS file
+DIM fauxiliar AS File
+DIM temporal AS String
+DIM fprofesores AS String
+DIM linea AS String
+DIM nombre AS String
+DIM mac AS String
+
+ 
+ 'realizar un fichero mediante ldapsearch con los nombres de los equipos de profesor
+ temporal = "/tmp/datos-prof"
+ TRY SHELL "ldapsearch -xLLL -h ldap -b dc=instituto,dc=extremadura,dc=es \"(&(objectClass=dhcpHost)(cn=a*-pro))\" | egrep \"cn:|ethernet\" | awk '{ print $2 $3 }' > " & temporal WAIT
+   
+ fprofesores = "/tmp/profesores-ldap"
+ cmbaulas.add("Elige un equipo ...")
+
+ TRY OPEN fprofesores FOR CREATE AS #fauxiliar
+
+ TRY OPEN temporal FOR READ AS #fichero
+ WHILE NOT Eof(fichero)
+  
+  LINE INPUT #fichero, linea
+  nombre = linea
+  LINE INPUT #fichero, linea
+  mac = Right(linea, 17)
+  
+  cmbaulas.Add(nombre)
+  PRINT #fauxiliar, nombre & " " & mac
+  
+ WEND
+ CLOSE #fichero
+ 
+ CLOSE #fauxiliar
+ 
+ habilitar_botones(FALSE)
+
+ 
+ CATCH 
+  message.Error("No se puedieron obtener los datos de los equipos de profesor")
+
+END
+
+
+PUBLIC SUB iniciar_programa()
+  
+ 'cargamos la lista de equipos encendidos
+ iconos()
+ inicia_lista()
+ btnRefrescar_click()
+  
+END
+
+
+PUBLIC SUB habilitar_botones(valor AS Boolean)
+
+ btnprofon.Enabled = valor
+
+END
+
+
+
+PUBLIC SUB cmbaulas_Click()
+
+ IF (cmbaulas.Text = "Elige un equipo ...") THEN
+  habilitar_botones(FALSE)
+  lblaula.text = "No hay ningún equipo seleccionado"
+ ELSE
+  aula = cmbaulas.Text
+  habilitar_botones(TRUE)
+  lblaula.text = "Esta seleccionado el equipo " & aula
+ ENDIF
+
+END
+
+
+PUBLIC SUB habilitar(valor AS Boolean)
+
+'  frame1.Enabled = valor
+  frame2.Enabled = valor
+  listapcs.Enabled = valor
+  IF (valor) THEN
+   ME.Mouse = mouse.Default
+  ELSE
+   ME.mouse = mouse.Wait
+  ENDIF
+
+END
+
+PUBLIC SUB inicia_lista()
+
+  listapcs.Columns.Count = 4
+  listapcs.Columns[0].Width = 200
+  listapcs.Columns[1].Width = 125
+  listapcs.Columns[2].width = 180
+  listapcs.Columns[0].Text = "Nombre"
+  listapcs.Columns[1].Text = "Dirección IP"
+  listapcs.Columns[2].text = "MAC"
+  listapcs.Columns[3].text = "   "
+    
+END
+
+
+'****************************************************************************************************
+'****************************************************************************************************
+' opciones menu y botones
+'****************************************************************************************************
+'****************************************************************************************************
+
+
+PUBLIC FUNCTION obtener_mac(cadena AS String[]) AS String
+  
+  RETURN Right(cadena[2], 2) & ":" & Right(cadena[3], 2) & ":" & Right(cadena[4], 2) & ":" & Right(cadena[5], 2) & ":" & Right(cadena[6], 2) & ":" & Right(cadena[7], 2)
+    
+END
+
+
+PUBLIC SUB btnrefrescar_Click()
+DIM fichero1 AS String
+DIM fichero2 AS String
+DIM fichero3 AS String
+DIM ficherounion AS String
+DIM fencendidos AS File
+DIM linea AS String
+DIM tratalinea01 AS String[]
+DIM tratalinea02 AS String[]
+DIM nombre AS String
+DIM ip AS String
+DIM mac AS String
+DIM contador AS Integer
+DIM tipo AS String
+
+  
+  IF (listapcs.Exist(0)) THEN listapcs.Clear
+  
+  inicia_lista()
+  contador = 0
+  habilitar(FALSE)
+  fichero1 = "/tmp/equipos-workstation"
+  fichero2 = "/tmp/equipos-scanies"
+
+  
+'Se crea un fichero con los pc's que están encendidos
+SHELL "avahi-browse _workstation._tcp -fkprt | grep = | grep IPv4 > " & fichero1 WAIT
+SHELL "avahi-browse _scanies._tcp -fkprt | grep = | grep IPv4 > " & fichero2 WAIT 
+
+'Uno los dos ficheros y los ordeno por nombre
+ficherounion = "/tmp/equipos-union"
+SHELL "cat " & fichero1 & " " & fichero2 & " > " & ficherounion WAIT 
+fichero3 = "/tmp/encendidos"
+SHELL "sort -t\";\" -k 4 " & ficherounion & " > " & fichero3 WAIT
+
+
+'Saco los datos de los pc's encendidos 
+TRY OPEN fichero3 FOR READ AS #fencendidos
+   WHILE NOT Eof(fencendidos)
+    LINE INPUT #fencendidos, linea  
+
+    tratalinea01 = Split(linea, ";") 'dividimos linea en campos
+    
+    'diferenciamos si es workstation o scanies
+    tipo = tratalinea01[4]
+    
+    'workstation
+    IF (tipo = "_workstation._tcp") THEN 
+        tratalinea02 = Split(tratalinea01[3], "\\") 'dividimos campo 3 que contiene el nombre y la mac"
+        nombre = tratalinea02[0]
+        mac = obtener_mac(tratalinea02)
+        ip = tratalinea01[7]
+    ENDIF 
+    
+    'scanies
+    IF (tipo = "_scanies._tcp") THEN 
+        nombre = tratalinea01[3]
+        tratalinea02 = Split(tratalinea01[9], "#")
+        ip = Replace(tratalinea02[0], "\"", "")
+        mac = Replace(tratalinea02[1], "\"", "")
+    ENDIF 
+    
+    listapcs.Add(contador, nombre)
+    listapcs[contador][1] = ip
+    listapcs[contador][2] = mac
+    
+    IF (tipo = "_workstation._tcp") THEN 
+     listapcs[contador][3] = "x"
+    ELSE 
+     listapcs[contador][3] = " "
+    ENDIF 
+    
+    contador = contador + 1
+       
+   WEND 
+
+  CLOSE #fencendidos
+  lblnequipos.text = "Numero de equipos encendidos: " & contador
+  habilitar(TRUE)
+
+END
+
+
+PUBLIC SUB mnuConfiguracion2_Click()
+
+ frmconfiguracion.Show
+
+END
+
+PUBLIC SUB btnsalir_Click()
+
+ ME.Close
+
+END
+
+PUBLIC SUB mnuRefrescar_Click()
+
+ btnrefrescar_click()
+
+END
+
+PUBLIC SUB mnuSalir_Click()
+
+ btnsalir_Click()
+
+END
+
+PUBLIC SUB mnuAyuda2_Click()
+
+  frmayuda.Show
+  
+END
+
+PUBLIC SUB listapcs_Click()
+  
+  indice = listapcs.Current.Key
+  
+END
+
+
+PUBLIC SUB listapcs_Menu()
+'DIM tocado AS Boolean
+
+'   TRY tocado = LAST.current.selected
+'   IF NOT ERROR THEN
+     mnupopup.Popup
+'     indice = LAST.item.key
+'   ENDIF
+
+END
+
+PUBLIC SUB mnuconectar_Click()
+DIM direccion AS String
+  
+  IF (listapcs[indice][3] = " ") THEN  
+   message.Info("No hay conexión a esa red")
+  ELSE  
+   direccion = listapcs[indice][1]
+   SHELL "gnome-terminal -x ssh root@" & direccion
+  ENDIF    
+  
+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/scanies-report.ps"
+  ficheropdf = User.home & "/Desktop/scanies-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("*** ScanIES ***", x + 1500, 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 + xinc1, y)
+  Draw.Text("MAC", x + xinc2, y) 
+  
+  
+  'cuerpo *************************************************************
+  y = y + yinc1
+  yinc2 = 100
+  Draw.Font.size = 10
+  Draw.Font.bold = FALSE
+  
+  FOR i = 0 TO listapcs.Count
+   
+    IF (listapcs.Exist(i)) THEN 
+      snombre = listapcs[i][0]
+      sdireccionip = listapcs[i][1]
+      smac = listapcs[i][2]
+      
+      Draw.Text(snombre, x, y)
+      Draw.Text(sdireccionip, x + xinc1, y)
+      Draw.Text(smac, 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 + xinc1, y)
+       Draw.Text("MAC", 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 btnnmap_Click()
+
+  frmnmap.ShowModal
+
+END
+
+PUBLIC SUB btnproftodoson_Click()
+DIM profesores AS String
+DIM temporal AS String
+
+ temporal = Temp()
+ profesores = "/tmp/profesores-ldap"
+ SHELL "awk '{ print $2 }' " & profesores & " > " & temporal WAIT  
+ SHELL "wakeonlan -f " & temporal WAIT  
+ message.Info("Enviada señal de encendido a todos los equipos de profesor")
+
+END
+
+
+PUBLIC SUB btnprofon_Click()
+DIM profesores AS String
+DIM temporal AS String
+DIM mac AS String
+
+  temporal = Temp()
+  profesores = "/tmp/profesores-ldap"
+  SHELL "grep " & cmbaulas.text & " " & profesores & " | cut -f2 -d\" \"  > " & temporal WAIT 
+  
+  TRY mac = file.Load(temporal)
+  SHELL "wakeonlan " & mac
+  message.Info("Enviada señal de encendido al equipo " & cmbaulas.text)
+
+END
Index: aplicaciones/scanies/trunk/frmnombre.class
===================================================================
--- aplicaciones/scanies/trunk/frmnombre.class	(nonexistent)
+++ aplicaciones/scanies/trunk/frmnombre.class	(revision 530)
@@ -0,0 +1,57 @@
+' 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
+' ################################################
+
+PUBLIC pasardireccion AS String
+
+
+PUBLIC SUB Form_Open()
+
+  ME.Center
+  btnaceptar.Picture = Stock["16/apply"]
+  btncancelar.Picture = Stock["16/cancel"]
+  txtdireccion.text = pasardireccion
+  txtdireccion.enabled = FALSE
+  txtnombre.text = frmnmap.pasarnombre
+    
+END
+
+PUBLIC SUB btncancelar_Click()
+
+  ME.Close
+
+END
+
+PUBLIC SUB btnaceptar_Click()
+
+  IF (txtnombre.text = "") THEN 
+   frmnmap.pasarnombre = "Dispositivo"
+  ELSE 
+   frmnmap.pasarnombre = txtnombre.Text
+  ENDIF 
+  
+  ME.Close
+
+END
Index: aplicaciones/scanies/trunk/frmconfiguracion.form
===================================================================
--- aplicaciones/scanies/trunk/frmconfiguracion.form	(nonexistent)
+++ aplicaciones/scanies/trunk/frmconfiguracion.form	(revision 530)
@@ -0,0 +1,41 @@
+# Gambas Form File 2.0
+
+{ Form Form
+  MoveScaled(15.625,21.625,76,29)
+  Font = Font["Bitstream Vera Sans,10"]
+  Text = ("Configuracion ScanIES")
+  Icon = Picture["imagenes/red.png"]
+  Border = Window.Fixed
+  { Frame1 Frame
+    MoveScaled(1,13,74,11)
+    Text = (" Opciones para nmap ")
+    { TextLabel1 TextLabel
+      MoveScaled(2,4,12,3)
+      Text = ("Rango de Red")
+    }
+    { txtrango TextBox
+      MoveScaled(15,4,56,3)
+      Text = ("")
+    }
+  }
+  { btnsalir Button
+    MoveScaled(60,25,15,3)
+    Font = Font["Bitstream Vera Sans,10"]
+    Text = ("Salir")
+  }
+  { btnguardar Button
+    MoveScaled(1,25,23,3)
+    Font = Font["Bitstream Vera Sans,10"]
+    Text = ("Guardar Configuraci\xC3\xB3n")
+    Default = True
+  }
+  { Frame2 Frame
+    MoveScaled(1,1,74,10)
+    Text = (" Opciones para ldap ")
+    { chkbxldap CheckBox
+      MoveScaled(3,4,68,3)
+      Text = ("\xC2\xBF Coger datos de los servidores de terminales mediante el servidor ldap ?")
+      Value = CheckBox.True
+    }
+  }
+}
Index: aplicaciones/scanies/trunk/frmconfiguracion.class
===================================================================
--- aplicaciones/scanies/trunk/frmconfiguracion.class	(nonexistent)
+++ aplicaciones/scanies/trunk/frmconfiguracion.class	(revision 530)
@@ -0,0 +1,82 @@
+' 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               : frmconfiguracion.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 hset AS Settings
+
+
+PUBLIC SUB Form_Open()
+
+ ME.Center
+ hset = NEW settings(user.Home & "/.scanies4")
+ iconos()
+ comprobar_configuracion()
+
+END
+
+PUBLIC SUB btnsalir_Click()
+
+ME.Close
+
+END
+
+
+PUBLIC SUB iconos()
+
+  btnguardar.Picture = stock["16/apply"]
+  btnsalir.Picture = stock["16/quit"]
+  
+END
+
+
+PUBLIC FUNCTION comprobar_configuracion() AS Boolean
+
+  txtrango.text = hset["Rango de Red"]
+  
+  IF (hset["ldap"] = "") THEN 
+   chkbxldap.value = TRUE
+  ELSE 
+   chkbxldap.value = hset["ldap"]
+  ENDIF 
+  
+   
+END
+
+
+PUBLIC SUB btnguardar_Click()
+ 
+  hset["Rango de Red"] = txtrango.Text
+  hset["ldap"] = chkbxldap.Value
+
+  hset.Save
+ 
+  fprincipal.rango = txtrango.Text
+  fprincipal.datosldap = chkbxldap.Value
+
+  ME.Close
+
+END
+
+
+
Index: aplicaciones/scanies/trunk/frmnmap.form
===================================================================
--- aplicaciones/scanies/trunk/frmnmap.form	(nonexistent)
+++ aplicaciones/scanies/trunk/frmnmap.form	(revision 530)
@@ -0,0 +1,31 @@
+# Gambas Form File 2.0
+
+{ Form Form
+  MoveScaled(0,0,42,65)
+  Text = ("Electr\xC3\xB3nica de Red ...")
+  Icon = Picture["imagenes/red.png"]
+  { mnupopup Menu
+    Text = ("PopUp")
+    Visible = False
+    { mnunombre Menu
+      Text = ("Poner Nombre")
+      Picture = Picture["icon:/16/edit"]
+    }
+    { mnunavegador Menu
+      Text = ("Abrir con Navegador Web")
+      Picture = Picture["icon:/16/earth"]
+    }
+    { mnupdf Menu
+      Text = ("Generar datos PDF")
+      Picture = Picture["imagenes/pdf16.png"]
+    }
+  }
+  { lista ColumnView
+    MoveScaled(0,0,42,61)
+    ScrollBar = Scroll.Vertical
+  }
+  { btnsalir Button
+    MoveScaled(0,61,42,4)
+    Text = ("Salir")
+  }
+}
Index: aplicaciones/scanies/trunk/frmnmap.class
===================================================================
--- aplicaciones/scanies/trunk/frmnmap.class	(nonexistent)
+++ aplicaciones/scanies/trunk/frmnmap.class	(revision 530)
@@ -0,0 +1,245 @@
+' 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
+
Index: aplicaciones/scanies/trunk/leeme.txt
===================================================================
--- aplicaciones/scanies/trunk/leeme.txt	(nonexistent)
+++ aplicaciones/scanies/trunk/leeme.txt	(revision 530)
@@ -0,0 +1,29 @@
+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 

Property changes on: aplicaciones/scanies/trunk/leeme.txt
___________________________________________________________________
Added: svn:executable
Index: aplicaciones/scanies/trunk/copying
===================================================================
--- aplicaciones/scanies/trunk/copying	(nonexistent)
+++ aplicaciones/scanies/trunk/copying	(revision 530)
@@ -0,0 +1,340 @@
+		    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.

Property changes on: aplicaciones/scanies/trunk/copying
___________________________________________________________________
Added: svn:executable
Index: aplicaciones/scanies/trunk/.gambas/FRMCONFIGURACION
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/.gambas/FRMCONFIGURACION
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/.gambas/FRMNMAP
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/.gambas/FRMNMAP
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/.gambas/FPRINCIPAL
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/.gambas/FPRINCIPAL
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/.gambas/FRMNOMBRE
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/.gambas/FRMNOMBRE
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/.gambas/FRMAYUDA
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/.gambas/FRMAYUDA
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies/trunk/scanies.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies/trunk/scanies.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies-ltsp/trunk/.directory
===================================================================
--- aplicaciones/scanies-ltsp/trunk/.directory	(nonexistent)
+++ aplicaciones/scanies-ltsp/trunk/.directory	(revision 530)
@@ -0,0 +1,2 @@
+[Desktop Entry]
+Icon=./.icon.png

Property changes on: aplicaciones/scanies-ltsp/trunk/.directory
___________________________________________________________________
Added: svn:executable
Index: aplicaciones/scanies-ltsp/trunk/.project
===================================================================
--- aplicaciones/scanies-ltsp/trunk/.project	(nonexistent)
+++ aplicaciones/scanies-ltsp/trunk/.project	(revision 530)
@@ -0,0 +1,5 @@
+# Gambas Project File 2.0
+Title=scanies-ltsp
+Startup=scaniesltsp
+Version=0.0.23
+TabSize=2
Index: aplicaciones/scanies-ltsp/trunk/scanies-ltsp
===================================================================
--- aplicaciones/scanies-ltsp/trunk/scanies-ltsp	(nonexistent)
+++ aplicaciones/scanies-ltsp/trunk/scanies-ltsp	(revision 530)
@@ -0,0 +1,58 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          scanies-ltsp
+# Default-Start:     2 
+# Short-Description: Demonio para scanies
+### END INIT INFO
+#
+# Autor: Francisco Paniagua S�nchez
+#
+
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/scanies-ltsp.gambas
+NAME=scanies-ltsp
+
+do_start()
+{
+ echo -n "Iniciando $NAME ..."
+ /usr/bin/scanies-ltsp.gambas &
+ echo "."
+}
+
+do_stop()
+{
+  echo -n "Parando $NAME ..."
+  PID=`ps -AF | grep scanies-ltsp.gambas | grep -v grep | awk '{print $2}'`
+  if [ ! -z "$PID" ]; then
+     kill -9 $PID
+  fi
+  PID=`ps -AF | grep _scanies._tcp | grep -v grep | awk '{print $2}'`
+  if [ ! -z "$PID" ]; then
+     kill -9 $PID
+  fi
+  echo "."
+}
+
+case "$1" in
+  start)
+        do_start
+	;;
+	
+  stop)
+        do_stop
+	;;
+
+  restart|reload|force-reload)
+        do_stop 
+	sleep 2
+        do_start
+	;;
+	
+  *)
+	echo "Usage: /etc/init.d/scanies-ltsp {start|stop|restart}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
Index: aplicaciones/scanies-ltsp/trunk/.gambas/SCANIESLTSP
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies-ltsp/trunk/.gambas/SCANIESLTSP
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies-ltsp/trunk/.icon.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: aplicaciones/scanies-ltsp/trunk/.icon.png
___________________________________________________________________
Added: svn:executable
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: aplicaciones/scanies-ltsp/trunk/scaniesltsp.class
===================================================================
--- aplicaciones/scanies-ltsp/trunk/scaniesltsp.class	(nonexistent)
+++ aplicaciones/scanies-ltsp/trunk/scaniesltsp.class	(revision 530)
@@ -0,0 +1,188 @@
+' 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               : scaniesltsp.class
+' # created in project      : scanies-ltsp
+' # created by              : Francisco Paniagua Sánchez
+' # mail                    : adminies.franciscodeorellana@edu.juntaextremadura.net
+' # created at              : 10/03/2009
+' # last test with          : gambas-2.7-1
+' ################################################
+
+STATIC clase AS scaniesltsp
+PRIVATE proceso AS Process
+
+
+STATIC PUBLIC SUB Main()
+  
+  clase = NEW scaniesltsp
+  
+END
+
+PUBLIC SUB _New()
+  
+  proceso = SHELL "avahi-browse _workstation._tcp -frpkl | grep \"eth0;IPv4\"" FOR INPUT 
+  
+END
+
+PRIVATE FUNCTION obtener_mac(cadena AS String[]) AS String
+  
+ RETURN Right(cadena[2], 2) & ":" & Right(cadena[3], 2) & ":" & Right(cadena[4], 2) & ":" & Right(cadena[5], 2) & ":" & Right(cadena[6], 2) & ":" & Right(cadena[7], 2) 
+  
+END
+
+PRIVATE FUNCTION esportatil(servidor AS String, cliente AS String) AS String
+DIM aula AS String[]
+DIM caracteres AS Byte
+DIM resultado AS String
+
+  aula = Split(servidor, "-")
+  caracteres = Len(aula[0])
+  
+  IF (aula[0] = Left(cliente, caracteres)) THEN 
+   'es cliente ligero mantenemos nombre
+   resultado = cliente
+  ELSE 'es portatil anexamos nombre clase
+   resultado = servidor & "--" & cliente
+  ENDIF 
+  
+  RETURN resultado
+  
+END
+
+PRIVATE SUB publicar(aula AS String, nombre AS String, direccion AS String, mac AS String)
+DIM texto AS String
+DIM fichero AS String
+DIM dato AS String
+DIM ip AS String[]
+DIM dirip AS String
+DIM nombrefinal AS String
+
+ fichero = "/tmp/temporalscan"
+
+'esto es porque a veces se meten direcciones ipv6  
+  IF (Left(direccion, 7) = "192.168") THEN 
+   texto = direccion & "#" & mac
+  ELSE 
+   'Hay que resolverlo a mano
+   SHELL "avahi-resolve-host-name -4 " & nombre & ".local > " & fichero WAIT
+
+   TRY dato = File.Load(fichero)
+      
+   'si el dato es vacio
+    IF (dato <> "") THEN 
+      ip = Split(dato, "\t")
+      dirip = Left(ip[1], Len(ip[1]) - 1)
+    ELSE 
+      dirip = "no-ip"
+    ENDIF 
+   
+   texto = dirip & "#" & mac
+  
+  ENDIF 
+   nombrefinal = esportatil(aula, nombre)
+   SHELL "avahi-publish-service -f " & nombrefinal & " _scanies._tcp 9013 " & texto & " 2>/dev/null &" WAIT 
+  
+END
+
+
+PUBLIC SUB borrar(nombre AS String)
+DIM fichero AS String
+DIM buscar AS String
+
+    fichero = "/tmp/buscar"
+    
+    buscar = nombre & " _scanies._tcp"
+   
+    'lo borro de la red
+    SHELL "ps aux | grep \"" & buscar & "\" | grep -v grep | awk '{print $2}' > " & fichero WAIT 
+    'TRY pid = File.Load(fichero)
+    SHELL "kill -9 `cat " & fichero & "` 2>/dev/null" WAIT 
+                  
+  
+END
+
+
+
+PUBLIC SUB process_read()
+DIM cadena AS String
+DIM campos AS String[]
+DIM mascampos AS String[]
+DIM nombre AS String
+DIM direccionip AS String
+DIM mac AS String
+DIM pid AS String
+DIM nombreservidor AS String
+DIM failedtemp AS String
+DIM failedhost AS String
+DIM aula AS String[]
+
+
+  nombreservidor = Trim(System.host)
+  aula = Split(nombreservidor, ".")
+  
+     
+  TRY LINE INPUT #LAST, cadena
+  
+  IF NOT (Left(cadena, 6) = "Failed") THEN 'si no hay fallo se analiza
+     
+       campos = Split(cadena, ";")
+   
+             IF (campos[0] = "=") THEN 'esta encendido
+   
+               direccionip = campos[7]
+               mascampos = Split(campos[3], "\\") 
+               mac = obtener_mac(mascampos)
+               
+               'publicar
+               publicar(aula[0], mascampos[0], direccionip, mac)           
+               
+   
+             ELSE IF (campos[0] = "-") THEN 'se apaga
+   
+               'fichero = "/tmp/buscar"
+               mascampos = Split(campos[3], "\\")
+               
+               'componer nombre
+               nombre = esportatil(aula[0], mascampos[0])
+               'borrar
+               borrar(nombre)
+                            
+             ELSE 'descartamos 
+              PRINT "Log1 (+): " & cadena 
+             ENDIF 
+  ELSE 
+   'formato es: Failed to resolve service 'nombre-equipo [00:30:05:42:26:35]' of type ... 
+   campos = Split(cadena, " ")
+   failedtemp = campos[4]
+   'obtener solo el nombre
+   mascampos = Split(failedtemp, " ")
+   failedhost = Right(mascampos[0], Len(mascampos[0]) - 1)
+   'y borrar de la lista 
+   nombre = esportatil(aula[0], failedhost)
+   borrar(nombre)
+   
+  ENDIF  
+   
+END
+
+
+PUBLIC SUB _free()
+  
+  proceso.Kill
+  
+END
Index: aplicaciones/scanies-ltsp/trunk/.settings
===================================================================
--- aplicaciones/scanies-ltsp/trunk/.settings	(nonexistent)
+++ aplicaciones/scanies-ltsp/trunk/.settings	(revision 530)
@@ -0,0 +1,21 @@
+[Breakpoints]
+Count=0
+
+[DebugWindow]
+Count=0
+
+[FFind]
+SearchIn="Module"
+CaseSensitive=False
+SearchWord=False
+SearchComment=False
+SearchString=True
+
+[OpenFile]
+File[1]="scaniesltsp.class:150.15"
+Active=1
+Count=1
+
+[Watches]
+Count=0
+

Property changes on: aplicaciones/scanies-ltsp/trunk/.settings
___________________________________________________________________
Added: svn:executable
Index: aplicaciones/etiquetas-portatiles/LEEME
===================================================================
--- aplicaciones/etiquetas-portatiles/LEEME	(nonexistent)
+++ aplicaciones/etiquetas-portatiles/LEEME	(revision 530)
@@ -0,0 +1 @@
+Repositorio movido a https://github.com/manumora/laptop-labels
Index: aplicaciones/autoclone/trunk/Server/main.py
===================================================================
--- aplicaciones/autoclone/trunk/Server/main.py	(nonexistent)
+++ aplicaciones/autoclone/trunk/Server/main.py	(revision 530)
@@ -0,0 +1,70 @@
+import ZeroconfService
+from BaseHTTPServer import HTTPServer
+import logging
+import os
+import time
+import WebServer
+import MyUtils
+import threading
+
+LOG_FILENAME = "/var/log/autocloneserver.log"
+rootPath = "/var/lib/autocloneserver"
+downloadsPath = rootPath + "/www/"
+portWebServer = 8000
+classroomName = MyUtils.getClassroomName()
+
+logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
+
+def checkmd5File(pathFileName):
+	md5File = pathFileName+'.md5'
+	if not os.path.isfile(md5File):
+		md5Hash = MyUtils.getMD5Hash(pathFileName+'.iso')
+		f = open(md5File, 'wt')
+		f.write(md5Hash)
+		f.close()
+
+# publish files (Avahi)
+def publishFiles():
+	published = []
+
+	while True:
+		listFiles = os.listdir(downloadsPath)
+		for i in listFiles:
+			if os.path.isfile(downloadsPath + i) and i.endswith('.iso'):
+				fileName = MyUtils.getFileName(os.path.basename(i))
+				pathFileName = downloadsPath + fileName
+
+				checkmd5File(pathFileName)
+
+				service = ZeroconfService.ZeroconfService(name = str(portWebServer)+"@"+i, port=3000, stype = "_autoclone_"+classroomName+"._tcp") #, domain="replicant", host="localhost", text="Esto es una prueba")
+				service.publish()
+
+				published.append(service)
+
+		time.sleep(300) #refresh in seconds
+		for i in published:
+			i.unpublish()
+
+# Start web server
+def startWebServer():
+	server = HTTPServer(('', portWebServer), WebServer.MyHandler)
+	server.serve_forever()
+
+
+if __name__ == '__main__':
+
+	if not os.path.exists(rootPath):
+		os.mkdir(rootPath)
+
+	if not os.path.exists(downloadsPath):
+		os.mkdir(downloadsPath)
+
+	t = threading.Thread(target=publishFiles)  
+	t.start()  
+
+	t2 = threading.Thread(target=startWebServer)  
+	t2.start()  
+
+	
+#server.socket.close()
+#service.unpublish()
Index: aplicaciones/autoclone/trunk/Server/WebServer.py
===================================================================
--- aplicaciones/autoclone/trunk/Server/WebServer.py	(nonexistent)
+++ aplicaciones/autoclone/trunk/Server/WebServer.py	(revision 530)
@@ -0,0 +1,25 @@
+from BaseHTTPServer import BaseHTTPRequestHandler
+import os
+import shutil
+import MyUtils
+
+class MyHandler(BaseHTTPRequestHandler):
+
+	def do_GET(self):
+		try:
+			if self.path.endswith(".iso") or self.path.endswith(".md5"):
+				file = "/var/lib/autocloneserver/www/" + self.path
+				f = open(file)
+				s = os.path.getsize(file)
+
+				self.send_response(200)
+				self.send_header('Content-type', MyUtils.getMimeType(self.path))
+				self.send_header('Content-Length', s)
+				self.end_headers()
+
+				shutil.copyfileobj(f, self.wfile)
+				f.close()
+				return
+            
+		except IOError:
+			pass
Index: aplicaciones/autoclone/trunk/Server/MyUtils.py
===================================================================
--- aplicaciones/autoclone/trunk/Server/MyUtils.py	(nonexistent)
+++ aplicaciones/autoclone/trunk/Server/MyUtils.py	(revision 530)
@@ -0,0 +1,39 @@
+import hashlib
+import os
+import socket
+
+def getMD5Hash(file, block_size=2**20):
+	f = open(file)
+	md5 = hashlib.md5()
+	while True:
+		data = f.read(block_size)
+		if not data:
+				break
+		md5.update(data)
+	md5Hash = md5.hexdigest()
+	return md5Hash
+
+
+def getFileName(file):
+	basename = os.path.basename(file) 
+	filename = os.path.splitext(basename) 
+	return filename[0]
+
+
+def getMimeType(path):
+	if path.endswith(".iso"):
+		return "application/x-iso9660-image"
+	elif path.endswith(".md5"):
+		return "text/plain"
+
+def getClassroomName():
+	name = socket.gethostname()
+	classname="noclassroomname" 
+	hostname=name.strip().split('.')[0].replace('_','-')
+	items=hostname.split('-')
+
+	if len(items)==2:
+		if len(items[1])==3 and (items[1].upper()=='PRO' or items[1][:1].upper()=='O'):
+			classname= items[0]
+
+	return classname
Index: aplicaciones/autoclone/trunk/Server/ZeroconfService.py
===================================================================
--- aplicaciones/autoclone/trunk/Server/ZeroconfService.py	(nonexistent)
+++ aplicaciones/autoclone/trunk/Server/ZeroconfService.py	(revision 530)
@@ -0,0 +1,27 @@
+import avahi
+import dbus
+
+__all__ = ["ZeroconfService"]
+
+class ZeroconfService:
+
+    def __init__(self, name, port, stype="_http._tcp", domain="", host="", text=""):
+        self.name = name
+        self.stype = stype
+        self.domain = domain
+        self.host = host
+        self.port = port
+        self.text = text
+    
+    def publish(self):
+        bus = dbus.SystemBus()
+        server = dbus.Interface(bus.get_object(avahi.DBUS_NAME, avahi.DBUS_PATH_SERVER), avahi.DBUS_INTERFACE_SERVER)
+
+        g = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.EntryGroupNew()), avahi.DBUS_INTERFACE_ENTRY_GROUP)
+        g.AddService(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC,dbus.UInt32(0), self.name, self.stype, self.domain, self.host, dbus.UInt16(self.port), self.text)
+
+        g.Commit()
+        self.group = g
+    
+    def unpublish(self):
+        self.group.Reset()
Index: aplicaciones/autoclone/trunk/Client/avahiClient.py
===================================================================
--- aplicaciones/autoclone/trunk/Client/avahiClient.py	(nonexistent)
+++ aplicaciones/autoclone/trunk/Client/avahiClient.py	(revision 530)
@@ -0,0 +1,63 @@
+import dbus, gobject, avahi
+from dbus import DBusException
+from dbus.mainloop.glib import DBusGMainLoop
+from string import split
+import logging
+import os, time
+from urlgrabber.grabber import URLGrabber
+
+LOG_FILENAME = '/var/log/autoclone.log'
+TYPE = "_autoclone_noclassroomname._tcp"
+files = {}
+logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
+
+
+def downloadFile(fileToDownload, source, port):
+	if not os.path.exists(fileToDownload):
+		g = URLGrabber()
+	else:
+		g = URLGrabber(reget="simple")
+
+	url = "http://"+source+":"+port+"/"+fileToDownload
+
+	try:
+		local_filename = g.urlgrab(url)
+	except:
+		logging.debug("No se puede realizar la descarga de "+fileToDownload+" desde "+source+":"+port)
+		time.sleep(600) 
+
+
+def service_resolved(*args):
+	val = str(args[2]).split("@")
+	files[val[1]] = {'address' : str(args[7]), 'port': str(val[0])}
+
+	if len(files)>0:
+		for i in files:
+			downloadFile(i, files[i]['address'], files[i]['port'])
+
+
+def print_error(*args):
+    print 'error_handler'
+    print args[0]
+
+def myhandler(interface, protocol, name, stype, domain, flags):
+    #print "Found service '%s' type '%s' domain '%s' " % (name, stype, domain)
+
+    if flags & avahi.LOOKUP_RESULT_LOCAL:
+            # local service, skip
+            pass
+
+    server.ResolveService(interface, protocol, name, stype, domain, avahi.PROTO_UNSPEC, dbus.UInt32(0), reply_handler=service_resolved, error_handler=print_error)
+
+
+if __name__ == '__main__':
+
+	loop = DBusGMainLoop()
+	bus = dbus.SystemBus(mainloop=loop)
+
+	server = dbus.Interface(bus.get_object(avahi.DBUS_NAME, '/'), 'org.freedesktop.Avahi.Server')
+
+	sbrowser = dbus.Interface(bus.get_object(avahi.DBUS_NAME, server.ServiceBrowserNew(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, TYPE, 'local', dbus.UInt32(0))), avahi.DBUS_INTERFACE_SERVICE_BROWSER)
+	sbrowser.connect_to_signal("ItemNew", myhandler)
+
+	gobject.MainLoop().run()
Index: aplicaciones/profEnAula/Leeme
===================================================================
--- aplicaciones/profEnAula/Leeme	(nonexistent)
+++ aplicaciones/profEnAula/Leeme	(revision 530)
@@ -0,0 +1,24 @@
+Programas necesarios:
+python-ldap
+python-reportlab
+python-wxgtk2.8
+
+Descripción
+profEnAula
+Muestra una lista con los profesores que están actualmente en clase, 
+al seleccionar cualquiera de ellos nos dice en que aula está. Requiere
+fichero horarios.xml generado por importHorarios.
+Necesario modificar en el fichero la variable passwd XXXXXX para que 
+tenga la contraseña de root de ldap.
+
+importHorarios
+Extrae los horarios desde los ficheros de horarios importados desde rayuela
+y los convierte en un xml. Es necesario ejecutarlo cada vez que 
+cambien los horarios. Para su funcionamiento requiere una carpeta 
+llamada datos colocada donde se ejecute el importHorarios, dentro 
+estarán los ficheros importados desde rayuela con nombres en minusculas
+excepto la 1ª letra en Mayusculas, deben borrarse las cabeceras de los
+ficheros dejando solo las lineas con datos.
+
+NOTA: cuando se dan de baja profesores hay que comprobar que no quedan en 
+el grupo teacher de ldap.
Index: aplicaciones/profEnAula/profEnAula.py
===================================================================
--- aplicaciones/profEnAula/profEnAula.py	(nonexistent)
+++ aplicaciones/profEnAula/profEnAula.py	(revision 530)
@@ -0,0 +1,250 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import wx
+import ldap
+import unicodedata
+from xml.etree import ElementTree
+import time
+import sys,os
+#import horarioXml11
+
+listProfesores = []
+uidNombre = {}
+
+class buscaProf(wx.Frame):
+	
+    def __init__(self, *args, **kwds):
+        kwds["style"] = wx.DEFAULT_FRAME_STYLE
+        wx.Frame.__init__(self, *args, **kwds)
+        self.sizer_1_staticbox = wx.StaticBox(self, -1, "Profesor")
+        #self.aproxList = wx.TextCtrl(self,style = wx.TE_PROCESS_ENTER)
+        self.profesores = wx.ListBox(self, -1, choices=[], style=wx.LB_SORT)
+        self.btBuscar = wx.Button(self, -1, "Refrescar")
+        self.resultado = wx.StaticText(self, -1, "")
+        self.btSalir = wx.Button(self, -1, "Salir")
+        #self.profAula()
+        self.rellenaProf()
+        self.__set_properties()
+        self.__do_layout()
+        self.Bind(wx.EVT_LISTBOX, self.buscaAula, self.profesores)        
+        self.Bind(wx.EVT_BUTTON, self.salir, self.btSalir)
+        #self.Bind(wx.EVT_TEXT, self.desplazaLista, self.aproxList)
+        ahora = time.localtime()    
+    	dia = self.diaSemana(ahora[6])    	
+    	minutos = int(ahora[3]*60+ahora[4])
+        self.Bind(wx.EVT_BUTTON, self.profAula, self.btBuscar)
+        self.rellenaProf()
+        
+        self.profAula(self)
+
+    def __set_properties(self):
+        self.SetTitle("Busca Profesor en aulas")        
+        self.SetPosition([1500,0])
+        #self.aproxList.SetToolTipString("Introduzca la inicial del nombre")
+        
+    def __do_layout(self):
+        sizer_1 = wx.StaticBoxSizer(self.sizer_1_staticbox, wx.VERTICAL)
+        grid_sizer_1 = wx.GridSizer(1, 2, 0, 0)
+        #sizer_1.Add(self.aproxList,0,wx.ADJUST_MINSIZE, 0)
+        sizer_1.Add(self.profesores, 5, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 0)
+        grid_sizer_1.Add(self.btBuscar, 0, wx.ALIGN_BOTTOM, 0)
+        grid_sizer_1.Add(self.resultado, 0, wx.ALIGN_BOTTOM, 0)
+        grid_sizer_1.Add(self.btSalir, 0, wx.ALIGN_BOTTOM, 0)
+        sizer_1.Add(grid_sizer_1, 1, wx.ADJUST_MINSIZE, 0)
+        self.SetSizer(sizer_1)
+        self.Layout()
+        self.SetSize((258, 1322))
+        
+    def salir(self,evento=None):
+        self.Close(True)
+
+    #Tecla en TxtCtrl selecciona prof de lista    
+    def desplazaLista(self,event):   	   	
+    	for i in self.listProfesores:    		
+    		if i[0] ==  self.aproxList.GetValue()[0]:
+    			print 'desplazaLista'
+        		self.profesores.SetStringSelection(i)
+        		self.aproxList.SetValue(i)
+        		break
+              
+    def elCurso(self, minutos, dia):
+        prof = self.profesores.GetStringSelection().encode('utf-8')
+        dia = raiz.find(dia + '.txt')
+        for i in dia:
+          if  i.attrib['nif'] == uidNombre[prof]:
+            profesor = i.getchildren()
+            #buscar la hora
+            for j in profesor:
+              inicio = j.get('inicio')
+              fin = j.get('fin')
+              if int(inicio) <= minutos <= int(fin):
+                curso = j.getchildren()
+                for h in curso:#curso son los alumnos co su nie
+                  #para evitar problema con alumnos que no existen
+                  try:
+                    nieAlumno = self.consulta('nie', h.get('nie'))[0]
+                  except:
+                    nieAlumno = [];continue
+                  #print nieAlumno;print 'antes nif'
+                  if nieAlumno:
+                    print 'sin error'
+                    self.cursoAlumno(nieAlumno)
+                    return 1
+                  else:
+                    print 'error'
+    #Averiguar curso de un alumno dado, busca curso por curso 
+    def cursoAlumno(self,nif):    	        	       	
+    	#COMPROBAR SI SOBRA AQUI Y QUITARLA allcurso = []
+    	for i in self.consulta('cursos',''):    		 
+    		allcurso = []  	   		
+    		allcurso.append(self.consulta('alumnocurso',i))    		
+    		for j in allcurso[0][0]: #LDAP empieza con un usuario vacio, no lo procesamos   			
+    			if j != '' and j == nif:
+					self.resultado.SetLabel('Curso: '+i)
+					#encontrado = True
+					return j
+					break						
+    
+    def buscaAula(self, event):
+    	self.resultado.SetLabel('Buscando')
+    	ahora = time.localtime()    
+    	dia = self.diaSemana(ahora[6])    	
+    	minutos = int(ahora[3]*60+ahora[4])    	    	
+        self.elCurso(minutos,dia)           	
+        event.Skip() 
+
+#Rellenar lista profesores en aula  
+    def profAula(self, event):
+      #self.rellenaProf()
+      print 'entra'
+      ahora = time.localtime()    
+      dia = self.diaSemana(ahora[6])    	
+      minutos = int(ahora[3]*60+ahora[4])
+      self.profesores.Clear()
+      nombres1 = []
+      dia = raiz.find(dia+'.txt')      
+      for i in dia:
+          profesor = i.getchildren()
+              #buscar la hora
+          for j in profesor:
+              inicio = j.get('inicio')
+              fin = j.get('fin')
+              if int(inicio) <= minutos <= int(fin):
+                for h in uidNombre:
+                  if uidNombre[h] == i.attrib['nif']:
+                    nombres1.append(h)
+      self.profesores.InsertItems(nombres1,0)
+
+										   
+    def rellenaProf(self):  
+		allTeacher = []        
+		curso = []
+		nombres = []      	  	
+		allTeacher.append(self.consulta('profesores',''))       	   	 	
+		for i in allTeacher[0][0]:
+			if i != '':
+				nombre = self.consulta('nombre',i)[0]    		
+				nombres.append(nombre)    		
+				dni =   self.consulta('nif',i)    		
+				if dni != []:    			
+					if len(dni[0]) == 9:
+						uidNombre[nombre] = dni[0]#self.consulta('nif',i)[0] 
+					else:
+						aux=dni[0]
+						for i in range(9-len(dni[0])):
+							aux= '0' + aux
+						uidNombre[nombre] = aux
+    					
+    			
+        #self.profesores.InsertItems(nombres,0)  
+		self.listProfesores = nombres
+        #print self.listProfesores
+     	
+    #Consultas a ldap
+    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
+		
+    def diaSemana(self,dia):
+      dias = ['Lunes','Martes','Miercoles','Jueves','Viernes']
+      return dias[dia]		
+
+if __name__ == "__main__":
+	rDir = os.path.split(sys.argv[0])[0]
+	print rDir
+	if rDir:
+		arbolxml = ElementTree.parse(rDir+'/horarios.xml')
+	else :
+		arbolxml = ElementTree.parse('horarios.xml')		
+	raiz = arbolxml.getroot()
+	app = wx.PySimpleApp(0)
+	wx.InitAllImageHandlers()
+	frame_1 = buscaProf(None, -1, "")
+	app.SetTopWindow(frame_1)
+	frame_1.Show()
+	app.MainLoop()

Property changes on: aplicaciones/profEnAula/profEnAula.py
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: aplicaciones/profEnAula/importHorarios.py
===================================================================
--- aplicaciones/profEnAula/importHorarios.py	(nonexistent)
+++ aplicaciones/profEnAula/importHorarios.py	(revision 530)
@@ -0,0 +1,112 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#       horarioXml.py
+#       
+#       Copyright 2011 Juan Antonio  Cristín<programador@informatico>
+#       
+#       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.
+
+from xml.etree import ElementTree
+from xml.dom.minidom import parse
+import sys,os,time,errno,re
+
+#De linea rayuela crea diccionario
+def extraeDatosLineaRayuela(linea,dia):	
+	datos = linea.split("|")	
+	return { "dni_profesor" : datos[0], "nie_alumno" : datos[1], "inicio" : int(datos[2]), "final" : int(datos[3]), "dia": dia}	
+
+def transformaArchivos(datosrayuela):
+	#comprobar que existe dir y q contiene los ficheros y limpiar linea de los for	
+	if os.path.isdir(datosrayuela):
+		try:
+			archivosRayuela = os.listdir(datosrayuela)
+		except:			
+			return 3
+	print datosrayuela	
+	#Limpiemos las listas de archivos 
+	archivosRayuela = [ archivo for archivo in archivosRayuela if archivo in ["Lunes.txt","Martes.txt","Miercoles.txt","Jueves.txt","Viernes.txt"]]			
+	listaLineas = []	
+	#Procesemos cada archivo de Rayuela
+	for archivoRayuela in archivosRayuela:		
+		filearchivoRayuela = open(os.path.join(datosrayuela,archivoRayuela), 'r')		
+		while True:
+			linea = filearchivoRayuela.readline()							
+			if not linea:
+				break
+			if linea[:6] == "D.N.I.":				
+				continue			
+			datosLineaRayuela = extraeDatosLineaRayuela(linea,archivoRayuela)
+			listaLineas.append(datosLineaRayuela)								
+		filearchivoRayuela.close()
+	return listaLineas
+
+
+#Parametro indice 6 de tupla resultado de: time.localtime()
+def diaSemana(dia):
+	dias = ['Lunes','Martes','Miercoles','Jueves','Viernes']
+	return dias[dia]	
+
+def main():	
+	dias = []
+	ahora = time.localtime()
+	minutoActual = int(ahora[3]*60+ahora[4])
+	diadeSemana = diaSemana(ahora[6])
+	filexml = open('horarios.xml','w')
+	filexml.write("""<?xml version='1.0' encoding='UTF-8'?>
+				   <horarios></horarios>""")
+	filexml.close()	
+	arbolxml = ElementTree.parse('horarios.xml')	
+	raiz = arbolxml.getroot()
+	rDir = os.path.split(sys.argv[0])[0]
+	print rDir
+	if rDir:
+		lineas = transformaArchivos(rDir + "/datos")		
+	else :
+		lineas = transformaArchivos("datos")		
+	for i in lineas:
+		#cada dia un fichero
+		diaProcesado = i['dia']			
+		# = i['dni_profesor']
+		nif = i['dni_profesor'][0:9]
+		inicio = i['inicio']
+		final = i['final']
+		niealumno = i['nie_alumno']
+		inicioFinal = [str(inicio),str(final)]
+		#nuevo (nodo) fichero de dia
+		if not diaProcesado in dias:
+				dia = ElementTree.SubElement(raiz,diaProcesado)
+				dias.append(diaProcesado)
+				profesores = []
+		#nuevo nodo profesor para un dia			
+		if not nif in profesores:
+			profesores.append(nif)			
+			profesor = ElementTree.SubElement(dia,'profesor',{'nif':nif})									
+			horas = []											
+		#nuevo nodo hora
+		if not inicioFinal in horas:
+			alumnos = []								
+			horas.append(inicioFinal)				
+			#comprobar en el nodo si es el 1º hijo
+			hora = ElementTree.SubElement(profesor,'hora',{'inicio':str(inicio),'fin':str(final)})	
+		#nuevo nodo alumno		
+		if not niealumno in alumnos:
+			addAlum = ElementTree.SubElement(hora,'alumno')	
+			addAlum.set('nie',niealumno[0:7])
+		alumnos.append(niealumno)
+	arbolxml.write('horarios.xml', encoding='UTF-8')		
+	return 0
+
+if __name__ == '__main__': main()

Property changes on: aplicaciones/profEnAula/importHorarios.py
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/portatiles/autorename/LEEME
===================================================================
--- scripts/portatiles/autorename/LEEME	(nonexistent)
+++ scripts/portatiles/autorename/LEEME	(revision 530)
@@ -0,0 +1 @@
+Repositorio movido a http://github.com/manumora/autorename
