Publish/Manager

From J Wiki
Jump to navigation Jump to search
Publish | Overview | Markup Summary Markup Detail | Styles | Images Tables | Examples
Pubman1.png

Publish Manager is a GUI front end for Publish. This allows you view and edit the source files that make up a report. With a suitable arrangement of the open windows, you can make changes to the source and see the effect immediately on pressing Run. J experience is not required for most content editing.


Directory Layout

Publish Manager assumes that reports are stored in their own directories, and that typically, reports are stored in directories at the same level. A file with extension .jpb stores information relevant to a Publish report - this file must have the same name as the directory. Also, the Publish master file must be named master.txt.

Running Publish Manager

The main verb is pubman and this takes an argument of either:

  • a .jpb file. The report is opened, and other report files at the same level may be selected from the Publish Manager.
  • a directory path. The .jpb files are searched for at this path, and the first such file is opened.

For example:

load 'format/publish/pubman'
pubman 'd:\reports\2008\jan\jan.jpb'     NB. open specific report
pubman 'd:\reports\2008'                 NB. open reports at given level

File Selections

The file list selection dialogs are populated automatically from the source directory. Files may also be added from other directories.

  • Text (*.txt). For casual (non-J programmer) users, these are the only source files that need be accessed for working with a report.
  • Style (*.sty). These source files configure output formats.
  • Script (*.ijs). These are normal script files. In particular, master.ijs, if present, is run at outset when a Publish report is run.
  • Other - all other files in the source directory.

Add/Remove

The Add button adds source files to a Publish report. A file may be added from another directory, and may already exist.

The Remove button removes source files. If the file is in the source directory, it is deleted, otherwise only the file reference is removed from the Publish report.

Demos

Two demos are included with Publish, and these can be accessed from Publish Manager. Try:

load 'format/publish/pubman'
pubman jpath '~addons/format/publish'