Le 19/09/2017 à 15:29, Brad Jorsch (Anomie) a écrit :
On Tue, Sep 19, 2017 at 2:48 AM, mathieu stumpf guntz
<
psychoslave(a)culture-libre.org> wrote:
But having ability to write a limited amount of bytes in a single data
module per script call, and possibly others
safeguard limits, wouldn't be
that risky, would it?
It would break T67258 <https://phabricator.wikimedia.org/T67258>. I also
think it's probably a very bad idea to be trying to have page parses make
edits to the wiki.
Well, actually, depending on what you mean with have page
parses make
edits to the wiki, I'm not sure what I'm looking for fall under this
umbrella.
What I would like is a way to do something like
local data = mw.loadData( 'Module:Name/data/entry' )
-- do some stuff with `data`
mw.saveData( 'Module:Name/data/entry', data)
That's it.
If it's not, please provide me some feed back
on the proposal to add such
a function, and if I should document such a proposal elsewhere, please let
me know.
You're free to file a task in Phabricator, but it will be closed as
Declined. There are too many potential issues there for far too little
benefit.
If you do think it's an horrible akward awfully disgusting idea , I
would be interested to know more technical details on what problems it
might lead to (not the global result of nightmarish hell on earth that
I'm obviously targeting )
Your initial idea of somehow hooking into the editor (whether that's the
wikitext editor or VE) with JavaScript to allow humans to make edits to the
data module while editing another page was much better.
I didn't even thought
about JS actually. For the wikitext removal of
updating parameter, I had in mind some inplace template substitution.
Does javascript allow to change an other page on the wiki, especially a
data module, at some point when the user edit/save an article?