Re: [patch] readmore flavour setting

Akai <[email protected]> Tue, 02 Jun 2015 00:56:20 +0300
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============3611097975331973801==
Content-Type: multipart/alternative;
	boundary="------------060807030002080704070204"

This is a multi-part message in MIME format.
--------------060807030002080704070204
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

Good catch!
I'll test it, and get it merged in as soon as I can (hopefully tomorrow)
Thanks

On 5/29/2015 3:24 PM, Hauke Fath wrote:
> Hi,
>
> taking the readmore plugin for a spin, I noticed that the text on the
> "More..." page is always rendered in the vanilla html flavour. The
> following patch, modelled after other plugins, fixes that and makes it 
> use
> the current flavour, if set:
>
>
> --- Pyblosxom/plugins/readmore.py.orig    2013-07-31 
> 00:53:58.000000000 +0000
> +++ Pyblosxom/plugins/readmore.py
> @@ -209,7 +209,11 @@ def cb_story(args):
>       # otherwise we replace the breakpoint with the template
>       base_url = config["base_url"]
>       file_path = entry["file_path"]
> -    flavour = config.get("default_flavour", "html")
> +
> +    # Set and use current (or default) flavour for full entry
> +    flavour = data.get(
> +        "flavour", config.get("default_flavour", "html"))
> +
>       url = '%s/%s.%s' % (base_url, file_path, flavour)
>
>       link = (template % {"url": url,
>
>
> (see also
> <http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/py-blosxom/patches/patch-Pyblosx 
>
> om_plugins_readmore.py>). Please apply.
>
> Cheerio,
> hauke
>
>
> -- 
> "It's never straight up and down"     (DEVO)
>
>
>
> ------------------------------------------------------------------------------ 
>
> _______________________________________________
> Pyblosxom-devel mailing list
> Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel


--------------060807030002080704070204
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-text-flowed" style="font-family: -moz-fixed;
      font-size: 14px;" lang="x-western">Good catch!
      <br>
      I'll test it, and get it merged in as soon as I can (hopefully
      tomorrow)<br>
      Thanks
      <br>
      <br>
      On 5/29/2015 3:24 PM, Hauke Fath wrote:
      <br>
      <blockquote type="cite" style="color: #000000;">Hi,
        <br>
        <br>
        taking the readmore plugin for a spin, I noticed that the text
        on the
        <br>
        "More..." page is always rendered in the vanilla html flavour.
        The
        <br>
        following patch, modelled after other plugins, fixes that and
        makes it use
        <br>
        the current flavour, if set:
        <br>
        <br>
        <br>
        --- Pyblosxom/plugins/readmore.py.orig    2013-07-31
        00:53:58.000000000 +0000
        <br>
        +++ Pyblosxom/plugins/readmore.py
        <br>
        @@ -209,7 +209,11 @@ def cb_story(args):
        <br>
              # otherwise we replace the breakpoint with the template
        <br>
              base_url = config["base_url"]
        <br>
              file_path = entry["file_path"]
        <br>
        -    flavour = config.get("default_flavour", "html")
        <br>
        +
        <br>
        +    # Set and use current (or default) flavour for full entry
        <br>
        +    flavour = data.get(
        <br>
        +        "flavour", config.get("default_flavour", "html"))
        <br>
        +
        <br>
              url = '%s/%s.%s' % (base_url, file_path, flavour)
        <br>
        <br>
              link = (template % {"url": url,
        <br>
        <br>
        <br>
        (see also
        <br>
        &lt;<a class="moz-txt-link-freetext"
href="http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/py-blosxom/patches/patch-Pyblosx">http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/www/py-blosxom/patches/patch-Pyblosx</a>
        <br>
        om_plugins_readmore.py&gt;). Please apply.
        <br>
        <br>
        Cheerio,
        <br>
        hauke
        <br>
        <br>
        <br>
        --
        <br>
        "It's never straight up and down"     (DEVO)
        <br>
        <br>
        <br>
        <br>
------------------------------------------------------------------------------
        <br>
        _______________________________________________
        <br>
        Pyblosxom-devel mailing list
        <br>
        <a class="moz-txt-link-abbreviated"
          href="mailto:Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org">Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org</a>
        <br>
        <a class="moz-txt-link-freetext"
          href="https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel">https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel</a>
        <br>
      </blockquote>
      <br>
    </div>
  </body>
</html>

--------------060807030002080704070204--


--===============3611097975331973801==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------

--===============3611097975331973801==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pyblosxom-devel mailing list
Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel

--===============3611097975331973801==--