Jump to content

Wikipedia talk:Guide to Scribbling

Page contents not supported in other languages.
From Wikipedia

Thanks!

[edit]

This guide is much appreciated - keep up the good work. Wnt (talk) 02:54, 30 August 2012 (UTC)[reply]

Tiny bug/feature ;)

[edit]

Meanwhile, I found a curious bug/feature - see [1]. In the older revision, without <small> surrounding the #invokes, the output comes out in a nice block array despite the presence of ordinary spaces. But in the newer revision, that little bit of formatting makes the whole thing react like standard wikitext and lump up against the left margin. The latter, though it looks bad, is the expected behavior - the lack of such processing for the former is actually the "bug". :) Wnt (talk) 02:54, 30 August 2012 (UTC)[reply]

  • Both are the expected behaviour. You're forgetting that a space character at the start of a line has a meaning in wikitext. Put "<small>" in front of it, and it's no longer at the start of the line. Uncle G (talk) 08:22, 30 August 2012 (UTC)[reply]
Ohhhh. My these little things are so clear after the fact! Thanks once more! Wnt (talk) 18:19, 30 August 2012 (UTC)[reply]

Ways of getting data

[edit]

Right now I'm aware of two methods by which a module can get data - by having "configs" set directly in the #invoke wikitext, or by having parameters passed to the template in originating wikitext. What I'm wondering is if there are any other methods. For example:

  • It's definitely possible for modules to automatically plot data (very crudely done at User:Wnt/Templates/Plotter). Templates can pass alterable data if it can be transcluded directly - i.e., if the data occupies an entire page, on the same project. I assume though that if the data is on another project, i.e. Wikidata, this isn't possible (I doubt you're letting the modules browse the web on their own), and if the data occupies part of a page, you'd have to pass in the whole page to let your module find it (which might be doable). Is that right?
  • Is there any way, on the fly, to create a link in output that activates a module with specific parameters? For example, in User:Wnt/Templates/Mandelbrot, my original thought (if I didn't have other problems with FP accuracy) was that it would be neat if the output were sectioned into sectors, and you could click on a sector to enlarge it into a fresh plot of the smaller area. But I don't know of any wiki syntax that lets me have a clickable link to run a template with the parameters I've just generated (i.e. the boundaries of the smaller area) - I think I'd need to have a separate pre-written, pre-saved wiki page for every area I might want to highlight, making it impossible for users to just browse around the set at random. Is that so?
  • Likewise, I don't see any indication that you can press a button or check a box to change how a template produces data, unless, of course, what you press is a link to a different template written out in advance with a different set of parameters. Wnt (talk) 19:34, 30 August 2012 (UTC)[reply]
  • One specific way of getting data that would seem more feasible to allow: I'd like to be able to pass the contents of an SVG file (which is actually a text based format) into a Scribunto template. For example, I had to copy [2] into a local file to run my little test script User:Wnt/Templates/Svgedit on it. Wnt (talk) 06:24, 4 September 2012 (UTC)[reply]