Talk:Scientific Blackpill: Difference between revisions

Jump to navigation Jump to search
Line 39: Line 39:


# Temporarily remove the <code>__ NOTOC__</code>
# Temporarily remove the <code>__ NOTOC__</code>
# In Firefox or Chrome, right click on the TOC, inspect element, then right-click on the #toc div, click Copy, then Outer HTML
# In Firefox or Chrome, right click on the TOC, inspect element, then right-click on the first <ul> element, click Copy, then Outer HTML
# Now one can use various online tools (search for "convert html to mediawiki") or Pandoc to convert the HTML to MediaWiki syntax.
# Replace links with MediaWiki syntax and remove bullet points using <code>list-style: none</code>
# On Linux: <code>pandoc -f html -t mediawiki <(xclip -o) | xclip -sel c</code>. This command requires <code>sudo apt get install pandoc xclip</code> to be installed.
## On Linux this can be done like so: <code>xclip -o| sed -e 's/<a href="/[[/; s/"><span/|<span/; s/<\/a>/]]/; s/<ul>/<ul style="list-style: none;">/' | xclip -sel c</code>. This command requires <code>sudo apt get install xclip</code> to be installed. The converted TOC is then in pasteboard.
## The converted TOC is then in pasteboard.
# Only replace the list part since the div container
17,538

edits

Navigation menu