diff --git a/README.md b/README.md index 872ee4d..d84265e 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ apache alias. To configure this use `FILES_ROOT` in config.zsh. Bleeding edge is on GitHub. see https://github.com/dyne/webnomad -Pull requests may be welcome. +Pull requests and translations of this documentation are welcome. Come on IRC channel #dyne via https://irc.dyne.org to get in touch. diff --git a/index b/index index 448f800..45511f7 100755 --- a/index +++ b/index @@ -303,16 +303,19 @@ EOF index_long_preview() { dir="${1}" func "index_long_preview \"$dir\"" + func "index data: $archive/$dir" + func "index url: $url / $dir" + + { test -d "$archive/$dir" } || { error "cannot index: not a directory '$archive/$dir'"; return 1 } - { test -d "$dir" } || { error "cannot index: not a directory '$dir'"; return 1 } files=() - ttmp=`ls -l --time-style=long-iso "$dir" | awk ' + ttmp=`ls -l --time-style=long-iso "${archive}/${dir}" | awk ' /^total/ { next } /^$/ { next } { printf "files+=(\"%s;%s;%s\");", $8, $5, $6 } '` { test $? = 0 } || { - error "Error parsing directory: $dir" + error "Error parsing directory: ${archive}/${dir}" return 1 } eval "$ttmp" @@ -334,6 +337,24 @@ index_long_preview() { Preview EOF + + + # if not parent offer to go up + [[ "$dir" = "" ]] || { + func "parent: $parent" + cat < + + +parent directory + + +.. [ parent ] + +EOF + } + for f in ${files}; do name="${f[(ws:;:)1]}" size="${f[(ws:;:)2]}" diff --git a/test b/test index c0c54e3..322c4bf 100755 --- a/test +++ b/test @@ -5,9 +5,9 @@ STYLING=0 # make it work to browse results on file:// baseurl="file://`pwd`/test/" -includejs+=(jquery.min.js jquery.sidr.js) +# includejs+=(jquery.min.js jquery.sidr.js) -includecss+=(jquery.sidr.dark.css) +# includecss+=(jquery.sidr.dark.css) { test "$STYLING" = "1" } || { render_test_footer() { return 0 }; return 0 }