[Moin-user] attachments, filenamespaces, and indexing

greg gregwh at gmail.com
Thu Apr 21 15:27:58 EDT 2005


Thomas,

Thanks for the help.  I've attached a patch made with
    diff -u AttachFile.py AttachFilenew.py > AttachFile.py

This was against 1.3.4.  I've never submitted a patch before, so I
apologize if this isn't the correct way to go about it.  It's only two
lines anyway.  One thing to consider is that it replaces spaces with
underscores even if the user uses "Save as."  I believe this is best
for my site since the novice group is likely to type in files with
spaces without considering the consequences for linking to attachments
and they aren't likely to be surprised or upset by the underscore
substitution.   Anyway the other behavior could be had by doing

if not rename:
    target = re.sub(' ','_',target)

The complete replacement of attachments sounds a little scary.  I'm
hoping there's a migration path!

Thanks,
Greg

On 4/21/05, Thomas Waldmann <tw-public at gmx.de> wrote:
> > considering altering the MoinMoin.action.AttachFile.do_upload function
> > to substitute underscores for spaces.  Is there any good reason not to
> > do this?
> 
> As a similar thing is already done for page names: No.
> 
> So feel free to do that. If you make a nice clean patch we might even
> include it into 1.3.
> 
> There won't be bigger changes though, as we will replace attachments in
>   the next major release completely.
> 
> > The other issue is making the attachment pages available for a web
> > crawler to index.  We're considering using htdig or maybe a google
> > mini appliance to index the site including the attachments.  Is there
> > any place the unlinked files are available to the crawler?  Should I
> > create an AttachIndex macro?
> 
> Maybe you need to use a useragent string that is not listed on the
> blacklist of moin. Usually you DON'T want a search engine to trigger
> actons, therefore most of those bots and tools are on the blacklist and
> forbidden for actions.
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: New Crystal Reports XI.
> Version 11 adds new functionality designed to reduce time involved in
> creating, integrating, and deploying reporting solutions. Free runtime info,
> new features, or free trial, at: http://www.businessobjects.com/devxi/728
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: AttachFile.diff
URL: <http://mail.python.org/pipermail/moin-user/attachments/20050421/8f22e7b3/attachment.ksh>


More information about the Moin-user mailing list