FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// ====== Multistation data records browser - bzbrowser ====== Bzbrowser application is dedicated to browsing data records from [[cs:servers|storage servers]]. Currently it generates screenshots as a strip of records sorted by time. ===== Installation ===== sudo apt-get install libsdl2-dev git python-numpy python-versiontools sudo easy_install pysdl2 git clone https://github.com/bolidozor/bzbrowser.git cd bzbrowser python bzbrowser.py ===== Internal functioning ===== SnapshotCollection class gets requests for time interval that should cover the snapshots (the so called cover method) and checks what area has already been covered. If there is an interval missing that should be covered, the class calls a get_snapshots from [[en:bzpost|bzpost]] and the individual snapshots are put into a function (self.sink) - this process is done in a different thread that is created especially for it, so the call will not block the cover and the program will respond to scrolling or other actions. In main, the class V mainu se té třídě jako sink, tedy funkce, kterou to má na každý nový snapshot zavolat, předá spuštění funkce put_up_snapshot zase v jiném vlákně (řádek 122). put_up_snapshot ten snapshot podle url stáhne, převede na obrázek a poté se předá té knihovně SDL, aby se mohl vykreslovat - to se ale musí udělat v hlavním vlákně, jinak by to SDL nezvládla, proto se vyrobí funkce finish a předá funkci run_on_main. finish se potom spustí na řádku 143.