Jedmodes Directory Structure

Theses

Modularity:

  • Each mode has its own directory

  • autogenerate pages from metadata

Simplicity:

  • Use flat files instead of a database engine

  • Use directories for “public” URL-s

    • URL will not change if e.g. index.html is replaced by index.php (or vice versa)

    • Structure of the site is transparent also with ftp or shell access

  • easy upload via shell access

User-friendliness:

  • several listing formats (categories, keywords, author, date)

  • search script (grep in metadata)

General Structure

Jedmodes has two parts:

  1. Catalogue,

  2. Mode sources in a Git repository.

Modes can also appear in the Catalogue while the sources are at a different location (“external modes”). This way, contributions from people with their own webspace can be listed too.

Catalogue

  • Each Jed mode has its own mode-root directory.

  • There are no “hard” restrictions regarding the directory structure under the mode-root directory, however, some assumptions are made and automatic generation of a mode’s “home page” requires some rules to be obeyed (see below).

  • Files in a subdirectory containing the substring “doc” will be listed as “further reading” by mode-index.php. Use this for additional documentation, screenshots and similar.

  • A (tar-gzipped) template for the default directory structure is available. See Jedmodes Howto for more instructions.

Strongly recommended files:
dcdata.txt

Metadata enables keyword search and metadata listings (see Jedmodes DC metadata terms).

Filename restrictions:

Jedmodes places no restriction to the modes name. Staying to alphanumeric characters is a good advice, as the name is used in URLs. If the mode shall be running on DOS, remember the 8.3 limit

Catalogue Directory

htdocs/                     % root of http://jedmodes.sourceforge.net
|
|__index.php                % Homepage of jedmodes
|__parse-dcdata.php         % helper script, read dcdata into an php array
|__grep-dcdata.php          % helper script, grep for lines in dcdata
|__mode-index.php           % display mode metadata nicely formatted
|
|__doc/                     % Documentation and templates
|  |__changelog.txt         % Changelog for jedmodes project
|  |__mode-template.tgz     % Template mode-directory
|  |...
|__categories/              % Browse modes by Categories
|  |...
|__modes/                   % Browse modes by Subjec, Author, Date, ...
|  |...
|
|__mode/                    % Modes folder
   |
   |__<default>/            % default structure for a mode at jedmodes
   |  |__dcdata.txt         % metadata file (Dublin Core terms)
   |  |__index.php          % Index file. Reads ../../mode-index.php
   |  |__doc/               % optional additional documentation files
   |     |__screenshot1.png % will get links in the index page
   |
   |__<custom>/              % mode with a custom index page
   |  |__index.[html|php]   % user-provided index file
   |  |                     % No restrictions regarding the directory
   |  |                     % structure under the mode-root directory
   |  |__dcdata.txt         % metadata file (Dublin Core terms)
   |
   |__<virtual>/            % virtual (meta/container/external) mode
   |  |__dcdata.txt         % metadata file (Dublin Core terms)
   |                        % with link to modes homepage or download-site
   |
   ...

Mode Sources

Git Directory

https://sourceforge.net/p/jedmodes/code/ci/master
|
|__mode/                    % Modes folder
   |
   |__<default>/            % Place your mode in a dir, even if
   |  |__default.sl         % it is only one file.
   |
   |__custom/               % Be sure to list all source files
   |  |__custom.sl          % in the dcdata.txt metadata file
   |  |__custom-misc.sl     % (under the key "hasPart").
   |  |__custom.hlp
   |
   ...