Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

"VC-style" interaction?

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


Tom_Roche at pobox

Jun 23, 2012, 3:56 PM

Post #1 of 6 (312 views)
Permalink
"VC-style" interaction?

(Apologies if this is a FAQ, but brief googling found nothing.)

Can one edit a "true MediaWiki" (MW) in a manner similar to how one
interacts with a GitHub wiki (GHW, aka gollum)

https://github.com/blog/699-making-github-more-open-git-backed-wikis

? Why I ask:

As part of an attempt to do more "open science" (more on that
separately), I'm starting to use GHW instead of my group's MW. This is
not as easy as I would like, and has one major problem: the github wiki
engine (gollum) merely "supports" MW wikitext. I.e., there are bugs
(things that work in "real" MW, but fail on GHW), and GHW's rendering
is generally butt-ugly compared to MW.

OTOH, editing a GHW is a joy. A GHW is backed by a git repo, so I can
interact with it "VC-style":

# whack away @ local files with my local editor
# commit to my local repo
# push to remote on github
# refresh my browser

and see the changes. (One can also run a local gollum and test locally
before pushing "to the world," but I am too lazy for that.)

I'd much love to have "the best of both worlds," i.e., a "real MW"
with correct/pretty wikitext rendering, but with which I can interact
in VC-style (and preferably with git). Can that be done? I.e., can MW
be configured to do this, or is anyone working on a version that
supports this interaction style?

TIA, Tom Roche <Tom_Roche [at] pobox>

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


mah at everybody

Jun 23, 2012, 5:55 PM

Post #2 of 6 (295 views)
Permalink
Re: "VC-style" interaction? [In reply to]

On 06/23/2012 06:56 PM, Tom Roche wrote:
> OTOH, editing a GHW is a joy. A GHW is backed by a git repo, so I can
> interact with it "VC-style":
>
> # whack away @ local files with my local editor
> # commit to my local repo
> # push to remote on github
> # refresh my browser

I appreciate the first step -- that is why I use Emacs and mediawiki.el
(https://launchpad.net/mediawiki-el). And the last step would be simple
to add.

Which leaves the middle two steps -- integrate MediaWiki with VCS somehow.

Given some of the things people have been doing with git, it seems like
this would be straight-forward -- kind of like post-commit hook.

Mark.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Platonides at gmail

Jun 24, 2012, 9:42 AM

Post #3 of 6 (294 views)
Permalink
Re: "VC-style" interaction? [In reply to]

On 24/06/12 02:55, Mark A. Hershberger wrote:
> On 06/23/2012 06:56 PM, Tom Roche wrote:
>> OTOH, editing a GHW is a joy. A GHW is backed by a git repo, so I can
>> interact with it "VC-style":
>>
>> # whack away @ local files with my local editor
>> # commit to my local repo
>> # push to remote on github
>> # refresh my browser
>
> I appreciate the first step -- that is why I use Emacs and mediawiki.el
> (https://launchpad.net/mediawiki-el). And the last step would be simple
> to add.
>
> Which leaves the middle two steps -- integrate MediaWiki with VCS somehow.
>
> Given some of the things people have been doing with git, it seems like
> this would be straight-forward -- kind of like post-commit hook.
>
> Mark.

Not so much. MediaWiki expects more things than just the text.
If you are only editing mediawiki through git, then yes, it would be
easy: Add a post-commit hook in the git server which rans
maintenance/importTextFile.php of the modified files.

If there are also edits at MediaWiki side, then you'd also need an
extension which hooks mediawiki to convert edits to git commits.

However, you could replace git with a command line tool which performed
edits. No need to do so through a git transport.



_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


mah at everybody

Jun 24, 2012, 12:07 PM

Post #4 of 6 (298 views)
Permalink
Re: "VC-style" interaction? [In reply to]

On 6/24/2012 12:42 PM, Platonides wrote:
> If there are also edits at MediaWiki side, then you'd also need an
> extension which hooks mediawiki to convert edits to git commits.

This is also a problem I need to deal with (read: have yet to deal with)
in mediawikiki.el. Right now, it doesn't handle conflict resolution or
session timeouts. It does the job for quick edits on pages that aren't
the focus of a lot of attention right now, but it needs more work.

> However, you could replace git with a command line tool which performed
> edits. No need to do so through a git transport.

Agreed. Maybe a CLI is what Tom was looking for?

Mark.


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Tom_Roche at pobox

Jun 24, 2012, 4:20 PM

Post #5 of 6 (295 views)
Permalink
Re: "VC-style" interaction? [In reply to]

Tom Roche Sat, 23 Jun 2012 18:56:31 -0400
>>> OTOH, editing a GHW [github wiki, aka gollum] is a joy. A GHW is
>>> backed by a git repo, so I can interact with it "VC-style":

>>> # whack away @ local files with my local editor

which happens to be emacs

>>> # commit to my local repo
>>> # push to remote on github

which can be done in-emacs

>>> # refresh my browser

Mark A. Hershberger Sun Jun 24 00:55:29 UTC 2012
>> it seems like this would be straight-forward -- kind of like
>> post-commit hook.

Platonides 6/24/2012 12:42 PM
> MediaWiki expects more things than just the text. If you are only
> editing mediawiki through git, then yes, it would be easy: Add a
> post-commit hook in the git server which [ran]
> maintenance/importTextFile.php of the modified files.

> If there are also edits at MediaWiki side, then you'd also need an
> extension which hooks mediawiki to convert edits to git commits.

> However, you could replace git with [API calls] which performed
> edits.

And, after a bit of googling, I noticed

https://www.mediawiki.org/wiki/API

but I'm not seeing any lists of tools implementing the API (though
there are lotsa libraries). What's out there? E.g., will

https://launchpad.net/mediawiki-el

do what I want? which, for a non-VC-backed implementation, would be
something like

1 utter keychord to create buffer with MW page contents from URI
2 whack away @ buffer (with usual emacs commands)
3 utter keychord which transparently utters MW API to preview my edit
4 loop 2-3, until
5 utter keychord which transparently utters MW API to save

? TIA, Tom Roche <Tom_Roche [at] pobox>

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


mah at everybody

Jun 24, 2012, 5:34 PM

Post #6 of 6 (295 views)
Permalink
Re: "VC-style" interaction? [In reply to]

On Sunday, June 24, 2012 7:20:18 PM, Tom Roche wrote:
> And, after a bit of googling, I noticed
>
> https://www.mediawiki.org/wiki/API
>
> but I'm not seeing any lists of tools implementing the API (though
> there are lotsa libraries). What's out there?

Quite a few libraries: https://www.mediawiki.org/wiki/API:Client_code

> will
>
> https://launchpad.net/mediawiki-el
>
> do what I want? which, for a non-VC-backed implementation, would be
> something like
>
> 1 utter keychord to create buffer with MW page contents from URI
> 2 whack away @ buffer (with usual emacs commands)
> 3 utter keychord which transparently utters MW API to preview my edit
> 4 loop 2-3, until
> 5 utter keychord which transparently utters MW API to save

It doesn't do a preview, but that sounds like it should be easy to add
with https://www.mediawiki.org/wiki/API:Parse.

Adding that + the other things I mentioned sound like things that I
should add to the next release.

HTH,

Mark.

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.