Toolserver:~hippietrail/randompage.fcgi
This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.
This user's account has expired and their tools have subsequently been disabled. |
Random page per language Release status: unknown |
|
---|---|
Implementation | Random |
Author(s) | Hippietrail |
License | No license specified |
Download | https://svn.toolserver.org/svnroot/Hippietrail/ https://toolserver.org/~hippietrail/randompage.fcgi?langs=1 |
Random page per language redirects to a random entry in the English Wiktionary in the requested language. Language can be specified by name or by code.
- Language codes are used with the
langcode
parameter and must be lowercase. WikiMedia and English Wiktionary extended language codes are accepted: - Language names are used with the
langname
parameter and must be the capitalized English name of the language: - As a bonus, namespaces and redirects are also supported by using "Redirect" or the namespace name prefixed with an underscore as the language name:
- To see a list of available languages pass the
langs
parameter with any value: - To see the source code pass the
dumpsource
parameter with any value:
Only the English Wiktionary is currently supported because the various Wiktionaries use different page formats. If people wish to contribute code to support other Wiktionary it will be accepted.
The data used is generated as the product of a series of command-line tools which index dump files in various ways. There is a text file named after each language as used in language headings in the English Wiktionary (including misspellings). The files are kept in a hard-coded directory for now. Files are read into memory as arrays and cached in memory until the server process terminates.