diff --git a/scripts/discussion_dump_to_markdown.py b/scripts/discussion_dump_to_markdown.py new file mode 100644 index 0000000000..3a5d2ed70d --- /dev/null +++ b/scripts/discussion_dump_to_markdown.py @@ -0,0 +1,191 @@ +""" +Page scraping (to be used later to fixup internal cross references off anchor +IDs). + +- First back up without edits here: b5e26e9b81b58ffe9a2dc9b39c76c1ed06cc8d20 + +.. code-block:: console + + $ curl 'https://github.com/intel/dffml/discussions/1369/comments/2603280/threads?back_page=1&forward_page=0&anchor_id=2813540' | tee /tmp/a + $ curl 'https://github.com/intel/dffml/discussions/1369/comments/2603280/threads?back_page=1&forward_page=0&anchor_id=0' | tee /tmp/a.0 + $ diff -u /tmp/a /tmp/a.0 + $ grep 2813540 /tmp/b | grep -v '2813540"' | grep 2813540 + $ curl 'https://github.com/intel/dffml/discussions/1369' | tee /tmp/b + $ grep '