Talk:XTools

This page is a feedback forum for XTools. For reporting bugs, it's preferred that you use Phabricator.

If the issue is urgent and you're unable to use Phabricator, feel free to ping one of the active maintainers.

Articles edited (total)

4

I'm interested in knowing how many edits I've made pages I've edited in the article namespace. I realize the Top Edits tool could be used to determine this (for most editors) by simply counting the entries; however, since I've edited more than 1000 articles, this list is truncated. I noticed that the Edit Counter tool displays a count of the total pages edited under the "General statistics" heading in Pages edited (total), but not for specific namespaces.

Would it be possible/feasible to add a count of pages edited by namespace to the Edit Counter tool and/or increase the maximum number of pages returned in the Top Edits tool beyond 1000? I imagine the latter would be easier to implement and prefer it over the former since I'm also interested in looking at the frequency distribution of my edits in the article namespace.

Also, I realize some editors have edited tens of thousands of pages in the article namespace, so some truncation limit is necessary in the Top Edits tool. It would probably be useful to provide those editors with a summary of the truncated data (this is a third alternative for implementing what I've requested above); i.e., append a statement like either of the following:

• Limited to the first 1000 entries. Username performed X more edits across N more pages in this namespace.
• Limited to the first 1000 entries. Username edited N more pages in this namespace.

Summarizing the X number of edits in those N remaining pages isn't really necessary since one could determine that manually (i.e., subtract the total edits in the namespace by the sum the edits in the first 1000 entries), but that would probably be helpful for some.

Thanks for the suggestions! If Top Edits is the preferred tool, I think the ideal solution would be to paginate the results if there are more than 1,000. This is how the Pages Created tool works. Adding a count of the unique pages edited in a namespace is something a bit easier to do, and I don't think it will be really slow. I have created a ticket for these features at phab:T218531. We also plan to add date range filtering to Top Edits, along with the Edit Counter, which may be helpful in your case. That is tracked at phab:T202552. Regards.

Thanks! I really appreciate it. Filtering the output by date is a novel solution to the truncation problem. Edit: I agree, pagination would be the best way of addressing this.

Anyway, kudos to you guys for creating a really useful set of edit analysis tools.

Average edit size

6

Would it be possible to calculate this as the root square to measure absolute differences?

I.e. net change average of +3, -4 and -5 = ±4

Otherwise stats like average edit size can be skewed by deletions and lead to misleadingly low (or even negative) changes.

Alternatively ignore all -ve values when calculating and report average addition size and average reduction size or equivalent.

Maybe you're talking about variance? If so then yes, this should be an easy change thanks to MySQL built-in functions. They also have a function for standard deviation.

Although variance is the most mathematically reasonable, it is possibly a little technical for many.

I'd actually intended a simpler-to-interpret measure of average byte change whilst ignoring whether its +ve or -ve. For example:

• edit A, +2 bytes
• edit B, +3 bytes
• edit C, -4 bytes
• edit D, -5 bytes

Average

${\displaystyle {\frac {+2+3-4-5}{4}}=-1}$

Average change

${\displaystyle {\frac {{\sqrt {(+2)^{2}}}+{\sqrt {(+3)^{2}}}+{\sqrt {(-4)^{2}}}+{\sqrt {(-5)^{2}}}}{4}}=+3.5}$

${\displaystyle {\frac {+2+3}{2}}=+2.5}$ accounting only for addition edits A and B

Average reduction size

${\displaystyle {\frac {-4-5}{2}}=-4.5}$ accounting only for deletion edits C and D

For the four edits above, the average is -1, which is tricky to interpret. Do they just make small deletions? Do they make large deletions and additions that happen to almost net cancel? By splitting the additions and reductions, it becomes possible to see whether they e.g. mostly make lost of small additions with the occasional massive deletion.

So much math! =P The issue here is we are bound by what MySQL can do for us. Otherwise we have to pull in the edit size of every edit, and run our calculations, which will consume too much memory for some users. I can say of the options you've laid out, the average addition and reduction size should be doable, assuming the query is still fast enough. Note we do show the number of small edits (< -20 diff size) vs large edits (> 1000), so I hope that in a way also gives an idea of the size of edits a user typically makes.

I think the average addition size and average reduction size would be interesting statistics to know, but being a statistician makes me more of a dork than the typical editor. The edit size distribution for most editors is probably highly positively skewed, so it might be worthwhile to report to median addition size and median reduction size (either as an alternative to or in addition to those averages).

Pages Created not seeing assessment for one page

3

it shows that the the assessment is unknown for the article on Mary Jobe Akeley, but the article was assessed back in December 2018:https://en.wikipedia.org/wiki/Talk:Mary_Jobe_Akeley

Does something need to prompt the script to re-check? Is there something wrong in the coding of the assessment in the en.wiki?

Thanks

~~~~

It's probably pulling from WikiProject United States because it's the first assessment record in the database, and that one doesn't have a specified "class" ranking. I think we implemented it in this way because we tried to get pages created + assessments all in the same query. On second thought, it shouldn't slow things down much to make this into two different queries, such that we can get the first non-null result for class assessments. I'll look into it!

Thanks!

Ken

Reply to "Pages Created not seeing assessment for one page"

2
Summary by MusikAnimal

This should be fixed.

Why in section Admin Score edit summaries used in the article space and edits to the article space count is same for all users?

Edit summaries are measured only in the mainspace because that's a strictly collaborative area. For instance you generally aren't expected to use edit summaries in your userspace.

Your second point sounds like a bug. This tool admittedly has not been given much attention. I'll try to look into it soon.

4

Is there an easy way to configure what the gadget shows? E.g., seeing who created a page does very little for most editors, but top editors by added text? Potentially very useful.

Top editors by added text is too slow for automatic, real-time metadata that the gadget is meant to provide. There is another gadget out there that does something similar, based on the WikiHistory tool, but I can't seem to find it. It works by precomputing the data ahead of time, which is why its able to serve the stats so quickly. However it is of questionable accuracy. If you want attribution stats (tantamount to this example, but not the same as top editors), I would recommend using the WhoColor browser extension. It's a little hard to setup, but later this year it'll be much easier to install, among other improvements. More at phab:T213813. Hope this helps

Thank you! And is there an easy way to configure this gadget to drop the first editor? It often sticks out conspicuously and is either an old IP or someone who created a redirect (more heat than light).

Sure, we just need to add CSS classes around it and then you can customize it as you please. I've created phab:T216782

Question regarding the API

2

Hello. I'd like to use the api for xtools.

I have a list of wikipedia pages and I'm interested in seeing the number of edits and characters for each of them.

I tried to follow the api instructions. I opened a new directory and installed composer. I downloaded the latest release, unzipped it and moved the files to the directory.

I ran the code php composer.phar install and received this message: The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension..

I tried again with php composer.phar install --ignore-platform-reqs and received this message: Parse error: parse error, expecting ';'' or '{'' in /Volumes/flashdrive/API/vendor/ocramius/package-versions/src/PackageVersions/Installer.php on line 59

Can anyone give me a hand?

If you only need data for WMF wikis (and not your own third-party wiki), you can use the existing public API. There is no need to install XTools on your system. Documentation is at https://xtools.readthedocs.io/en/stable/api/index.html. Specifically I think you want the article info and prose endpoints.

If you do want to install your own XTools instance, ext-intl will be a requirement (it is used to format numbers and dates, etc.). I'm not sure about the Installer.php error you got. I searched and found this GitHub issue that suggests you might have an incompatible version of PHP (should be 7.2).

Hope this helps.

Reply to "Question regarding the API"

2

I noticed that the CheckUser group isn't shown in the "User groups" column of admin stats. I was wondering whether there was a reason for this. Seems relevant to include, especially if we're looking for active checkusers on other projects, for example.

It's supposed to show it but this must have broken when we reworked that tool a while back. Filed a task at phab:T213119

Summaries

2
Summary by MusikAnimal

Fixed! WMF migration complete and XTools was updated accordingly

Hi, the tool seems to be counting more edits as being without edit summaries all of a sudden. Could you tell me what edits are now being counted as without? Is it starting new pages or use of a tool like twinkle perhaps?

It's due to a WMF database migration. All summaries should return in a few days (hopefully). I'm putting up a disclaimer in the XTools interface, and will look into an interim solution until WMF is done with the migration. You can follow updates at phab:T189234.

Changes...?

3

Recently (I'm not sure how long ago) it seems there were some changes. The headings are now defaulted to the right, and their content to left (but lower), which makes it awkward looking, and not as easy to follow. Also, what happened to the edit summary chart? Not that it was all that accurate, but please tell me it's coming back soon, after there has been an update to improve accuracy (and by then the headings will be fixed). Thanks

Sorry for the long response...

The headings are now defaulted to the right, and their content to left (but lower)I'm not sure what you mean. The headings always encompassed the width of the content, and the label is centered. What changed here is new headings were added for "Basic information" and "Edits (live)". We did this because we removed some statistics from the Edit Counter, so things were moved around to make use of the available space on the page. If you have any ideas on how to reorganize it and make it look nice, please share :)

For edit summaries: The WMF database that stores summaries was recently redone. Now all summaries (edits, log entries, etc.) live in a different database table. It's too slow to query these alongside all the other expensive queries that the Edit Counter runs, so instead we're showing links (see bottom of the "Edits (live)" section) to the dedicated tools to get this data: Edit Summaries and Automated Edits (which uses the summaries table).

But, you are right -- the summary stats we used to show in the Edit Counter weren't precise. They just checked where the summary was blank or non-blank, and didn't account for automated edit summaries like /* Section */. This was for performance. Enter the Edit Summaries tool, which will account for automated edit summaries, giving you what should be 100% accurate results :)

Hope this helps

Thanks for the reply. Would it help if I sent you a screen cap showing the layout of the page (that I'm seeing) and the placement of the headings? Thank again