Appropedia:Porting formatted content to MediaWiki

From Appropedia
Jump to: navigation, search

Suggestion: Merge with the manual on Mediawiki.org

Formatted text, or "rich text," including HTML, Word or OpenOffice documents, can be converted to MediaWiki markup, with formatting.

There are a few techniques which are now being trialed. It may be that wikEd is better for HTML files and OpenOffice is better for Word/rtf files (and Word/rtf files converted from PDF).[verification needed]

If you are starting with a PDF document, it must first be converted to formatted text in another application, before it can be converted to MediaWiki: see Help:Porting PDF files to MediaWiki.

Contents

[edit] Online conversion

The best solution is often diberri's HTML2Wiki online converter. Insert the url (or raw HTML), and remember to select MediaWiki as the Wiki dialect.

Advantages:

  • No need to set anything up

Disadvantages:

  • In the output, you have to search past the header, sidebar code etc to find the actual content you're looking for in the wiki output. (Just a little inconvenient. Do a search, ctrl+f, for the title of the page, and it should bring you to the start.)
  • Image links are not converted correctly, assuming you want to convert the embedded images to links. However if the images are all stored in the one folder on the website.(If you want to have the images on Appropedia, make sure the licenses are also suitably licensed before uploading, and cite the source and license properly.)

Magnus' HTML2Wiki Converter requires pasting the HTML (view source of the page to be converted) i.e. doesn't allow using a url. However it converts images without mangling the link.

Advantages:

  • No need to set anything up.
  • Converts image links without mangling. (If you want the images actually on Appropedia, see note above.)

Disadvantages:

  • In the output, you have to search past the header, sidebar code etc to find the actual content you're looking for in the wiki output. (Just a little inconvenient. Do a search, ctrl+f, for the title of the page, and it should bring you to the start.)
  • Requires pasting the raw HTML - less convenient.

[edit] wikEd

Another method is to use wikEd. It may be best to install this on another wiki you only use for this purpose You must install this on the account there, then convert the content there, then paste to Appropedia. (E.g. I use Wiki Species, and a sandbox in my userspace, i.e. User:Chriswaterguy/sandbox - but I don't actually save the page there. --Chriswaterguy 11:05, 23 September 2009 (UTC))

Otherwise install on your Appropedia account - (but does this clash with our new WYSIWYG editor? --Chriswaterguy 11:05, 23 September 2009 (UTC)) you can easily copy formatted text to the edit box, hit [w] ("wikify"), and you're most of the way there.

This seems to work well with HTML - how does it work with text pasted from various Wordprocessors? (I seem to recall having problems with this. --Chriswaterguy 03:35, 28 October 2009 (UTC))

[edit] Handling images in HTML2Wiki and wikEd

Image links are not converted correctly:

  • If you want to have the actual images on the wiki page, make sure the images are also suitably licensed (sometimes the text is, but the images are not). Then upload with a suitable name, and use the same name to display it in the wiki page.
  • If you want to convert the embedded images to links (a good temporary option for some wikis, especially when converting many pages):
    • If the images are actually from a different domain than the content, then they should be converted correctly to links.
    • If they're on the same server as the content, the links will display as [[Image:imagefilename.jpg]] (or .png...). However if the images are all stored in the one folder on the website, you can do a search and replace, ( [[Image: for [http://domain.org/images/foldername/ ) either in a Wordprocessor or using the replace function in the wikEd toolbar.

[edit] OpenOffice

OpenOffice can open Word documents as well as Open Document Format and other wordprocessor formats.

[edit] From local installation of OOO

  • Open the file or copy the content in OpenOffice 2.3 or greater;
  • Export to MediaWiki format: File menu -> Export -> Under format type choose MediaWiki - this exports wikimarkup as a txt file.

(If this is inadequate (e.g. for dealing with images and references) then we have to work out some VB macro code, we will post everything we know. First need to upgrade and try out the feature. --Chriswaterguy · talk 16:52, 7 February 2008 (PST))

Update: I can't get this function to work in OOO 2.5 for Linux. --Chriswaterguy 03:35, 28 October 2009 (UTC)

Images: Are images saved automatically during file export from OpenOffice? Tags to indicate image location?

[edit] OpenOffice extension

OpenOffice extension for Mediawiki.

Once you install it, you just send your document to the Mediawiki of your choice. It prompts you for the URL and your ID and Password, and posts it.

Status: untested. Info supplied by Mark Johnson markAtsymbol.pngvector-groupDot.pngcom

[edit] Rich text editors for the wiki

In the medium to long term, Appropedia:Rich text editing (i.e. WYSIWYG or some variation on that) might make this easier. There are problems, including fears that this will lead to non-standard markup being entered, and excess use of HTML tags if they are not converted effectively.

FCKEditor is already working well on Appropedia, however it doesn't allow pasting of formatted text (probably to avoid the problems mentioned above).

[edit] Spreadsheets

  • csv2wp is a little script for converting tables from the comma-separated values (CSV) file format to wiki-tables.

(There may be better ones around - I haven't looked. --Chriswaterguy 10:58, 24 February 2010 (UTC))

[edit] Other methods

These haven't been tried yet:

[edit] Interwiki links

Some may be useful:

[edit] See also

[edit] Interwiki links