help me upload patterns to the /pattern directory

For general discussion about Conway's Game of Life.
Post Reply
User avatar
testitemqlstudop
Posts: 1365
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

help me upload patterns to the /pattern directory

Post by testitemqlstudop »

WHY DOES IT SAY YOU CAN UPLOAD ONLY IMAGES
User avatar
dvgrn
Moderator
Posts: 12049
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: help me upload patterns to the /pattern directory

Post by dvgrn »

testitemqlstudop wrote: October 15th, 2019, 6:38 am WHY DOES IT SAY YOU CAN UPLOAD ONLY IMAGES
Interesting combination -- all-caps shouting at 85% size. What's that about?

Assuming you're talking about uploading patterns to the LifeWiki patterns collection, see LifeWiki:Pattern_pages#Pattern_files:
One action that can only be performed by the site administrator or other LifeWiki moderators is uploading pattern files. These are the files in RLE and plaintext format that are downloadable from most pattern pages, as well as the macrocell, compressed RLE and macrocell, and .zip archive files available on some pattern pages) to the LifeWiki. The reason for this restriction is twofold. First, it is for security reasons as people download and execute those files on their hard drive so the last thing we want is someone uploading a virus or some such malicious thing. Second, the server that LifeWiki is run on simply doesn't like automatic uploads of files in strange file formats.
The following paragraphs explain how the RLE:{pname} namespace works, and the current setup for automagically turning RLE-namespace articles into uploaded pattern files... every now and then.
User avatar
testitemqlstudop
Posts: 1365
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: help me upload patterns to the /pattern directory

Post by testitemqlstudop »

Okay, but why can't we host everything on pages like "RLE:long10boat" on LifeWiki?
User avatar
apg
Moderator
Posts: 3007
Joined: June 1st, 2009, 4:32 pm

Re: help me upload patterns to the /pattern directory

Post by apg »

testitemqlstudop wrote: October 15th, 2019, 9:18 am Okay, but why can't we host everything on pages like "RLE:long10boat" on LifeWiki?
Then it takes a lot more effort to download the RLE itself (I don't believe there's an easy way to access the raw contents of a wiki page).
What do you do with ill crystallographers? Take them to the mono-clinic!
dani
Posts: 1221
Joined: October 27th, 2017, 3:43 pm

Re: help me upload patterns to the /pattern directory

Post by dani »

calcyman wrote: October 15th, 2019, 12:04 pm
testitemqlstudop wrote: October 15th, 2019, 9:18 am Okay, but why can't we host everything on pages like "RLE:long10boat" on LifeWiki?
Then it takes a lot more effort to download the RLE itself (I don't believe there's an easy way to access the raw contents of a wiki page).
Clicking 'view source' or 'edit page' usually does this, although I'm not sure if this is what is needed.
User avatar
dvgrn
Moderator
Posts: 12049
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: help me upload patterns to the /pattern directory

Post by dvgrn »

danny wrote: October 15th, 2019, 12:17 pmClicking 'view source' or 'edit page' usually does this, although I'm not sure if this is what is needed.
Yes, that's as close as you can get at the moment, without some automated code to extract just the contents of the "wpTextbox1" text box. If your URL is of this form

https://conwaylife.com/w/index.php?title=RLE:r2d2&action=edit

then the textbox and its contents will be the same no matter if you're logged in or not (though the rest of the page looks quite different).
testitemqlstudop wrote: October 15th, 2019, 9:18 am Okay, but why can't we host everything on pages like "RLE:long10boat" on LifeWiki?
We could definitely get by with that if we had to. But at least for the moment, we're still trying to support the old standard LifeWiki pattern links, which allow for cleaner links to the RLE pattern file with no HTML junk, and also allow the "all.zip" LifeWiki pattern archive to be automatically regenerated every night.

So, for example, if you want to create RLE:{pname} files for all those articles you made recently about long^N vessels, then I'll run the script and drop all the resulting new patterns into the conwaylife.com/patterns directory. As a nice side effect, as soon as you make the RLE:{pname} files, the article infoboxes will start putting up a LifeViewer picture of the object, instead of an image redlink.

EDIT: Okay, Ian07 has done the RLE-namespace additions for long^N barge and so on. I'll try running the auto-update script now and see how it goes.

If anyone else is interested in doing a trial run of the script but has trouble getting it running, please let me know. It should work for anyone, but A) no doubt the documentation could be improved, and B) the files created by the script have to be uploaded by a LifeWiki moderator, so they could maybe just be attached to a forum post in the form of a ZIP archive.
User avatar
dvgrn
Moderator
Posts: 12049
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: help me upload patterns to the /pattern directory

Post by dvgrn »

The recent MediaWiki update broke version 1.5 of the auto-update script. Version 1.7 is now working and checked in.

The script generated a few dozen new .rle and .cells files, which have been uploaded. The /patterns directory is now back in synch with the contents of the raw RLE namespace, LifeWiki and Catagolue synthesis costs are back in alignment again, and so forth.

The script made a few complaints about "plaintext = false" in the HWSS on HWSS 5 and 8 articles, but those are candidates for deletion so maybe there's no point in fixing them. Ordinarily an article wouldn't include "plaintext = false" in the infobox... though maybe this could be used for cases like switch-engine ping-pong where the RLE pattern is too big to allow for a reasonable .cells file. At the moment the convention is just not to put in a "plaintext" info line at all.

For smaller patterns, if there's currently an RLE pattern available on the server, the script will use that to create an equivalent .cells file to be uploaded. So including plaintext = false usually just means the article will have to be edited again later.

Conversely, it's okay to put in rle = true and plaintext = true as soon as RLE is safely added to the RLE namespace. The links will start working as soon as the script runs again.
Post Reply