New topics: Your Pet, IOU, Baby IQ, The Poisons, Birther II, Games, Future Power

Trying out the documentation theme?

Skip to end of metadata
Go to start of metadata
Name Content Refactoring Plugin
Vendor Bobsgear Project (Website)
Authors Garnet R. Chaney
Homepage http://www.bobsgear.com/display/bobsgear/Content+Refactoring+Plugin
Issue Tracking http://www.bobsgear.com/display/bobsgear/Content+Refactoring+Plugin
Categories content macro (???)
Version 1.0.0
Availability Confluence v2.4.3
State Stable
License Open Source (BSD)
Price Donation
Release Docs http://www.bobsgear.com/display/bobsgear/Content+Refactoring+Plugin
Java API Docs n/a
Download Source [^com.bobsgear.factor.1.0.0.zip]
Download JAR http://plugins.bobsgear.com/plugins-lib/plugins-com.bobsgear.factor.1.0.0.jar

Description/Features

Plugin aids in refactoring large wiki pages into smaller easy to manage child pages. Creates reciprocal links between refactored child pages and parent.

Discussion of how content refactoring is used on http://www.chat11.com wik.

Postcard-ware / Donation

After you've tried this plugin, please send me an email, or a postcard, to let me know what you think of it. This will also help me keep in touch with you about enhancements, and consider including your ideas in the next version. I love to tinker with the code that runs my wiki as much as developing the wiki content, so expect to see more great features included in this plugin.

If you find yourself using this plugin on a regular basis, please consider donating at least $25 to support this and other projects. Or if you have an extra feature you'd like to see added to the plugin, please consider sponsoring the development of that feature. Contact us for more information about sponsoring advanced development.

Setup

Download and install this macro using the plugin repository of the System Administration.

Usage

This plugin includes one macro:

  • {factor} with a body to be refactored to a child page

Examples

{ factor:Child Page}
Here is some content that would go on a child page.
{ factor}

NOTE: The extra space after the opening brace keeps the system from interpreting the macro when this page is saved.

Version History

  • 1.0.0 - Factor listener complete
      • Handle placing children in other spaces
      • Document in full notation guide
  • 0.0.1 - May 26, 2007 - Added 0.0.1 to repository

Todo List

Screenshots

Labels:
refactor refactor Delete
plugin plugin Delete
confluence confluence Delete
refactoring refactoring Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 16, 2007

    Anonymous

    Hi there. fantastic functionality.

    This does not seem to me to be a content macro, as it is not parsed by the default parser. As you have indicated on your page here, it doesn't work intuitively when it's included in a construct such as {noformat} or {code}. It's more of a page pre-parsing directive. If I understand, no page will ever have the factor macro present once saved, if your plugin is installed correctly, and using the built in rendered (via the API, user macro or remote API), 'factor' won't render as anything special, but on a page save it would.

    If I'm mistaken, please let me know because I'd like to better understand how this listener works.

    If I'm on the right track, you are not limited to the {...} notation, and so a new notation might be appropriate, to help prevent confusion. MediaWiki uses #REDIRECT, for example.

    Perhaps something like:

    >>factor:page name<<
    
    >><<
    

    Or perhaps there are other 'directive' type macros already out there? What do you think?

    1. Jun 16, 2007

      Thanks for your kind comments and thoughts. I believe this macro is a first of its kind for Confluence, so I was in a quandry what category to put it in.

      Refactoring is often discussed in wikiland, but I don't know anyone else who has implemented this kind of solution. I believe I am the first inventor of this kind of functionality in a wiki, which I call a "Post Edit" function. I first implemented it in my http://www.chat11.com several years ago, and later in my http://www.hivewiki.com system. I am so used to it, I am almost unable to write a page without having at least one factor block. This functionality really makes a wiki quick! Often I write pages that have several of these blocks in the page before I save it. It's almost like having a multiple wiki editor window. My record is to have 1200 of these blocks in one page, (the page was written by a script for input to the wiki), but that's another story and the subject for another plugin.

      You are indeed correct that a different syntax could be used for this functionality, perhaps even the original syntax used at Chat11 which was to wrap the content in FACTOR child title: / content / ENDFACTOR (without the slashes of course, and FACTOR and ENDFACTOR being on their own separate lines).

      My Confluence implementation is curious in that saving the page results in two versions being saved to your history, the original with the factor definitions intact, and a second version with the factors parsed out. This is a little different than how my other wikis work, which throw away the original version of text. Sometimes I've realized that I'd like to see the original text again at a later point, or would like to archive these original factor pages for future use.

      So in Confluence you can go back and review your original page including the factor definitions. Although it isn't strictly necessary, when viewing the interrim version the beginning and end of each factor definition is replaced with "factor is here", so its "pre-parsing" is very limited. If you restore that version, then the act of restoring will act on the factor definitions. If you go to the Info view for a page, and click on just viewing the previous version, and then click Edit for that page version (before restoring it), you have your factor definitions back.

      Or at least that is the way I wish Confluence worked. Unfortunately, even though the edit tab shows the page ID of whatever older version you are looking at, when you click the edit tab, you'll get the latest version of the page in the editor. Confluence demands that you first restore the old version, then when it is the latest version, you can edit it. Unfortunately the restore will act on the macros. I will fix this in the next version.

  2. Jun 15, 2007

    Anonymous

    does the macro only 'create' new child pages, or append the refactored information to existing pages?

    1. Jun 16, 2007

      If the childpage already exists, then the new information will be appended to it.

      A more advanced version will be available soon that makes replace vs. append an option.

Add Comment