Subject: [Tools-discuss] Python code to strip headers and footers

From: Eric Rescorla <[email-masked]>
Date: Fri, 18 Aug 2017 06:16:02 -0700

Does anyone happen to have a piece of python code that strips draft headers
and footers? Thought I'd ask before I wrote something.

-Ekr

---

From: "Eggert, Lars" <[email-masked]>
Date: Fri, 18 Aug 2017 13:31:18 +0000

On 2017-8-18, at 15:16, Eric Rescorla <[email-masked]> wrote:
> Does anyone happen to have a piece of python code that strips draft headers and footers? Thought I'd ask before I wrote something.

https://trac.tools.ietf.org/tools/rfcstrip/about

Henrik to the rescue.

Lars

---

From: Eric Rescorla <[email-masked]>
Date: Fri, 18 Aug 2017 06:45:23 -0700

Heh. That's the same (or similar) awk code in rfcdiff, which I ended up
ripping off.

I should have specified pure python :)

-Ekr

On Fri, Aug 18, 2017 at 6:31 AM, Eggert, Lars <[email-masked]> wrote:

> > Does anyone happen to have a piece of python code that strips draft
> headers and footers? Thought I'd ask before I wrote something.
>

---

From: Robert Sparks <[email-masked]>
Date: Fri, 18 Aug 2017 09:59:59 -0500

You might look in the source for id2xml (pip install id2xml).

(Henrik is on vacation until next week - he can probably aim you at 
exactly where to look when he gets back).

RjS

On 8/18/17 8:45 AM, Eric Rescorla wrote:
> Heh. That's the same (or similar) awk code in rfcdiff, which I ended 
> up ripping off.
>
> On Fri, Aug 18, 2017 at 6:31 AM, Eggert, Lars <[email-masked] 
> <mailto:[email-masked]>> wrote:
>
>     On 2017-8-18, at 15:16, Eric Rescorla <[email-masked]
>     <mailto:[email-masked]>> wrote:
>     > Does anyone happen to have a piece of python code that strips
>     draft headers and footers? Thought I'd ask before I wrote something.
>
>     <https://trac.tools.ietf.org/tools/rfcstrip/about>
>
>     Henrik to the rescue.
>
>     Lars
>
>
>
>

---

From: Henrik Levkowetz <[email-masked]>
Date: Fri, 18 Aug 2017 20:17:33 +0200

> On 18 Aug 2017, at 16:59, Robert Sparks <[email-masked]> wrote:
> 

Specifically in 

https://tools.ietf.org/tools/ietfdb/browser/branch/elft/id2xml/id2xml/utils.py

Look for strip_pagebreaks()

Additionally, id2xml has an option to invoke that function and do no other processing.

> (Henrik is on vacation until next week - he can probably aim you at exactly where to look when he gets back).

Now in Münich Lufthafen.

Best,

    Henrik
>> Heh. That's the same (or similar) awk code in rfcdiff, which I ended up ripping off.
>> 
> -- 
> Tools-discuss mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/tools-discuss
> 
> Please report datatracker.ietf.org bugs at http://tools.ietf.org/tools/ietfdb
> or send email to [email-masked]
> 
> Please report tools.ietf.org bugs at http://tools.ietf.org/tools/issues or
> send email to [email-masked]

---

From: Eric Rescorla <[email-masked]>
Date: Fri, 18 Aug 2017 11:18:52 -0700

Great. Thanks

On Fri, Aug 18, 2017 at 11:17 AM, Henrik Levkowetz <[email-masked]>
wrote:

> <https://tools.ietf.org/tools/ietfdb/browser/branch/elft/id2xml/id2xml/utils.py?order=name>
>

---

From: "HANSEN, TONY L" <[email-masked]>
Date: Wed, 23 Aug 2017 01:44:17 +0000

Since it’s possibly a generally-useful utility, I’ve modified the invocation of id2xml available from the webpage at xml2rfc.tools.ietf.org to provide a “striponly” checkbox.

Hope people do find it useful.

                Tony

From: Tools-discuss <[email-masked]> on behalf of Eric Rescorla <[email-masked]>
Date: Friday, August 18, 2017 at 2:19 PM
To: Henrik Levkowetz <[email-masked]>
Cc: Tools-discuss <[email-masked]>, Robert Sparks <[email-masked]>
Subject: Re: [Tools-discuss] Python code to strip headers and footers

Great. Thanks

On Fri, Aug 18, 2017 at 11:17 AM, Henrik Levkowetz <[email-masked]<mailto:[email-masked]>> wrote:

On 18 Aug 2017, at 16:59, Robert Sparks <[email-masked]<mailto:[email-masked]>> wrote:
You might look in the source for id2xml (pip install id2xml).

Specifically in

https://tools.ietf.org/tools/ietfdb/browser/branch/elft/id2xml/id2xml/utils.py<https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_tools_ietfdb_browser_branch_elft_id2xml_id2xml_utils.py-3Forder-3Dname&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=s-7BBG5NS-S1kar4oZ7NGgrQ-52Fcdc4WKiNCFSSejk&e=>

Now in Münich Lufthafen.

Best,

    Henrik

RjS

-Ekr

On Fri, Aug 18, 2017 at 6:31 AM, Eggert, Lars <[email-masked]<mailto:[email-masked]>> wrote:
> Does anyone happen to have a piece of python code that strips draft headers and footers? Thought I'd ask before I wrote something.

https://trac.tools.ietf.org/tools/rfcstrip/about<https://urldefense.proofpoint.com/v2/url?u=https-3A__trac.tools.ietf.org_tools_rfcstrip_about&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=6hR5i8QjTgCxFQRc0yoxRdZ9LSdjC3JX8fGj5281i4U&e=>

Henrik to the rescue.

Lars

--
Tools-discuss mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/tools-discuss<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_tools-2Ddiscuss&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=3QZvIbh8nvJSpI2RJr5FL4Xm6bLwPmr0I6k9J2bt3J4&e=>

Please report datatracker.ietf.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__datatracker.ietf.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=bWx7mF9yQUuKEHjLIk3_vq-adbguM7CggVN3w4ImYd4&e=> bugs at http://tools.ietf.org/tools/ietfdb<https://urldefense.proofpoint.com/v2/url?u=http-3A__tools.ietf.org_tools_ietfdb&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=16eOnLntpvEguwyOgQL9Zgn_-K15-0RMd-RK8Se26-8&e=>
or send email to [email-masked]<mailto:[email-masked]>

Please report tools.ietf.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__tools.ietf.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=Wb1XDgfCnCKXpl415Nb35ltpPvJlwbdo675FENlzoFQ&e=> bugs at http://tools.ietf.org/tools/issues<https://urldefense.proofpoint.com/v2/url?u=http-3A__tools.ietf.org_tools_issues&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=Ra32k0clO3IruIpMjZPdPpCL-yDek3BAZvBweoEb6M8&e=> or
send email to [email-masked]<mailto:[email-masked]>

--
Tools-discuss mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/tools-discuss<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_tools-2Ddiscuss&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=3QZvIbh8nvJSpI2RJr5FL4Xm6bLwPmr0I6k9J2bt3J4&e=>

Please report datatracker.ietf.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__datatracker.ietf.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=bWx7mF9yQUuKEHjLIk3_vq-adbguM7CggVN3w4ImYd4&e=> bugs at http://tools.ietf.org/tools/ietfdb<https://urldefense.proofpoint.com/v2/url?u=http-3A__tools.ietf.org_tools_ietfdb&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=16eOnLntpvEguwyOgQL9Zgn_-K15-0RMd-RK8Se26-8&e=>
or send email to [email-masked]<mailto:[email-masked]>

Please report tools.ietf.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__tools.ietf.org&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=Wb1XDgfCnCKXpl415Nb35ltpPvJlwbdo675FENlzoFQ&e=> bugs at http://tools.ietf.org/tools/issues<https://urldefense.proofpoint.com/v2/url?u=http-3A__tools.ietf.org_tools_issues&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=Kz8VdgPVctDNSNPJ6PsBaw&m=PjE1-VdQIqtkqDVKAaBT51v-WnbV6G-yv22Nlcq1ZGI&s=Ra32k0clO3IruIpMjZPdPpCL-yDek3BAZvBweoEb6M8&e=> or
send email to [email-masked]<mailto:[email-masked]>