MoinUploadsCenter

screenshot

Purpose

In MoinMoin, attachments are bound to a page and are uploaded - one by one - by means of HTML and HTTP. However, often it is easier to upload files by means of FTP or the like (especially if there are many of them), and only use a web front-end for accessing them one by one.

This is where MoinUploadsCenter comes in. It scans the wiki/htdocs/_uploads directory and all it's sub-directories. Wherever it finds a file named "!readme.txt" (note: case matters), it collects the files inside that directory and shows them in a HTML table ready for download. In addition, a file may be associtated with a wiki page that might provide a description for it.

Installation

Unpack the contents of the wiki sub-folder from the attached archive into your MoinMoin wiki folder. This should create and populate the wiki/htdocs/_uploads and wiki/htdocs/_resources directories (the latter contains images for the MoinUploadsCenter GUI) as well as add some files and folders to wiki/data/plugin/actions.

Should this not be the case on your machine, you'll have to adjust the code that handles that (near the top of MoinUploadsCenter/main.py).

You'd probably want to delete the sample content from _uploads at some point in time.

Usage

After installation you should see an action named Upload Center in your action list. Click on it to view your files.

Files are listed in blocks grouped by folder. Each block displays:

Each file name is accompanied with two icons:

To add a file, simply put it into a sub-directory of wiki/htdocs/_uploads. Be sure to create a !readme.txt there, otherwise the directory will not be scanned.

To remove a file, delete it from disk, or move it to a directory without a !readme.txt. Note however that the associated wiki page will not be automatically deleted. You'll want to do a cleanup of OrphanedPages in that case.

<!> Copyright © 2007 Zoran Isailovski

<!> Licensed under the Apache License, Version 2.0

{i} Includes some Silk Icons by famfamfam, which are released under Creative Commons Attribution 3.0 License.

Dependencies

{i} The code uses the airspeed templating engine (already in the archive).

History

1.0

(In)Formaly promoted last stable RC to final.

1.0rc4
  • Added wiki makup support for "!readme.txt" files that start with "#!wiki"
1.0rc3
  • Added a list of packages at the top of the UploadsCenter page - kind of table of contents

    • (When there are many packages, it gets too cumbersome to scroll up and down.)
  • Cosmetics in the template
1.0rc2
  • fixed a bug with non-ascii characters in file names
1.0rc1
  • changed license to Apache License 2.0
    • (due to incompatibility of the CC license with moin's GPL - thx ThomasWaldmann for his hint)

  • enhancement: automatic determination of the wiki directory from the module's directory
    • => WIKI_DIR variable not required any more.

  • several bug-fixes related to character encoding (now all content is converted to unicode first)
1.0b
  • initial public release under Creative Commons Attribution 3.0 License

ToDo

Cheers

-- ZoranIsailovski

Discussion

MoinMoin: MoinUploadsCenter (last edited 2007-12-01 11:49:24 by ZoranIsailovski)