Difference between revisions of "Creditstable"

From Sega Retro

Line 25: Line 25:
 
i.e. get a list of "backlinks". We could always have a whopping big GAMES category and do a categorymatch to filter things out. How you'd cleanly work out the release dates, I can't say. -[[User:Black Squirrel|Black Squirrel]] ([[User talk:Black Squirrel|talk]]) 13:18, 9 August 2017 (CDT)
 
i.e. get a list of "backlinks". We could always have a whopping big GAMES category and do a categorymatch to filter things out. How you'd cleanly work out the release dates, I can't say. -[[User:Black Squirrel|Black Squirrel]] ([[User talk:Black Squirrel|talk]]) 13:18, 9 August 2017 (CDT)
 
: categorymatch can use wildcards. - [[User:Hivebrain|Hivebrain]] ([[User talk:Hivebrain|talk]]) 14:06, 9 August 2017 (CDT)
 
: categorymatch can use wildcards. - [[User:Hivebrain|Hivebrain]] ([[User talk:Hivebrain|talk]]) 14:06, 9 August 2017 (CDT)
 +
 +
== gee (Hive)brain, what are we doing to do tonight ==
 +
 +
I think
 +
 +
the best course of action is merge ideas from [[:template:CreditsTest]] into this template, and cruicially have it backwards compatible.
 +
 +
i.e. something like
 +
 +
<pre>
 +
<section begin="credits_whatever" />
 +
{{creditstable|
 +
{{creditsrow|Role here|person 1, person 2, person 3}}
 +
{{creditsrow|Alternatively|person 4|person 5|person 6|whatever's easiest}}
 +
{{creditsheader|Same headers as before}}
 +
*'''This is valid too:''' but we'd discourage it going forward
 +
|source=Bums
 +
|ref={{fileref|ButtsMagazine UK 01.pdf|page=4}}
 +
}}
 +
<section end="credits_whatever" />
 +
</pre>
 +
 +
creditsrow would basically just return a bullet point. Splitting the ref from the source might make it easier to work with - dunno.
 +
 +
 +
You'd then have algorithms in the creditsrow and creditsheader templates that will create variables that look like
 +
<pre>
 +
{{#var:SomePerson}} = Mega Drive: Programmer|Special Thanks (Sega)|Master System: Whatever
 +
</pre>
 +
 +
 +
(there may be better ways to format the string but you get the point. Probably want to pass the source through too. )
 +
 +
 +
 +
by doing it this way, we can add a check to creditstable to detect whether it has any "nested" creditsrow templates. If there aren't any, the creditstable template can put the page in a "THIS IS THE OLD CREDITSTABLE SCHEME" category - i.e. the wiki can tell us which pages need updating with minimal effort.
 +
 +
 +
 +
the only thing this doesn't do is give us the date of when the game was released. However, I don't really know how to easily sort things in mediawiki, so I'm not sure what I'd do with that information right now
 +
 +
 +
 +
the ProductionHistory template would transclude the "credits_whatever" section, compare names and pump out a list ("GAME (SYSTEM; DATE) -- ROLE1, ROLE2, ROLE3 (as ALIAS)")
 +
 +
 +
 +
I don't like having to put the section tags in manually but I don't think there's a workaround for that. -[[User:Black Squirrel|Black Squirrel]] ([[User talk:Black Squirrel|talk]]) 14:05, 16 August 2017 (CDT)

Revision as of 14:05, 16 August 2017

Auto-generating production history

I have solved a problem. The code needs cleaning up and the output needs to be formatted better, but as a proof of concept, it's not a bad start.

Given a developer name and a known list of games the developer has worked on, I can retreive the role he/she played during each game's development.

e.g. Mie Kumagai (Sandbox, User:Black Squirrel/Sandbox3)

  • Sandbox –
  • User:Black Squirrel/Sandbox3 –


cons:

  • it's not clean or efficient (i.e. there may be other extensions better suited to this task)
  • every usage of Creditstable will need to be changed
  • it's complicated to explain. Basically I'm generating variables called CREDITS##NAME and transcluding big chunks of wiki pages

this prototype does not handle aliases or multiple roles or multiple platforms (and it's not ignoring square brackets yet), and it could theoretically be automated further to find relevant games, but yeah, this is a thing. Make it better. -Black Squirrel (talk) 14:28, 8 August 2017 (CDT)

I can't really think of a good way to automate credits. The best I've come up with is to have DPL pull from "Category:Mie Kumagai games credits" and about 1000 other similar categories. Not ideal. - Hivebrain (talk) 12:17, 9 August 2017 (CDT)
I did a bit of exploring. You can do this:

i.e. get a list of "backlinks". We could always have a whopping big GAMES category and do a categorymatch to filter things out. How you'd cleanly work out the release dates, I can't say. -Black Squirrel (talk) 13:18, 9 August 2017 (CDT)

categorymatch can use wildcards. - Hivebrain (talk) 14:06, 9 August 2017 (CDT)

gee (Hive)brain, what are we doing to do tonight

I think

the best course of action is merge ideas from template:CreditsTest into this template, and cruicially have it backwards compatible.

i.e. something like

<section begin="credits_whatever" />
{{creditstable|
{{creditsrow|Role here|person 1, person 2, person 3}}
{{creditsrow|Alternatively|person 4|person 5|person 6|whatever's easiest}}
{{creditsheader|Same headers as before}}
*'''This is valid too:''' but we'd discourage it going forward
|source=Bums
|ref={{fileref|ButtsMagazine UK 01.pdf|page=4}}
}}
<section end="credits_whatever" />

creditsrow would basically just return a bullet point. Splitting the ref from the source might make it easier to work with - dunno.


You'd then have algorithms in the creditsrow and creditsheader templates that will create variables that look like

{{#var:SomePerson}} = Mega Drive: Programmer|Special Thanks (Sega)|Master System: Whatever


(there may be better ways to format the string but you get the point. Probably want to pass the source through too. )


by doing it this way, we can add a check to creditstable to detect whether it has any "nested" creditsrow templates. If there aren't any, the creditstable template can put the page in a "THIS IS THE OLD CREDITSTABLE SCHEME" category - i.e. the wiki can tell us which pages need updating with minimal effort.


the only thing this doesn't do is give us the date of when the game was released. However, I don't really know how to easily sort things in mediawiki, so I'm not sure what I'd do with that information right now


the ProductionHistory template would transclude the "credits_whatever" section, compare names and pump out a list ("GAME (SYSTEM; DATE) -- ROLE1, ROLE2, ROLE3 (as ALIAS)")


I don't like having to put the section tags in manually but I don't think there's a workaround for that. -Black Squirrel (talk) 14:05, 16 August 2017 (CDT)