Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/thpatch/TouhouPatchCenter

Creates a thcrap server from MediaWiki pages.
https://github.com/thpatch/TouhouPatchCenter

TPCFmtCSV: Prevent the subkeys from being encoded as a JSON array.

So here we have…:
• PHP not distinguishing between maps and regular sequential arrays
• PHP auto...

ab0254382013807285d453b36da074503cd96a35 authored almost 7 years ago by nmlgc <[email protected]>
Add a parser for CSV strings.

a4c7b280933cea5ac992ca9d5995fa49f7a8a822 authored almost 7 years ago by nmlgc <[email protected]>
Remove an unncessary check that prevented theme page evaluation on save.

93753c21e490173ee275cd776adf6c2241304ff0 authored about 7 years ago by nmlgc <[email protected]>
{{thcrap_tl_patches}} is defined in TPCTLPatches.php, not hooks/PCInclude.php.

a5dae734732ae2e9b245292d09bb20e31ed603a0 authored about 7 years ago by nmlgc <[email protected]>
Finally update themes.js independently from Music Room pages.

5e486eed8eddf7bd98968d682ea6b80cc10c7794 authored about 7 years ago by nmlgc <[email protected]>
Finally move music theme translation into a separate function.

1b7874eb5bf615cbe9cf8b9bc724d8d492038728 authored about 7 years ago by nmlgc <[email protected]>
TPCInclude: Escape [ and ] for wiki file names.

Fixes the wp_result* files in NSML.

1d0ac57ed307b049a129c64bd16c3e4fd9e0e439 authored about 7 years ago by nmlgc <[email protected]>
Tasofro: Replace unsupported bold and italic markup with asterisks.

4da085f3ddc7c9aecf596fad3ac9f6ed565ec74d authored about 7 years ago by nmlgc <[email protected]>
Generalize per-file automatic codes.

d48e8c360336af38964ed9160f2a8e86c95045c7 authored over 7 years ago by nmlgc <[email protected]>
Tasofro: Don't escape percent signs in {{tt}} templates.

Unlike ZUN, they don't sprintf() every single line.

76a592a2e2cfed2d2a8684833f937482d98b55d8 authored over 7 years ago by nmlgc <[email protected]>
TPCFmtGentext: Write one-line translations as JSON strings rather than arrays.

Everyone uses thcrap's flexible JSON arrays to access the translations
anyway, so this doesn't b...

107f7f1dcd213f988fc4650129bfe5cb8c871f3d authored over 7 years ago by nmlgc <[email protected]>
TPCFmtGentext: Sanitize TH14.3 nicknames.

Broke the Japanese patch.

e1461d951101c1e3c5a066ee3121c50c435abf20 authored over 7 years ago by nmlgc <[email protected]>
TPCFmtGentext: Don't check for empty IDs.

Because empty() in PHP, I language I'd never use for anything else, also
means means 0, because ...

3c4539199752628302ea8dd3d3715289c4a8ae30 authored over 7 years ago by nmlgc <[email protected]>
Add a parser for generic text.

Yup, this code was lying around there, 90%, finished for three years.
But hey, better late than ...

9a9e517852000641bb3f6204f54837962834d96a authored over 7 years ago by nmlgc <[email protected]>
Add {{thcrap_game_file}}.

Because .jdiff is ugly. Interesting that we haven't had this before.

0c269b12ef9623a173862d6a2a742a1e0ec67c28 authored over 7 years ago by nmlgc <[email protected]>
TPCFmtSpells: Allow strings as IDs.

9bb74b7a7b2e2632fc12a6dd8b3f1c41c818d229 authored over 7 years ago by nmlgc <[email protected]>
Finally support proper file deletion from the wiki interface.

e0d6e4ecdc3e9dcfb59981c00072968cff50d392 authored almost 8 years ago by nmlgc <[email protected]>
Tasofro: Use a separate code counter for every file.

0c0ec0d00ca0bdb0ea95becf27a987a09bcf58eb authored almost 8 years ago by nmlgc <[email protected]>
Tasofro: Keep patch stacking functional.

9ad988e5c9b2a0359171e2711616ac818c69c413 authored almost 8 years ago by nmlgc <[email protected]>
Add a parser for Tasofro dialogs.

3d30bf032fbf0851752f2ff1a162ff1a627261b6 authored almost 8 years ago by nmlgc <[email protected]>
MWScrape: Remove multi-line HTML comments prior to parsing.

Previously, you could type an unclosed {{Template into a <!--comment
block--> at the beginning o...

bb6f83441f92432d55e3404bbbc1ff9998190871 authored about 8 years ago by nmlgc <[email protected]>
TPCVersions: Support code page specifications as an optional 4th array element.

14716a171a21afb36d4ddc2c1561293b028acdf2 authored over 8 years ago by nmlgc <[email protected]>
Whitespace cleanup.

d4fa8de2562d76ebfe9df7963872024201dbf71d authored over 8 years ago by nmlgc <[email protected]>
Implement {{thcrap_neighbors}}.

85be74cfec0c774f0cfc35c116f3fd95510cafa2 authored over 10 years ago by nmlgc <[email protected]>
Refactor GeoIP table cell creation into its own function.

d065fb1751f695e272dd646737aad7541fa58291 authored over 10 years ago by nmlgc <[email protected]>
Remove the backwards compatibility crutch of keeping the file list in patch.js.

The Nmlgc repository has moved beyond that, and now it's time for thpatch to follow suit.

357e8ee4d06b7f9e42f881d01a08f8b24dbc559f authored over 10 years ago by nmlgc <[email protected]>
sanitize(): Optionally match \n around translation tags and comments.

The previous regex worked with the music room, but left a <translate> tag at the beginning of ev...

a00b62bb4232e946329950062213f1be80cf967f authored almost 11 years ago by nmlgc <[email protected]>
For now, make sure that patch dependencies are stored as an array.

Whoops... This broke automatic dependency resolution for every patch with just one dependency. O...

cb7c38a50510b097bdbfa4abd193bd1889e40723 authored almost 11 years ago by nmlgc <[email protected]>
TPCBinhack: Make the 'title' key optional.

4bc6eb1c9cf7e44860e4df50b798a96a12fd9f7c authored almost 11 years ago by nmlgc <[email protected]>
TPCFmtMsg: Use the ruby markup parsing introduced in the 2014-01-27 build of thcrap.

Unfortunately, this no longer has the nice property that it works *anywhere*. On the other hand,...

7b47bd438129bb1093c211982de798772ef8146d authored almost 11 years ago by nmlgc <[email protected]>
TPCStorage: Write the contact e-mail address to repo.js.

8eca28c6b974fa13b01018a3117af248d7e02ea8 authored almost 11 years ago by nmlgc <[email protected]>
Parse breakpoint addresses as flexible arrays.

Yes, multi-address breakpoints are a thing now.

95ccbb35de5afe6996d2acc044f6dda83fe66fda authored almost 11 years ago by nmlgc <[email protected]>
sanitize(): Separately filter <!--T:--> comments followed by a newline.

This fixes the surplus newline in all the Japanese Music Rooms.

675dc3f2d557a13fb8e138a2059f3f58e539c86f authored almost 11 years ago by nmlgc <[email protected]>
parseCSV(): Return flexible arrays.

9c0e58da145807f577a88d4696f539e9a29faf75 authored almost 11 years ago by nmlgc <[email protected]>
Rename the patch list "server" concept to "repository".

Prior to this, we had two things called "server": the list of patches downloadable from one plac...

a766c5f0d0c79b7ee5ab28efb6007188712fce06 authored about 11 years ago by nmlgc <[email protected]>
Cleanup.

cf568bebf09a0451742b688695965fee4614d3ba authored about 11 years ago by nmlgc <[email protected]>
TPCBinhack: Assign the full array returned by parseCSV.

Because why wouldn't we? This fixes the most fatal bug ever, where all binary hack addresses bey...

8a8e3a794615c5c5e9fcc32a433d4ae56b5f5820 authored about 11 years ago by nmlgc <[email protected]>
Remove HTML comments and translation markup.

With a lengthy justification about why we use regex for it after all.

0d0eb0379ebc73f4593db69bb39d1e5787da585d authored about 11 years ago by nmlgc <[email protected]>
Sanitize spell card name and owner, as well as assist character names.

4e84482a09cf07676e96290717f890751e7bdab6 authored about 11 years ago by nmlgc <[email protected]>
{{thcrap TL include}}: Map the base page to its language code as well.

This is the easy part of the Japanese patch.

e8c8c8130e6221b304272907b1ded1e9ed6036f5 authored about 11 years ago by nmlgc <[email protected]>
TPCStorage: Require to specify the back-end class in the server array.

Much better than intransparently hardcoding the class choice depending on certain keys in the ar...

8411fa737ce73cfc33fcab24cb51cef40ae29a14 authored about 11 years ago by nmlgc <[email protected]>
TPCStorage: Fix two possible PHP warnings.

85ca72887023e04c84720fa2a1b83d16dc106643 authored about 11 years ago by nmlgc <[email protected]>
Use Composer to manage the dependency on phpseclib.

ff947f6447946f9fee019d0dfda5f5f292284024 authored about 11 years ago by nmlgc <[email protected]>
Write the server title and neighbor list.

ed1822d90a9eed239752f91694549f7ede6d6b1c authored about 11 years ago by nmlgc <[email protected]>
Binhack: Use CSV parsing for addresses.

Necessary for relative addresses. Since thcrap obviously has to validate these too, another leve...

a7a7d664f0dfadead7394e8bf9063b4b19e94175 authored about 11 years ago by nmlgc <[email protected]>
TPCUtil::sanitize(): Convert &nbsp; to Unicode no-break spaces.

This facilitates a much nicer workaround for padding template parameters than using full-width s...

75d338f400c4899f8a7b2f26dd0c7029c30d4265 authored about 11 years ago by nmlgc <[email protected]>
Escape percent signs by default, but not in hardcoded strings.

In the end, we wanted to have this after all. Keeping all of the original sprintf calls is the o...

e82c21049ffccbd784dd354cebf506710e3cbfcc authored about 11 years ago by nmlgc <[email protected]>
TPCUtil::sanitize(): Convert MediaWiki's bold and italic markup.

31f6d620d623ae1e826842fa6e1b25b15f6b8726 authored about 11 years ago by nmlgc <[email protected]>
Check the class of the $content object when getting restricted templates.

Fixes a bug that effectively made it impossible for users without the tpc-restricted right to cr...

3566677a379003749f0f5db9ff7ea57703a7d5ca authored about 11 years ago by nmlgc <[email protected]>
Remove patch.js from its own "files" block.

Sounds logical, right? Well, due to PHP's design, this took quite a while to actually work corre...

9b4b1da393f7126345a655cff1938213273b9f25 authored about 11 years ago by nmlgc <[email protected]>
Remove the special treatment of patch.js.

... as far as possible without breaking backwards compatibility, that is.

01636ca421f2f4217e0294d39069e138927baec1 authored about 11 years ago by nmlgc <[email protected]>
Split off the list of patch files to a separate file.

This simplifies the updater quite a lot (if only conceptually), and paves the way for dependency...

468204fb2b409681bd07c9bad2c6fefa8fabb41f authored about 11 years ago by nmlgc <[email protected]>
Show the list of restricted patch templates on blocked edits.

... and all it took was a change to the system message. Nice.

ac42eb8316cd76ac48aa7994d2319d7327a14de0 authored about 11 years ago by nmlgc <[email protected]>
Add a template that lists restricted patch templates.

Yeah, I would have preferred to have wiki links there, but apparently these don't really work wi...

f9e04182f6596162e7c3c5e3b051d62c6d42c425 authored about 11 years ago by nmlgc <[email protected]>
Add a base class for templates rendered by this extension.

Reducing duplication where we can. I'm a bit reluctant to get rid of the MagicWordwgVariableIDs ...

0a60c1b1538ec7f99dd6e3ff3a8a1cbe616033d9 authored about 11 years ago by nmlgc <[email protected]>
Allow free editing around restricted templates.

We only really need to protect the parameters and the number of restricted templates.

2d28efbb1be907ce6b1846d31068252dfb44f2a8 authored about 11 years ago by nmlgc <[email protected]>
Restrict usage of dangerous templates to users with a special right.

Proper, out-of-the-box security, at last.

601f91d7c7842db5407110f2bc0a9ec80438a246 authored about 11 years ago by nmlgc <[email protected]>
TPCFmtMusic: Sanitize theme titles.

fe04cde8b72e207de2666b8446466f3f113c3307 authored about 11 years ago by nmlgc <[email protected]>
Remove {{lang}} wrapper templates.

I've removed them from the pages on Touhou Patch Center as well, this is just to make sure we'll...

f1d2b50c62cd2d6c184c770a60c339dabed03107 authored about 11 years ago by nmlgc <[email protected]>
Cleanup.

Some coding style and redundancy issues. Also, make the page save hook match its actual name and...

e96a95d1c911096ed31590d936998f7788dfe4ff authored over 11 years ago by nmlgc <[email protected]>
TPCFmtString: Add parsing for ASCII-limited strings.

9d4f30e3be36debf788dbf2115882eaf9976c5f8 authored over 11 years ago by nmlgc <[email protected]>
TPCInfo: Parse patch dependencies.

819843a03544c151654e1c108837c24216e566e0 authored over 11 years ago by nmlgc <[email protected]>
TPCParse: Add a function for CSV parsing.

6dfc5177beaa6a08e8b82392d8e7e3438950d2b4 authored over 11 years ago by nmlgc <[email protected]>
Move multiline parsing to TPCParse.

... oh, wait, we do have a dedicated class for that. Almost forgot.

42b9e18b64c0942a7b2cd86b2a25a492a94af368 authored over 11 years ago by nmlgc <[email protected]>
TPCFmtMsg: Use the ruby markup introduced in the 2013-08-20 build of thcrap.

f935cf58f59f305a50e58167510c7ff65c3d2613 authored over 11 years ago by nmlgc <[email protected]>
... but ignore *completely* empty lines.

Because this breaks patch stacking otherwise.

339ae9f335b02bf8d0701660b5a64cbabfb43d9a authored over 11 years ago by nmlgc <[email protected]>
Scrape empty lines as well.

Discarding empty lines probably has caused more issues than it solved, and padding with full-wid...

d74d16f9f6c0723438e7f6426b9b680044e5b4b1 authored over 11 years ago by nmlgc <[email protected]>
Add a parser for Music Room translations.

b82bf2d1c0389afe98291b0de532e7102341857e authored over 11 years ago by nmlgc <[email protected]>
TPCFmtMsg: Add a space after indent tabs.

If I hadn't abstracted away the bracket for th11's assist dialogues, this would all have been so...

f16ad7c529fabf0ed4255feadd91c2fdeae7440f authored over 11 years ago by nmlgc <[email protected]>
Cleanup.

79bcb006bce9f6e07772b29fec62db9dee72eebe authored over 11 years ago by nmlgc <[email protected]>
TPCFmtMsg: Accept the {{ruby-ja}} template as well.

0d084eca291db9041d6ea5bd577f64660845ebb2 authored over 11 years ago by nmlgc <[email protected]>
Use CRC32 in patch.js for files as well.

e060a842f1e59b08c1663c5a37592d6a3d1fd5f1 authored over 11 years ago by nmlgc <[email protected]>
Page evaluation on file pages is a bad idea!

... because this creates lots and lots of possible security holes which need to be locked by som...

8b3a1d242cb7d8e4ce74827c2106b9fddfb7e5df authored over 11 years ago by nmlgc <[email protected]>
Use two spaces instead of one full-width space for ending indentation.

This works around the need for a CJK font to actually *display* a full-width whitespace. Wine do...

8cf22ab617992f68d39d1d4825bfa87d2096d158 authored over 11 years ago by nmlgc <[email protected]>
Write every character name as a separate parameter into the tab reference string.

The layout parser then bases the tabstop width on the parameter with the largest rendered width.

652a5e87485f9020dda0a19c85c982ee7aa6ded1 authored over 11 years ago by nmlgc <[email protected]>
Add a parser for hardcoded strings.

363dc90e1b51ae108f48ab8a447a6ba0bba17209 authored over 11 years ago by nmlgc <[email protected]>
Complete support for build-specific files.

84d53c21eaf4a02ac4e4eb50ed1fbae2f0523088 authored over 11 years ago by nmlgc <[email protected]>
TPCState: Change terminology to be consistent with thcrap.

acdeff768352a622fe9eb992911b5f1e04525100 authored over 11 years ago by nmlgc <[email protected]>
Add support for the tabchar type.

fb50f39910bca4a94bff71880773578b0e8230e9 authored over 11 years ago by nmlgc <[email protected]>
Refactor prefix and postfix constants for special types into an array.

d74574fd0f2f46d3d7fc4cd35e82f91f04217966 authored over 11 years ago by nmlgc <[email protected]>
Use a separate type variable for the slot and time index.

... really, h1 is the only instance in which we make use out of this feature anyway, it's just a...

50d5b37c23ff006d70a2de673797df7436d9d0da authored over 11 years ago by nmlgc <[email protected]>
Remove percent sign sanitization altogether.

We *are* going to introduce custom sprintf format strings once we're doing hardcoded strings. An...

9aa4ac25c3e92e9706983c8336047a94480ba76b authored over 11 years ago by nmlgc <[email protected]>
TPCFmtMsg: Use layout markup for assist messages.

686147127fb168720d3c0069f25948df6962397d authored over 11 years ago by nmlgc <[email protected]>
Refactor page and file evaluation.

Page content is now evaluated in any case.

5ff58a110110bd688af0a0036c9d8bcb137d36d0 authored over 11 years ago by nmlgc <[email protected]>
Resolve file redirects.

d57d2f963e43ff63357f9a666b91580e03da4270 authored over 11 years ago by nmlgc <[email protected]>
Add a TitleMoveComplete hook.

6e4a38e2ece972ec361f21e6c4f21505f66a8820 authored over 11 years ago by nmlgc <[email protected]>
Add evalTitle as a wrapper around both evalPage and evalFile.

b22389d12610b58978e5e7dfaf324f81592ca52e authored over 11 years ago by nmlgc <[email protected]>
Store the list of translation patches in the database.

Necessary to have them readily available on any other page that references them... which turned ...

9adce8f7730addc9e75e05c9974a0a65ba610991 authored over 11 years ago by nmlgc <[email protected]>
{{thcrap_servers}}: Fix line breaks.

25dffc88631fc5e64ac6681124e8ffd165bb3549 authored over 11 years ago by nmlgc <[email protected]>
Add {{thcrap_image}} as an alternative for prefixed file inclusion.

... because that's what it basically is. :)

Also, remove some leftover debugging code... oops.

7e5223ebb55d6065cd57267823146984684c759d authored over 11 years ago by nmlgc <[email protected]>
Remove TPCFormat.

Listen. I know that MediaWiki is the completely wrong tool for our job, so. This was the most ri...

4acf2e8397a6f28ef7f64a6a30f27e8ec8ee6798 authored over 11 years ago by nmlgc <[email protected]>
Add include hooks for prefixed wiki pages.

510c655b4e435b38bbe05335fa8793c43aa7bae1 authored over 11 years ago by nmlgc <[email protected]>
Sanitize slashes in file names.

Allow slashes, but specifically check for directory traversals afterwards. This allows directori...

c91b81c4a9d24c7d861628d4a3111c137227f48b authored over 11 years ago by nmlgc <[email protected]>
TPCStorage: Only write JSON files that really have been changed.

A solution in true PHP quality.

Since we're planning to send these files over half the globe, n...

e68514827b5b2b0795197381baaa40319298e8f2 authored over 11 years ago by nmlgc <[email protected]>
Cleanup.

9bdb31200fa4b4787dee2592756bf5ada66d4c79 authored over 11 years ago by nmlgc <[email protected]>
Add an SFTP storage back-end.

deba030591200a241c7951d37c0cbe9bb73395ca authored over 11 years ago by nmlgc <[email protected]>
Refactor file storage to use back-end classes.

4c4fd275b352396a5fc02c30a678c5465b681d92 authored over 11 years ago by nmlgc <[email protected]>
TPCFmtSpells.php: Don't escape spell cards after all.

We needed to do this because spell names are actually sprintf format strings, even though the ga...

640183f9b27e9cd0eb5cfb72f0de76649a72f0b2 authored over 11 years ago by nmlgc <[email protected]>
TPCUtil.php: Refactor wikitext sanitizing into its own function.

This way, it can also be used for single-line text. th07's "xx% Reflowering" spell requires this...

6746ab079d3fa4ce4a0954f8614b8a5b16a2112d authored over 11 years ago by nmlgc <[email protected]>
Add spell card comment parsing

74c96d180a917f46ab7e6d029083975bea70db18 authored over 11 years ago by nmlgc <[email protected]>