Skip to content

Commit e37a2c9

Browse files
authored
fix: stop linking to pdfized txt at the rfc editor site (ietf-tools#10873)
* fix: stop linking to pdfized txt at the rfc editor site * test: adjust tests to match
1 parent 4165235 commit e37a2c9

3 files changed

Lines changed: 2 additions & 13 deletions

File tree

ietf/doc/feeds.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,6 @@ def item_extra_kwargs(self, item):
234234
"is_format_of": self.item_link(item),
235235
}
236236
)
237-
if item.rfc_number not in [571, 587]:
238-
media_contents.append(
239-
{
240-
"url": f"https://www.rfc-editor.org/rfc/pdfrfc/{item.name}.txt.pdf",
241-
"media_type": "application/pdf",
242-
"is_format_of": self.item_link(item),
243-
}
244-
)
245237
else:
246238
media_contents.append(
247239
{

ietf/doc/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,9 +2093,9 @@ def test_rfc_feed(self):
20932093
self.assertEqual(len(q("item")), 3)
20942094
item = q("item")[0]
20952095
media_content = item.findall("{http://search.yahoo.com/mrss/}content")
2096-
self.assertEqual(len(media_content), 3)
2096+
self.assertEqual(len(media_content), 2)
20972097
types = set([m.attrib["type"] for m in media_content])
2098-
self.assertEqual(types, set(["text/plain", "text/html", "application/pdf"]))
2098+
self.assertEqual(types, set(["text/plain", "text/html"]))
20992099

21002100
def test_state_help(self):
21012101
url = urlreverse('ietf.doc.views_help.state_help', kwargs=dict(type="draft-iesg"))

ietf/doc/utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,9 +1274,6 @@ def build_file_urls(doc: Union[Document, DocHistory]):
12741274
label = "plain text" if t == "txt" else t
12751275
file_urls.append((label, base + doc.name + "." + t))
12761276

1277-
if "pdf" not in found_types and "txt" in found_types:
1278-
file_urls.append(("pdf", base + "pdfrfc/" + doc.name + ".txt.pdf"))
1279-
12801277
if "txt" in found_types:
12811278
file_urls.append(("htmlized", urlreverse('ietf.doc.views_doc.document_html', kwargs=dict(name=doc.name))))
12821279
if doc.tags.filter(slug="verified-errata").exists():

0 commit comments

Comments
 (0)