David Goodger | 1 Jul 2004 06:01
Favicon

Re: BackTalk-like Product Using ReST

Mohsen Moeeni wrote:
 > I am investigating the feasibility of developing a BackTalk-like
 > Zope product using ReST.

I know of someone else working on something similar: Frank Bennett of
Nagoya University, in Japan.  Frank, could you comment on Mohsen's
post?  (http://article.gmane.org/gmane.text.docutils.user/1351)

 > - Inline-comments can be separated from the main content by using
 >   substitution directives. This makes further edition of the main
 >   content easier and more error-prune.

What's "error-prune"?  Did you mean "error-prone" (a bad thing) or
"error-proof" (possibly good)?

 > - Firstly if I make sense at all in this regard? Is this the/a
 >   right way?

I'm not sure.  Would the "quote" directives be generated by software?
Or would the user have to type them in?  Disclaimer: I don't know
Zope.

 > - Secondly, in quote_paragraph function above, you have paragraph
 >   id as p_id. I doubt ReST paragraphs have any id. Any idea on how
 >   to distinguish paragraphs?

All Docutils document tree elements may have an ID.  True, most
paragraphs are not assigned an ID, but they can get one.

 > - Lastly, There should be a "Quote" mark after each **paragraph**
(Continue reading)

Frank Bennett | 1 Jul 2004 08:53
Picon

Re: BackTalk-like Product Using ReST

Mohsen Moeeni <mohsen <at> schoolnet.ir> writes:
> I am investigating the feasibility of developing a BackTalk-like
> Zope product using ReST. Zope BackTalk [1]_ product allows 
> readers of the content to make inline comments on the content
> they are reading. It's used to develope online versions of Zope
> and Zope-Dev books [2]. BackTalk uses STX as its internal
> format. The inline comments are just some "in-place" paragraphs
> with special format which makes them distinguishable from the
> main content.
> 
> . [1] http://backtalk.sourceforge.net/
> . [2] http://www.zope.org/Documentation/Books/ZopeBook/

Hi, Frank Bennett here.  David Goodger was kind enough to suggest I take
a look at Mohsen's very interesting post.

Yes.  I really like the BackTalk concept.  We've built an
extended version of the BackTalk environment at Nagoya University
that I'm using to teach writing classes this term.  The system
has over 100 students scribbling away in it (and eagerly awaiting
comments) even as we speak.  :-)

One of the limitations of the original BackTalk that drove us to
extend it was the inclusion of the comments in the source
text.  This raises a couple of problems.  First, when you spin up a new
version of a document, you may want to archive it with the comments,
but you probably don't want old comments cluttering up the editable
source.  It's a lot simpler to tidy up for a version transition if the
comments are stored outside of the document in the first place, say
under SQL, and spliced in by Zope when the document is displayed,
(Continue reading)

Mohsen Moeeni | 1 Jul 2004 17:59
Picon
Favicon

Re: BackTalk-like Product Using ReST


Hi David, Thanks for paying attention.

Quoting David Goodger <goodger <at> python.org>:

> Mohsen Moeeni wrote:
>  > - Inline-comments can be separated from the main content by using
>  >   substitution directives. This makes further edition of the main
>  >   content easier and more error-prune.
> 
> What's "error-prune"?  Did you mean "error-prone" (a bad thing) or
> "error-proof" (possibly good)?

Sorry, read it "less error-prone" :-). This is because ReST allowes
you to maintain the quotes/annotations seperated from the main
content by using substitution directives.

> 
>  > - Firstly if I make sense at all in this regard? Is this the/a
>  >   right way?
> 
> I'm not sure.  Would the "quote" directives be generated by software?
> Or would the user have to type them in?  Disclaimer: I don't know
> Zope.

The user just provides his comment. It's the responsiblity
of the software to wrap this comment into a quote directive and
place it in the right place in the document as well as to
provide a directive function for the quote directive and register
it with the parser. 
(Continue reading)

Mohsen Moeeni | 1 Jul 2004 18:34
Picon
Favicon

Re: Re: BackTalk-like Product Using ReST


Hi Frank;

Thanks alot for your post.

Quoting Frank Bennett <bennett <at> nomolog.nagoya-u.ac.jp>:

> Yes.  I really like the BackTalk concept.  We've built an
> extended version of the BackTalk environment at Nagoya University
> that I'm using to teach writing classes this term.  The system
> has over 100 students scribbling away in it (and eagerly awaiting
> comments) even as we speak.  :-)

Nice to hear about that :-)

> 
> > And Here are some questions which I am interested to know:
> > 
> > - Firstly if I make sense at all in this regard? Is this the/a
> >   right way?
> 
> As I noted above, I think that putting the comments directly
> into the document would prove cumbersome.

That's right. Although in the exmaple of my first post, I put
them near the main content, that was not my final idea. As
I didn't like to make my post longer than that, I didn't explain
every detail. Now I can expalin more details about my idea of how
ReST can be utilized to seperate the comments and main content
to a very high degree in Zope. There are two steps to achieve this. 
(Continue reading)

W. Winder | 3 Jul 2004 09:07
Picon
Picon

raw in head of html doc

Is it possible to put  information in the header of an html file 
(generated with buildhtm.py)? I would like to put in the tag <base 
target="_blank"> but don't see any way to add raw html to the head 
(though it is done easily enough in the body).

Any suggestions?

thanks!

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
David Goodger | 3 Jul 2004 16:26
Favicon

Re: BackTalk-like Product Using ReST

Mohsen Moeeni wrote:
> Can these IDs be specified in the ReST source or they are just
> relevant for the life time of the document tree?

Currently, IDs are assigned by software, and don't come from the
source reST.  There's no mechanism for putting IDs in the source
text, but we could add one.  But an author-specified "name" might
be better.

> Which docs should I look in to learn about them?

* http://docutils.sf.net/docs/ref/doctree.html
* http://docutils.sf.net/docs/ref/docutils.dtd
* Use the Source, Luke!
* Ask questions here.

--

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

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
David Goodger | 3 Jul 2004 21:34
Favicon

Re: raw in head of html doc

W. Winder wrote:
 > Is it possible to put  information in the header of an html file
 > (generated with buildhtm.py)? I would like to put in the tag <base
 > target="_blank"> but don't see any way to add raw html to the head
 > (though it is done easily enough in the body).

 From within a document, no, it is not currently possible.  There is a
patch which I'm taking another look at thanks to your prompting:
http://sf.net/tracker/index.php?func=detail&aid=817443&group_id=38414&atid=422032
It's not as simple as it may seem though.

--

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

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
Aahz | 5 Jul 2004 16:45

Re: Re: BackTalk-like Product Using ReST

I just wanted to say how really cool it is that reST is getting used so
many different ways.
--

-- 
Aahz (aahz <at> pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Typing is cheap.  Thinking is expensive."  --Roy Smith, c.l.py

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
christof hoeke | 12 Jul 2004 20:01
Picon
Favicon

ResT .txt files and encodings

  hi,
if I use the following simple txt file

===================
examples
===================

**TEST** (äöüßEUR) < > &

and save it in utf-8 e.g. in Scite, the editor naturally inserts 
encoding information bytes at the beginning of the file which i see when 
opening it in an non unicode aware editor. when I transform this txt to 
XHTML afterwards (inputencoding set to utf-8) I do not get the expected 
headline element but only a simple ===================== examples 
=====================

I guess the encoding information at the beginning of the file somehow do 
confuse docutils or do i do something wrong?

thanks for any help
chris

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
David Goodger | 12 Jul 2004 21:18
Favicon

Re: ResT .txt files and encodings

christof hoeke wrote:
 > if I use the following simple txt file
...
 > and save it in utf-8 e.g. in Scite, the editor naturally inserts
 > encoding information bytes at the beginning of the file which i see
 > when opening it in an non unicode aware editor.

Could you send me an example of such a file?  Please gzip it so that
email doesn't corrupt it.

 > when I transform this txt to XHTML afterwards (inputencoding set to
 > utf-8) I do not get the expected headline element but only a simple
 > ===================== examples =====================
 >
 > I guess the encoding information at the beginning of the file
 > somehow do confuse docutils

That's very possible.  Docutils currently reads the raw data from a
file and *then* decodes it.  Perhaps Docutils should open and decode
in one step.  The Python codecs might even support that.

 > or do i do something wrong?

I don't think so.

--

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

-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
(Continue reading)


Gmane