Changeset 9823 for src/django_gheat
- Timestamp:
- Dec 23, 2011, 9:16:20 AM (13 years ago)
- Location:
- src/django_gheat
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/fabfile.py
r9817 r9823 41 41 run("./manage.py sqlreset gheat | ./manage.py dbshell") 42 42 sudo("./import_scan_data.sh", user='wlrobot') 43 sudo("svn up ../genesis", user='w lrobot')44 sudo("../genesis/tools/genesis-to-yaml.pl", user='w lrobot')45 sudo("../genesis/tools/gformat.py cleanup", user='w lrobot')43 sudo("svn up ../genesis", user='www') 44 sudo("../genesis/tools/genesis-to-yaml.pl", user='www') 45 sudo("../genesis/tools/gformat.py cleanup", user='www') 46 46 run("../genesis/tools/gformat.py full-export | ./manage.py import_nodes -") -
src/django_gheat/gheat/management/commands/import_datafile.py
r9819 r9823 123 123 apparatuur, created = Apparatuur.objects.get_or_create(kaart=options['kaart']) 124 124 125 # Meetrondje is deducted and checked from first filename 126 filename = args[0] 127 logger.info("Processing '%s'" % filename) 128 meetrondje, created = MeetRondje.objects.get_or_create( 129 datum=get_date(filename), naam=get_meetrondje(filename), 130 gebruiker=gebruiker, apparatuur=apparatuur) 131 if not options['force'] and not created: 132 raise CommandError("Meetrondje '%s' already imported", meetrondje) 133 125 134 # Check if all files are valid 126 135 for filename in args: 127 logger.info("Processing '%s'" % filename)128 meetrondje, created = MeetRondje.objects.get_or_create(129 datum=get_date(filename), naam=get_meetrondje(filename),130 gebruiker=gebruiker, apparatuur=apparatuur)131 if not options['force'] and not created:132 logger.error("Meetrondje '%s' already imported", meetrondje)133 continue134 135 136 logger.info('Meetrondje: %s', meetrondje) 136 137 meetbestand = MeetBestand(meetrondje=meetrondje,is_imported=True) -
src/django_gheat/import_scan_data.sh
r9777 r9823 59 59 done 60 60 61 #Kismet netxml Imports62 FILES="`find $DATAROOT -name '*netxml*' | sort`"63 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES64 65 61 # Import all measure data 66 62 for USERDIR in `find $DATAROOT -mindepth 1 -maxdepth 1 -type d | sort`; do … … 70 66 ARGS="-g $USERNAME -e $USERNAME@wirelessleiden.nl -k $DEVICE" 71 67 68 echo "# INFO: Processing $USERNAME/$DEVICE" 72 69 # DroidStumber imports 73 70 FILES=`find $DEVICEDIR -name 'ScanResult-*'` 74 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES 71 if [ -n "$FILES" ]; then 72 $MANAGE import_datafile $ARGS $FILES 73 fi 75 74 76 #Kismet gpsxmlImports75 #Kismet Imports 77 76 FILES="`find $DEVICEDIR -name '*gpsxml*'`" 78 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES 77 for GPSXML in $FILES; do 78 NETXML=`echo $GPSXML | sed 's/gpsxml/netxml/g' ` 79 $MANAGE import_datafile $ARGS $NETXML $GPSXML 80 done 79 81 80 # Kismetimports82 # NetStumbler imports 81 83 FILES=`find $DEVICEDIR -name '*.ns1'` 82 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES 84 if [ -n "$FILES" ]; then 85 $MANAGE import_datafile $ARGS $FILES 86 fi 83 87 done 84 88 done
Note:
See TracChangeset
for help on using the changeset viewer.