Hi there, just noticed a bit of oddness when using subst:
((#invoke:GetShortDescription|main |name=Brazil |only=explicit))
→ table((#invoke:GetShortDescription|main |name=Brazil))
→ table((subst:#invoke:GetShortDescription|main |name=Brazil |only=explicit))
→((subst:#invoke:GetShortDescription|main |name=Brazil))
→ country in South AmericaOlivaw-Daneel (talk) 10:19, 23 January 2023 (UTC)
Fred Gandt · talk · contribs
10:57, 23 January 2023 (UTC)((subst:User:Fred Gandt/sandbox/Get short description |name=Brazil |only=explicit ))
→ tableFred Gandt · talk · contribs
11:06, 23 January 2023 (UTC)
Fred Gandt · talk · contribs
11:09, 23 January 2023 (UTC)Fred Gandt · talk · contribs
13:04, 23 January 2023 (UTC)
((annotated link))
which is already horrible to maintain and will only get worse, so eventually that template will being using this module anyway 😁 Substituting is always a pain; the existence of various kludges to get around the issue is proof of it; safesubst, subst and all kinds of weird breaking of inclusion tags... The removal of preprocessing from the module will improve performance anyway, so it's good to do even if not for fixing the substitution issue. Fred Gandt · talk · contribs
04:44, 24 January 2023 (UTC)Fixed in my test Module; needs more testing before pushing
((subst:#invoke:User:Fred Gandt|main |name=Brazil |only=explicit))
→ Country in South America((subst:#invoke:User:Fred Gandt|main |name=Brazil))
→ Country in South AmericaFred Gandt · talk · contribs
09:26, 24 January 2023 (UTC)
Pushed to release; nice little performance boost too:
Old NewPP limit report Parsed by mw1351 Cached time: 20230124093803 Cache expiry: 1814400 Reduced expiry: false Complications: [vary‐revision‐sha1, vary‐page‐id, show‐toc] CPU time usage: 0.276 seconds Real time usage: 0.339 seconds Preprocessor visited node count: 566/1000000 Post‐expand include size: 20103/2097152 bytes Template argument size: 744/2097152 bytes Highest expansion depth: 14/100 Expensive parser function count: 7/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 4974/5000000 bytes Lua time usage: 0.208/10.000 seconds Lua memory usage: 15322087/52428800 bytes Number of Wikibase entities loaded: 0/400
NewNewPP limit report Parsed by mw1478 Cached time: 20230124094020 Cache expiry: 1814400 Reduced expiry: false Complications: [vary‐revision‐sha1, vary‐page‐id, show‐toc] CPU time usage: 0.184 seconds Real time usage: 0.237 seconds Preprocessor visited node count: 566/1000000 Post‐expand include size: 20103/2097152 bytes Template argument size: 744/2097152 bytes Highest expansion depth: 14/100 Expensive parser function count: 7/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 4974/5000000 bytes Lua time usage: 0.138/10.000 seconds Lua memory usage: 15322564/52428800 bytes
Number of Wikibase entities loaded: 0/400
Fred Gandt · talk · contribs
09:44, 24 January 2023 (UTC)
For the record: there's still a problem; it's just a different problem. Fred Gandt · talk · contribs
12:50, 24 January 2023 (UTC)
I think I fixed it; it's plugged into Module:Annotated link and the results are pretty nifty:
Code: ((#invoke:Annotated link|main |name=The Partisan |quote=yes |only=wikidata |desc_first_letter_case=upper |wedge=from the album ''[[Songs from a Room]]'' |aka=La Complainte du partisan |aka_lang=fr ))
Result: "The Partisan", also known as La Complainte du partisan, from the album Songs from a Room – Song composed by Anna Marly with lyrics by Emmanuel d'Astier de La Vigerie performed by Leonard Cohen
And yes, it works if it's substed 😉 Fred Gandt · talk · contribs
21:28, 24 January 2023 (UTC)
((#invoke:GetShortDescription|main |name=Oceania |only=explicit))
→ table((#invoke:GetShortDescription|main |name=Oceania))
→ table((subst:#invoke:GetShortDescription|main |name=Oceania |only=explicit))
→((subst:#invoke:GetShortDescription|main |name=Oceania))
→ geographic region that includes Australasia, Melanesia, Micronesia and PolynesiaFred Gandt · talk · contribs
07:42, 26 January 2023 (UTC)Fred Gandt · talk · contribs
10:30, 26 January 2023 (UTC)I see "Result: table" a couple of times in the documentation - is that intentional? Olivaw-Daneel (talk) 05:31, 8 February 2023 (UTC)
Fred Gandt · talk · contribs
05:38, 8 February 2023 (UTC)I see a lot of talk discussing the term "table" being the only thing returned from this, which is the problem I've run into. I see the discussion last was mentioned in February. Any progress, resolution, workaround, or tool that can get just the description returned from an annotated link? Thanks! GeogSage (⚔Chat?⚔) 22:06, 1 December 2023 (UTC)
Fred Gandt · talk · contribs
14:23, 2 December 2023 (UTC)
{|class="wikitable sortable" style="width:99%;"
! style="text-align:center;"|Title
! stype="text-align:center;"|Year first published
! style="text-align:center;"|Short Description
! style="text-align:center;"|Notes
|-
| [[Concepts and Techniques in Modern Geography ]
| 2022
| Series of geography publications
|
|-
|}
{|class="wikitable sortable" style="width:99%;"
! style="text-align:center;"|Title
! stype="text-align:center;"|Year first published
! style="text-align:center;"|Short Description
! style="text-align:center;"|Notes
|-
| [[Concepts and Techniques in Modern Geography ]
| 2022
| {#invoke:GetShortDescription|main |name=Concepts and Techniques in Modern Geography |only=explicit}
|
|-
|}
|stringify=True
it returns text. Olivaw-Daneel (talk) 20:33, 2 December 2023 (UTC)
Fred Gandt · talk · contribs
22:57, 2 December 2023 (UTC)
How does this differ from the older Module:Get short description? Should the two be merged? Dpleibovitz (talk) 00:55, 1 March 2024 (UTC)