Content-space.de

The WikiBlog of Michael Hamann about changing technologies and more

User Tools

Site Tools


projekte:dokufs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
projekte:dokufs [2008/05/10 23:03] – angelegt michituxprojekte:dokufs [2012/01/28 15:57] (current) – Some typos fixed michitux
Line 1: Line 1:
 ====== DokuFS ====== ====== DokuFS ======
- 
-//Dieser Artikel ist in Englisch geschrieben, da dieses Projekt ein internationales Publikum und ausschließlich Benutzer mit fortgeschrittenen Linuxkenntnissen anspricht.// 
  
 DokuFS is a filesystem that allows, with the help of [[wp>Filesystem_in_Userspace|Fuse]], to mount a [[doku>wiki:DokuWiki|DokuWiki]] over [[wp>XML-RPC]] into you local filesystem on Linux. DokuFS is a filesystem that allows, with the help of [[wp>Filesystem_in_Userspace|Fuse]], to mount a [[doku>wiki:DokuWiki|DokuWiki]] over [[wp>XML-RPC]] into you local filesystem on Linux.
  
-You are then able to browse the filesystem and to create, edit or delete files, that means to create, edit or delete pages on the Wiki you have mounted. Deleting, moving and copying of whole namespaces should work, too.+You are then able to browse the filesystem and to create, edit or delete files, that means to create, edit or delete pages or media files on the Wiki you have mounted. Deleting, moving and copying of whole namespaces should work, too (however the history of pages is not moved).
  
-All pages have the extension .dw so you can easily handle syntax highlighting (syntax highlighting for vim is included in [[http://www.chimeric.de/projects/dokuwiki/dokuvimki|DokuVimKi]], though you don't need the rest of DokuVimKi when using DokuFS). The creation of other files but those with the extension .dw isn't allowed (temporary files of some editors are handled by DokuFS). In a later version when the XML-RPC-API of DokuWiki supports media management, the up- and download of media-files might be supported, too.+All pages have the extension .dw so you can easily handle syntax highlighting (syntax highlighting for vim is included in the unfortunately discontinued [[https://github.com/chimeric/dokuwikixmlrpc|DokuVimKi]] project, though you don't need the rest of DokuVimKi when using DokuFS).
  
-Every 5 minutes, the recent changes of the Wiki are pulled and the directory-structure is updated.+DokuFS supports two modes -- one for pages and one for media files. In the mode for pages the creation of other files but those with the extension .dw isn't allowed (temporary files of VIM and Emacs are handled in memory). In the mode for media files every file is simply uploaded to the DokuWiki, so basically all file types are allowed that are supported by your DokuWiki installation. 
 + 
 +Every 5 minutes, the recent changes of the Wiki are pulled and the directory structure is updated. Once a page is downloaded it will be in a cache (with a memory limit) so that only the first read/size-request will be slow.
  
 ===== Some notes on the current version ===== ===== Some notes on the current version =====
Line 15: Line 15:
 The current version has to be considered as alpha version as nobody besides me has ever used DokuFS. Known issues are: The current version has to be considered as alpha version as nobody besides me has ever used DokuFS. Known issues are:
  
-  * There is no cache for pages, every read of a page causes a request to the server. As some filebrowsers read the content of every file, directory listing might be very slow. 
   * There is no recognition if a file was saved correctly or not. When you are admin this might not be an issue, but when you are not sure if you have permission to write/create the page, you should better see if the page was really saved (just reading it's content again should be sufficient).   * There is no recognition if a file was saved correctly or not. When you are admin this might not be an issue, but when you are not sure if you have permission to write/create the page, you should better see if the page was really saved (just reading it's content again should be sufficient).
   * When the file/pagename wasn't accepted/changed by DokuWiki there might be undefined stages, including the appearance under the original and the corrected filename in the directory-structure.   * When the file/pagename wasn't accepted/changed by DokuWiki there might be undefined stages, including the appearance under the original and the corrected filename in the directory-structure.
Line 21: Line 20:
 ===== License ===== ===== License =====
  
-Copyright (C) 2008  Michael Hamann+Copyright (C) 2009  Michael Hamann
  
 This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
Line 40: Line 39:
 ===== Installation ===== ===== Installation =====
  
-First of all you need a working [[http://www.ruby-lang.org|Ruby]]-installation and of course DokuWiki with enabled XML-RPC-backend.+DokuFS runs on Linux, it might work on Mac OS X and from all I know it doesn't work on Windows.
  
-The most tricky part is the installation of [[http://rubyforge.org/projects/fusefs/|FuseFS]]. The only Linux distributions I know that have packages or to be more correct: build-files for FuseFS, are [[http://packages.gentoo.org/package/dev-ruby/fusefs|Gentoo]] and [[http://aur.archlinux.org/packages.php?ID=4051|Arch Linux (AUR)]]. In all other cases there are instructions in README.txt which is distributed with FuseFS.+First of all you need a working [[http://www.ruby-lang.org|Ruby]]-installation and of course DokuWiki with enabled XML-RPC-backend (note that you need to enable it and set a user that can access the wiki over XML-RPC, allowing access for all users is **not** recommended).
  
-Then you can download {{:projekte:dokufs:dokufs.rb|dokufs.rb}} and make it executable with <code bash>chmod +x dokufs.rb</code>. You might want to put DokuFS in one of your directories in $PATH, this might be ~/bin/.+You need [[http://rubyforge.org/projects/fusefs/|FuseFS]] in order to use DokuFS. In Debian and Ubuntu (and derivates of them) it is provided in a package named ''libfusefs-ruby''. In Gentoo there is a package named [[http://packages.gentoo.org/package/dev-ruby/fusefs|fusefs]] and in ArchLinux it is in the [[http://aur.archlinux.org/packages.php?ID=4051|AUR]]. In all other cases there are instructions in README.txt which is distributed with FuseFS. 
 + 
 +You can download the latest version of DokuFS from its [[https://github.com/michitux/dokufs|git repository]]. You just need the file ''dokufs.rb'' and then you should make it executable with <code bash>chmod +x dokufs.rb</code>. You might want to put DokuFS in one of your directories in $PATH, this might be ~/bin/.
  
 ===== Usage ===== ===== Usage =====
  
-In short: +<code> 
- +Usage: dokufs.rb [options] directory 
-Usage: dokufs.rb [-user your_username -password your_password] [-server your_server.com] [-path /your/path/to/lib/exe/xmlrpc.php] [-no-sslpath/where/to/mount/ +    -u, --user USER                  The username 
- +    -p, --password PASSWORD          The password 
-The longer version:+    -s, --server SERVER              The server to use (default: localhost) 
 +        --path PATH                  The path to XMLRPC (default: /lib/exe/xmlrpc.php
 +        --[no-]ssl                   Use (no) ssl (default: use ssl) 
 +    -m, --media                      Display media files instead of wiki pages 
 +        --update-interval INTERVAL   The update interval in seconds 
 +    -n, --no-cache                   Don't use the cache - this will cause a significantly higher load on the server. (defaultuse cache) 
 +    -h, --help                       Show this message 
 +</code>
  
-  * -user user -password password - the authentication passed to DokuWiki. Default is no authentication at all. +Some notes on that: Server is the domain name of the server the DokuWiki you want to mount is on. Don't include a protocol (e.g. http) here. You only need to specify the path when you DokuWiki-installation is not in the root directory of your domain. Using SSL is highly recommended, only use disable ssl when you don't have any other option.
-  * -server www.example.com - the domain name of the server the DokuWiki you want to mount is on. Don't include a protocol (e.g. http) here. Default is localhost. +
-  * -path /your/path/to/lib/exe/xmlrpc.php - default is /lib/exe/xmlrpc.php, so you only need this option when you want to use a DokuWiki-installation which is not in the root-directory of the domain. +
-  * -no-ssl - don't use SSL. By default DokuFS is using SSL to connect to the server, this is highly recommended so use this option just if there is no other possibility.+
  
 Creating new directories allows you to create new pages in new namespaces, but this creation itself has no effect on the Wiki. Creating new directories allows you to create new pages in new namespaces, but this creation itself has no effect on the Wiki.
Line 63: Line 68:
 When the first line of a file begins with %, everything after this % (and an optional whitespace) up to the end of the line is considered as commit message. When saving an empty file or a file that contains only a line beginning with %, the page is deleted. So you can delete a page playground:test with the message "foo bar" by calling <code bash>echo "% foo bar" > playground/test.dw</code> When the first line of a file begins with %, everything after this % (and an optional whitespace) up to the end of the line is considered as commit message. When saving an empty file or a file that contains only a line beginning with %, the page is deleted. So you can delete a page playground:test with the message "foo bar" by calling <code bash>echo "% foo bar" > playground/test.dw</code>
  
-Unmounting the filesystem is bit tricky. You have to call <code bash>fusermount -u path/to/dokuwiki/</code> and it least on my system DokuFS doesn'exit itself, you have to kill it by pressing [ctrl]+[c].+Unmounting the filesystem is bit tricky. You have to call <code bash>fusermount -u path/to/dokuwiki/</code> and at least on my system DokuFS doesn'terminate itself, you have to kill it, e.g. by pressing [ctrl]+[c].
  
 If there are any further questions or requests, you may contact me using comments here or you can send me an email at michael <at> content-space.de. Jabber is available, too, the address is the same as my email-address. If there are any further questions or requests, you may contact me using comments here or you can send me an email at michael <at> content-space.de. Jabber is available, too, the address is the same as my email-address.
  
-{{tag>dokuwiki fuse filesystem ruby}} + 
-~~LINKBACK~~ +
-~~DISCUSSION~~+
  
projekte/dokufs.1210453421.txt.gz · Last modified: 2008/05/10 23:03 by michitux