You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
in vote, such as http://oknesset.org/vote/6196/ it would be nice to have a link to the relevant part in the plenum protocol http://oknesset.org/plenum/7678/ - the correct plenum meeting can be easily found by date (there is only 1 plenum protocol per day. possible edge case - votes that are after midnight might be in the plenum protocol of the previous date! need to check this). the relevant part inside the protocol may be found by using vote.vote_number, and matching it against a protocol part header (see below).
from datetime import date
p = Committee.objects.get(name='Plenum')
// p is the plenum "committee" object.
m = p.meetings.get(date=date(2013, 03, 19))
// m is the meeting object. m.protocol_text is a bulb of text of the protocol, m.parts is the protocol, parsed to small chunks.
parts = m.parts.filter(header__contains=u'הצבעה')
// these are all the parts that have הצבעה in their name. each should also have a number. just find the one where the number matches vote.vote_number. we'll assume we put it in the variable part
part.get_absolute_url should give you the direct link to it.
The link should be added using the Links app. need to make sure it is presented in the vote page.
Link.objects.create(...)
This whole thing should be written as a management command, with options to run it on all the votes in the db, or just on votes from last x days.
The text was updated successfully, but these errors were encountered:
Hi Ori!
Just checked the issue.
In the example protocol (http://oknesset.org/plenum/7814/), just above where it says "הישיבה השישים-ושתיים של הכנסת התשע-עשרה", the number of plenum is actually given, in gematria!
For example, in that protocol it says ישיבה ס"ב. I believe that given this detail, we might not be needing a conversion library. A Python dictionary or similar to map between the Heb letters and their values should be sufficient then, correct?
in vote, such as http://oknesset.org/vote/6196/ it would be nice to have a link to the relevant part in the plenum protocol http://oknesset.org/plenum/7678/ - the correct plenum meeting can be easily found by date (there is only 1 plenum protocol per day. possible edge case - votes that are after midnight might be in the plenum protocol of the previous date! need to check this). the relevant part inside the protocol may be found by using vote.vote_number, and matching it against a protocol part header (see below).
from datetime import date
p = Committee.objects.get(name='Plenum')
// p is the plenum "committee" object.
m = p.meetings.get(date=date(2013, 03, 19))
// m is the meeting object. m.protocol_text is a bulb of text of the protocol, m.parts is the protocol, parsed to small chunks.
parts = m.parts.filter(header__contains=u'הצבעה')
// these are all the parts that have הצבעה in their name. each should also have a number. just find the one where the number matches vote.vote_number. we'll assume we put it in the variable part
part.get_absolute_url should give you the direct link to it.
The link should be added using the Links app. need to make sure it is presented in the vote page.
Link.objects.create(...)
This whole thing should be written as a management command, with options to run it on all the votes in the db, or just on votes from last x days.
The text was updated successfully, but these errors were encountered: