fuzzyman | 3 May 2006 00:55
Picon
Favicon
Gravatar

rest2web in Subversion

rest2web in Subversion

rest2web 0.5.0 alpha is now in subversion.

Included in this is a partial documentation update. I think that it will be easier to work on the remaining features I'd like to add to 0.5.0, if it can be done in smaller incremental steps.

Not only that, but some of the new features need using, commenting on and more work. Hopefully as I add to the documentation this will happen.

The new features are currently best documented in the changelog. This provides an outline of all the changes (so far) since 0.4.0 alpha.

Remaining features targeted for inclusion in 0.5.0 are outlined in the todo list.

The biggest change to rest2web is the new force mode. This allows rest2web to build a simple website just from a directory tree of ReST documents. restindexes, templates and index pages all become optional. Documentation for this feature already exists, see the force mode source file.

Posted by Fuzzyman on 2006-05-01 23:23:55.
Categories: Projects, Python, Website
Visit the Voidspace Techie Blog to read this entry and more.

David Goodger | 4 May 2006 05:27
Favicon

Re: DocUtils GUIs

[Matt Dorn]
> I've been reStructuredText for quite some time and have been considering
> working on a GUI project to facilitate publication to other formats via
> DocUtils.   I noticed that there's an old project called DocFactory and
> that some new work was been done on a separate project called "dugui".
> Why was a new project started?
...
> Is there an overall goal for dugui?

The purpose of dugui is a GUI front end to Docutils.  Just a way to
select an input file, an output path, output format, and options.
A front end for users who are more comfortable with GUI apps than
the command line.

DocFactory is meant to be a complete IDE: editor, processor, and viewer.

> Is DocFactory now a dead end?  (The last
> history entry was about 2 years ago, so I'm assuming the answer is yes.)

I checked in some updates from Gunnar Schwant (DocFactory's author)
on March 21, about six weeks ago.

> I don't want to start a separate project if I'm going to be redundant.

If your project's goals fit with something existing, it would be best
to work on that.

--

-- 
David Goodger <http://python.net/~goodger>

Felix Wiemann | 4 May 2006 20:19
Picon

Re: error pickling a document

David Goodger wrote:

> Felix Wiemann wrote:
>
>> I think that docutils.core.publish_from_doctree will take
>> care of setting the reporter object up again.
>
> It does not, and it should not.

Well, it does -- from the docstring::

    Also, new document.transformer and document.reporter objects are
    generated.

ISTM that there's nothing wrong with this as there may be new settings
(like warning_stream) that influence the behavior of the reporter.

--

-- 
For private mail please ensure that the header contains 'Felix Wiemann'.

"the number of contributors [...] is strongly and inversely correlated with the
number of hoops each project makes a contributing user go through."      -- ESR

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Felix Wiemann | 4 May 2006 20:52
Picon

Re: docutils win32 binary installer puts data files in wrong directory

GD Alcos wrote:

> problem: the binary Windows installer created by **python setup.py
> bdist_wininst**, will install data files in the wrong place
>
> cause : the code of setup.py that specifies the data directory root
> does not run in a binary installer ::
>
> solution : backtrack to the previous version that used a special
> data-installer::
>
> class smart_install_data(install_data):
>
>      # From <http://wiki.python.org/moin/DistutilsInstallDataScattered>,
>      # by Pete Shinners.
>
>      [...]

Unfortunately this doesn't work with Python 2.2, and we want to be
compatible to Python 2.2.

Might using the current method for Python 2.2 and using the new method
for Python 2.3+ (using sys.hexversion) solve the problem for you?

When is that setup code executed?  Only when the EXE is created, or when
the EXE is run, or both?  (If you don't know, please just tell me so,
and I'll do some testing myself.)

[Please Cc Docutils-users <at> lists.sourceforge.net in your reply.]

Felix

--

-- 
For private mail please ensure that the header contains 'Felix Wiemann'.

"the number of contributors [...] is strongly and inversely correlated with the
number of hoops each project makes a contributing user go through."      -- ESR

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
David Goodger | 4 May 2006 20:56
Favicon

Re: Re: error pickling a document

[Felix Wiemann, on 1 April]
>>> I think that docutils.core.publish_from_doctree will take care of
>>> setting the reporter object up again.

[David Goodger, on 1 April]
> > It does not, and it should not.

[Felix Wiemann, on 4 May]
> Well, it does -- from the docstring::

If you're going to revisit a dead argument from over a month ago,
please have the courtesy of reading the *entire* thread before
replying. :-)  On April 2 I wrote:

    ... In fact, after a reexamination of the DocTree Reader that
    Martin Blais wrote for Docutils (docutils.readers.doctree), I
    rediscovered that it *does* create a new Reporter and Transformer
    for processing the doctree.  I had forgotten.  Apologies for any
    confusion.

--
David Goodger <http://python.net/~goodger>

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
GD Alcos | 5 May 2006 15:36
Picon

Re: docutils win32 binary installer puts data files in wrong directory

Hello Felix

At 20:52 04/05/2006, you wrote:
>GD Alcos wrote:
> > problem: the binary Windows installer created by **python setup.py
> > bdist_wininst**, will install data files in the wrong place
>
>Unfortunately this doesn't work with Python 2.2, and we want to be
>compatible to Python 2.2.

I didn't know it could not work on Python 2.2. I am currently using 
Python 2.4, and was using Python 2.3

>Might using the current method for Python 2.2 and using the new method
>for Python 2.3+ (using sys.hexversion) solve the problem for you?

My problem is solved. I modified the setup.py source and everything 
runs fine on my computers
  and on my clients computers (using Python 2.3 or 2.4).

I was just transmitting some info to try to help others.
If somebody creates a binary installer with the current setup.py,
the data files will not be installed in the right place, and his 
users will have errors kind of :

*C:\Python24\Lib\site-packages\docutils\writers\html4css1\html4css1.css 
Not Found*

>When is that setup code executed?  Only when the EXE is created, or when
>the EXE is run, or both?  (If you don't know, please just tell me so,
>and I'll do some testing myself.)

The setup.py code can be used in many ways :

+ display help :
         python setup.py --help

+ install docutils
         python setup.py install

+ create a binary installer (windows)
         python setup.py bdist_wininst

+ with *-k* option, we keep the temporary file tree used as source 
for the installer :  *docutils-5_0/build/bdist.win32/wininst*
         python setup.py bdist_wininst -k

============================================= Description of the problem

The temporary subtree *docutils-5_0/build/bdist.win32/wininst* on the 
computer where we prepare the binary installer should only contain
2 sub-folders : PURELIB and SCRIPTS (with html4css1.css is in the 
PURELIB subtree)

With the current setup.py, it contains 3 sub-folders : PURELIB, 
SCRIPTS and DATA  (with html4css1.css is in the DATAsubtree).

The binary installer created from this tree will copy the files of 
the DATA subtree in a subfolder of *C:\Documents and 
Settings\xxxx\Application Data*
where xxxx is the user login name.

When *docutils\writers\html4css1\__init__.py* will eventually run, it 
will  not find html4css1.css where he is searching it.
And the user will wonder what's happening.

===============

Regards, Guy 

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Dan Fabulich | 5 May 2006 21:16

Using docutils without installing it?


I'd like to use docutils on my official build machine at work, but they 
require that people not modify the build machine (to make sure that the 
build engine is simple and reproducible).  Hence, I can't install docutils 
into Python's site-packages directory.

Is it possible to use docutils without running the setup.py script and 
installing it in site-packages?

The docs emphasize that docutils is not to be simply unpacked into 
site-packages, but is that because setup.py is doing some important work 
that I can't live without, or is that because only the docutils/docutils 
directory is appropriate for installation directly into site-packages...?

If I just add the docutils/docutils directory to my PYTHONPATH, will that 
be good enough?

(Note that I am not subscribed to this mailing list, so please cc me in 
replies, though I will also try to check back using the web gateway.)

-Dan

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
David Goodger | 5 May 2006 22:44
Favicon

Re: Re: found a UnicodeDecodeError in a very simple rst file

[Michael Zheng (郑新星)]
> I do some testings for this problem. I found that if the reST file
> contains any syntex error , the UnicodeDecodeError will be appeared
> if the reST file has a Chinese name or the command-line parameters
> contains Chinese.

I came to the same conclusion, and have prepared a patch to add
a --command-line-encoding option/setting to allow for non-ASCII
file names.  I don't have time to post it right now -- I'm going
away for the weekend in a few minutes.

What I'd like to know is, is there a reliable way to *know* (not
guess) the encoding of sys.argv?  IOW, a way to know the shell's
encoding.

--

-- 
David Goodger <http://python.net/~goodger>

David Goodger | 5 May 2006 22:54
Favicon

Re: Using docutils without installing it?

[Dan Fabulich]
> If I just add the docutils/docutils directory to my PYTHONPATH, will
> that be good enough?

Yes, you can.  I do.  You have to add the directory *containing* the
"docutils" package directory to your PYTHONPATH, as well as the "extras"
directory beside it.  On my system, I have:

export
PYTHONPATH=$HOME/projects/docutils/docutils:$HOME/projects/docutils/docutils/extras

Or you can add a single directory to your PYTHONPATH, and install
Docutils there:

python setup.py install --prefix $HOME

export PYTHONPATH=$HOME/lib

--

-- 
David Goodger <http://python.net/~goodger>

François Pinard | 5 May 2006 23:19
Picon
Gravatar

Re: Re: found a UnicodeDecodeError in a very simple rst file

[David Goodger]

>What I'd like to know is, is there a reliable way to *know* (not
>guess) the encoding of sys.argv?  IOW, a way to know the shell's
>encoding.

Not reliably.  One may have filenames with different encodings in the 
same directory.  The shell does not have an encoding per se.

However, the LANGUAGE, LANG, LC_ALL or LC_CTYPE environment variables 
can hint about user's preferences.  But this is no guarantee that file 
names comply with this preference.  Maybe this could be used short of 
knowing better, given a program expects the guess to be sometimes wrong.

--

-- 
François Pinard   http://pinard.progiciels-bpi.ca

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642

Gmane