TWiki home VRJ Wiki > TWiki > BeautifierPlugin (r1.1 vs. r1.10) VRJ Wiki webs:
Juggler | VRJPlanning | Main | TWiki | Test
TWiki . { Welcome | Register | Changes | Topics | Index | Search | Go }
 <<O>>  Difference Topic BeautifierPlugin (r1.10 - 25 Jul 2003 - LingLo?)

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by Mike Jewell.

Line: 12 to 12

C++ %CODE{"cpp"}% ... %ENDCODE%
C# %CODE{"csharp"}% ... %ENDCODE%
Java %CODE{"java"}% ... %ENDCODE%
Added:
>
>
Lua %CODE{"lua"}% ... %ENDCODE%

Makefile %CODE{"makefile"}% ... %ENDCODE%
Perl %CODE{"perl"}% ... %ENDCODE%
PL/SQL %CODE{"plsql"}% ... %ENDCODE%
Line: 63 to 64

lib/HFile/HFile_cpp.pm  
lib/HFile/HFile_csharp.pm C#, courtesy of TWiki:Main/MatthewMastracci
lib/HFile/HFile_java.pm  
Added:
>
>
lib/HFile/HFile_lua.pm  

lib/HFile/HFile_makefile.pm Makefile, courtesy of Agora:Main/BruceMitchener
lib/HFile/HFile_perl.pm  
lib/HFile/HFile_php3.pm  
Line: 112 to 114

Bugs

  • Why doesn't it highlight Tcl keywords with 3 spaces in front? See AudioExample?, the first code snippet has 4 space indents the rest have 3.
Changed:
<
<
-- LeafGarland? 31 Jul 2002
>
>
-- TWiki:Main/LeafGarland 31 Jul 2002

History

Date Change Name
Changed:
<
<
28 Dec 2002 Accepts mixed case language names LingLo?
20 Dec 2002 Changed syntax to allow for simpler addition of new languages LingLo?
16 Oct 2002 Added nebula nodes and links to Python scripts, but it doesn't work since the node names are usually in strings LeafGarland?
30 Jul 2002 Added nebula nodes and links to Tcl scripts LeafGarland?
30 Jul 2002 Changed Beautifier::Core to use 'linkscripts' LeafGarland?
28 Jul 2002 Created LingLo?
>
>
26 Jul 2003 Syntax fixes from TWiki:Main/WillNorris TWiki:Main/LingLo
10 Feb 2003 Syntax fix from TWiki:Main/JoshMore TWiki:Main/LingLo
28 Dec 2002 Accepts mixed case language names TWiki:Main/LingLo
20 Dec 2002 Changed syntax to allow for simpler addition of new languages TWiki:Main/LingLo
16 Oct 2002 Added nebula nodes and links to Python scripts, but it doesn't work since the node names are usually in strings TWiki:Main/LeafGarland
30 Jul 2002 Added nebula nodes and links to Tcl scripts TWiki:Main/LeafGarland
30 Jul 2002 Changed Beautifier::Core to use 'linkscripts' TWiki:Main/LeafGarland
28 Jul 2002 Created TWiki:Main/LingLo

Plugin Info

Plugin Author: TWiki:Main/LingLo
Changed:
<
<
Plugin Version: 11 Jan 2003 (V1.13)
>
>
Plugin Version: 26 Jul 2003 (V1.14)

CPAN Dependencies: none
Changed:
<
<
Other Dependencies: Beautifier
>
>
Other Dependencies: Beautifier (supplied)

Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/BeautifierPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/BeautifierPluginDev

 <<O>>  Difference Topic BeautifierPlugin (r1.9 - 28 Apr 2003 - LingLo?)

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by Mike Jewell.

Line: 14 to 14

Java %CODE{"java"}% ... %ENDCODE%
Makefile %CODE{"makefile"}% ... %ENDCODE%
Perl %CODE{"perl"}% ... %ENDCODE%
Added:
>
>
PL/SQL %CODE{"plsql"}% ... %ENDCODE%

Python %CODE{"python"}% ... %ENDCODE%
PHP3 %CODE{"php3"}% ... %ENDCODE%
Scheme %CODE{"scheme"}% ... %ENDCODE%
TCL %CODE{"tcl"}% ... %ENDCODE%
Added:
>
>
XML %CODE{"xml"}% ... %ENDCODE%

Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families. Other languages can be added with relative easy by downloading the full PHP dist from http://www.beautifier.org and converting the relevant language file from PHP to Perl.

Line: 59 to 61

lib/Beautifier/Magic.pm  
lib/Beautifier/MagicConfig.pm  
lib/HFile/HFile_cpp.pm  
Changed:
<
<
lib/HFile/HFile_csharp.pm C#, courtesy of MatthewMastracci?
>
>
lib/HFile/HFile_csharp.pm C#, courtesy of TWiki:Main/MatthewMastracci

lib/HFile/HFile_java.pm  
lib/HFile/HFile_makefile.pm Makefile, courtesy of Agora:Main/BruceMitchener
lib/HFile/HFile_perl.pm  
lib/HFile/HFile_php3.pm  
Added:
>
>
lib/HFile/HFile_plsql.pm PL/SQL, courtesy of TWiki:Main/FranzJosefSilli

lib/HFile/HFile_python.pm  
lib/HFile/HFile_scheme.pm  
lib/HFile/HFile_tcl.pm  
Added:
>
>
lib/HFile/HFile_xml.pm XML, courtesy of TWiki:Main/FranzJosefSilli

lib/Output/ANSI.pm  
lib/Output/DocBook.pm  
lib/Output/HTML.pm  
Line: 123 to 127

Plugin Info

Plugin Author: TWiki:Main/LingLo
Changed:
<
<
Plugin Version: 11 Jan 2003 (V1.12)
>
>
Plugin Version: 11 Jan 2003 (V1.13)

CPAN Dependencies: none
Other Dependencies: Beautifier
Perl Version: 5.005

 <<O>>  Difference Topic BeautifierPlugin (r1.8 - 11 Jan 2003 - LingLo?)

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by Mike Jewell.

Line: 10 to 10

Language Syntax
C++ %CODE{"cpp"}% ... %ENDCODE%
Changed:
<
<
Java %CODE_JAVA{"java"}% ... %ENDCODE%
Perl %CODE_PYTHON{"perl"}% ... %ENDCODE%
Python %CODE_PYTHON{"python"}% ... %ENDCODE%
PHP3 %CODE_PYTHON{"php3"}% ... %ENDCODE%
Scheme %CODE_TCL{"scheme"}% ... %ENDCODE%
TCL %CODE_TCL{"tcl"}% ... %ENDCODE%
>
>
C# %CODE{"csharp"}% ... %ENDCODE%
Java %CODE{"java"}% ... %ENDCODE%
Makefile %CODE{"makefile"}% ... %ENDCODE%
Perl %CODE{"perl"}% ... %ENDCODE%
Python %CODE{"python"}% ... %ENDCODE%
PHP3 %CODE{"php3"}% ... %ENDCODE%
Scheme %CODE{"scheme"}% ... %ENDCODE%
TCL %CODE{"tcl"}% ... %ENDCODE%

Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families. Other languages can be added with relative easy by downloading the full PHP dist from http://www.beautifier.org and converting the relevant language file from PHP to Perl.

Line: 57 to 59

lib/Beautifier/Magic.pm  
lib/Beautifier/MagicConfig.pm  
lib/HFile/HFile_cpp.pm  
Added:
>
>
lib/HFile/HFile_csharp.pm C#, courtesy of MatthewMastracci?

lib/HFile/HFile_java.pm  
Added:
>
>
lib/HFile/HFile_makefile.pm Makefile, courtesy of Agora:Main/BruceMitchener

lib/HFile/HFile_perl.pm  
lib/HFile/HFile_php3.pm  
lib/HFile/HFile_python.pm  
Line: 81 to 85

}
Deleted:
<
<

  • Test if the installation was successful:

%CODE{"cpp"}%

Line: 104 to 107

Bugs

Changed:
<
<
  • Why doesn't it highlight Tcl keywords with 3 spaces in front? See AudioExample?, the first code snippet has 4 space indents the rest have 3.
    -- LeafGarland? 31 Jul 2002
>
>
  • Why doesn't it highlight Tcl keywords with 3 spaces in front? See AudioExample?, the first code snippet has 4 space indents the rest have 3.
    -- LeafGarland? 31 Jul 2002

History

Line: 116 to 120

30 Jul 2002 Changed Beautifier::Core to use 'linkscripts' LeafGarland?
28 Jul 2002 Created LingLo?
Added:
>
>

Plugin Info

Plugin Author: TWiki:Main/LingLo
Plugin Version: 11 Jan 2003 (V1.12)
CPAN Dependencies: none
Other Dependencies: Beautifier
Perl Version: 5.005
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/BeautifierPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/BeautifierPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- LingLo? - 18 Dec 2002



 <<O>>  Difference Topic BeautifierPlugin (r1.7 - 28 Dec 2002 - LingLo?)

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by Mike Jewell.

Line: 109 to 109

History

Date Change Name
Added:
>
>
28 Dec 2002 Accepts mixed case language names LingLo?

20 Dec 2002 Changed syntax to allow for simpler addition of new languages LingLo?
16 Oct 2002 Added nebula nodes and links to Python scripts, but it doesn't work since the node names are usually in strings LeafGarland?
30 Jul 2002 Added nebula nodes and links to Tcl scripts LeafGarland?

 <<O>>  Difference Topic BeautifierPlugin (r1.6 - 20 Dec 2002 - LingLo?)

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by Mike Jewell.

Syntax Rules

Changed:
<
<
  • Just paste the code between %CODE_CPP{ and }%. The following indicates the syntax used for the different languages:
>
>
  • Just paste the code between %CODE{"syntax"}% and %ENDCODE%. The following indicates the syntax used for the different languages:

Language Syntax
Changed:
<
<
C++ %CODE_CPP{ ... }%
Java %CODE_JAVA{ ... }%
Python %CODE_PYTHON{ ... }%
Tcl %CODE_TCL{ ... }%
>
>
C++ %CODE{"cpp"}% ... %ENDCODE%
Java %CODE_JAVA{"java"}% ... %ENDCODE%
Perl %CODE_PYTHON{"perl"}% ... %ENDCODE%
Python %CODE_PYTHON{"python"}% ... %ENDCODE%
PHP3 %CODE_PYTHON{"php3"}% ... %ENDCODE%
Scheme %CODE_TCL{"scheme"}% ... %ENDCODE%
TCL %CODE_TCL{"tcl"}% ... %ENDCODE%

Changed:
<
<
Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families. Other languages can be added with relative easy by downloading the full PHP dist from beautifier.org and converting the relevant language file from PHP to Perl.
>
>
Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families. Other languages can be added with relative easy by downloading the full PHP dist from http://www.beautifier.org and converting the relevant language file from PHP to Perl.

Examples



Changed:
<
<
%CODE_CPP{
>
>
%CODE{"cpp"}%

void foo() { print("Do stuff.\n"); }
Changed:
<
<
}%
>
>
%ENDCODE%

Line: 59 to 62

lib/HFile/HFile_php3.pm  
lib/HFile/HFile_python.pm  
lib/HFile/HFile_scheme.pm  
Changed:
<
<
lib/HFile/HFile_tcltk.pm  
>
>
lib/HFile/HFile_tcl.pm  

lib/Output/ANSI.pm  
lib/Output/DocBook.pm  
lib/Output/HTML.pm  
Line: 81 to 84

  • Test if the installation was successful:
Changed:
<
<
%CODE_CPP{
>
>
%CODE{"cpp"}%

#include

/**

Line: 96 to 99

entity->Trigger(this, this->stepSize); } }
Changed:
<
<
}%
>
>
%ENDCODE%

Bugs

Line: 106 to 109

History

Date Change Name
Added:
>
>
20 Dec 2002 Changed syntax to allow for simpler addition of new languages LingLo?

16 Oct 2002 Added nebula nodes and links to Python scripts, but it doesn't work since the node names are usually in strings LeafGarland?
30 Jul 2002 Added nebula nodes and links to Tcl scripts LeafGarland?
30 Jul 2002 Changed Beautifier::Core to use 'linkscripts' LeafGarland?
28 Jul 2002 Created LingLo?
Deleted:
<
<

 <<O>>  Difference Topic BeautifierPlugin (r1.5 - 18 Dec 2002 - LingLo?)
Changed:
<
<

BeautifierPlugin

>
>

BeautifierPlugin


Changed:
<
<
This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by MikeJewell?. Code fragments are surrounded by the following:
>
>
This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by Mike Jewell.

Syntax Rules

  • Just paste the code between %CODE_CPP{ and }%. The following indicates the syntax used for the different languages:

Language Syntax
C++ %CODE_CPP{ ... }%
Java %CODE_JAVA{ ... }%
Python %CODE_PYTHON{ ... }%
Tcl %CODE_TCL{ ... }%

Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families. Other languages can be added with relative easy by downloading the full PHP dist from beautifier.org and converting the relevant language file from PHP to Perl.

Examples




Line: 13 to 29

Changed:
<
<
Three languages are supported in this edition of the plugin, using the following syntax:
>
>

BeautifierPlugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Highlights and formats code fragments.

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip BeautifierPlugin.zip in your twiki installation directory, this will also install the Beautifier library by default. Content:
    File: Description:
    data/TWiki/BeautifierPlugin.txt Plugin topic
    data/TWiki/BeautifierPlugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/BeautifierPlugin.pm Plugin Perl module
  • To install the Beautifier library, either install it in the Perl library folder or unpack it into the twiki directory. For the latter, the following files are installed:
    File: Description:
    lib/Beautifier/Context.pm  
    lib/Beautifier/Core.pm  
    lib/Beautifier/HFile.pm  
    lib/Beautifier/Magic.pm  
    lib/Beautifier/MagicConfig.pm  
    lib/HFile/HFile_cpp.pm  
    lib/HFile/HFile_java.pm  
    lib/HFile/HFile_perl.pm  
    lib/HFile/HFile_php3.pm  
    lib/HFile/HFile_python.pm  
    lib/HFile/HFile_scheme.pm  
    lib/HFile/HFile_tcltk.pm  
    lib/Output/ANSI.pm  
    lib/Output/DocBook.pm  
    lib/Output/HTML.pm  
    lib/TWiki/Plugins  
    lib/TWiki/Plugins/BeautifierPlugin.pm  
  • To get the doxygen-ish box around the code fragment, the following is needed in the skin's stylesheet:

Changed:
<
<
Language Syntax
C++ %CODE_CPP{ ... }%
Tcl %CODE_TCL{ ... }%
Python %CODE_PYTHON{ ... }%
>
>
div.fragment{
        background : #FFFFCC;
        border : 1px solid #CCCCCC;
        margin-left : 2em;
        margin-right : 2em;
        padding : 4px;
}

Changed:
<
<
Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families.
>
>
  • Test if the installation was successful:

Changed:
<
<
  • Why doesn't it highlight Tcl keywords with 3 spaces in front? See AudioExample?, the first code snippet has 4 space indents the rest have 3. [ LeafGarland? 31 Jul 2002 ]
>
>
%CODE_CPP{ #include

Changed:
<
<

Global Settings

>
>
/** @brief Advance the simulation by one timeslice. */ void nWorld::StepSim() { // Iterate simulation loop for (node = entityList.GetHead(); node = NULL; node = node->GetSucc()) { entity = (nEntity*)node->GetPtr(); entity->Trigger(this, this->stepSize); } } }%

Deleted:
<
<
  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Highlights and formats code fragments.

Changed:
<
<
-- LingLo? - 28 Jul 2002
>
>

Bugs

  • Why doesn't it highlight Tcl keywords with 3 spaces in front? See AudioExample?, the first code snippet has 4 space indents the rest have 3.
    -- LeafGarland? 31 Jul 2002

History


 <<O>>  Difference Topic BeautifierPlugin (r1.4 - 16 Oct 2002 - LeafGarland?)

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by MikeJewell?. Code fragments are surrounded by the following:

Line: 36 to 36

History

Date Change Name
Changed:
<
<
30 Jul 2002 Added nebula nodes and links to script docs LeafGarland?
>
>
16 Oct 2002 Added nebula nodes and links to Python scripts, but it doesn't work since the node names are usually in strings LeafGarland?
30 Jul 2002 Added nebula nodes and links to Tcl scripts LeafGarland?

30 Jul 2002 Changed Beautifier::Core to use 'linkscripts' LeafGarland?
28 Jul 2002 Created LingLo?

 <<O>>  Difference Topic BeautifierPlugin (r1.3 - 31 Jul 2002 - LeafGarland?)

BeautifierPlugin

This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by MikeJewell?. Code fragments are surrounded by the following:

Line: 22 to 22

Python %CODE_PYTHON{ ... }%
Changed:
<
<
Additional can be added since the Beautifier library is flexible and can support a wide range of language families.
>
>
Additional languages can be added since the Beautifier library is flexible and can support a wide range of language families.

  • Why doesn't it highlight Tcl keywords with 3 spaces in front? See AudioExample?, the first code snippet has 4 space indents the rest have 3. [ LeafGarland? 31 Jul 2002 ]

Global Settings

Line: 30 to 32

    • Set SHORTDESCRIPTION = Highlights and formats code fragments.

-- LingLo? - 28 Jul 2002

Added:
>
>

History

Date Change Name
30 Jul 2002 Added nebula nodes and links to script docs LeafGarland?
30 Jul 2002 Changed Beautifier::Core to use 'linkscripts' LeafGarland?
28 Jul 2002 Created LingLo?


 <<O>>  Difference Topic BeautifierPlugin (r1.2 - 30 Jul 2002 - LingLo?)

BeautifierPlugin

Added:
>
>
This plugin allows you to have code fragments automatically formatted and highlighted. It depends on the Beautifier library written by MikeJewell?. Code fragments are surrounded by the following:

%CODE_CPP{
   void foo() {
     print("Do stuff.\n");
   }
}%

Three languages are supported in this edition of the plugin, using the following syntax:

Language Syntax
C++ %CODE_CPP{ ... }%
Tcl %CODE_TCL{ ... }%
Python %CODE_PYTHON{ ... }%

Additional can be added since the Beautifier library is flexible and can support a wide range of language families.

Global Settings

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Highlights and formats code fragments.

-- LingLo? - 28 Jul 2002

 <<O>>  Difference Topic BeautifierPlugin (r1.1 - 29 Jul 2002 - LingLo?)
Line: 1 to 1
Added:
>
>

BeautifierPlugin

-- LingLo? - 28 Jul 2002



Topic BeautifierPlugin . { View | Diffs | r1.10 | > | r1.9 | > | r1.8 | More }
Revision r1.1 - 29 Jul 2002 - 03:00 - LingLo?
Revision r1.10 - 25 Jul 2003 - 23:51 - LingLo?

Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding VRJ Wiki? Send feedback