Mailing List Archive

Additional numbered styles
Hi,

I'm looking for a way, in wiki, to use some numbered custom types.

What I'm dreaming of is:

- a way to define a custom style (say Requirement, for example),
- see an automatic numbering each time this new style is used (e.g.
[Rn], where n is automatically incremented),
- a kind of index macro showing the list of items using this style on a
page; something like:

[[CustomStyleIndex(Requirement [, PathToThePage/IfNotTheCurrentOne])]]

- hyperlinks working like for Header styles (or anchors).

The idea behind this is to help in writing some traceability matrix, that
is to ensure that all items of a page are covered.

Is anybody aware of such a feature (or something similar) in existing
extensions?
I've had a look on the plug-in / macro list on track-hacks but I haven't
found.

Thanks,
Jean

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/d6d29032-cdc9-4750-84ba-8ca6862412a6n%40googlegroups.com.
Re: Additional numbered styles [ In reply to ]
After a short thought (and trying to make it with existing stuffs), I think
this feature should not concern styles but anchors.
The reasons are:

- I guess adding custom styles is not expected.
- Custom anchors may appear under existing styles / formats (e.g. a
header, or a bullet in a list).
- The custom anchor insertion would look more like current anchors.

If I try to rephrase the spec, this would give (for an anchor tag named
"Requirement"):

- Define an anchor tag, in config file:

[custom_anchor]
# Tag ID: "Requirement", numbering template: "[Rn]" where "n" is the
automatical count.
anchor.tag = Requirement, [(?.)R#]

- Insert an anchor, in a wiki page (say My/Wiki/Page):

[=#Requirement(MyAnchorId)] The product should be able to blah blah blah.
This would display as:
[R1] The product should be able to blah blah blah.

- Insert the custom anchor table:

[[CustomAnchorIndex(Requirement [, My/Wiki/Page])]]
This would display a hyperlink list:
[R1] The product should be able to blah blah blah.
[R2] Another one blah blah blah.

- Referencing an anchor, from a (possibly different) wiki page or a
ticket comment:

see [#Requirement(My/Wiki/Page:MyAnchorId)].
This would display a hyperlink as:
see [My/Wiki/Page.R1].

Jean

Le mardi 1 juin 2021 à 21:48:06 UTC+2, Jean Vittor a écrit :

> Hi,
>
> I'm looking for a way, in wiki, to use some numbered custom types.
>
> What I'm dreaming of is:
>
> - a way to define a custom style (say Requirement, for example),
> - see an automatic numbering each time this new style is used (e.g.
> [Rn], where n is automatically incremented),
> - a kind of index macro showing the list of items using this style on
> a page; something like:
>
> [[CustomStyleIndex(Requirement [, PathToThePage/IfNotTheCurrentOne])]]
>
> - hyperlinks working like for Header styles (or anchors).
>
> The idea behind this is to help in writing some traceability matrix, that
> is to ensure that all items of a page are covered.
>
> Is anybody aware of such a feature (or something similar) in existing
> extensions?
> I've had a look on the plug-in / macro list on track-hacks but I haven't
> found.
>
> Thanks,
> Jean
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/b55f8a67-0843-443f-859e-ed12824cf183n%40googlegroups.com.
Re: Additional numbered styles [ In reply to ]
On Wednesday, June 2, 2021 at 2:27:00 AM UTC-7 v.jean...@gmail.com wrote:

> After a short thought (and trying to make it with existing stuffs), I
> think this feature should not concern styles but anchors.
> The reasons are:
>
> - I guess adding custom styles is not expected.
> - Custom anchors may appear under existing styles / formats (e.g. a
> header, or a bullet in a list).
> - The custom anchor insertion would look more like current anchors.
>
> If I try to rephrase the spec, this would give (for an anchor tag named
> "Requirement"):
>
> - Define an anchor tag, in config file:
>
> [custom_anchor]
> # Tag ID: "Requirement", numbering template: "[Rn]" where "n" is the
> automatical count.
> anchor.tag = Requirement, [(?.)R#]
>
> - Insert an anchor, in a wiki page (say My/Wiki/Page):
>
> [=#Requirement(MyAnchorId)] The product should be able to blah blah blah.
> This would display as:
> [R1] The product should be able to blah blah blah.
>
> - Insert the custom anchor table:
>
> [[CustomAnchorIndex(Requirement [, My/Wiki/Page])]]
> This would display a hyperlink list:
> [R1] The product should be able to blah blah blah.
> [R2] Another one blah blah blah.
>
> - Referencing an anchor, from a (possibly different) wiki page or a
> ticket comment:
>
> see [#Requirement(My/Wiki/Page:MyAnchorId)].
> This would display a hyperlink as:
> see [My/Wiki/Page.R1].
>
> Jean
>
> Le mardi 1 juin 2021 à 21:48:06 UTC+2, Jean Vittor a écrit :
>
>> Hi,
>>
>> I'm looking for a way, in wiki, to use some numbered custom types.
>>
>> What I'm dreaming of is:
>>
>> - a way to define a custom style (say Requirement, for example),
>> - see an automatic numbering each time this new style is used (e.g.
>> [Rn], where n is automatically incremented),
>> - a kind of index macro showing the list of items using this style on
>> a page; something like:
>>
>> [[CustomStyleIndex(Requirement [, PathToThePage/IfNotTheCurrentOne])]]
>>
>> - hyperlinks working like for Header styles (or anchors).
>>
>> The idea behind this is to help in writing some traceability matrix, that
>> is to ensure that all items of a page are covered.
>>
>> Is anybody aware of such a feature (or something similar) in existing
>> extensions?
>> I've had a look on the plug-in / macro list on track-hacks but I haven't
>> found.
>>
>> Thanks,
>> Jean
>>
>
The plugin most similar to what you describe is TracBackLinkPlugin:
https://trac-hacks.org/wiki/TracBackLinkPlugin

It parses the page on save and maintains a database table of backlinks for
populating an index at the end of the page. What you describe is
effectively the same, parse the page to extract the requirements that are
identified by a custom syntax and display those in a macro by pulling from
a database table.

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/726c590e-f8b4-4fae-984e-f3a36f8eb8b3n%40googlegroups.com.
Re: Re: Additional numbered styles [ In reply to ]
I'll give a try...

Thanks Ryan,

Jean

Le 28/09/2021 à 22:23, RjOllos a écrit :
>
> [...]
>
> The plugin most similar to what you describe is TracBackLinkPlugin:
> https://trac-hacks.org/wiki/TracBackLinkPlugin
>
> It parses the page on save and maintains a database table of backlinks
> for populating an index at the end of the page. What you describe is
> effectively the same, parse the page to extract the requirements that
> are identified by a custom syntax and display those in a macro by
> pulling from a database table.
>
> Ryan
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/1b247568-efc4-5df3-4d8b-3c156e14efdb%40gmail.com.