User talk:Larivact

From ArchWiki
Jump to: navigation, search

Link checker

Hi,

I've noticed that you've been updating many links lately to use HTTPS and flagging dead links, thanks! Are you doing all the work manually or do you have some tool helping you?

-- Lahwaacz (talk) 17:28, 2 June 2017 (UTC)

I have to admit that I was doing it manually. Forgive me, Father, for I have sinned.
I just wrote linkchecker.py a small Python script that detects dead links and HTTP links that can be upgraded to HTTPS. Cheers.–Larivact (talk) 21:06, 2 June 2017 (UTC)
No worries, better late than never :-) As for your comment on automatic editing, that would be obviously very nice and I might even help you with that. Here is my link-checker.py, which currently checks internal links and only a few external links and (semi-)automatically makes the edits. If you'd like, feel free to try it, only know that there are still many false-positives that should be handled differently than what the script suggests, so use the --dry-run option for testing. Also, since there is practically no documentation, feel free to ask anything.
As for the checking strategy, I think that if the updates are fully automated, the script should be able to detect and ignore temporarily unavailable sites. For example, if we run the script daily, it should flag dead links only on the second or third successive failure. For that we would need to have some persistent cache of the responses, so that would be much more difficult though.
-- Lahwaacz (talk) 07:08, 3 June 2017 (UTC)
I uploaded my current version. It seems to work fine except that it fails to recognize identical dead links in man templates. I am not sure how to fix this. Maybe earwig will have an idea. [1]Larivact (talk) 20:47, 3 June 2017 (UTC)
I put my bot on ice till there is a Python MediaWiki parser that supports space-initialized code blocks. It doesn't look like earwig cares about #103. --Larivact (talk) 12:41, 29 June 2017 (UTC)

API login

According to the MediaWiki docs you should get a login token from action=query&meta=tokens and post to clientlogin. action=query&meta=tokens however returns +\ as the token when I am not logged in. --Larivact (talk) 06:23, 17 June 2017 (UTC)

Apparently it's the edit token for anonymous users and you need to send a valid _session cookie to log in. So you need to be logged in in order to log in ... that's just stupid. --Larivact (talk) 07:45, 17 June 2017 (UTC)
The meta=tokens submodule has an additional type parameter, where you should pass login. You might be more happy with this documentation as a complete API reference. -- Lahwaacz (talk) 08:24, 17 June 2017 (UTC)
api='https://wiki.archlinux.org/api.php?format=json&action'
token=$(curl "$api=query&meta=tokens&type=login" | jq -r .query.tokens.logintoken)
curl --data-urlencode "logintoken=$token" "$api=clientlogin"
I get a badtoken error. --Larivact (talk) 09:40, 17 June 2017 (UTC)
Now hook up the cookies:
api='https://wiki.archlinux.org/api.php?format=json&action'
token=$(curl "$api=query&meta=tokens&type=login" -c test.cookie | jq -r .query.tokens.logintoken)
curl --data-urlencode "logintoken=$token" "$api=clientlogin" -b "archwiki_session=$(tail -n 1 test.cookie | awk '{ print $7 }')"
At least it gives me a different error now ;)
-- Lahwaacz (talk) 11:29, 17 June 2017 (UTC)
"You're not allowed to edit this wiki through the API" Discriminating bots, huh? --Larivact (talk) 13:48, 17 June 2017 (UTC)
Not bots, only new accounts. As shown couple of lines below, you need at least 20 edits and 3 days of age. Sorry for the inconvenience, the config was designed against spammers rather than for bots. Also note that technically there are still only 3 bot accounts. -- Lahwaacz (talk) 14:11, 17 June 2017 (UTC)

Moving articles to User space

Hi, thank you for moving articles without content back to the authors' User pages, if I can suggest an improvement you could also update or remove any backlinks in doing so, cheers :) -- Kynikos (talk) 11:17, 13 August 2017 (UTC)

Of course, thanks for cleaning up after me. --Larivact (talk) 11:38, 13 August 2017 (UTC)
Hi, scrolling recent changes here, I'm not sure about a couple of moves today. For example, User:Thestinger/Nessus. It has a dozen contributors over years, software is uptodate & article covers some specific info, a Nessus_(Русский) translation exists too. Why does it not have enough flesh to stay in Main? --Indigo (talk) 19:14, 17 August 2017 (UTC)
Hi, the installation note is superfluous, if you are interested in how a PKGBUILD file works, read it; when a PKGBUILD does a silent HTTP request this should be fixed. The post-installation setup section is unnecessary as the localhost page tells you to do that anyway. The service name and the localhost URL are echoed in post_install. The removal note should be echoed in post_remove. So the few info that's there can just be echoed during installation / removal and doesn't require an article. I now commented my suggestions at the AUR package.[2] --Larivact (talk) 05:25, 18 August 2017 (UTC)
Thanks, all good reasons, and good move to suggest the improvements to the AUR package. Yet, consider the following: (1) How did you come up with the improvements for the PKGBUILD? Without installing the package or scrolling years of comments, the info in the article helped you. You sure are right it is better served in the PKGBUILD, but it is not there yet - and if you did not explain here, the move reasons would not be transparent. (2) What may happen in six months, if another user sees there is no article on Nessus yet? S/he may create one from scratch, rather than improving an existing (fixing style and removing then superfluous info), or reconsider after finding the previous one via a Template:Archive). (3) Since User pages are not indexed in our search, there is no direct way to find the current one. Moving it like this also leaves translator teams in a flux figuring why the original is gone.
I'm appreciating your effort to clean-up too, please don't think otherwise. I'd like to make another suggestion: We have Template:Stub and want to archive it. The problem is that it is still used in many articles, Special:WhatLinksHere/Template:Stub. Among these will be clearer cut candidates for archiving/Template:Merge for otherwise useful info/move to user space (the latter should be primarily for articles a single contributor started but never got round to bringing it to a full article). Cheers. --Indigo (talk) 08:28, 18 August 2017 (UTC)
Thanks, I wasn't aware of the confusion I caused. I moved the articles to the User namespace since I didn't get archiving - I thought it was a dedicated feature. I'll undo my recent moves. --Larivact (talk) 18:27, 18 August 2017 (UTC)
So do we have a uniform strategy on when to Archive something and when to move something back to the original author's user page? E.g. [3], [4], [5] would fall under the above "single contributor" criterion...
Also I'll take advantage of this to remind ourselves of the behemoth discussion ArchWiki_talk:Administrators#Should_we_remove_or_archive_obsolete_articles.3F which is not yet completed. -- Alad (talk) 18:55, 18 August 2017 (UTC)
I'd say if it has only one contributor (excluding translators adding language links, bot edits etc.) and it is not very old (e.g. up to 1 or 2 years), then move it to the user namespace, otherwise archive it. -- Lahwaacz (talk) 19:36, 18 August 2017 (UTC)
Sounds good to me. While it can get arbitrary, I'd also exclude simple fixes done by staff to help a new article to par style-wise.
@Larivact: thanks again. --Indigo (talk) 17:10, 19 August 2017 (UTC)
I agree too with Lahwaacz's proposed guidelines, we can make them official in Help:Procedures#Remove an entire page. Sorry I don't have time to resume ArchWiki_talk:Administrators#Should_we_remove_or_archive_obsolete_articles.3F at the moment. -- Kynikos (talk) 09:39, 20 August 2017 (UTC)
I'd make it depend on the current amount/quality of information. When something is only a short stub / a style mess it's not really worth archiving. On the other hand when we deal with all such pages and monitor new pages the two year rule should work.--Larivact (talk) 15:13, 23 August 2017 (UTC)
Also note that when a page has dozens of contributors and it's still "a short stub / a style mess", it's not really worth moving to the subpage of the first editor. If something's not worth archiving, we might as well delete it. -- Lahwaacz (talk) 16:43, 23 August 2017 (UTC)
I've started deleting pages that are either irrelevant to Arch (e.g. ArchAudio which was some random third-party project, now dead) or are "stubs" without meaningful contribution (e.g. Bankid). @Larivact: great work on the categorizing/cleanup you're doing btw. -- Alad (talk) 10:29, 24 August 2017 (UTC)
N.B. If there's a related page (such as a modern replacement), it's likely better to redirect pages there rather than delete or archive them. All this does show there's gaps in Help:Procedures#Remove an entire page and I agree to expand it. -- Alad (talk) 10:36, 24 August 2017 (UTC)
I absolutely don't want to duplicate ArchWiki talk:Administrators#Should we remove or archive obsolete articles? here, but my position is that for the moment the issue is regulated by Help:Procedures#Remove an entire page which only considers deletion in case of "spam or other clearly malicious content". I think that all contributions that made it to stay published for long periods (ArchAudio even since 2009) are part of the history of the wiki and should not be deleted. I don't see the advantages of deleting except when in need to censor the content; the data is not actually removed from the database, so it's not even a relief for the server, as small as it would even be, and I still regret having the habit of deleting pages and especially discussions before the only (and I hope last) occasion in which the deleted articles were actually purged from the database without any warning. -- Kynikos (talk) 17:40, 26 August 2017 (UTC)
In the case of ArchAudio I would say it never belonged on the wiki in the first place, or classifies as spam. See [6] which raised the original concern but was closed arbitrarily by two users. In the other cases I agree they might as well have been moved back to the user namespace. -- Alad (talk) 12:54, 27 August 2017 (UTC)
Topic is closed but I do think some pages should redirect/merged to List of applications. I am now reviewing pages moved to user namespace and do the work if approprite,

"rewrite"

Hi, thanks for going over wiki articles but the motivation for removing information with "rewrite" is not sufficient, particularly when it is not clear why said information is irrelevant to the article. For example, in [7] you've removed mention of the commonly used web form located at https://ptpb.pw/f as well as any information what a post request is, without motivating why. Similar to Help:Procedures, which also spawned [8] and subsequent discussion.

Some examples which do it right: [9], [10]. Alad (talk) 14:00, 21 August 2017 (UTC)

Thanks for reminding me.
you've removed [...] any information what a post request is
I am not really a fan of linking every tech concept to remote sources. If they are interested they can just search the internet. --Larivact (talk) 14:37, 22 August 2017 (UTC)
It doesn't harm to point our readers to the correct resources (hidden amongst all the blogs and stackoverflow links...), particularly when it adds little to no weight to the article. In the case of pb there's also no dedicated curl article, so some added context in the form of a few links is helpful. Cheers -- Alad (talk) 21:05, 22 August 2017 (UTC)