9F.Sphynkx.Org.Ua: In GNU We Trust

This is AdminPanel script for file management of files that embedding to wiki. Script operates with files and directories in folder configured as file storage. It can show files as thumbnails and icons, generate embedding markdown code, upload and delete files, create subdirectories. Besides main package for proper work script needs some additional utilities - nfile and base64 encoder.

Script uses JS for upload/delete/copy functions and some functions may not work if your browser not properly supported JS.

Installation

Means that werc directory placed at /sys/www/ and wiki placed as sites/your_host/wiki, also file storage for wiki is sites/your_host/wiki/_files.

 1. Download and unpack main package:

cd /sys/www/werc/sites/wiki/_werc
hget https://9f.sphynkx.org.ua/werc/adm.tar.gz | tar zxf

Add contents of config.adm to your sites/your_host/wiki/_werc/config.

 2. For uploading files need to install one of base64 encoders. It is the b64 utility - see more about it.

cd /tmp
hget https://9f.sphynkx.org.ua/base64/b64.tar.gz | tar zxv
cd b64
mk
mk install

Alternatively you may install awk script fromb64.awk and put it to bin/contrib directory:

hget https://9f.sphynkx.org.ua/from64.awk>/sys/www/werc/bin/contrib/from64.awk
chmod +x /sys/www/werc/bin/contrib/from64.awk

 3. Install nfile utility. It is modified version of original Plan9 file(1) utility, expanded with much of filetypes and modified some MIMEs. See more about it. Script would work with original file(1) utility but worse.

cd /temp
hget https://9f.sphynkx.org.ua/nfile/nfile.tar.gz | tar zxv
cd nfile
mk
mk install

 4. Add link for AdminPanel in apps/dirdir/sidebar_controls.tpl. After </form> tag add next line:

<p><a href="/wiki/_werc/_adm/">adm</a>

Configuration

All necessary parameters stored in /wiki/_werc/config. It consists next variables:

Known bugs

After delete files in subdirs script doesn't remember subdir and returns to main.

Embedding text has duplicated slashes in url.