Need help converting HTML doc to ReST

I'd like to convert my document "The Theory of TypeHinting" to ReST so I can include it in PEP 483. Can someone help me with the conversion? The source is https://quip.com/r69HA9GhGa7J and the destination is http://legacy.python.org/dev/peps/pep-0483/ (or, more correctly, https://hg.python.org/peps/file/7cbb166b30fd/pep-0483.txt). Thanks!! -- --Guido van Rossum (python.org/~guido)

On Sat, Jan 10, 2015 at 4:10 AM, Guido van Rossum <guido@python.org> wrote:
The Debian repositories include a utility called pandoc which can do that conversion. I don't know if it's perfect or not, but it certainly looks pretty reasonable. Footnotes need to be transformed a bit, which can be done manually. Shall I put the content straight into the peps repo? ChrisA

Chris, would you be so kind? I tried to work from Donald's gist, but there are some funny characters in it. I'd also like to use the Open Publication License (see PEP 1) rather than placing it in the public domain. You can go straight to the peps repo, I can fix things up later once I have time to review it. Thank you so much!! On Fri, Jan 9, 2015 at 9:24 AM, Chris Angelico <rosuav@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido)

On Sat, Jan 10, 2015 at 4:46 AM, Guido van Rossum <guido@python.org> wrote:
Text imported. It builds cleanly, and it looks roughly like the original page, but I suspect there's some places where other forms of formatting will be better suited (eg nested lists are used to indent code blocks). I've left the license as it is (Creative Commons) for the moment; does "like to use" mean that you would if you could, or you are hereby relicensing it? Quotes, dashes, etc have all been ASCIIfied. ChrisA

Thank you so much!! It is already live on legacy.python.org/dev/peps/ (www seems to lag behind or require a manual kick). In PEP 1 there are only two options for PEP copyrights: public domain or open publication license. For this particular document I'd rather not do public domain (I've already received a request for republication) so I'll convert it to Open Publication License. On Fri, Jan 9, 2015 at 10:30 AM, Chris Angelico <rosuav@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido)

On Sat, Jan 10, 2015 at 5:35 AM, Guido van Rossum <guido@python.org> wrote:
Done. To make sure I got the text and formatting correct, I went looking for any other RST PEP using that license... and there is exactly one (plus one more in text/plain). So the copyright info is lifted from PEP 437. :) ChrisA

Sounds fine. I've made a few superficial changes -- thanks for getting this out so quickly! Now it's on to PEP 484, which will lay out the actual specification of the typing module and address many details. This may take another week (but folks interested in the progress can peek at the github repo referenced from the PEP 484 stub :-). On Fri, Jan 9, 2015 at 10:41 AM, Chris Angelico <rosuav@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido)

On 10 January 2015 at 04:35, Guido van Rossum <guido@python.org> wrote:
Thank you so much!! It is already live on legacy.python.org/dev/peps/ (www seems to lag behind or require a manual kick).
I haven't dug into the details to confirm it yet (not enough roundtuits), but my current theory for the lag with new PEPs is that the 404 response is getting cached somewhere, and taking ~45 minutes to expire. That theory came from a commit where I both updated an existing PEP and added a new one, and the updates came through quickly, but the new one took nearly an hour to become available. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

On Sat, Jan 10, 2015 at 9:11 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
In this case, there was a stub PEP before the change went through. After the first change, I pushed a separate commit that updated the copyright/license; both changes were separately visible on Legacy while the primary site still showed the stub. ChrisA

I ran this through pandoc real quick and cleaned it up a bit: https://gist.github.com/dstufft/d4fc00108b323ffa8034 <https://gist.github.com/dstufft/d4fc00108b323ffa8034>. I didn’t read through it or anything though just ran pandoc on it and killed the leftover raw html tidbits. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

On Sat, Jan 10, 2015 at 4:10 AM, Guido van Rossum <guido@python.org> wrote:
The Debian repositories include a utility called pandoc which can do that conversion. I don't know if it's perfect or not, but it certainly looks pretty reasonable. Footnotes need to be transformed a bit, which can be done manually. Shall I put the content straight into the peps repo? ChrisA

Chris, would you be so kind? I tried to work from Donald's gist, but there are some funny characters in it. I'd also like to use the Open Publication License (see PEP 1) rather than placing it in the public domain. You can go straight to the peps repo, I can fix things up later once I have time to review it. Thank you so much!! On Fri, Jan 9, 2015 at 9:24 AM, Chris Angelico <rosuav@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido)

On Sat, Jan 10, 2015 at 4:46 AM, Guido van Rossum <guido@python.org> wrote:
Text imported. It builds cleanly, and it looks roughly like the original page, but I suspect there's some places where other forms of formatting will be better suited (eg nested lists are used to indent code blocks). I've left the license as it is (Creative Commons) for the moment; does "like to use" mean that you would if you could, or you are hereby relicensing it? Quotes, dashes, etc have all been ASCIIfied. ChrisA

Thank you so much!! It is already live on legacy.python.org/dev/peps/ (www seems to lag behind or require a manual kick). In PEP 1 there are only two options for PEP copyrights: public domain or open publication license. For this particular document I'd rather not do public domain (I've already received a request for republication) so I'll convert it to Open Publication License. On Fri, Jan 9, 2015 at 10:30 AM, Chris Angelico <rosuav@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido)

On Sat, Jan 10, 2015 at 5:35 AM, Guido van Rossum <guido@python.org> wrote:
Done. To make sure I got the text and formatting correct, I went looking for any other RST PEP using that license... and there is exactly one (plus one more in text/plain). So the copyright info is lifted from PEP 437. :) ChrisA

Sounds fine. I've made a few superficial changes -- thanks for getting this out so quickly! Now it's on to PEP 484, which will lay out the actual specification of the typing module and address many details. This may take another week (but folks interested in the progress can peek at the github repo referenced from the PEP 484 stub :-). On Fri, Jan 9, 2015 at 10:41 AM, Chris Angelico <rosuav@gmail.com> wrote:
-- --Guido van Rossum (python.org/~guido)

On 10 January 2015 at 04:35, Guido van Rossum <guido@python.org> wrote:
Thank you so much!! It is already live on legacy.python.org/dev/peps/ (www seems to lag behind or require a manual kick).
I haven't dug into the details to confirm it yet (not enough roundtuits), but my current theory for the lag with new PEPs is that the 404 response is getting cached somewhere, and taking ~45 minutes to expire. That theory came from a commit where I both updated an existing PEP and added a new one, and the updates came through quickly, but the new one took nearly an hour to become available. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

On Sat, Jan 10, 2015 at 9:11 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
In this case, there was a stub PEP before the change went through. After the first change, I pushed a separate commit that updated the copyright/license; both changes were separately visible on Legacy while the primary site still showed the stub. ChrisA

I ran this through pandoc real quick and cleaned it up a bit: https://gist.github.com/dstufft/d4fc00108b323ffa8034 <https://gist.github.com/dstufft/d4fc00108b323ffa8034>. I didn’t read through it or anything though just ran pandoc on it and killed the leftover raw html tidbits. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
participants (4)
-
Chris Angelico
-
Donald Stufft
-
Guido van Rossum
-
Nick Coghlan