This plugin allows for the creation of Globally/Unique Identifiers (GUID/UUID). It uses the Perl/CPAN Data::UUID module (
http://search.cpan.org/dist/Data-UUID/UUID.pm) to generate the data, and is based strongly on the similar module by
TWiki:Main.MichaelSparks.
(Note: I've edited this plugin to get it running under the Dakar
VM, but I'm not a plugin expert so I can't claim the functionality is identical to the original version. That said, it works for me in the way I expect so it should for you, too. -
TWiki:Main.NeilRichardson)
Syntax Rules
| You Type |
You Get |
Comment |
| %GUID% |
%GUID% |
default is string type |
| %GUID{type="str"}% |
%GUID{type="str"}% |
string representation |
| %GUID{type="bin"}% |
%GUID{type="bin"}% |
binary representation |
| %GUID{type="hex"}% |
%GUID{type="hex"}% |
hex |
| %GUID{type="b64"}% |
%GUID{type="b64"}% |
base64 |
GuidPlugin Global Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%, for example,
%GUID_SHORTDESCRIPTION%
- One line description, shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Generates GUID unique ids
- Debug plugin: (See output in
data/debug.txt)
- Set DEBUG = 0
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 below
- Put them as follows (if you extract into the root TWiki folder, this should happen automatically):
| File: | Description: |
data/TWiki/GuidPlugin.txt | Plugin topic |
data/TWiki/GuidPlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/GuidPlugin.pm | Plugin Perl module |
- Test if the plugin is correctly installed:
- If working correctly, the table above will look something like the following hard-coded example (although the exact values will change with every page view):
| You Type | You Get | Comment |
| %GuID% | CEAEE384-BABE-11DB-83F2-133F06AD2F55 | default is string type |
| %GUID{type="str"}% | CEAEF78E-BABE-11DB-83F2-133F06AD2F55 | string representation |
| %GUID{type="bin"}% | [random non-alphanumeric characters here] | binary representation |
| %GUID{type="hex"}% | 0xCEAF26E6BABE11DB83F2133F06AD2F55 | hex |
| %GUID{type="b64"}% | Vjmvzr662xGD8hM/Bq0vVQ== | base64 |
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins
--
TWiki:Main.NeilRichardson - 21 Mar 2007