Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
standardized plugin/macro templates
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
FND  
View profile  
 More options Oct 18 2007, 2:54 am
From: FND <Ace_No...@gmx.net>
Date: Thu, 18 Oct 2007 08:54:40 +0200
Local: Thurs, Oct 18 2007 2:54 am
Subject: standardized plugin/macro templates
Hi all,

I've noticed some people (noticeably Simon[1] and Martin[2]) have looked
into creating a template for creating plugins and/or macros.
Having intended to do this myself for ages, I think we should combine
our efforts and create a universal template for this purpose.

Having a consistent structure for all plugins would probably also help
with the upcoming plugin library.

I've already started creating the basic framework for this:
     http://www.tiddlywiki.org/wiki/Dev:Plugin_Template
All that's left, really, is making sure all fields (for the meta table
and documentation) are covered. The code samples should be easy.

As a final goal, it'd be nice to have a simple HTML page (or TW plugin)
with a bunch of input and textarea fields to compile ready-made
templates on demand.

-- F.

[1] http://tinyurl.com/25a4cg
(http://simonmcmanus.wordpress.com/2007/10/16/macro-template-for-tiddl...)
[2] http://tinyurl.com/2a5k75
(http://trac.tiddlywiki.org/browser/Trunk/contributors/MartinBudden/pl...)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dawn ahukanna  
View profile  
 More options Oct 19 2007, 8:47 am
From: "dawn ahukanna" <dawn.ahuka...@gmail.com>
Date: Fri, 19 Oct 2007 13:47:57 +0100
Local: Fri, Oct 19 2007 8:47 am
Subject: Re: [twdev] standardized plugin/macro templates

How about having the main fields (not the documentation, notes etc) as
properties of the plugin/macro using the version.extensions object?
e.g.
...
!Code
***/
//{{{
version.extensions.foo=
{
major: 2,
minor: 1,
revision: 0,
date: new Date("Jan 2, 2007"),
code: "http://localhost/tiddlywiki.htm#Macro",
doc: "http://localhost/tiddlywiki.htm#MacroDoc",
author:"<Name> <email>",
summary:"<short 10 word summary>",
description: "<short description of a few sentences>",
coreVersion: "<Minimum supported Tiddlywiki version"

};

config.macros.foo = {};
config.macros.foo.handler = function(place, macroName, params, wikifier,
paramString, tiddler) {
/* ... */

}

The detailed documentation can go in a separate tiddler.

Then all you need to do is have a plug-in that will automatically generate
the field documentation in a standard format by inspecting the plugins.  It
also means the code has some basic self-documentation and the plugin library
generation can use the same structure.

What do you think?

Dawn.

On 10/18/07, FND <Ace_No...@gmx.net> wrote:

--
http://dahukanna.net

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
FND  
View profile  
 More options Oct 19 2007, 9:12 am
From: FND <Ace_No...@gmx.net>
Date: Fri, 19 Oct 2007 15:12:11 +0200
Local: Fri, Oct 19 2007 9:12 am
Subject: Re: [twdev] Re: standardized plugin/macro templates

> How about having the main fields (not the documentation, notes etc) as
> properties of the plugin/macro using the version.extensions object?

I'm not sure what the benefit of this would be*; the "meta table" can
already be parsed/interpreted.
It should be easy to adapt getPluginInfo() and/or getTiddlerSlices() for
pretty much any language (in the case of the Plugin Library, probably
Ruby or PHP).

> Then all you need to do is have a plug-in that will automatically
> generate the field documentation in a standard format

I'm not sure I follow; why a plugin? If anything, it'd probably be a
core component, automatically inserting the meta table when rendering
systemConfig tiddlers. (Obviously, regular users should be able to view
the meta table without having to dig into the code.)
But that seems like a lot of unnecessary overhead!?

-- F.

* I'm probably the only one who'd care about a consistent order for the
fields' presentation...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dawn ahukanna  
View profile  
 More options Oct 19 2007, 9:24 am
From: "dawn ahukanna" <dawn.ahuka...@gmail.com>
Date: Fri, 19 Oct 2007 14:24:04 +0100
Local: Fri, Oct 19 2007 9:24 am
Subject: Re: [twdev] Re: standardized plugin/macro templates

It doesn't have to be a plugin that is used to generate the documentation,
it was just an example. The main point I was trying to make is that the
formating of the standard documentation can be separated and from the actual
content.
The metatable can then be generated from the plugin code as will always be
present, is guaranteed to be consistent with the code and is available to
ordinary users.

Dawn.

On 10/19/07, FND <Ace_No...@gmx.net> wrote:

--
http://dahukanna.net

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xavier Verges  
View profile  
 More options Oct 19 2007, 10:43 am
From: Xavier Verges <xver...@gmail.com>
Date: Fri, 19 Oct 2007 14:43:58 -0000
Local: Fri, Oct 19 2007 10:43 am
Subject: Re: standardized plugin/macro templates
On Oct 19, 3:24 pm, "dawn ahukanna" <dawn.ahuka...@gmail.com> wrote:

> The metatable can then be generated from the plugin code as will always be
> present, is guaranteed to be consistent with the code and is available to
> ordinary users.

I like the Don't Repeat Yourself idea, so it makes lots of sense that
the same info is not at the same time in the metatable and in the
code.

However, I'm under the impression that things are is simpler if the
single source of truth is the metatable, and that the few plugins that
need access to the metadata do it by quering the parsed metatable.

Worthless 2c from someone that has never published a plugin .-)

-Xv


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dawn ahukanna  
View profile  
 More options Oct 19 2007, 12:08 pm
From: "dawn ahukanna" <dawn.ahuka...@gmail.com>
Date: Fri, 19 Oct 2007 17:08:47 +0100
Local: Fri, Oct 19 2007 12:08 pm
Subject: Re: [twdev] Re: standardized plugin/macro templates

Xavier,
That's a fair comment.

Dawn.

On 10/19/07, Xavier Verges <xver...@gmail.com> wrote:

--
http://dahukanna.net

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Ruston  
View profile  
 More options Oct 19 2007, 3:28 pm
From: "Jeremy Ruston" <jeremy.rus...@gmail.com>
Date: Fri, 19 Oct 2007 20:28:09 +0100
Local: Fri, Oct 19 2007 3:28 pm
Subject: Re: [twdev] Re: standardized plugin/macro templates
The reason that we encode the plugin metadata as slices rather than as
part of the version.{} object is so that we can inspect the metadata
without having to execute the plugin, potentially exposing security
risks. In the future, if we added plugin signatures for security, this
approach would enable us to scan and verify plugins before execution.
It also makes it easier for server side crawlers to pick out the
metadata without needing to be able to execute javascript.

Cheers

Jeremy

On 10/19/07, dawn ahukanna <dawn.ahuka...@gmail.com> wrote:

--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
FND  
View profile  
 More options Mar 19 2008, 12:37 pm
From: FND <F...@gmx.net>
Date: Wed, 19 Mar 2008 16:37:48 +0000
Local: Wed, Mar 19 2008 12:37 pm
Subject: Re: [twdev] standardized plugin/macro templates
I've put some more thought into this, and think that a standardized,
consistent structure for plugin tiddlers is necessary for two reasons:
* provide guidelines for new TiddlyWiki developers
*  simplify automated aggregation (e.g. for the plugin library)

I have attempted to record the current implicit consensus on the
community wiki:
     http://www.tiddlywiki.org/wiki/Dev:Plugin_Template

Naturally, that list is probably incomplete and contentious.
However, it is not supposed to be comprehensive. For example, individual
plugin authors can add custom meta-table fields (e.g.
"BookmarkletReady") to their plugins if they like.
Nevertheless, constructive criticism is very welcome!

Once we have an explict consensus on this, I'd like to whip the official
plugins into shape* to provide a practical reference.

-- F.

* cf. http://groups.google.com/group/TiddlyWikiDev/t/53c0b136c5b3eddb/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »