Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Comrade:CriticalResist/sandbox

More languages

Some useful regex functions

You can use search and replace with regex in the visual editor, just tap Ctrl+f on your keyboard, then click on the icon representing (.*) — that's the regex (regular expression) function, which will interpret your search string as regex.

Unfortunately you can't use regex in the replace function but anyway, here are some cool regex functions you can use to help you on pages. Just copy the "regex code" row into the search bar (yes it looks like nothing, that's normal)

Regex code What it does Use for
\[(\d+)\] Detects references like [12] Transform plain text references into formatted MediaWiki references (ctrl+shift+k to add a reference). Will probably leave behind extra spaces so run the next function.
\s{2,} Detect two spaces or more Search for this code, add a space in the replace field, then press replace all and it will correct all possible extra spaces to just one.
\s(?=[.,;:!?)%]) Remove space before punctuation Removes a space before punctuation, like . or ? or ;

be careful before replacing all, you should look through instances one by one.

\s-{1,2}|\s\u2013 Detects a hyphen or two OR an en dash after a space This can indicate incorrect use of an em dash

Will detect either - or --, which are sometimes incorrectly used. Replace all with em dash (with a space before but not after)

Will also detect the en dash (–), which should also be replaced.

(?<!\s)\d+\s*[.\-\)] Detects improperly formatted ordered lists (e.g. 1), 2), etc) We should use mediawiki lists instead of plain text. This detects such a case. Use only to find it, then apply the list format manually.
(?<![.!?])\n Detects superfluous line breaks When importing from PDF, you will usually have extra line breaks that shouldn't be here. This code detects them (new lines preceded by period, exclamation mark or question mark). Replace with an empty space.

Note: detecting line breaks doesn't work in MediaWiki. Import your text to say Google Docs, use their search function, then import result to ProleWiki. You still have to go through the text manually but it saves a lot of time and cramps.

Other sandbox stuff for my own use

Crit's absolute beginner reading list

Once you start on your theoretical journey and become a student of marxism, you will realistically always remain one: your learning never stops.

Yet, in my opinion, most lists present too many books and act more like repositories than actual reading lists or syllabus. Realistically, a marxist-leninist reading list will contain every single book ever written that comes remotely close to marxism-leninism.

In this list, I purposely chose to limit myself to 6 books. This is a list for absolute beginners, the absolute bare minimum reading that should be done (and in this order) as sort of a crash course to get you started. Your situation is this: you like communism, you want to learn more, but you don't know where to start. Well, this is your list.

The books I chose (and please read them in this order) are:

Book Why it was picked
How marxism works, Chris Harman
Principles of communism, Engels
Elementary principles of philosophy, Georges Politzer
Value, price and profit, Marx
The three sources and three component parts of Marxism, Lenin
Library:Imperialism, the highest stage of capitalism, Lenin
  1. How marxism works, by Chris Harman.