Hi Dan,

could you please split this bug report into a few smaller,
self-contained ones ? That way I can tag/fix/close them the right way.

Cheers,

--Seb

On Wed, Aug 09, 2006 at 10:34:43PM +0800, Dan Jacobson wrote:
> Package: wikipediafs
> Version: 0.1-1
> Severity: normal
> File: /usr/share/man/man8/mount.wikipediafs.8.gz
> X-Debbugs-Cc: Mathieu Blondel <[EMAIL PROTECTED]>
> 
> I can ls and cat existing articles, but
> cannot use cp to make new articles:
> 
> # cp ~/newarticle nurdsburg.org/newart
> # Traceback (most recent call last):
>   File "/usr/lib/python2.3/site-packages/fuse.py", line 40, in __call__
>     return apply(self.func, args, kw)
>   File "/usr/lib/python2.3/site-packages/wikipediafs/WikipediaFS.py", line 
> 365, in release
>     self.__publishArticle(relative_path=path)
>   File "/usr/lib/python2.3/site-packages/wikipediafs/WikipediaFS.py", line 
> 122, in __publishArticle
>     current_WikipediaArticle = \
>   File "/usr/lib/python2.3/site-packages/wikipediafs/WikipediaFS.py", line 
> 96, in __getWikipediaArticleFromPath
>     return self.article_list[current_dir][file_name]
>   File 
> "/usr/lib/python2.3/site-packages/wikipediafs/WikipediaArticleList.py", line 
> 50, in __getitem__
>     return self.list[self.get().index(article_name)]
> ValueError: list.index(x): x not in list
> 
> 
> # ed /mnt/wfs/bla.org/newfile
> doesn't work either.
> So apparently we can only edit existing articles. Not add new
> articles.
> 
> We can however now ls and cat newart etc. So it gets into the cache,
> but not into the wiki.
> 
> 
> Also add a note that on Debian,
>    # chmod 4750 /usr/bin/fusermount
> 
>    # chgrp fuse /dev/fuse /usr/bin/fusermount
> have already been done for us.
> 
> Trailing blanks:
> $ grep -c ' $' 
> /usr/share/pycentral/wikipediafs/site-packages/wikipediafs/WikipediaFS.py
> 86
> Also GNU is no longer on Temple Place.
> 
> 
> In WikipediaArticle.py we see names hardwired in:
>     wal = WikipediaArticleList('mblondel.org', 'www.mblondel.org',
> 
> 
> Man page says
>        none /mnt/wfs/ wikipediafs noauto,nouser,home=/home/your_username/
> 
>        Replace  noauto  by auto if you want WikipediaFS to be mounted at boot.
>        Replace nouser by user if  you  want  to  allow  simple  users  to  use
>        WikipediaFS.
> Mention if that is all that is needed to allow simple users, or must
> one do the chmods.
> 
> P.S.
> $ man mount.wikipediafs |grep '/ \?Japan'
>        $ cat wikipedia-en/Japan | less
>        $ ls wikipedia-en/ Japan
>        $ cp wikipedia-en/Japan ~/Desktop/
>        $ cp wikipedia-en/Japan mblondel.org/
> Space on second line.
> 
> By the way I do
> # emacs
> and the above error messages get sent to the shell that called emacs,
> and are not seen inside emacs. Try doing them in M-x shell to test.
> 
> OK, I made a workaround to upload articles, new or existing:
> 
> #!/usr/bin/perl
> # wikimediawritepage -- write a page to a wikimedia
> # Offline allow ample time to think, and save big modem $$.
> # Copyright       : http://www.fsf.org/copyleft/gpl.html
> # Author          : Dan Jacobson -- http://jidanni.org/
> # Created On      : Aug 2006
> # Last Modified By: Dan Jacobson
> # Last Modified On: Wed Aug  9 03:23:18 2006
> # Update Count    : 140
> use strict;
> use warnings;
> die "Usage: $0 baseName_of_page < wikitext" if $#ARGV;
> my $editurl = 
> "http://localhost/mediawiki/index.php?title=$ARGV[0]&action=edit";;
> use LWP::UserAgent;
> use HTML::Form;
> my $ua = LWP::UserAgent->new;
> ##$ua->env_proxy;
> my $response = $ua->get($editurl);
> die $response->as_string unless $response->is_success;
> my $form = HTML::Form->parse($response);                ##1st item
> $form->enctype("application/x-www-form-urlencoded");    #else some utf problem
> $ARGV[0] = "-";
> local $/;
> $form->value( "wpTextbox1", <> );
> $ua       = LWP::UserAgent->new;
> $response = $ua->request( $form->click );
> die $response->as_string unless $response->is_success;
> print $response->content;
> 
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to