Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
mw-render not picking up customconfig.py
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Swaroop  
View profile  
 More options Sep 30 2008, 4:40 pm
From: Swaroop <swar...@swaroopch.com>
Date: Tue, 30 Sep 2008 13:40:51 -0700 (PDT)
Local: Tues, Sep 30 2008 4:40 pm
Subject: mw-render not picking up customconfig.py
Hi,

After Volker's quick reply to my previous question on specifying PDF
size ( http://groups.google.com/group/mwlib/t/b5d8e22147c61d61 ), I
set up mwlib on my own server and it installed smoothly, thanks to
`easy_install`.

I was able to switch $wgCollectionMWServeURL to the new server and
confirmed that it is talking to the new server via the log generated
by mw-serve (specified by `-l` option, I think).

I added a `customconfig.py` file to /usr/lib/python2.5/site-packages/
mwlib.rl-0.8.2-py2.5.egg/mwlib/rl/ directory with the following
content:

    #! /usr/bin/env python
    #! -*- coding:utf-8 -*-

    from reportlab.lib.units import cm, inch
    new_size = (8*inch, 10*inch)

    ######### PAGE CONFIGURATION
    pageMarginHor = 2 * cm
    pageMarginVert= 2 * cm
    pageWidth, pageHeight = new_size
    printWidth = pageWidth - 2*pageMarginHor
    printHeight = pageHeight - 2*pageMarginVert

However, the new PDFs being generated are still the same old size. I
even tried hacking `pdfstyles.py` itself but still observed no change.

I'm baffled because it appears to be talking to the right server but
changes are not being reflected.

Is editing the files within an egg the problem?

Would greatly appreciate any help.

Regards,
Swaroop


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Swaroop  
View profile  
 More options Oct 1 2008, 3:41 am
From: Swaroop <swar...@swaroopch.com>
Date: Wed, 1 Oct 2008 00:41:13 -0700 (PDT)
Local: Wed, Oct 1 2008 3:41 am
Subject: Re: mw-render not picking up customconfig.py

I am able to confirm that the changes are being picked up:

    pdfstyles.py : 2008-10-01 03:35:26.208707 ; pageWidth = 576.0
    customconfig.py : 2008-10-01 03:35:26.209123

But *still*, the resulting PDF size is 8.27 x 11.69 inches.

Has anybody tried this successfully?

Regards,
Swaroop


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Volker Haas  
View profile  
 More options Oct 1 2008, 9:46 am
From: Volker Haas <volker.h...@brainbot.com>
Date: Wed, 01 Oct 2008 15:46:11 +0200
Local: Wed, Oct 1 2008 9:46 am
Subject: Re: [mwlib] Re: mw-render not picking up customconfig.py
Hi Swaroop,

actually you are right. Currently there is a bug preventing proper page size customization.
I opened a ticket for that http://code.pediapress.com/wiki/ticket/310
I'll fix this soon.

Best,
Volker

Swaroop wrote:
I am able to confirm that the changes are being picked up:

    pdfstyles.py : 2008-10-01 03:35:26.208707 ; pageWidth = 576.0
    customconfig.py : 2008-10-01 03:35:26.209123

But *still*, the resulting PDF size is 8.27 x 11.69 inches.

Has anybody tried this successfully?

Regards,
Swaroop


  
I'm baffled because it appears to be talking to the right server but
changes are not being reflected.
    

  

-- 
volker haas                 brainbot technologies ag
fon +49 6131 2116394        boppstraße 64
fax +49 6131 2116392        55118 mainz
volker.haas@brainbot.com    http://www.brainbot.com/

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Swaroop  
View profile  
 More options Oct 1 2008, 10:06 am
From: Swaroop <swar...@swaroopch.com>
Date: Wed, 1 Oct 2008 07:06:19 -0700 (PDT)
Local: Wed, Oct 1 2008 10:06 am
Subject: Re: mw-render not picking up customconfig.py
Hi Volker,

Thanks for confirming it's a bug!

On a different note, just wanted to thank you guys for the awesome
functionality that you are providing. I'm now finally able to sell
printed copies of my Creative Commons-licensed book [1], which many
readers had requested [2]. Everyday, someone discovers mwlib and is
very happy like this person Dan [3]:

"That, sir, is a truly awesome piece of software, and written in
Python too. Thanks for making me aware of it. A big +1."

[1] http://www.swaroopch.com/notes/Python
[2] http://www.swaroopch.com/buybook
[3] http://stackoverflow.com/questions/154592/python-module-for-wiki-mark...

Regards,
Swaroop

On Oct 1, 6:46 pm, Volker Haas wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Volker Haas  
View profile  
 More options Oct 14 2008, 9:08 am
From: Volker Haas <volker.h...@brainbot.com>
Date: Tue, 14 Oct 2008 15:08:01 +0200
Local: Tues, Oct 14 2008 9:08 am
Subject: Re: [mwlib] Re: mw-render not picking up customconfig.py
Hi Swaroop

Swaroop wrote:
> Hi Volker,

> Thanks for confirming it's a bug!

Sorry the fix took so long, I thought that I did not have to time to fix
the issue since other stuff was more important. But actually the fix was
so laughably easy, and the bug so stupid... I wish that I had just fixed
the bug and not even opened a ticket for that ;)

> On a different note, just wanted to thank you guys for the awesome
> functionality that you are providing.

That's always nice to hear ;)

Regards,
Volker

--
volker haas                 brainbot technologies ag
fon +49 6131 2116394        boppstraße 64
fax +49 6131 2116392        55118 mainz
volker.h...@brainbot.com    http://www.brainbot.com/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google