Exporting Wiki Articles


Follow

Overview

There are two main approaches to export wiki articles from FogBugz: 

 


Solution

 

Save to PDF

This solution is about viewing the wiki article in your browser and using the print dialog box to save it as a PDF document.

  • Open the article in your browser tab
  • Open the Print dialog box
    • Press CTRL + P on Windows (use Chrome or Edge browser)
    • Press Command + P on Mac (Safari)
  • Select the Save to PDF option to save the article as a PDF file.

If you use a browser that does not have the "Save to PDF" option, just install any software that provides a virtual PDF printer, and print your wiki pages to that "printer"  (eg: CutePDF, or on Windows 10 or later the built-in Microsoft Print to PDF virtual printer).

 

Back to the top


Programmatic Export

If you need to export many pages or export programmatically, there are many options available, starting from using an out-of-the-box HTML spider/scraper software, to building your own migration scripts.

We do not provide or recommend any readily available solution, we just give you some guidelines and share some knowledge of how we store wiki articles in our databases.

  • Wiki articles are stored in the FogBugz database as raw HTML
  • This raw HTML can be retrieved using our XML API. Use cmd=viewArticle to get the wiki page.
  • Intra-wiki links, case links, and image links are relative.
  • Embedded images and attachments’ URLs can be accessed programmatically:
    • use cmd=viewArticle to get the raw HTML of the wiki page, then find the attachments by searching the HTML for *href* or in case of images *src*. These will be relative URLs. 
      • eg: src="default.asp?pg=pgDownload&pgType=pgWikiAttachment&ixAttachment=11&sFileName=FogBugz+-+Attachment.png"
    • fetch the attachment by concatenating the base URL of your FogBugz instance and the relative URL.
      • eg: https://yourfogbugz.com/default.asp?pg=pgDownload&pgType=pgWikiAttachment&ixAttachment=11&sFileName=FogBugz+-+Attachment.png
    • for internal wiki pages, to fetch the attachments, append an XML API login token at the end of the URL (API token is not needed for public wiki articles)
      • eg: https://yourfogbugz.com/default.asp?pg=pgDownload&pgType=pgWikiAttachment&ixAttachment=11&sFileName=FogBugz+-+Attachment.png&token=secretabcd
  • If you use plugins in your wikis such as the Table of Contents or other Wiki block plugins (not supported anymore), these only put a placeholder in the HTML which is dynamically replaced on render.

Back to the top