Assist Converting Documents into MediaWiki Format: Difference between revisions

From Calidus HUB
(Updated to latest version)
(Added PowerToys for renaming.)
Line 2: Line 2:


Recommended initial editing tool - NOTEPAD++
Recommended initial editing tool - NOTEPAD++
* https://notepad-plus-plus.org/downloads/


Create Macro - Assist Cleanup
Create Macro - Assist Cleanup
Line 8: Line 9:
Create Macro - Vertopal Cleanup
Create Macro - Vertopal Cleanup
* See documentation - [[Assist Clean Up Vertopal Macro]]
* See documentation - [[Assist Clean Up Vertopal Macro]]
Recommended - PowerToys
* https://learn.microsoft.com/en-us/windows/powertoys/install




==  Process ==
==  Process ==
Convert document using Vertopal online conversion tool
Convert document using Vertopal online conversion tool
 
* https://www.vertopal.com/en/convert/docx-to-wiki-mediawiki
https://www.vertopal.com/en/convert/docx-to-wiki-mediawiki


Use DOC/DOCx - PDF doesn't work very well.
Use DOC/DOCx - PDF doesn't work very well.


NOTE: This does not convert embedded objects like excel, attachments, Visio or Word diagrams. If your document contains these, then svae these as PNG images to add to the document later.
NOTE: This does not convert embedded objects like excel, attachments, Visio or Word diagrams. If your document contains these, then save these as PNG images to add to the document later.


Download and Extract to subfolder
Download and Extract to subfolder
Line 65: Line 67:
Put into Assist
Put into Assist


Upload images using the numbers as guide.
Rename images - Recommend using PowerRename from PowerToys.
* Select all images to be renamed, then right-click and Select Rename with PowerRename.
* If from Vertopal, the images are in a media subdirectory, names as image1, image2, etc.
* Tick "User regular expressions"
* From name: image(.*)
* To name: SYS-DESC-$1
 
Example:
* From name: image(.*)
* To name: TTM-WMS-$1
 
{| class="wikitable"
|+ Results
|-
! From !! To
|-
| Image1 || TTM-WMS-1
|-
| Image2 || TTM-WMS-2
|-
| Image10 || TTM-WMS-10
|-
| Image11 || TTM-WMS-11
|-
| Image20a-text || TTM-WMS-20a-text
|}
 
When renamed, use the Upload Multiple Files Special page to upload the files in bulk:
* Go to Special pages
* Click Upload multiple files.
* Enter a description for the images (otherwise this will default to something useless).
* Drag your images to be uploaded to the appropriate place on the page.
* The images will upload automatically, showing the progress on the screen.
* If any images should fail, try re-uploading them - sometimes bulk uploading >40 images at a time will cause some issues.
 
If you are doing this manually instead, upload the images by clicking on the image in the document and then manually upload the correct "imageX" file using the numbers as guide.


Check sizes of all pictures - remove or add |800px if necessary.
Finally, check the sizes of all pictures - remove or add |800px if necessary.


[[Category:Assist Guides]]
[[Category:Assist Guides]]
[[Category:ASSIST]]
[[Category:ASSIST]]

Revision as of 09:50, 8 May 2025

Tools

Recommended initial editing tool - NOTEPAD++

Create Macro - Assist Cleanup

Create Macro - Vertopal Cleanup

Recommended - PowerToys


Process

Convert document using Vertopal online conversion tool

Use DOC/DOCx - PDF doesn't work very well.

NOTE: This does not convert embedded objects like excel, attachments, Visio or Word diagrams. If your document contains these, then save these as PNG images to add to the document later.

Download and Extract to subfolder

Rename and Edit wiki file

Run Macro - Assist Cleanup

Run Macro - Clean Up Vertopal

Essentially this does the following:

	<span.*</span> with nothing

	\[\[File\:vertopal_392608dac46847cb99daf0bb8d5090ed/media/image with \[\[File\:TTM-

	\.png\|.*?\]\] with \.png\|800px\]\] (if mostly huge images) or \.png\]\] (if mostly small images)

	<\/?blockquote> with nothing

	<ol.*>\n<li> with \n

	</li></ol> with nothing

	= <br />\n with "= " (without the quotes)

	\{\| with \{\| class="wikitable" border="1"

	!width="\d*%"\| with !

Note Note: Replace in the above - this assumes replacing for a document for TTM - replace TTM- with the name of your Assist and doc being converted e.g. WMS-, PORTAL-TTM-ARCH-, EPOD-DEVICE-, CTLTMS-, etc

The Vertopal Cleanup macro will put in "SYS-DESC-", so replace that.

Go through and ensure images are named with a reasonable name

e.g. if in home section in TTM, change file from TTM-1.png to TTM-HOME-1.PNG

Check all images now have a name - search for File\:

Any inline icons, make size 16px - search for file\: and any that are within paragraphs will need manipulation


Put into Assist

Rename images - Recommend using PowerRename from PowerToys.

  • Select all images to be renamed, then right-click and Select Rename with PowerRename.
  • If from Vertopal, the images are in a media subdirectory, names as image1, image2, etc.
  • Tick "User regular expressions"
  • From name: image(.*)
  • To name: SYS-DESC-$1

Example:

  • From name: image(.*)
  • To name: TTM-WMS-$1
Results
From To
Image1 TTM-WMS-1
Image2 TTM-WMS-2
Image10 TTM-WMS-10
Image11 TTM-WMS-11
Image20a-text TTM-WMS-20a-text

When renamed, use the Upload Multiple Files Special page to upload the files in bulk:

  • Go to Special pages
  • Click Upload multiple files.
  • Enter a description for the images (otherwise this will default to something useless).
  • Drag your images to be uploaded to the appropriate place on the page.
  • The images will upload automatically, showing the progress on the screen.
  • If any images should fail, try re-uploading them - sometimes bulk uploading >40 images at a time will cause some issues.

If you are doing this manually instead, upload the images by clicking on the image in the document and then manually upload the correct "imageX" file using the numbers as guide.

Finally, check the sizes of all pictures - remove or add |800px if necessary.