Import History Visualized by Code Swarm

Talk about random things WiFiDB related, either new things, concepts, or issues to work out in code.
Post Reply
User avatar
Posts: 406
Joined: Mon Oct 22, 2007 8:38 am
Location: The Universe

Import History Visualized by Code Swarm

Post by pferland »

CodeSwarm Github page:
The Fork I used:

YouTube Video:

Code to gather data for use: ...
To use you will need a modified config file from the current stable version of WiFiDB in a ini format. the python script is made to use config.ini but the current incarnation of WiFiDB uses
There is also a php version of the script that is quite a bit older, that I have not updated as of yet. So it may or may not work.

Link to Sample config.ini file for people that want to convert their to config.ini to be used for the script:
Daemon Config.ini: ... Config.ini
www config.ini:

Now for the description. – Connects to the WiFiDB SQL server and extracts the Imports. The only files used from the rest of the project for this script is the [wifidb/tools]/config/config.ini and [wifidb/www]/lib/config.ini files. Grabs the import date/time, Import Author, and AP ID’s and puts them into the events.xml file to be used by codeswarm. Next version is going to be updated to work with the dev version of the SQL server, and also use the API to grab the data so people do not need direct access to the SQL server.

Sample of Events.xml

Code: Select all

<?xml version="1.0"?>
<event date="1386700719000" filename="244556.wpa" author="glr" />
<event date="1386700719000" filename="" author="glr" />
<event date="1386700719000" filename="244558.wep" author="glr" />

Events.xml is generated by the script. Each event has a timestamp in seconds, the filename is the AP ID and the security type for the AP, author is the Import Author.


Code: Select all

ColorAssign1="WEP", ".*wep.*", 0,0,255, 0,0,255
ColorAssign2="WPA", ".*wpa.*", 0,255,255, 0,255,255
ColorAssign3="Open", ".*open.*", 255,0,0, 255,0,0

Only three CollorAssign# labels are supported for WiFiDB imports right now, wep, wpa, and open. The color for each is set at the end of each row, put the same RGB color twice.
TakeSnapshots is required, otherwise the frames that are generated are not stored, and then we cannot generate a video from the frames.

Browse to the path that is holding the generated PNG files, and run:

Code: Select all

ffmpeg -r 10/1 -pattern_type glob -i '*.png' -c:v libx264 out.mp4
Options Breakdown:
  • -r 10/1 = 10 frames per second (10 images shown per second)
    -pattern_type glob = Use the * for the pattern-I ‘*.png’ Input file is a pattern based png image.
    -vcodec libx264 = Use the x264 codec
    out.mp4 =The output file
The best acceleration you can get on a Mac is 9.8ms^2
Post Reply