Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-12 Thread Matthieu Moy
Jeff King p...@peff.net writes: I was thinking that you would be self-contained inside the contrib/mw-to-git directory, and therefore you would have to teach your code how to install the Git module, and you could not longer just cp git-remote-mediawiki into the right place to install it.

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-12 Thread Jeff King
On Wed, Jun 12, 2013 at 08:55:12AM +0200, Matthieu Moy wrote: But I think we have already crossed that bridge somewhat with Git.pm. And if you add your module as perl/Git/MediaWiki.pm and use the existing perl build system, then it is not any extra effort from the build system. I'm not

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-11 Thread Benoît Person
The V2 is on the launchpad but I am still struggling with the code factoring between git-mw.perl and git-remote-mediawiki.perl :/ . On 9 June 2013 08:08, Jeff King p...@peff.net wrote: You could make a Git::MediaWiki.pm module, but installing that would significantly complicate the build

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-11 Thread Jeff King
On Tue, Jun 11, 2013 at 11:31:31PM +0200, Benoît Person wrote: I've implemented this one for now but after a real-life meeting with Matthieu Moy we discussed the possibility to build a GitMediawiki.pm module. It seems more clean than the concatenation of perl scripts. Plus, it would force

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Jeff King
On Fri, Jun 07, 2013 at 11:50:31PM +0200, benoit.per...@ensimag.fr wrote: The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. Sounds like a useful goal. The default behaviour for the `preview` subcommand

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Jeff King
On Sat, Jun 08, 2013 at 09:00:30PM +0200, Matthieu Moy wrote: + # Auto-loading in browser + if ($autoload) { + open(my $browser, -|:encoding(UTF-8), xdg-open .$preview_file_name); That could be read from Git's configuration, and default to xdg-open. But you don't want

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Matthieu Moy
Jeff King p...@peff.net writes: 1- Find the remote name of the current branch's upstream and check if it's a wiki one with its url (ie: mediawiki://) 2- Parse the content of the local file (given as argument) using the distant wiki's API. Makes sense. 3- Retrieve the current page on the

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Benoît Person
Matthieu Moy matthieu@grenoble-inp.fr writes: Same question here. I'd expect git mw preview in a mediawiki workflow to do what pdflatex foo evince foo.pdf do in a latex workflow: see in rendered form what I've been doing. In a latex flow, if I want to see how my local changes merge with

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Benoît Person
On 9 June 2013 08:08, Jeff King p...@peff.net wrote: I also wonder if it would be useful to be able to specify not only files in the filesystem, but also arbitrary blobs. So in 4b above, you could git mw preview origin:page.mw to see the rendered version of what upstream has done. Hum, so

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Matthieu Moy
Benoît Person benoit.per...@ensimag.fr writes: On 9 June 2013 08:08, Jeff King p...@peff.net wrote: I also wonder if it would be useful to be able to specify not only files in the filesystem, but also arbitrary blobs. So in 4b above, you could git mw preview origin:page.mw to see the rendered

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Jeff King
On Sun, Jun 09, 2013 at 01:01:48PM +0200, Matthieu Moy wrote: I also wonder if it would be useful to be able to specify not only files in the filesystem, but also arbitrary blobs. So in 4b above, you could git mw preview origin:page.mw to see the rendered version of what upstream has

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-09 Thread Jeff King
On Sun, Jun 09, 2013 at 02:35:45PM +0200, Benoît Person wrote: On 9 June 2013 08:08, Jeff King p...@peff.net wrote: I also wonder if it would be useful to be able to specify not only files in the filesystem, but also arbitrary blobs. So in 4b above, you could git mw preview origin:page.mw

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-08 Thread Matthieu Moy
benoit.per...@ensimag.fr writes: From: Benoit Person benoit.per...@ensimag.fr The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. This commit is a first attempt to achieve it. It adds a new git command,

[PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-07 Thread benoit . person
From: Benoit Person benoit.per...@ensimag.fr The #7 issue on git-mediawiki's issue tracker [1] states that the ability to preview content without pushing would be a nice thing to have. This commit is a first attempt to achieve it. It adds a new git command, named `git mw`. This command accepts