Mark Nodine | 1 Mar 2007 02:12
Picon

Re: Invisible document node for include?

Stefan Rank wrote:

> Hi docutilsers,
> 
> I just tried to write a replacement for the Include directive that works 
> in a web application - and it does.
> 
> I wanted to go further and (optionally) show in the output which parts 
> were ``.. include``d:
> This is easy for :literal: includes. I just add a class.
> This is impossible for normal includes, (AFAICT ?)
> because there is no document node that corresponds to the inclusion.

Can't you do something like

   .. compound::
      :class: included

      .. include:: myfile

	--Mark

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Stefan Rank | 1 Mar 2007 08:41
Favicon

Re: Invisible document node for include?

on 28.02.2007 19:26 Roberto Alsina said the following:
> On Wed 28 Feb 2007 15:08:46 Stefan Rank wrote:
>> - the rst writer of the future, that can reproduce the original source
>>    (or that can output rst after includes/transforms/...)
> 
> Just in case: there is a sort-of-rst-writer-of-the-present at 
> http://lateral.blogsite.org/rst2rst/rst2rst.py
> 
> It's not really a writer, but it can chew almost any rst and produce legal and 
> apparently identical rst back at you :-)
> 
> At least it's good enough to eat this, which uses almost every rst feature:
> 
> http://lateral.blogsite.org/rst2rst/t1.txt

Hi Roberto,

yes, I knew your rst2rst.py (I still have your message from November in 
my python inbox :-).
It's very impressive.

Without integrating it into docutils, however, it can't solve problems 
like the include case, i.e. it can only output the doctree after includes.
The same goes for transforms such as ``.. contents::``.

cheers,
strank

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
(Continue reading)

Stefan Rank | 1 Mar 2007 08:48
Favicon

Re: Invisible document node for include?

on 28.02.2007 21:59 Alan Isaac said the following:
> Stefan Rank wrote:
>> I just tried to write a replacement for the Include directive that 
>> works in a web application - and it does.
> 
> If you are working with the ``include`` directive,
> please consider implementing delimited includes.
> (I.e., include file lines between a START tag
> and an END tag (noninclusive), where these tags
> are arguments to the ``include`` directive.)

To see if I understand you correctly:

.. include:: blafile
    :starttag: something to grep for
    :endtag: another thing to grep for

would read ``blafile`` and search for the string/line/glob/regexp (?) 
specified via starttag and use only the text read until it finds the 
endtag (string/line/glob/regexp?).

Right?

I can see that this might be useful. Is this in the todos somewhere?

cheers,
strank

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
(Continue reading)

Stefan Rank | 1 Mar 2007 08:52
Favicon

Re: Invisible document node for include?

on 01.03.2007 02:12 Mark Nodine said the following:
> Stefan Rank wrote:
> 
>> Hi docutilsers,
>>
>> I just tried to write a replacement for the Include directive that 
>> works in a web application - and it does.
>>
>> I wanted to go further and (optionally) show in the output which parts 
>> were ``.. include``d:
>> This is easy for :literal: includes. I just add a class.
>> This is impossible for normal includes, (AFAICT ?)
>> because there is no document node that corresponds to the inclusion.
> 
> Can't you do something like
> 
>   .. compound::
>      :class: included
> 
>      .. include:: myfile

Not if ``myfile`` has::

   a heading
   ~~~~~~~~~

in it.

(same for ``.. container``)

(Continue reading)

grubert | 1 Mar 2007 15:18
Picon
Gravatar

Re: [Docutils-users] Fwd: Test suite failure

On Thu, 22 Feb 2007, Daniel Scharfman wrote:

> Not sure what you mean by o2.
> OS is Windows XP.  Python is 2.5.

sorry but you understood correct.
maybe someone with this config on the devlist could check ?

> On 2/22/07, grubert <at> users.sourceforge.net <grubert <at> users.sourceforge.net>
> wrote:
>> On Wed, 21 Feb 2007, Daniel Scharfman wrote:
>> 
>> > The website says that any errors from running tests should be
> reported.  So
>> > I'm doing that.
>> >
>> > Checked out head from the trunk (revision number 4919) and ran install.
>> > Tests seem to be failing though.  Attached is text file with standard
> out
>> > and standard error.
>> >
>> > I did the install double clicking on install.py and doing 
>> setup.pyinstall.
>> >
>> > My install is Windows XP, Python 2.5.
>> >
>> > I ran alltests.py and had failures.  Attached are results of running
>> > alltests.py, the standard out, standard error, and a file named
> alltests.out
>> > .
(Continue reading)

Stefan Rank | 1 Mar 2007 16:28
Favicon

Re: [Docutils-users] Fwd: Test suite failure

on 01.03.2007 15:18 grubert <at> users.sourceforge.net said the following:
> On Thu, 22 Feb 2007, Daniel Scharfman wrote:
> 
>> Not sure what you mean by o2.
>> OS is Windows XP.  Python is 2.5.
> 
> sorry but you understood correct.
> maybe someone with this config on the devlist could check ?

I am running this config at the moment.
svn updated to rev4962 and ran alltests.py

I get one failure:

functional/output/ui/small-black/framing.css
functional/output/ui/small-black/pretty.css

differ from the expected files in the line-endings only
(diff --ignore-space-change gives no output).
Expected has CRLF, output has LF only.

In my book it is ok to generate LF only .css files on Windows,
so my solution would be to check the expected files into svn with LF 
line endings.

cheers,
strank

>> On 2/22/07, grubert <at> users.sourceforge.net <grubert <at> users.sourceforge.net>
>> wrote:
(Continue reading)

Alan G Isaac | 1 Mar 2007 16:36
Picon
Favicon

Re: Invisible document node for include?

> on 28.02.2007 21:59 Alan Isaac said the following: 
>> If you are working with the ``include`` directive, please 
>> consider implementing delimited includes.  (I.e., include 
>> file lines between a START tag and an END tag 
>> (noninclusive), where these tags are arguments to the 
>> ``include`` directive.) 

On Thu, 01 Mar 2007, Stefan Rank apparently wrote: 
> To see if I understand you correctly: 
> .. include:: blafile 
>     :starttag: something to grep for 
>     :endtag: another thing to grep for 
> would read ``blafile`` and search for the string/line/glob/regexp (?) 
> specified via starttag and use only the text read until it finds the 
> endtag (string/line/glob/regexp?). 

This is the basic idea.
I am not asking to use a regexp.  I would just use ``startswith``.
I would be happy with any reasonable restrictions on the tag structure.
Note that inclusion should start with the line after the 
begin-tag and end with the line before the end-tag.

> I can see that this might be useful. Is this in the todos somewhere? 

I do not think the developers have yet expressed a consensus 
view on this functionality.  But I would certainly use it 
all the time for including code snippets.

Cheers,
Alan Isaac
(Continue reading)

Felix Wiemann | 2 Mar 2007 08:20
Picon

plugins branch

Hi,

On my way back I did some work on the plugins branch.  David, can you 
tell me what you think?  I like it so far, I think we can merge it to 
the trunk sooner or later.

Best wishes,

     Felix

--

-- 
Felix Wiemann -- http://www.ososo.de/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Daniel Scharfman | 1 Mar 2007 21:53

Re: [Docutils-users] Fwd: Test suite failure

If you think it's an end of line thing, could it have something to do with binary file read (binary flag or no binary flag)?  That seems like a common problem with  on cross-platform python program.


Daniel

On 3/1/07, grubert <at> users.sourceforge.net <grubert <at> users.sourceforge.net > wrote:
On Thu, 22 Feb 2007, Daniel Scharfman wrote:

> Not sure what you mean by o2.
> OS is Windows XP.  Python is 2.5.

sorry but you understood correct.
maybe someone with this config on the devlist could check ?

> On 2/22/07, grubert <at> users.sourceforge.net <grubert <at> users.sourceforge.net>
> wrote:
>> On Wed, 21 Feb 2007, Daniel Scharfman wrote:
>>
>> > The website says that any errors from running tests should be
> reported.  So
>> > I'm doing that.
>> >
>> > Checked out head from the trunk (revision number 4919) and ran install.
>> > Tests seem to be failing though.  Attached is text file with standard
> out
>> > and standard error.
>> >
>> > I did the install double clicking on install.py and doing
>> setup.pyinstall.
>> >
>> > My install is Windows XP, Python 2.5.
>> >
>> > I ran alltests.py and had failures.  Attached are results of running
>> > alltests.py, the standard out, standard error, and a file named
> alltests.out
>> > .
>> >
>> > I'm sending output as 7zip because .zip was blocked by sourceforge.
>> >
>> > Daniel
>>
>> looks like a end-of-line character problem ?
>>
>> which system are you running, o2, python ?
>>
>> cheers
>>
>> --
>>
>

--

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Felix Wiemann | 5 Mar 2007 04:24
Picon

Re: plugins branch

Felix Wiemann wrote:

> On my way back I did some work on the plugins branch.

One issue I'm currently seeing is that it isn't possible to run Docutils 
without installing it through setuptools.  That's baaad.  I know there 
are hackarounds like Ian's workingenv.py, but I don't think that's enough.

Another (perhaps secondary) issue is that it's not currently possible to 
load plugins without installing them using setuptools.  A use-case for 
that would be processing aafigure's README.txt on the BerliOS server 
without actually installing aafigure.  Instead, I want the aafigure 
plugin to be loaded at run-time, perhaps through a --plugin option.

So yeah.  I think we should decouple Docutils and setuptools a little 
more.  I.e. Docutils should normally run with setuptools, but it should 
also be runnable *without* setuptools in case we need to.

So maybe the entry points should be defined in a separate file that can 
also be read directly by Docutils, without going through pkg_resources. 
  This file could be named entry_points.py and it could be stored in the 
project root of the main Docutils tree (and of each plugin?).

Thanks for reading this... :-)  Comments are appreciated.

Best wishes,

     Felix

--

-- 
Felix Wiemann -- http://www.ososo.de/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane