Re: [Labs-l] paste with stikkit!

2014-05-26 Thread Liangent
Well a simple configuration file enables pastebinit on
tools.wmflabs.org/paste

https://tools.wmflabs.org/paste/view/662c89d4

-Liangent


On Tue, May 27, 2014 at 4:10 AM, Marc-André Pelletier 
mpellet...@wikimedia.org wrote:

 On 05/26/2014 04:09 PM, Petr Bena wrote:
  I have .deb's but they are on launchpad and someone said that we
  shouldn't allow ppa's on tools project

 We don't, but there's nothing that prevents us from grabbing the .deb,
 reviewing it, and adding it to the local repo.  :-)

 -- Marc


 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l

___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


Re: [Labs-l] MediaWiki to LaTeX Compiler

2014-05-25 Thread Liangent
I don't really have an idea about how to go for the command line version
and use the -c command line option; I know nothing about Haskell anyway...

I hope that it's available on the web, is it possible to add a checkbox or
something?

-Liangent


On Sun, May 25, 2014 at 7:18 PM, Dirk Hünniger dirk.hunni...@googlemail.com
 wrote:

  Hi,
 I didn't take any special care about CJK. Its a bit hard for me since I
 cannot read any of these languages myself. Maybe you can have a look at the
 LaTeX source and tell me what I need to change. Currently no CJK package is
 loaded. The only thing I am doing is to switch to ttf fonts that contain
 CJK characters when I need to print them. Also I am using babel packages.
 For some languages I get proper hyphenation this way, but apparently
 something does not work here for Chinese.
 Yours Dirk

 On 2014-05-25 13:02, Liangent wrote:

  I had a try using an article on Chinese Wikipedia. Although I'm not sure
 whether the cause is in generated LaTeX source or the way you invoke LaTeX,
 the most notable problem is that in output PDF, word wrap doesn't take
 place correctly so almost every line overflows. See
 https://en.wikipedia.org/wiki/Word_wrap#Word_wrapping_in_text_containing_Chinese.2C_Japanese.2C_and_Koreanfor
  more information.

  -Liangent


 On Sun, May 25, 2014 at 5:49 PM, Dirk Hünniger 
 dirk.hunni...@googlemail.com wrote:

 Hi,
 if you want the tex source go for the command line version and use the -c
 command line option. If you want to convert from tex to mediawiki use
 pandoc. In the imprint of each pdf there is a link to the sourceforge page.
 Its slow, but I cannot make it any faster. Its mostly the runtime of LaTeX
 itself. I already invested two weeks in optimizing speed. In particular its
 using multiple cores, while in my code. But well there is not much you can
 do with multiple cores when running LaTeX itself. You could actully get
 some speed by using native cores, but the administration is not that easy.
 It also says on the main page that it will take up to ten minutes.
 Yours Dirk


 On 2014-05-25 11:40, Gryllida wrote:

 Hi,

 On Sun, 25 May 2014, at 18:02, Dirk Hünniger wrote:

 It not a private server anymore. Its now running on Wmflabs already.

 http://mediawiki2latex.wmflabs.org

 I would probably link to the source code and a bug tracker on its main
 page.
 - I see it generated a PDF. Nicely formatted. :) But the TeX source
 would be also useful.
 - It would be nice to be able to convert back from tex to wiki markup
 also.
 - It also appears to be dog slow (about 5 minutes).

 Gryllida.

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l



 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l




 ___
 Labs-l mailing 
 listLabs-l@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/labs-l



 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l


___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


Re: [Labs-l] MediaWiki to LaTeX Compiler

2014-05-25 Thread Liangent
I failed to compile your document in it's original form:

(../headers/babel.tex
(/var/lib/texmf/tex/generic/babel/babel.sty
(/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
! Undefined control sequence.
\initiate@active@char #1-\bbl@ifshorthand
   {#1}{\bbl@s@initiate@active@char
...
l.585 \initiate@active@char{~}

and I worked around it by commenting out \usepackage[english]{babel} in
../headers/babel.tex

In my experiment I added:

\usepackage{xeCJK}
\setCJKmainfont{WenQuanYi Zen Hei}

to main.tex after \usepackage{fontspec}, and it improves CJK typesetting a
lot.

WenQuanYi Zen Hei is contained in
https://packages.debian.org/sid/fonts-wqy-zenhei

-Liangent


On Sun, May 25, 2014 at 8:01 PM, Dirk Hünniger dirk.hunni...@googlemail.com
 wrote:

  Hi,
 I am sending you the latex source of the main page of the chinese
 wikipedia as attachment.
 You can look at it. But if you want to compile it you need to have ubuntu
 14.04 and do
 sudo apt-get install mediawiki2latex
 xelatex main.tex
 Yours Dirk


 On 2014-05-25 13:32, Liangent wrote:

  I don't really have an idea about how to go for the command line
 version and use the -c command line option; I know nothing about Haskell
 anyway...

 I hope that it's available on the web, is it possible to add a checkbox or
 something?

  -Liangent


 On Sun, May 25, 2014 at 7:18 PM, Dirk Hünniger 
 dirk.hunni...@googlemail.com wrote:

  Hi,
 I didn't take any special care about CJK. Its a bit hard for me since I
 cannot read any of these languages myself. Maybe you can have a look at the
 LaTeX source and tell me what I need to change. Currently no CJK package is
 loaded. The only thing I am doing is to switch to ttf fonts that contain
 CJK characters when I need to print them. Also I am using babel packages.
 For some languages I get proper hyphenation this way, but apparently
 something does not work here for Chinese.
 Yours Dirk

 On 2014-05-25 13:02, Liangent wrote:

  I had a try using an article on Chinese Wikipedia. Although I'm not
 sure whether the cause is in generated LaTeX source or the way you invoke
 LaTeX, the most notable problem is that in output PDF, word wrap doesn't
 take place correctly so almost every line overflows. See
 https://en.wikipedia.org/wiki/Word_wrap#Word_wrapping_in_text_containing_Chinese.2C_Japanese.2C_and_Koreanfor
  more information.

  -Liangent


 On Sun, May 25, 2014 at 5:49 PM, Dirk Hünniger 
 dirk.hunni...@googlemail.com wrote:

 Hi,
 if you want the tex source go for the command line version and use the
 -c command line option. If you want to convert from tex to mediawiki use
 pandoc. In the imprint of each pdf there is a link to the sourceforge page.
 Its slow, but I cannot make it any faster. Its mostly the runtime of LaTeX
 itself. I already invested two weeks in optimizing speed. In particular its
 using multiple cores, while in my code. But well there is not much you can
 do with multiple cores when running LaTeX itself. You could actully get
 some speed by using native cores, but the administration is not that easy.
 It also says on the main page that it will take up to ten minutes.
 Yours Dirk


 On 2014-05-25 11:40, Gryllida wrote:

 Hi,

 On Sun, 25 May 2014, at 18:02, Dirk Hünniger wrote:

 It not a private server anymore. Its now running on Wmflabs already.

 http://mediawiki2latex.wmflabs.org

 I would probably link to the source code and a bug tracker on its main
 page.
 - I see it generated a PDF. Nicely formatted. :) But the TeX source
 would be also useful.
 - It would be nice to be able to convert back from tex to wiki markup
 also.
 - It also appears to be dog slow (about 5 minutes).

 Gryllida.

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l



 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l




 ___
 Labs-l mailing 
 listLabs-l@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/labs-l



 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l




 ___
 Labs-l mailing 
 listLabs-l@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/labs-l



___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


Re: [Labs-l] MediaWiki to LaTeX Compiler

2014-05-25 Thread Liangent
It looks much better now.

Regarding newcommand's, it's more natural to say:

第4章 instead of 章4
第2页 instead of 页2
图8 instead of 图形8

and in Chinese you don't need to (and shouldn't) add spaces between words.
I feel there're some extra ones added especially near links.

-Liangent
On May 26, 2014 1:06 AM, Dirk Hünniger dirk.hunni...@googlemail.com
wrote:

  Hi,
 I made a language file for chinese now and installed it on the server. So
 please have a try:
 http://mediawiki2latex.wmflabs.org/
 Yours Dirk

 PS:The language file:
 \HyphSubstLet{ngerman}{ngerman-x-latest}
 \usepackage{xeCJK}
 \setCJKmainfont{WenQuanYi Zen Hei}
 \newcommand{\mychapterbabel}{章}
 \newcommand{\mypagebabel}{页}
 \newcommand{\myfigurebabel}{图形}
 \newcommand{\mylangbabel}{chinese}


 On 2014-05-25 17:58, Liangent wrote:

  I failed to compile your document in it's original form:

 (../headers/babel.tex
 (/var/lib/texmf/tex/generic/babel/babel.sty
 (/usr/share/texlive/texmf-dist/tex/generic/babel-english/english.ldf
 (/usr/share/texlive/texmf-dist/tex/generic/babel/babel.def
 ! Undefined control sequence.
 \initiate@active@char #1-\bbl@ifshorthand
{#1}{\bbl@s@initiate@active@char
 ...
 l.585 \initiate@active@char{~}

 and I worked around it by commenting out \usepackage[english]{babel} in
 ../headers/babel.tex

  In my experiment I added:

 \usepackage{xeCJK}
 \setCJKmainfont{WenQuanYi Zen Hei}

 to main.tex after \usepackage{fontspec}, and it improves CJK typesetting a
 lot.

 WenQuanYi Zen Hei is contained in
 https://packages.debian.org/sid/fonts-wqy-zenhei

  -Liangent


 On Sun, May 25, 2014 at 8:01 PM, Dirk Hünniger 
 dirk.hunni...@googlemail.com wrote:

  Hi,
 I am sending you the latex source of the main page of the chinese
 wikipedia as attachment.
 You can look at it. But if you want to compile it you need to have ubuntu
 14.04 and do
 sudo apt-get install mediawiki2latex
 xelatex main.tex
 Yours Dirk


 On 2014-05-25 13:32, Liangent wrote:

  I don't really have an idea about how to go for the command line
 version and use the -c command line option; I know nothing about Haskell
 anyway...

 I hope that it's available on the web, is it possible to add a checkbox
 or something?

  -Liangent


 On Sun, May 25, 2014 at 7:18 PM, Dirk Hünniger 
 dirk.hunni...@googlemail.com wrote:

  Hi,
 I didn't take any special care about CJK. Its a bit hard for me since I
 cannot read any of these languages myself. Maybe you can have a look at the
 LaTeX source and tell me what I need to change. Currently no CJK package is
 loaded. The only thing I am doing is to switch to ttf fonts that contain
 CJK characters when I need to print them. Also I am using babel packages.
 For some languages I get proper hyphenation this way, but apparently
 something does not work here for Chinese.
 Yours Dirk

 On 2014-05-25 13:02, Liangent wrote:

  I had a try using an article on Chinese Wikipedia. Although I'm not
 sure whether the cause is in generated LaTeX source or the way you invoke
 LaTeX, the most notable problem is that in output PDF, word wrap doesn't
 take place correctly so almost every line overflows. See
 https://en.wikipedia.org/wiki/Word_wrap#Word_wrapping_in_text_containing_Chinese.2C_Japanese.2C_and_Koreanfor
  more information.

  -Liangent


 On Sun, May 25, 2014 at 5:49 PM, Dirk Hünniger 
 dirk.hunni...@googlemail.com wrote:

 Hi,
 if you want the tex source go for the command line version and use the
 -c command line option. If you want to convert from tex to mediawiki use
 pandoc. In the imprint of each pdf there is a link to the sourceforge page.
 Its slow, but I cannot make it any faster. Its mostly the runtime of LaTeX
 itself. I already invested two weeks in optimizing speed. In particular its
 using multiple cores, while in my code. But well there is not much you can
 do with multiple cores when running LaTeX itself. You could actully get
 some speed by using native cores, but the administration is not that easy.
 It also says on the main page that it will take up to ten minutes.
 Yours Dirk


 On 2014-05-25 11:40, Gryllida wrote:

 Hi,

 On Sun, 25 May 2014, at 18:02, Dirk Hünniger wrote:

 It not a private server anymore. Its now running on Wmflabs already.

 http://mediawiki2latex.wmflabs.org

 I would probably link to the source code and a bug tracker on its main
 page.
 - I see it generated a PDF. Nicely formatted. :) But the TeX source
 would be also useful.
 - It would be nice to be able to convert back from tex to wiki markup
 also.
 - It also appears to be dog slow (about 5 minutes).

 Gryllida.

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l



 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l




 ___
 Labs-l mailing 
 listLabs-l

Re: [Labs-l] Sharing code in GitHub

2014-05-16 Thread Liangent
I pushed three repos just now[1][2][3], and I'm not sure about the correct
way to deal with others. One of them contains some counter vandalism
functionality, and I fear that publishing them makes vandals easier to
bypass it somehow. Another one is basically a MediaWiki core repo, with a
few patches on top of master to support [1]; I'm afraid pushing it will
upload a full MediaWiki history.

[1] https://github.com/liangent/mediawiki-extensions-Labs
[2] https://github.com/liangent/mediawiki-maintenance
[3] https://github.com/liangent/updatedyk

-Liangent


On Sat, May 17, 2014 at 3:04 AM, Emilio J. Rodríguez-Posada 
emi...@gmail.com wrote:

 Hi all;

 I use to publish my scripts with open source licenses. Previously I used
 SVN, but now I have moved to GitHub.

 This is my collection of repositories.[1] I have uploaded some of my tools
 (still migrating more from Toolserver) and started a special repo for code
 chunks of mine that can be widely used by other coders.[2] By now, only one
 about how to run a query over all Wikimedia projects[3] but I will add more.

 Please share your GitHub repo, I would like to follow you and read your
 code. :-)

 Regards

 [1] https://github.com/emijrp
 [2] https://github.com/emijrp/wmflabs
 [3] https://github.com/emijrp/wmflabs/blob/master/queryalldb.py

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l


___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


Re: [Labs-l] Changes to cron on tools

2014-04-30 Thread Liangent
It could be nice to have original crontabs kept somewhere for manual
inspection of the automatically prefixed version later.
On May 1, 2014 1:33 AM, Marc-André Pelletier mpellet...@wikimedia.org
wrote:

 On 03/24/2014 04:43 PM, Marc A. Pelletier wrote:
  AT THE END OF THAT WEEK:  any crontabs you may have had on tools-login
  or tools-bastion will be moved to the new server, and 'crontab' will be
  made to use the new system exclusively.  You have no intervention to
  make; this will be done automatically.

 This had not been yet done to give everyone the time to perform the
 switch manually (and because I had limited availability), but will take
 place this Thursday, May 1. (That is, tomorrow).

 I will try take the time to manually inspect the edited crontabs for
 everyone to make any obvious fixes but please be aware that I cannot
 make more than a cursory inspection.

 If you notice issues in your scheduled cron jobs, simply examine the
 automatically modified crontab for correctness.

 -- Marc


 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l

___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


Re: [Labs-l] instance-proxy has no public IP?!

2012-10-24 Thread Liangent
On Thu, Oct 25, 2012 at 12:17 PM, Roan Kattouw roan.katt...@gmail.com wrote:
 I saw https://labsconsole.wikimedia.org/wiki/Proxy and it seemed cool,
 but it looks like the instance-proxy VM doesn't actually have a public
 IP, and there's no DNS record for instance-proxy.wmflabs.org . Is or
 was this actually supposed to be a functional service? I'd like to use
 it but it's broken.

How lucky you are!

... for trying to use it at this specific time. Ryan misunderstood my
words and removed all DNS records on it[1]. I already added them back
and it should be working now.

[1] http://bots.wmflabs.org/~wm-bot/html/%23wikimedia-labs/20121025.htm
, from 04:03:20

-Liangent

 Roan

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l

___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


Re: [Labs-l] saving up some public IP by using a common proxy?

2012-10-12 Thread Liangent
On Wed, Oct 3, 2012 at 2:36 AM, Ryan Lane rlan...@gmail.com wrote:
 On Tue, Oct 2, 2012 at 7:01 AM, Forrest F. Fuqua
 forrest.fu...@gmail.com wrote:
 I've done this is nginx, you can have a system where its like

 http://commonproxy.wikilabs.org/192.168.0.1/
 and it would do a proxypass to the ip address in the field over a predefined
 port, or you could do /192.168.0.1/port/


 Hm. Yeah, this is doable. Another possibility is to use * DNS, and
 pass based on host header; so:

 ryansinstance.commonproxy.wikilabs.org - ryansinstance.pmtpa.wmflabs

 This is likely easier than setting up a per-project proxy service...

 Anyone want to have a go at this?

Is there a working one currently? I didn't see anything called proxy
or similar in the project or instance list.

If no, could someone create a project and allocate a public IP for me
and let me have a try now?

-Liangent


 - Ryan

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l

___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


Re: [Labs-l] New project request

2012-03-17 Thread Liangent
(cross posting to wikitech-l)

On Sun, Mar 18, 2012 at 2:26 AM, Ryan Lane rlan...@gmail.com wrote:
 I've created a project called category-sorting for you.

 On Sat, Mar 17, 2012 at 10:41 AM, Liangent liang...@gmail.com wrote:
 Hi,

 The zhwiki community started a discussion about category sorting
 again[1], which was what Extension:CategoryMultisort[2] designed for.
 However in MW 1.17+ it should be re-written to make use of the new
 Collation component. I plan to do it later (maybe after Git migration,
 as a new extension because it need to be written completely in another
 way) and I want to use Labs so the community can see the current
 developing progress. Can someone create a project for me?

 [1] 
 https://zh.wikipedia.org/wiki/Wikipedia:%E4%BA%92%E5%8A%A9%E5%AE%A2%E6%A0%88/%E5%85%B6%E4%BB%96#.E5.88.86.E7.B1.BB.E7.9A.84.E4.BA.BA.E5.B7.A5.E6.8E.92.E5.BA.8F.E5.AD.97
 [2] https://www.mediawiki.org/wiki/Extension:CategoryMultisort

What do you think is a better approach to implement this? In 1.16
version I had to create another DB table but in modern MediaWiki,
categories have better sorting support so another choice (which seems
more natural) is to patch MediaWiki and change $wgCategoryCollation to
an array to support multiple collation at the same time. Maybe another
choice is to reuse the existing categorylinks table in an extension
but this requires MediaWiki to have enough hooks.


 -Liangent

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l

 ___
 Labs-l mailing list
 Labs-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/labs-l

-Liangent

___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l


[Labs-l] Gerrit doesn't recognize my password.

2012-02-29 Thread Liangent
Hi,

Sumanah created an account for me but I didn't receive my initial
password as normal. I requested a password reset and changed the
temporary password to a 19-char one. I tried to log in to labsconsole
and gerrit with the new password afterwards and everything goes
smoothly. Today I tried to log in to gerrit but it doesn't accept my
password, with a message Incorrect username or password. but
labsconsole accepts my password happily. What's wrong?

-Liangent

___
Labs-l mailing list
Labs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/labs-l