File: parsequeue.py

package info (click to toggle)
doc-rfc 20201128-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye
  • size: 1,307,124 kB
file content (15 lines) | stat: -rwxr-xr-x 430 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python3

## Extracts the list of document filenames from the queue2.xml file
## (http://www.rfc-editor.org/queue2.xml, and see
## http://www.rfc-editor.org/about/queue/ for details).

import xml.etree.ElementTree as ET
import sys

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

queue = ET.parse(sys.argv[1])

for draft in queue.findall('./queue:section/queue:entry/queue:draft', ns):
  print(draft.text)