#replace: puzzle

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

#replace: puzzle

fustbariclation
Well, it's a puzzle for me.. What am I doing wrong? As you can see,
I've tried it straight and I've tried it with <nowiki> all over the
place.

{{#replace:{{#replace:{{#replace:{{#replace:{{#ask: [[category:Book]]
[[Author::Leo Tolstoy]]
| ?Book
| ?Chapter
| mainlabel=-
| format=template
| template=Book_Value
}}|<nowiki>[[</nowiki><nowiki>
</nowki>|<nowiki>[[</nowiki>}}|<nowiki>#
</nowiki>|<nowiki>#</nowiki>}}|<nowiki> </nowiki>War|War}}|<nowiki>
</nowiki>CHAPTER|CHAPTER}}

Gives me:

[[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_I| CHAPTER_I]]

[[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_II| CHAPTER_II]]

Every time. For some reason, I can't get it to remove the blank after
the '[[' or after the '#'.

Any suggestions gratefully received!

------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: #replace: puzzle

Cavila Contrafibularity
Not sure if it helps, but you could try the ReplaceSet extension instead:

https://www.mediawiki.org/wiki/Extension:ReplaceSet

Best,
Cav

> From: [hidden email]
> Date: Wed, 27 May 2015 09:01:39 +0200
> To: [hidden email]
> Subject: [Semediawiki-user] #replace: puzzle
>
> Well, it's a puzzle for me.. What am I doing wrong? As you can see,
> I've tried it straight and I've tried it with <nowiki> all over the
> place.
>
> {{#replace:{{#replace:{{#replace:{{#replace:{{#ask: [[category:Book]]
> [[Author::Leo Tolstoy]]
> | ?Book
> | ?Chapter
> | mainlabel=-
> | format=template
> | template=Book_Value
> }}|<nowiki>[[</nowiki><nowiki>
> </nowki>|<nowiki>[[</nowiki>}}|<nowiki>#
> </nowiki>|<nowiki>#</nowiki>}}|<nowiki> </nowiki>War|War}}|<nowiki>
> </nowiki>CHAPTER|CHAPTER}}
>
> Gives me:
>
> [[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_I| CHAPTER_I]]
>
> [[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_II| CHAPTER_II]]
>
> Every time. For some reason, I can't get it to remove the blank after
> the '[[' or after the '#'.
>
> Any suggestions gratefully received!
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
     
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: #replace: puzzle

jongfeli
In reply to this post by fustbariclation
Hello Peter

I don't know how the "source" data looks but what is the template doing, I
assume it creates a link? Can you post the results from the basic ask
query? There seem to be "line feeds" in your example, is this correct?

We often use the template format to do alter and combine the results from a
ask query and do the "fancy" stuff there, is it possible to move the
{{#replace... part to the template?

Regards,

Felipe.

2015-05-27 9:01 GMT+02:00 Peter Brooks <[hidden email]>:

> Well, it's a puzzle for me.. What am I doing wrong? As you can see,
> I've tried it straight and I've tried it with <nowiki> all over the
> place.
>
> {{#replace:{{#replace:{{#replace:{{#replace:{{#ask: [[category:Book]]
> [[Author::Leo Tolstoy]]
> | ?Book
> | ?Chapter
> | mainlabel=-
> | format=template
> | template=Book_Value
> }}|<nowiki>[[</nowiki><nowiki>
> </nowki>|<nowiki>[[</nowiki>}}|<nowiki>#
> </nowiki>|<nowiki>#</nowiki>}}|<nowiki> </nowiki>War|War}}|<nowiki>
> </nowiki>CHAPTER|CHAPTER}}
>
> Gives me:
>
> [[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_I| CHAPTER_I]]
>
> [[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_II| CHAPTER_II]]
>
> Every time. For some reason, I can't get it to remove the blank after
> the '[[' or after the '#'.
>
> Any suggestions gratefully received!
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: #replace: puzzle

Luis Miguel Morillas
And what is in your template Book_value?

Saludos,

-- luismiguel  (@lmorillas)

2015-05-27 15:30 GMT+02:00 Felipe de Jong <[hidden email]>:

> Hello Peter
>
> I don't know how the "source" data looks but what is the template doing, I
> assume it creates a link? Can you post the results from the basic ask
> query? There seem to be "line feeds" in your example, is this correct?
>
> We often use the template format to do alter and combine the results from a
> ask query and do the "fancy" stuff there, is it possible to move the
> {{#replace... part to the template?
>
> Regards,
>
> Felipe.
>
> 2015-05-27 9:01 GMT+02:00 Peter Brooks <[hidden email]>:
>
> > Well, it's a puzzle for me.. What am I doing wrong? As you can see,
> > I've tried it straight and I've tried it with <nowiki> all over the
> > place.
> >
> > {{#replace:{{#replace:{{#replace:{{#replace:{{#ask: [[category:Book]]
> > [[Author::Leo Tolstoy]]
> > | ?Book
> > | ?Chapter
> > | mainlabel=-
> > | format=template
> > | template=Book_Value
> > }}|<nowiki>[[</nowiki><nowiki>
> > </nowki>|<nowiki>[[</nowiki>}}|<nowiki>#
> > </nowiki>|<nowiki>#</nowiki>}}|<nowiki> </nowiki>War|War}}|<nowiki>
> > </nowiki>CHAPTER|CHAPTER}}
> >
> > Gives me:
> >
> > [[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_I| CHAPTER_I]]
> >
> > [[ War_and_Peace/BOOK_EIGHT:_1811_-_12# CHAPTER_II| CHAPTER_II]]
> >
> > Every time. For some reason, I can't get it to remove the blank after
> > the '[[' or after the '#'.
> >
> > Any suggestions gratefully received!
> >
> >
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Semediawiki-user mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/semediawiki-user
> >
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user