aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--README153
-rw-r--r--doc/mount.wikipediafs.sgml268
-rw-r--r--make_release.sh16
-rw-r--r--setup.py1
-rw-r--r--site/index.htm3
-rw-r--r--site/index_fr.htm3
7 files changed, 294 insertions, 155 deletions
diff --git a/ChangeLog b/ChangeLog
index 92dfb80..84d5843 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
-2006-08-23 Mathieu Blondel <mblondel@users.sourceforge.net>
+2006-09-04 Mathieu Blondel <mblondel@users.sourceforge.net>
-- Improved README.
+- Added man page. Removed some informations from the README
+and referred users to the man page for easier maintenance.
=== WikipediaFS 0.2 ===
diff --git a/README b/README
index 3982d2f..8fb0d1a 100644
--- a/README
+++ b/README
@@ -16,149 +16,20 @@ Install
($ su)
# python setup.py install
-Configuration
--------------
+Manual
+------
-The first time WikipediaFS is run, an XML configuration file is generated in
-~/.wikipediafs/config.xml. You can then edit it to add more Wikipedia or
-Mediawiki-based sites. Each site has a site entry defined as follows:
+$ man mount.wikipediafs
-<site>
- <dirname>wikipedia-fr</dirname>
- <host>fr.wikipedia.org</host>
- <basename>/w/index.php</basename>
- <username>Username</username>
- <password>Password</password>
-</site>
-
-* dirname
-
-Is the name of the directory through which you will access to the site.
-
-* host
-
-Is the host of the site.
-
-* basename
-
-Is the base of urls used by the site. Most of the time, it will be
-/dir/where/mediawiki/is/installed/index.php. For Wikipedia, it will be
-/w/index.php.
-
-* username and password
-
-Are optional and enable you to edit articles with your login.
-
-It is recommended to test WikipediaFS with a test site first. You can use
-mblondel.org, which is set with the default config, for this purpose.
-URL : http://www.mblondel.org/mediawiki/
-
-Mount
------
-
-$ mkdir ~/wfs/
-
-$ mount.wikipediafs ~/wfs/
-
-To run mount.wikipediafs without root privileges, you may have to set the right
-permissions for /usr/bin/fusermount and /dev/fuse if your distribution has not
-already done it for you. For example,
-
-# adduser your_username fuse
-# chmod 4750 /usr/bin/fusermount
-# chgrp fuse /dev/fuse /usr/bin/fusermount
-
-(You may have to log out and log in again so that changes are taken into
-account.)
-
-Unmount
--------
-
-$ fusermount -u ~/wfs/
-
-fstab
------
-
-Alternatively, you can mount WikipediaFS through fstab.
-
-To do so, add this line to /etc/fstab:
-
-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.
-Replace /home/your_username/ by your home directory.
-
-The right permissions have to be set on the mounted directory (e.g. /mnt/wfs/).
-
-Then, you can use the following commands to mount and unmount WikipediaFS:
-
-$ mount /mnt/wfs/
-# umount /mnt/wfs/
-
-Sample usage
-------------
-
-This section demonstrates possible usage of WikipediaFS via the command
-line, though it is also possible to use WikipediaFS with a graphical file
-explorer.
-
-$ mount /mnt/wfs/
-
-WikipediaFS is now mounted in /mnt/wfs/
-
-$ cd /mnt/wfs/
-
-We are now at the WikipediaFS root.
-
-$ ls
-mblondel.org/ wikipedia-en/
-
-Those are directories which have been defined in my config file.
-
-$ ls wikipedia-en/
-
-Nothing is listed because we have not used any file yet. This is why most of
-the time you will need a terminal to run the "your_favourite_editor file_name"
-command.
-
-$ cat wikipedia-en/Japan | less
-
-The Japan article is fetched on en.wikipedia.org and displayed.
-
-$ ls wikipedia-en/
-Japan
-
-Japan is now listed because it has been accessed once.
-
-$ vi mblondel.org/Test
-
-An article can be edited with a text editor. Looking at the article with a web
-browser, the changes have been performed correctly.
-
-To give a summary to your changes, use [[Summary: a sentence summary]] in the
-body of the article. It will be removed before the article is saved.
-
-$ cp wikipedia-en/Japan ~/Desktop/
-
-This backups the online article on the local disk.
-
-$ cp wikipedia-en/Japan mblondel.org/
-
-This copies the wikipedia-en article on my personal mediawiki site.
-
-$ rm mblondel.org/Test
-
-This only removes the article from the directory, not from the site, hopefully.
+The manual page describes in details the configuration file, mount/umount and
+sample usage. It is also available as HTML in doc/.
Troubleshooting
---------------
** I get the "fuse: reading device: Bad file descriptor" error
-This error can be caused by a number of reasons:
-
-1/ the fuse module is not loaded:
+The fuse module is probably not loaded:
To test if it is loaded:
# lsmod | grep fuse
@@ -168,23 +39,11 @@ To load it:
Add fuse to /etc/modules if you want this module to be loaded at boot.
-2/ WikipediaFS may still be mounted. Unmount it first.
-# umount /mount/path/
-
-
** I get the "mount: unknown filesystem type 'wikipediafs'" error
Try this:
# ln -s /usr/bin/mount.wikipediafs /sbin/mount.wikipediafs
-** I need to connect through an HTTP proxy.
-
-Please use the $http_proxy environment variable.
-
-** I want to deal with articles with a non-ASCII file name.
-
-Set your terminal encoding to UTF-8.
-
** Other
The FAQ available on the official Fuse website is worth reading.
diff --git a/doc/mount.wikipediafs.sgml b/doc/mount.wikipediafs.sgml
new file mode 100644
index 0000000..b9519f4
--- /dev/null
+++ b/doc/mount.wikipediafs.sgml
@@ -0,0 +1,268 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+ page: `docbook-to-man manpage.sgml > manpage.1'. You may view
+ the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+ less'. A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+ docbook-to-man $< > $@
+ -->
+
+ <!-- Fill in the various UPPER CASE things here. -->
+ <!ENTITY manfirstname "<firstname>Mathieu</firstname>">
+ <!ENTITY mansurname "<surname>Blondel</surname>">
+ <!-- Please adjust the date whenever revising the manpage. -->
+ <!ENTITY mandate "<date>Thu, 20 Jun 2006 13:16:17 -0700</date>">
+ <!-- SECTION should be 1-8, maybe with subsection. Other parameters are
+ allowed: see man(7), man(1). -->
+ <!ENTITY mansection "<manvolnum>8</manvolnum>">
+ <!ENTITY manemail "<email>mblondel@users.sourceforge.net</email>">
+ <!ENTITY manusername "sdffsd">
+ <!ENTITY manucpackage "<refentrytitle>MOUNT.WIKIPEDIAFS</refentrytitle>">
+ <!ENTITY manpackage "mount.wikipediafs">
+]>
+
+<refentry>
+ <refentryinfo>
+ <address>
+ &manemail;
+ </address>
+ <author>
+ &manfirstname;
+ &mansurname;
+ </author>
+ <copyright>
+ <year>2004</year>
+ <holder>&manusername;</holder>
+ </copyright>
+ &mandate;
+ </refentryinfo>
+ <refmeta>
+ &manucpackage;
+
+ &mansection;
+ </refmeta>
+ <refnamediv>
+ <refname>&manpackage;</refname>
+
+ <refpurpose>A program to mount WikipediaFS, a filesystem that allows to view
+and edit Wikipedia articles as if they were real files</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&manpackage; </command>
+ <replaceable>mountpoint</replaceable>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>DESCRIPTION</title>
+ <para>This manual page documents the <command>&manpackage;</command>
+ command and general usage of WikipediaFS.</para>
+
+ <para>WikipediaFS allows to view and edit Wikipedia articles as if
+they were real files. <command>&manpackage;</command> mounts a WikipediaFS
+filesystem.
+ </para>
+
+ <para>To connect through an HTTP proxy, you can use the $http_proxy
+environment variable.</para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>CONFIGURATION</title>
+
+ <para>The first time WikipediaFS is run, an XML configuration file is
+ generated in ~/.wikipediafs/config.xml. You can then edit it to add
+ more Wikipedia or Mediawiki-based sites. Each site has a site entry
+ defined as follows: </para>
+
+ <para>
+ &lt;site&gt;
+ &lt;dirname&gt;wikipedia-fr&lt;/dirname&gt;
+ &lt;host&gt;fr.wikipedia.org&lt;/host&gt;
+ &lt;basename&gt;/w/index.php&lt;/basename&gt;
+ &lt;username&gt;Username&lt;/username&gt;
+ &lt;password&gt;Password&lt;/password&gt;
+ &lt;/site&gt;
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term>dirname</term>
+ <listitem>
+ <para>
+ Is the name of the directory through which you will access
+ to the site.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>host</term>
+ <listitem>
+ <para>
+ Is the host of the site.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>basename</term>
+ <listitem>
+ <para>
+ Is the base of urls used by the site. Most of the time, it
+ will be /dir/where/mediawiki/is/installed/index.php. For
+ Wikipedia, it will be /w/index.php.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>username and password</term>
+ <listitem>
+ <para>
+ Are optional and enable you to edit articles with your
+ login.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</refsect1>
+
+ <refsect1>
+ <title>MOUNT</title>
+ <para><command>mount.wikipediafs</command> mountpoint/</para>
+
+ <para>To run mount.wikipediafs without root privileges, you may have to set
+ the right permissions for /usr/bin/fusermount and /dev/fuse if your
+ distribution has not already done it for you. For example,</para>
+
+ <para># adduser your_username fuse</para>
+
+ <para># chmod 4750 /usr/bin/fusermount</para>
+
+ <para># chgrp fuse /dev/fuse /usr/bin/fusermount</para>
+
+
+ <para>(You may have to log out and log in again so that changes are taken
+into account.)</para>
+</refsect1>
+
+ <refsect1>
+ <title>UNMOUNT</title>
+
+ <para><command>fusermount</command> -u mountpoint/</para>
+
+</refsect1>
+
+ <refsect1>
+ <title>FSTAB</title>
+
+ <para>Alternatively, you can mount WikipediaFS through fstab.</para>
+
+ <para>To do so, add this line to /etc/fstab:</para>
+
+ <para>none /mnt/wfs/ wikipediafs
+noauto,nouser,home=/home/your_username/</para>
+
+ <para>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. Replace /home/your_username/ by your home directory.</para>
+
+<para>Then, traditional mount and unmount can be used with WikipediaFS.</para>
+</refsect1>
+
+<refsect1>
+ <title>SAMPLE USAGE</title>
+ <para>This section demonstrates possible usage of WikipediaFS via the command
+line, though it is also possible to use WikipediaFS with a graphical file
+explorer.</para>
+
+<para>$ mount /mnt/wfs/
+
+WikipediaFS is now mounted in /mnt/wfs/</para>
+
+<para>$ cd /mnt/wfs/
+
+We are now at the WikipediaFS root.</para>
+
+<para>$ ls
+mblondel.org/ wikipedia-en/
+
+Those are directories which have been defined in my config file.</para>
+
+<para>$ ls wikipedia-en/
+
+Nothing is listed because we have not used any file yet. This is why most of
+the time you will need a terminal to run the "your_favourite_editor file_name"
+command.</para>
+
+<para>$ cat wikipedia-en/Japan | less
+
+The Japan article is fetched on en.wikipedia.org and displayed.</para>
+
+<para>$ ls wikipedia-en/
+Japan
+
+Japan is now listed because it has been accessed once.</para>
+
+<para>$ vi mblondel.org/Test
+
+An article can be edited with a text editor. Looking at the article with a web
+browser, the changes have been performed correctly.
+
+To give a summary to your changes, use [[Summary: a sentence summary]] in the
+body of the article. It will be removed before the article is saved.</para>
+
+<para>$ cp wikipedia-en/Japan ~/Desktop/
+
+This backups the online article on the local disk.</para>
+
+<para>$ cp wikipedia-en/Japan mblondel.org/
+
+This copies the wikipedia-en article on my personal mediawiki site.</para>
+
+<para>$ rm mblondel.org/Test
+
+This only removes the article from the directory, not from the site,
+hopefully.</para>
+</para>
+</refsect1>
+
+<refsect1>
+ <title>AUTHOR</title>
+
+ <para>This manual page was written by <author>&manfirstname;
+ &mansurname;</author>. </para>
+
+ <para>This manual page is (c) 2006 of <author>&manfirstname;
+&mansurname;</author> and licensed under the terms of the GPLv2 or higher
+</para>
+
+ </refsect1>
+ <refsect1>
+ <title>SEE ALSO</title>
+
+ <para><citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum>
+ </citerefentry>,
+ <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum>
+ </citerefentry>
+ </para>
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
diff --git a/make_release.sh b/make_release.sh
index 7b1f04d..21ef044 100644
--- a/make_release.sh
+++ b/make_release.sh
@@ -13,16 +13,24 @@ TAR_PKG="$PKG.tar.gz"
ZIP_PKG="$PKG.zip"
TMP_DIR="/tmp/$PKG"
-echo "Uploading site..."
-scp site/*.htm \
-mblondel@shell.sourceforge.net:/home/groups/w/wi/wikipediafs/htdocs/
-
echo "Creating temporary directory..."
$RM $TMP_DIR
$MKDIR $TMP_DIR
cp -r * $TMP_DIR
cd $TMP_DIR
+echo "Creating man page"
+docbook-to-man doc/mount.wikipediafs.sgml > doc/mount.wikipediafs.1
+man2html -r doc/mount.wikipediafs.1 | sed -e "s/Content-type: text\/html//" \
+ > doc/mount.wikipediafs.htm
+gzip doc/mount.wikipediafs.1
+
+echo "Uploading site..."
+cp README README.txt
+scp site/*.htm doc/mount.wikipediafs.htm README.txt \
+mblondel@shell.sourceforge.net:/home/groups/w/wi/wikipediafs/htdocs/
+$RM README.txt
+
echo "Removing unnecessary files..."
$RM `find . -name "*.pyc" -or -name ".*" -or -name "*~" -or -name "*.orig"`
$RM "make_release.sh"
diff --git a/setup.py b/setup.py
index 15007c8..bd826d0 100644
--- a/setup.py
+++ b/setup.py
@@ -12,4 +12,5 @@ setup(
packages = ['wikipediafs'],
package_dir = {'wikipediafs':'src/wikipediafs/'},
scripts = ['src/mount.wikipediafs'],
+ data_files = [('/usr/share/man/man1/', ['doc/mount.wikipediafs.1.gz'])],
) \ No newline at end of file
diff --git a/site/index.htm b/site/index.htm
index 9dc9124..1162171 100644
--- a/site/index.htm
+++ b/site/index.htm
@@ -44,7 +44,8 @@ License</a> and provided without any warranty of any kind.</p>
href="http://sourceforge.net/project/showfiles.php?group_id=133079">Download
area</a></p>
-<p>See the README file.</p>
+<p>See the <a href="README.txt">README</a> file and the <a
+href="mount.wikipediafs.htm">manual page</a>.</p>
<h2>Related links</h2>
diff --git a/site/index_fr.htm b/site/index_fr.htm
index 2d2c589..6f01cf1 100644
--- a/site/index_fr.htm
+++ b/site/index_fr.htm
@@ -45,7 +45,8 @@ General Public License</a> et fourni sans aucune garantie.</p>
href="http://sourceforge.net/project/showfiles.php?group_id=133079">Zone
de téléchargement</a></p>
-<p>Voir README.</p>
+<p>Voir le fichier <a href="README.txt">README</a> et la page de <a
+href="mount.wikipediafs.htm">manuel</a>.</p>
<h2>Liens relatifs</h2>