diff options
author | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2017-03-23 07:40:07 +0000 |
---|---|---|
committer | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2017-03-23 07:40:07 +0000 |
commit | b1b0d75831b3d81c41549358dde122b9fba0c054 (patch) | |
tree | 3739ed871351b062c55e116c92fed72f3197aed9 /kpov_judge/tasks/vlc_stream_rtp | |
parent | 34384f9ea87355fada45d74b3637b9405c75dea8 (diff) |
the edit_find_grep_compile_convert task now works
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@407 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks/vlc_stream_rtp')
-rw-r--r-- | kpov_judge/tasks/vlc_stream_rtp/task.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/kpov_judge/tasks/vlc_stream_rtp/task.py b/kpov_judge/tasks/vlc_stream_rtp/task.py index 4ae435d..ea9b905 100644 --- a/kpov_judge/tasks/vlc_stream_rtp/task.py +++ b/kpov_judge/tasks/vlc_stream_rtp/task.py @@ -9,12 +9,11 @@ instructions = { 'si':u""" Postavi navidezni računalnik SimpleArbiter z diska simpleArbiter ter StudentVLC z diska student-VLC. Poskrbi, da bosta na istem omrežju, od -koder bosta imela dostop tudi do Interneta -Na StudentVLC posodobi datoteko /etc/apt/sources.list, preveri posodobitve in -naloži VLC. +koder bosta imela dostop tudi do Interneta Na StudentVLC posodobi datoteko +/etc/apt/sources.list, preveri posodobitve in naloži VLC. Posnemi ali kako drugače ustvari film ter poskrbi, da bo film dostopen na -lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}. +lokalnem omrežju prek RTP z imenom toka {TOK} na naslovu {NASLOV}, vrata {PORT}. Računaj, da bodo film lahko videli tvoji sošolci. Kršenje avtorskih pravic je pri reševanju te naloge strogo prepovedano. """, @@ -27,7 +26,7 @@ VLC. Record or otherwise create a movie and make sure the movie is avaliable on your local network via RTP with the name of the stream {TOK} at the address -{NASLOV}. +{NASLOV} on port {PORT}. Take into account that the movie may be seen by your classmates. Copyright infrigement while solving this task is strictly prohibited. @@ -102,15 +101,19 @@ def task_check(results, params): p1_d = p1_l[1:-1] p1_s = "" for i in p1_d: - p1_s += "".join([j for j in i.split(' ')[1:]]) - sname = "".join([ hex(ord(i))[2:] for i in params['TOK']]) + p1_s = p1_s + "".join([j.strip() for j in i.split(' ')[1:]]) + sname = "".join([hex(ord(i))[2:] for i in params['TOK']]) if p1_s.find(sname) > 2: score += 5 - s = "IP [^ ]* > {}.{}: UDP, length [0-9]+\n\r".format( + else: + hints.append("stream name not found in stream announcement") + s = "IP [^ ]* > {}.{}: UDP, length [0-9]+".format( re.escape(params['NASLOV']), params['PORT']) if re.search(s, results['tcpdump']): score += 5 + else: + hints.append("RTP stream not detected in " + results['tcpdump']) return score, hints def prepare_disks(templates, task_params, global_params): |