User:SPage (WMF)/GDocs to wiki

The Architecture committee has meetings.

We were keeping meeting notes in Etherpad, now trying Google Docs

Etherpad process

edit
  1. Keep meeting notes as wikitext-like as possible:
    • no indenting
    • Use == for headings ==
  2. Then paste into User:SPage (WMF)/JS test and use "linkify" mode to convert TNNNN into [[phab:NNNN]] links and https://www.mediawiki.org/wiki/Page_title into [[Page_title]]
  3. Then paste wikitext into new Architecture committee/YYYY-MM-DD page.
  4. Add wiki link under publication of minutes

Google Docs process

edit

Work in progress

  1. Keep meeting notes as HTML-like as possible:
    • Use GDocs formatting toolbar for Heading 2/3 and bullets
    • No blank lines
  2. To convert to HTML, either
    1. select all in GDocs, copy, paste into http://ckeditor.com/demo, click its [<> Source] button, select all the HTML, copy
    2. File > Download as > Web page, unzip, open the .html file, and copy the HTML within the <body>...</body> block
  3. Now to convert this HTML back to wikitext, use Parsoid! Visit https://www.mediawiki.org/api/rest_v1/?doc
  4. open Transforms >[Post] /transform/html/to/wikitext/{title}/{revision} section
  5. In Title enter Architecture committee/blahblah (I don't think it matters)
  6. Paste the HTML from above into html field
  7. Click [Try it out!]

Results of 1. HTML from CK editor, then Parsoid

edit

/HTML from CK editor

  • Google indents bullets, so CK editor does, so they turn into <pre> *lines of code

Results of 2. HTML from Download as, then Parsoid

edit

/HTML from Download as