From a6772d334bdfa3f617450b41ea97edfbfcb4ad43 Mon Sep 17 00:00:00 2001
From: eyedeekay
#! /usr/bin/env sh
tagList() {
-echo " <div class=\"tags\">Tags:"
- for torrent in i2psnark/*.torrent; do
- filename=$(echo $torrent | sed 's|.torrent||g')
- title=$(echo $filename | sed 's|-| |g' | sed 's|i2psnark/||g')
- tags=$(echo $title | sed 's|\.| |g' | sed 's|@| |g')
- for tag in $tags; do
- for tag in $tags; do
- echo " <a class=\"$tag lvix1\" href=\"#$tag\">$tag</a>"
- done
- done
- done
- echo " </div>"
- }
-
-generatePage() {
-echo "<!doctype html>"
- echo "<html lang=en>"
- echo "<head>"
- echo "<meta charset=utf-8>"
- echo "<title>Torrent Index</title>"
- echo "<script src=\"script.js\"></script>"
- echo "<style>"
- echo "div {"
- echo " display: \"inline\";"
- echo "}"
- echo "</style>"
- echo "</head>"
- echo "<body>"
- cd "$SHARE"
- tagList | sort -u
+ for torrent in i2psnark/*.torrent; do
+ filename=$(echo $torrent | sed 's|.torrent||g')
+ title=$(echo $filename | sed 's|-| |g' | sed 's|i2psnark/||g')
+ tags=$(echo $title | sed 's|\.| |g' | sed 's|@| |g')
+ for tag in $tags; do
+ for tag in $tags; do
+ echo " <a class=\"$tag lvix1\" href=\"#$tag\">$tag</a>"
+ done
+ done
+ done
+ }
+
+generatePage() {
+echo "<!doctype html>"
+ echo "<html lang=en>"
+ echo "<head>"
+ echo "<meta charset=utf-8>"
+ echo "<title>Torrent Index</title>"
+ echo "<script src=\"script.js\"></script>"
+ echo "<style>"
+ echo "div {"
+ echo " display: \"inline\";"
+ echo "}"
+ echo "</style>"
+ echo "</head>"
+ echo "<body>"
+ cd "$SHARE"
+ echo " <div class=\"tags\">Tags:"
+ tagList | sort -u
+ echo " </div>"
for torrent in i2psnark/*.torrent; do
- transmission-edit -a "http://$zzzot_announce/a" "$torrent"
+ transmission-edit -a "http://$zzzot_announce/a" "$torrent" 2> "$BACK/err" 1> "$BACK/log"
filename=$(echo $torrent | sed 's|.torrent||g')
title=$(echo $filename | sed 's|-| |g' | sed 's|i2psnark/||g')
tags=$(echo $title | sed 's|\.| |g' | sed 's|@| |g')
- echo " <div id="$filename" class=\"$tags\">"
+ echo " <div id="$filename" class=\"lvix2 $tags\">"
echo " <a href=\"$torrent\">$title</a></br>"
echo " <div class=\"tags\">Tags:"
for tag in $tags; do
- echo "<a class=\"$tag lvix1\" href=\"#$tag\">$tag</a>"
+ echo " <a class=\"$tag lvix1\" href=\"#$tag\">$tag</a>"
done
echo " </div>"
echo " </div>"