Test /
FileList
Discussion on a possible directive called (:filelist:)
Original post from Christian:
Today one of the users of wiki.lyx.org requested an index of all the uploaded files. Unfortunately I can't use the regular (:attachlist:) since the site's upload area allows nested directories. I manually generated a list to temporarily satisfy him, see here for an actual text listing of the files that are uploaded on the site: http://wiki.lyx.org/Playground/UploadedFiles Using a static text listing isn't a very good solution in the long run of course.... My first thought was that I could write a new version of the directive (:attachlist:) which can handle a nested directory structure. It shouldn't be too hard, especially as I've done it once for PmWiki 0.6. Then I started thinking... the new (:pagelist:) is *really* powerful, what if we could have something similar for attachments? Writing something like (:pagelist:) for attachments is beyond my scope right now, but I think it's a functionality that'd greatly improve PmWiki. So I'd like to get some thoughts and comments on what functionality a directive such as (:filelist:) should have. That's just a working name by the way, it might eventually simply replace (:attachlist:). Here is some of the basic functionality that I'd like to suggest. Please note that I'm not saying it necessarily should be implented using a single directive. * The core functionality is to generate a listing of files in a specified directory tree. * The nesting level should be controllable, making it possible to only list files in a single directory. * Some kind of filtering should be applied to the listing, just like (:pagelist:) only lists pages matching the search criteria. -> This makes it possible to "find" a file... * It should be possible to choose the "format" of the listing, i.e. control how much information is shown about each file. This is some of the basic functionality, but there is something else that is similar to John Rankin's teasers that I'd like to have for attachments (both for files and directories actually). Let me try and explain: What I'd like is the ability to associate a short description to attachments, which could then be shown in the file listing. Here's an imagined scenario: * A "reader" clicks on a wiki page that contains a file listing. Some of the files have a short description/comment shown next to it, explaining what this file is. Perhaps there's also a link to a wiki page with more information. * An "author" clicks on a wiki page that contains a file listing. He notices that one of the file doesn't have a description, so he click's the 'Comment'-button next to the file in order to add a description. >From an implementation point of view, these descriptions could perhaps be stored on a wiki page in a format like this: :dir/subdir/filename: This is the description of the file ... bla. :dir/subdir/filename2: This is the description of the file ... The directive (:filelist:) would then be told from which wiki page it should extract file descriptions, and show them next to corresponding file. Adding a description to a file would be a matter of appending an entry to the description page. It's late so I'm going to break off here, g'night! /Christian