Re: [Wikitech-l] Acquiring list of templates including external links

2016-08-01 Thread Legoktm
Hi,

On 07/31/2016 07:53 AM, Takashi OTA wrote:
> Such links are stored in externallinks.sql.gz, in an expanded form.
> 
> When you want to check increase/decrease of linked domains in chronological
> order through edit history, you have to check pages-meta-history1.xml etc.
> In a such case, traditional links and links by templates are mixed,
> Therefore, the latter ones (links by templates) should be expanded to
> traditional link forms.

If you have the revision ID, you can make an API query like:
.

This will expand all templates and give you the same set of
externallinks that would have ended up in the dump.

-- Legoktm

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Acquiring list of templates including external links

2016-08-01 Thread Gergo Tisza
On Mon, Aug 1, 2016 at 7:46 AM, Marc-Andre  wrote:

> Clearly, all the data to do so is there in the database - and I seem to
> recall that there exists an extension that will allow you to use the parser
> in that way - but the Foundation projects do not have such an extension
> installed and cannot be convinced to render a page for you that would
> accurately show what ELs it might have had at a given date.
>

That would be the Memento [1] extension. I'm not sure this is even
theoretically possible - the parser has changed over time and old templates
might not work anymore.

Your best bet is probably to find some old dumps. (Kiwix [2] maybe? I don't
know if they preserve templates.)


[1] https://www.mediawiki.org/wiki/Extension:Memento
[2] https://dumps.wikimedia.org/other/kiwix/zim/wikipedia/
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Acquiring list of templates including external links

2016-08-01 Thread Marc-Andre

On 2016-07-31 10:53 AM, Takashi OTA wrote:


When you want to check increase/decrease of linked domains in chronological
order through edit history


This is actually a harder problem that it seems, even at first glance: 
if you want to examine the links over time then, when you are looking at 
an old revision of an article, you have to contrive to expand the 
templates /as they existed at that time/ and not those that exist /now/ 
as the Mediawiki engine would do.


Clearly, all the data to do so is there in the database - and I seem to 
recall that there exists an extension that will allow you to use the 
parser in that way - but the Foundation projects do not have such an 
extension installed and cannot be convinced to render a page for you 
that would accurately show what ELs it might have had at a given date.


-- Coren / Marc


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Acquiring list of templates including external links

2016-07-31 Thread Takashi OTA
Hoi,

This is an inquiry from my friend in academia, researching about Wikipedia.

He would like to know whether there's a way to acquire a list of templates
including external links. Here are some examples including external links.

https://ja.wikipedia.org/wiki/Template:JOI/doc
https://ja.wikipedia.org/wiki/Template:Twitter/doc

Such links are stored in externallinks.sql.gz, in an expanded form.

When you want to check increase/decrease of linked domains in chronological
order through edit history, you have to check pages-meta-history1.xml etc.
In a such case, traditional links and links by templates are mixed,
Therefore, the latter ones (links by templates) should be expanded to
traditional link forms.

Sorry if what I am saying does not make sense.
Thanks in advance,

--Takashi Ota [[U:Takot]]
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l