File: makequeue.py

package info (click to toggle)
doc-rfc 20170121-1
  • links: PTS, VCS
  • area: non-free
  • in suites: stretch
  • size: 541,932 kB
  • ctags: 32
  • sloc: xml: 267,963; sh: 101; python: 90; perl: 42; makefile: 13
file content (15 lines) | stat: -rwxr-xr-x 484 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python

# Builds the rfc-queue.txt file based on available files and queue2.xml.

import xml.etree.ElementTree as ET
import os

ns = {'queue': 'http://www.rfc-editor.org/rfc-editor-queue'}

queue = ET.parse('../extra/queue2.xml')

with open('rfc-queue.txt', 'w') as out:
  for draft in queue.findall('./queue:section/queue:entry/queue:draft', ns):
    have = "" if os.path.exists('../extra/%s' % draft.text) else "[missing] ";
    print >> out, "%s%s" % (have, draft.text)