pod afFandocViewer

(Deprecated) Project superceded by the afExplorer application

Mixins

Directive

Directives allow you to define pluggable bits of functionality for your fandocs.

Classes

Browser

A View with a Web Browser to show html, fandocs and files.

FandocResource

A Flux wrapper around an Fandoc URI, as resolved by FandocScheme.

FandocScheme

Registers the fandoc:// scheme to be viewed in the Browser.

FandocTheme

The theme used for styling Fandoc documention.

FluxFrame

A proxy to flux's Frame, exposing some internals.

IncludeDirective

A Directive to include the contents of the given file as raw text.

InternetResource

A Flux wrapper around an Internet URI, as resolved by InternetScheme.

InternetScheme

Registers the http://, https:// and ftp:// schemes to be viewed in the Browser.

Main

Launch Flux from the command line, passing in a pod name, a uri, or a Windows file path.

(Deprecated) Fandoc Viewer has been Superceded by the Alien-Factory Explorer application.

Overview

Fandoc Viewer is a flux extension to display and edit fandoc files. It lets you...

View Fantom Docs Offline!

Fandoc Viewer lets you view all the documentation in your current Fantom installation by adding a fandoc uri scheme to flux.

Try these command lines:

C:\> flux fandoc://docLang
C:\> flux fandoc://afFandocViewer
C:\> flux fandoc://sys/Uri

Wow! It looks just like the Fantom website!

Fandoc Viewer Screenshot

And all your favourite Alien-Factory pods are there too! The scheme follows the format:

fandoc://${podName}
fandoc://${podName}/${typeName}

Surf The Web!

Fandoc Viewer works by adding a web browser view to flux. That means you can also do this:

C:\> flux http://www.alienfactory.co.uk/

View and Edit Fandoc Files!

Render plain text files as Fandocs and edit them!

By giving files a .fandoc extension, flux will automatically open them as Fandocs! This is great for editing pod.fandoc files, previewing long Sidewalk articles, or just keeping notes in a fandoc format.

It works in code too! Use the fan:// scheme to view a Fandoc pod resource. This makes it easy for flux applications to view help pages and other documentation! Consider:

try {
    ...
} catch (Err r) {
    flux::Frame.load(`fan://myPod/doc/help.fandoc`)
}

Note this feature requires Flux Tools to be installed.

Flux Tools

Install Fandoc Viewer Flux Tools to add lots of little extras to flux.

C:\> fan afFandocViewer -install

The installation alters several Fantom property files. But rest assured, backups are made to any file touched. The installation also respects your work dir, should you be using PathEnv and have the FAN_ENV_PATH environment variable set.

The installation adds the following:

Fandoc Cmd

A simple fandoc.cmd file is copied to %FAN_HOME%\bin\ which launches Fandoc Viewer. It makes it possible to do this:

C:\> fandoc docLang
C:\> fandoc sys/Uri
C:\> fandoc fan://flux/doc/pod.fandoc
C:\> fandoc http://www.alienfactory.co.uk/

Note Linux users will have to give the fandoc file executable permission.

Syntax Highlighting

A flux text syntax file is installed and enabled to give your fandoc editing a flair of colour!

Fandoc CSS files

Fandoc CSS files are installed locally so you may style your fandoc and pod documentation as you like!

Fandoc Index Tool

This handy flux tool lets you view all installed Fantom documentation as soon as you hit F1!

View / Edit Fandoc Tool

This nifty flux tool lets you preview your fandoc editing with a single key press!

Hit F12 to edit any file based fandoc file, then hit F12 again to save and preview your edits!

Extension to MimeType Patch

Flux will render any file ending with .fandoc as a fandoc - it just takes this simple patch!

TIP: Associate the .fandoc extension with fandoc.cmd in your OS. Now you can double click on any .fandoc file to view and edit it!

F5 Browser Refresh

Now you have a browser view in flux, you're probably in the habit of using F5 to refresh!

Use this patch to un-bind Find Next from F5 and bind a refresh command instead. Don't worry, Ctrl+F still brings up the Find dialogue box!

Release Notes

v1.0.14

  • Chg: Project deprecated in favour of the Explorer application.
  • Chg: Flux NavBar is not displayed by default.

v1.0.12

  • Chg: cmd-line arguments may now truely be case-insensitive. C:\> fandoc afconcurrent/synchronizedfilemap

v1.0.10

  • Chg: main() tries to guess if a type name was passed in and converts the uri accordingly.
  • Bug: Install scripts now have the right name - thanks ttmrichter!

v1.0.8

  • New: The Flux Tools installer. C:\> fan afFandocViewer -install
  • Chg: The cmd-line argument may now just be a pod name, C:\> fandoc sys <==> C:\> fandoc fandoc://sys
  • Chg: Fandoc background is now white. ( Phew! )
  • Chg: Moved source code to BitBucket.

v1.0.6

  • Bug: Type name was displayed twice in the Breadcrumb when viewing a source file.

v1.0.4

  • New: Created the pluggable Directive feature
  • New: Added the IncludeDirective
  • New: Added the FandocIndex tool command

v1.0.2

  • New: Initial release