diff --git a/ietf/iesg/urls.py b/ietf/iesg/urls.py index c03f07710..298a72bf2 100644 --- a/ietf/iesg/urls.py +++ b/ietf/iesg/urls.py @@ -57,6 +57,7 @@ urlpatterns += patterns('', (r'^agenda/agenda_package.txt$', views.agenda_package), (r'^agenda/documents.txt$', views.agenda_documents_txt), (r'^agenda/documents/$', views.agenda_documents), + (r'^agenda/telechat-(?P<year>\d+)-(?P<month>\d+)-(?P<day>\d+)-docs.tgz', views.agenda_downloaddocstgz), (r'^discusses/$', views.discusses), (r'^telechatdates/$', views.telechat_dates), url(r'^wgactions/$', views.working_group_actions, name="iesg_working_group_actions"), diff --git a/ietf/iesg/views.py b/ietf/iesg/views.py index eae9d62a8..4e913ec1b 100644 --- a/ietf/iesg/views.py +++ b/ietf/iesg/views.py @@ -50,6 +50,7 @@ from ietf.idrfc.utils import update_telechat from ietf.ietfauth.decorators import group_required from ietf.idtracker.templatetags.ietf_filters import in_group import datetime +import tarfile def date_threshold(): """Return the first day of the month that is 185 days ago.""" @@ -296,6 +297,19 @@ def agenda_documents(request): telechats.append({'date':date, 'docs':res}) return direct_to_template(request, 'iesg/agenda_documents.html', {'telechats':telechats, 'hide_telechat_date':True}) +def agenda_downloaddocstgz(request,year,month,day): + date=datetime.date(int(year),int(month),int(day)) + docs= IDInternal.objects.filter(telechat_date=date, primary_flag=1, agenda=1) + response = HttpResponse(mimetype='application/octet-stream') + response['Content-Disposition'] = 'attachment; filename=telechat-%s-%s-%s-docs.tgz'%(year, month, day) + tarstream = tarfile.open('','w:gz',response) + for doc in docs: + tarstream.add(os.path.join(settings.INTERNET_DRAFT_PATH, doc.draft.filename+"-"+doc.draft.revision_display()+".txt"), + doc.draft.filename+"-"+doc.draft.revision_display()+".txt") + tarstream.close() + return response + + def discusses(request): positions = Position.objects.filter(discuss=1) res = [] diff --git a/ietf/templates/iesg/agenda_documents.html b/ietf/templates/iesg/agenda_documents.html index 9ae0c5e26..a64b7f346 100644 --- a/ietf/templates/iesg/agenda_documents.html +++ b/ietf/templates/iesg/agenda_documents.html @@ -82,6 +82,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <tr class="header"><td colspan="5"><a href="/iesg/agenda/">Full IESG Agenda</a></td></tr> {% endif %} +<tr class="header"><td colspan="5"><a href="/iesg/agenda/telechat-{{t.date|date:"Y"}}-{{t.date|date:"m"}}-{{t.date|date:"d"}}-docs.tgz">Download Documents</a></td></tr> + <tr class="header"><td colspan="5">2. Protocol Actions</td></tr> <tr class="header"><td colspan="5">2.1 WG Submissions</td></tr>