[Python-bugs-list] [ python-Bugs-558279 ] \verbatiminput and name duplication

noreply@sourceforge.net noreply@sourceforge.net
Mon, 20 May 2002 08:15:51 -0700


Bugs item #558279, was opened at 2002-05-20 09:52
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=558279&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Fred L. Drake, Jr. (fdrake)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: \verbatiminput and name duplication

Initial Comment:
The \verbatiminput support which generates file names
for the "Download as text" feature does not check that
the source file names are unique without the extension.
 If a document uses \verbatiminput with two files,
sample.py and sample.html, both get written to the
output as sample.txt; last one processed wins.

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

>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-05-20 11:15

Message:
Logged In: YES 
user_id=3066

I'm attaching a patch that will at least make sure things
work when presented with source filenames that share the
same base name, or are the same file included more than once.

The patch is not ideal:  repeated inclusions are not
detected, so the content will be duplicated for each
inclusion (minor).  The filename generation does not ensure
that a source file's basename will ever be used for a file
with that basename.  For example, including sample.py,
sample.c, and sample-c.c, in that order, will generate the
file names sample.txt, sample-c.txt, and sample-c-c.txt.

Note that filename re-writing is needed to ensure that Web
servers produce the text/plain Content-Type for these files;
there is no reliable way to configure Web servers to produce
 the appropriate headers from the content space.  (We also
need to avoid allowing the output text files to have
extensions of .html since LaTeX2HTML or node2label.pl might
overwrite them.)

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=558279&group_id=5470