feat: sync with updated scripts (rebase 2)
This commit is contained in:
parent
e84c1e71bb
commit
df3502e7e5
|
@ -1,171 +1,226 @@
|
||||||
docroot: /mirror/root
|
docroot: /mirror/root
|
||||||
duflags: --human-readable --max-depth=1
|
duflags: --max-depth=0 --dereference-args --exclude=/mirror/root/pub
|
||||||
output: /mirror/root/index.html
|
output: /mirror/root/index.html
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- include
|
||||||
|
- lost+found
|
||||||
|
- pub
|
||||||
|
- uw-courseware
|
||||||
|
- wics
|
||||||
|
- mirror-rootfs
|
||||||
|
- mirror-highpriority
|
||||||
|
- ups
|
||||||
|
|
||||||
directories:
|
directories:
|
||||||
|
alpine:
|
||||||
|
site: alpinelinux.org
|
||||||
|
url: https://alpinelinux.org/
|
||||||
|
|
||||||
|
almalinux:
|
||||||
|
site: almalinux.org
|
||||||
|
url: https://almalinux.org
|
||||||
|
|
||||||
apache:
|
apache:
|
||||||
site: apache.org
|
site: apache.org
|
||||||
url: http://www.apache.org/
|
url: https://www.apache.org/
|
||||||
|
|
||||||
archlinux:
|
archlinux:
|
||||||
site: archlinux.org
|
site: archlinux.org
|
||||||
url: http://www.archlinux.org/
|
url: https://www.archlinux.org/
|
||||||
|
|
||||||
centos:
|
centos:
|
||||||
site: centos.org
|
site: centos.org
|
||||||
url: http://www.centos.org/
|
url: https://www.centos.org/
|
||||||
|
|
||||||
|
ceph:
|
||||||
|
site: ceph.io
|
||||||
|
url: https://ceph.io
|
||||||
|
|
||||||
CPAN:
|
CPAN:
|
||||||
site: cpan.org
|
site: cpan.org
|
||||||
url: http://www.cpan.org/
|
url: https://www.cpan.org/
|
||||||
|
|
||||||
CRAN:
|
CRAN:
|
||||||
site: r-project.org
|
site: r-project.org
|
||||||
url: http://cran.r-project.org/
|
url: https://cran.r-project.org/
|
||||||
|
|
||||||
csclub:
|
csclub:
|
||||||
site: csclub.uwaterloo.ca
|
site: csclub.uwaterloo.ca
|
||||||
url: http://csclub.uwaterloo.ca/media/
|
url: https://csclub.uwaterloo.ca/media/
|
||||||
|
|
||||||
CTAN:
|
CTAN:
|
||||||
site: ctan.org
|
site: ctan.org
|
||||||
url: http://www.ctan.org/
|
url: https://www.ctan.org/
|
||||||
|
|
||||||
cygwin:
|
cygwin:
|
||||||
site: cygwin.com
|
site: cygwin.com
|
||||||
url: http://www.cygwin.com/
|
url: https://www.cygwin.com/
|
||||||
|
|
||||||
|
damnsmalllinux:
|
||||||
|
site: damnsmalllinux.org
|
||||||
|
url: https://www.damnsmalllinux.org/
|
||||||
|
|
||||||
debian:
|
debian:
|
||||||
site: debian.org
|
site: debian.org
|
||||||
url: http://www.debian.org/
|
url: https://www.debian.org/
|
||||||
|
|
||||||
debian-backports:
|
debian-backports:
|
||||||
site: backports.debian.org
|
site: backports.debian.org
|
||||||
url: http://backports.debian.org/
|
url: https://backports.debian.org/
|
||||||
|
|
||||||
debian-cd:
|
debian-cd:
|
||||||
site: debian.org
|
site: debian.org
|
||||||
url: http://www.debian.org/CD/
|
url: https://www.debian.org/CD/
|
||||||
|
|
||||||
debian-multimedia:
|
debian-multimedia:
|
||||||
site: debian-multimedia.org
|
site: debian-multimedia.org
|
||||||
url: http://www.debian-multimedia.org/
|
url: https://www.debian-multimedia.org/
|
||||||
|
|
||||||
debian-ports:
|
debian-ports:
|
||||||
site: debian-ports.org
|
site: debian-ports.org
|
||||||
url: http://www.debian-ports.org/
|
url: https://www.debian-ports.org/
|
||||||
|
|
||||||
debian-security:
|
debian-security:
|
||||||
site: debian.org
|
site: debian.org
|
||||||
url: http://www.debian.org/security/
|
url: https://www.debian.org/security/
|
||||||
|
|
||||||
debian-volatile:
|
debian-volatile:
|
||||||
site: debian.org
|
site: debian.org
|
||||||
url: http://www.debian.org/volatile/
|
url: https://www.debian.org/volatile/
|
||||||
|
|
||||||
eclipse:
|
eclipse:
|
||||||
site: eclipse.org
|
site: eclipse.org
|
||||||
url: http://www.eclipse.org/
|
url: https://www.eclipse.org/
|
||||||
|
|
||||||
emdebian:
|
emacsconf:
|
||||||
site: emdebian.org
|
site: emacsconf.org
|
||||||
url: http://www.emdebian.org/
|
url: https://emacsconf.org
|
||||||
|
|
||||||
|
# this is no longer a project
|
||||||
|
# emdebian:
|
||||||
|
# site: emdebian.org
|
||||||
|
# url: https://www.emdebian.org/
|
||||||
|
|
||||||
fedora:
|
fedora:
|
||||||
site: fedoraproject.org
|
site: fedoraproject.org
|
||||||
url: http://www.fedoraproject.org/
|
url: https://www.fedoraproject.org/
|
||||||
|
|
||||||
FreeBSD:
|
FreeBSD:
|
||||||
site: freebsd.org
|
site: freebsd.org
|
||||||
url: http://www.freebsd.org/
|
url: https://www.freebsd.org/
|
||||||
|
|
||||||
gentoo-distfiles:
|
gentoo-distfiles:
|
||||||
site: gentoo.org
|
site: gentoo.org
|
||||||
url: http://www.gentoo.org/
|
url: https://www.gentoo.org/
|
||||||
|
|
||||||
gentoo-portage:
|
gentoo-portage:
|
||||||
site: gentoo.org
|
site: gentoo.org
|
||||||
url: http://www.gentoo.org/
|
url: https://www.gentoo.org/
|
||||||
|
|
||||||
gnome:
|
gnome:
|
||||||
site: gnome.org
|
site: gnome.org
|
||||||
url: http://www.gnome.org/
|
url: https://www.gnome.org/
|
||||||
|
|
||||||
gnu:
|
gnu:
|
||||||
site: gnu.org
|
site: gnu.org
|
||||||
url: http://www.gnu.org/
|
url: https://www.gnu.org/
|
||||||
|
|
||||||
gutenberg:
|
gutenberg:
|
||||||
site: gutenberg.org
|
site: gutenberg.org
|
||||||
url: http://www.gutenberg.org
|
url: https://www.gutenberg.org/
|
||||||
|
|
||||||
|
kali:
|
||||||
|
site: kali.org
|
||||||
|
url: https://www.kali.org/
|
||||||
|
|
||||||
|
kali-images:
|
||||||
|
site: kali.org
|
||||||
|
url: https://www.kali.org/
|
||||||
|
|
||||||
kde:
|
kde:
|
||||||
site: kde.org
|
site: kde.org
|
||||||
url: http://www.kde.org/
|
url: https://www.kde.org/
|
||||||
|
|
||||||
|
kde-applicationdata:
|
||||||
|
site: kde.org
|
||||||
|
url: https://www.kde.org/
|
||||||
|
|
||||||
kernel.org:
|
kernel.org:
|
||||||
site: kernel.org
|
site: kernel.org
|
||||||
url: http://www.kernel.org/
|
url: https://www.kernel.org/
|
||||||
|
|
||||||
linuxmint:
|
linuxmint:
|
||||||
site: linuxmint.com
|
site: linuxmint.com
|
||||||
url: http://www.linuxmint.com/
|
url: https://www.linuxmint.com/
|
||||||
|
|
||||||
linuxmint-packages:
|
linuxmint-packages:
|
||||||
site: linuxmint.com
|
site: linuxmint.com
|
||||||
url: http://www.linuxmint.com/
|
url: https://www.linuxmint.com/
|
||||||
|
|
||||||
MacPorts:
|
MacPorts:
|
||||||
site: macports.org
|
site: macports.org
|
||||||
url: http://www.macports.org/
|
url: https://www.macports.org/
|
||||||
|
|
||||||
mozdev:
|
mozdev:
|
||||||
site: mozdev.org
|
site: mozdev.org
|
||||||
url: http://www.mozdev.org/
|
url: https://www.mozdev.org/
|
||||||
|
|
||||||
mozilla.org:
|
mozilla.org:
|
||||||
site: mozilla.org
|
site: mozilla.org
|
||||||
url: http://www.mozilla.org/
|
url: https://www.mozilla.org/
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
site: mysql.com
|
site: mysql.com
|
||||||
url: http://www.mysql.com/
|
url: https://www.mysql.com/
|
||||||
|
|
||||||
nongnu:
|
nongnu:
|
||||||
site: nongnu.org
|
site: nongnu.org
|
||||||
url: http://savannah.nongnu.org/
|
url: https://savannah.nongnu.org/
|
||||||
|
|
||||||
openoffice:
|
openoffice:
|
||||||
site: openoffice.org
|
site: openoffice.org
|
||||||
url: http://www.openoffice.org/
|
url: https://www.openoffice.org/
|
||||||
|
|
||||||
opensuse:
|
opensuse:
|
||||||
site: opensuse.org
|
site: opensuse.org
|
||||||
url: http://www.opensuse.org/
|
url: https://www.opensuse.org/
|
||||||
|
|
||||||
OpenBSD:
|
OpenBSD:
|
||||||
site: openbsd.org
|
site: openbsd.org
|
||||||
url: http://www.openbsd.org/
|
url: https://www.openbsd.org/
|
||||||
|
|
||||||
puppylinux:
|
puppylinux:
|
||||||
site: puppylinux.org
|
site: puppylinux.org
|
||||||
url: http://puppylinux.org/
|
url: https://puppylinux.org/
|
||||||
|
|
||||||
qtproject:
|
qtproject:
|
||||||
site: qt-project.org
|
site: qt-project.org
|
||||||
url: http://qt-project.org/
|
url: https://qt-project.org/
|
||||||
|
|
||||||
racket:
|
racket:
|
||||||
site: racket-lang.org
|
site: racket-lang.org
|
||||||
url: http://racket-lang.org/
|
url: https://racket-lang.org/
|
||||||
|
|
||||||
|
sage:
|
||||||
|
site: sagemath.org
|
||||||
|
url: https://www.sagemath.org/
|
||||||
|
|
||||||
|
saltstack:
|
||||||
|
site: saltstack.com
|
||||||
|
url: https://saltstack.com/
|
||||||
|
|
||||||
slackware:
|
slackware:
|
||||||
site: slackware.com
|
site: slackware.com
|
||||||
url: http://www.slackware.com/
|
url: https://www.slackware.com/
|
||||||
|
|
||||||
|
tdf:
|
||||||
|
site: documentfoundation.org
|
||||||
|
url: https://www.documentfoundation.org/
|
||||||
|
|
||||||
ubuntu:
|
ubuntu:
|
||||||
site: ubuntu.com
|
site: ubuntu.com
|
||||||
url: http://www.ubuntu.com/
|
url: https://www.ubuntu.com/
|
||||||
|
|
||||||
ubuntu-ports:
|
ubuntu-ports:
|
||||||
site: ports.ubuntu.com
|
site: ports.ubuntu.com
|
||||||
|
@ -173,33 +228,72 @@ directories:
|
||||||
|
|
||||||
ubuntu-ports-releases:
|
ubuntu-ports-releases:
|
||||||
site: ports.ubuntu.com
|
site: ports.ubuntu.com
|
||||||
url: http://cdimage.ubuntu.com/ports/releases/
|
url: https://cdimage.ubuntu.com/releases/
|
||||||
|
|
||||||
ubuntu-releases:
|
ubuntu-releases:
|
||||||
site: releases.ubuntu.com
|
site: releases.ubuntu.com
|
||||||
url: http://releases.ubuntu.com/
|
url: https://releases.ubuntu.com/
|
||||||
|
|
||||||
vlc:
|
vlc:
|
||||||
site: videolan.org
|
site: videolan.org
|
||||||
url: http://videolan.org/
|
url: https://videolan.org/
|
||||||
|
|
||||||
xiph:
|
xiph:
|
||||||
site: xiph.org
|
site: xiph.org
|
||||||
url: http://xiph.org/
|
url: https://xiph.org/
|
||||||
|
|
||||||
x.org:
|
x.org:
|
||||||
site: x.org
|
site: x.org
|
||||||
url: http://www.x.org/
|
url: https://www.x.org/
|
||||||
|
|
||||||
xubuntu-releases:
|
xubuntu-releases:
|
||||||
site: xubuntu.org
|
site: xubuntu.org
|
||||||
url: http://www.xubuntu.org/
|
url: https://www.xubuntu.org/
|
||||||
|
|
||||||
NetBSD:
|
NetBSD:
|
||||||
site: netbsd.org
|
site: netbsd.org
|
||||||
url: http://www.netbsd.org/
|
url: https://www.netbsd.org/
|
||||||
|
|
||||||
|
pkgsrc:
|
||||||
|
site: pkgsrc.org
|
||||||
|
url: https://pkgsrc.org/
|
||||||
|
|
||||||
raspberrypi:
|
raspberrypi:
|
||||||
site: raspberrypi.org
|
site: raspberrypi.org
|
||||||
url: http://www.raspberrypi.org/
|
url: https://www.raspberrypi.org/
|
||||||
|
|
||||||
|
raspbian:
|
||||||
|
site: raspbian.org
|
||||||
|
url: https://www.raspbian.org/
|
||||||
|
|
||||||
|
ipfire:
|
||||||
|
site: ipfire.org
|
||||||
|
url: https://www.ipfire.org/
|
||||||
|
|
||||||
|
manjaro:
|
||||||
|
site: manjaro.org
|
||||||
|
url: https://manjaro.org/
|
||||||
|
|
||||||
|
scientific:
|
||||||
|
site: scientificlinux.org
|
||||||
|
url: https://www.scientificlinux.org/
|
||||||
|
|
||||||
|
mxlinux:
|
||||||
|
site: mxlinux.org
|
||||||
|
url: https://mxlinux.org
|
||||||
|
|
||||||
|
mxlinux-iso:
|
||||||
|
site: mxlinux.org
|
||||||
|
url: https://mxlinux.org
|
||||||
|
|
||||||
|
parabola:
|
||||||
|
site: parabola.nu
|
||||||
|
url: https://www.parabola.nu/
|
||||||
|
|
||||||
|
hyperbola:
|
||||||
|
site: hyperbola.info
|
||||||
|
url: https://www.hyperbola.info/
|
||||||
|
|
||||||
|
trisquel:
|
||||||
|
site: trisquel.info
|
||||||
|
url: https://trisquel.info/
|
||||||
|
|
|
@ -41,7 +41,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<p>This service is run by the <a href="http://csclub.uwaterloo.ca/">Computer Science Club of the University of Waterloo</a>.<br />It is made possible by funding from the <a href="http://www.student.math.uwaterloo.ca/~mefcom/">Mathematics Endowment Fund</a><br />and support from the <a href="http://www.cs.uwaterloo.ca">David R. Cheriton School of Computer Science</a>.</p>
|
<p>This service is run by the <a href="https://csclub.uwaterloo.ca/">Computer Science Club of the University of Waterloo</a>.<br />It is made possible by funding from the <a href="https://uwaterloo.ca/math-endowment-fund/">Mathematics Endowment Fund</a><br />and support from the <a href="https://cs.uwaterloo.ca">David R. Cheriton School of Computer Science</a>.</p>
|
||||||
|
<p>Report an issue or request we mirror a project by contacting <a href="mailto:systems-committee@csclub.uwaterloo.ca">systems-committee@csclub.uwaterloo.ca</a>.</p>
|
||||||
|
<p>Generated (local time): ${generated.strftime("%Y-%m-%d %-I:%M%p")}</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python2
|
||||||
"""make-index.py
|
"""make-index.py
|
||||||
|
|
||||||
Generates an nice index of the directories from a
|
Generates an nice index of the directories from a
|
||||||
template.
|
template.
|
||||||
|
|
||||||
Original Author: Jeremy Roman <jbroman@csclub.uwaterloo.ca>
|
Original Author: Jeremy Roman <jbroman@csclub.uwaterloo.ca>
|
||||||
|
Modified by: Zachary Seguin <ztseguin@csclub.uwaterloo.ca>
|
||||||
|
|
||||||
So if you don't like how I did something,
|
So if you don't like how I did something,
|
||||||
I'm the person you get to complain to.
|
I'm the person you get to complain to.
|
||||||
|
@ -16,13 +17,23 @@ from subprocess import Popen, PIPE
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import yaml, mako.exceptions, webhelpers.html.tags
|
import yaml, mako.exceptions, webhelpers.html.tags
|
||||||
from mako.template import Template
|
from mako.template import Template
|
||||||
|
import humanize
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
def parse_size(s):
|
||||||
|
if s.endswith("T"):
|
||||||
|
return float(s[:-1])*1000*1000*1000*1000
|
||||||
|
elif s.endswith("G"):
|
||||||
|
return float(s[:-1])*1000*1000*1000
|
||||||
|
elif s.endswith("M"):
|
||||||
|
return float(s[:-1])*1000*1000
|
||||||
|
elif s.endswith("K"):
|
||||||
|
return float(s[:-1])*1000
|
||||||
|
|
||||||
|
return float(size)
|
||||||
|
|
||||||
def reformat_size(size):
|
def reformat_size(size):
|
||||||
"""Reformats '124M' to '124 MB', et cetera."""
|
return humanize.naturalsize(size)
|
||||||
if size[-1].isalpha():
|
|
||||||
return size[:-1] + " " + size[-1] + "B"
|
|
||||||
else:
|
|
||||||
return size
|
|
||||||
|
|
||||||
def atomic_write(filename, body):
|
def atomic_write(filename, body):
|
||||||
"""Atomically write to a file by writing a
|
"""Atomically write to a file by writing a
|
||||||
|
@ -75,7 +86,7 @@ def main():
|
||||||
|
|
||||||
# load config file
|
# load config file
|
||||||
try:
|
try:
|
||||||
config = yaml.load(file(options.config,'r'))
|
config = yaml.load(file(options.config,'r'), Loader=yaml.FullLoader)
|
||||||
except:
|
except:
|
||||||
config = None
|
config = None
|
||||||
|
|
||||||
|
@ -90,7 +101,7 @@ def main():
|
||||||
# fallback value for nonatomic is used so that character devices
|
# fallback value for nonatomic is used so that character devices
|
||||||
# (e.g. /dev/stdout, /dev/null) are written to in the regular way
|
# (e.g. /dev/stdout, /dev/null) are written to in the regular way
|
||||||
docroot = options.docroot or config.get('docroot')
|
docroot = options.docroot or config.get('docroot')
|
||||||
duflags = options.duflags or config.get('duflags') or "-h --max-depth=1"
|
duflags = options.duflags or config.get('duflags') or "-h --max-depth=1 --exclude='.~tmp~'"
|
||||||
output = options.output or config.get('output')
|
output = options.output or config.get('output')
|
||||||
template = options.template or config.get("template") or "index.mako"
|
template = options.template or config.get("template") or "index.mako"
|
||||||
nonatomic = options.nonatomic or config.get("nonatomic") or \
|
nonatomic = options.nonatomic or config.get("nonatomic") or \
|
||||||
|
@ -115,43 +126,97 @@ def main():
|
||||||
print >>sys.stderr, "template '%s' not found or is a directory." % template
|
print >>sys.stderr, "template '%s' not found or is a directory." % template
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
|
generated = datetime.datetime.now()
|
||||||
|
|
||||||
|
directories = []
|
||||||
|
total_size = 0.0
|
||||||
|
|
||||||
|
ls = os.listdir(docroot)
|
||||||
|
|
||||||
|
for item in ls:
|
||||||
|
if item == "pub":
|
||||||
|
continue
|
||||||
|
|
||||||
|
path = os.path.join(docroot, item)
|
||||||
|
|
||||||
|
# If symlink, then this is a project
|
||||||
|
if os.path.islink(path):
|
||||||
|
dataset = os.readlink(path)[1:]
|
||||||
|
|
||||||
|
# Get the disk space used by that dataset
|
||||||
|
du = Popen(
|
||||||
|
"/usr/bin/sudo /sbin/zfs get -H -o value used %s" % dataset,
|
||||||
|
shell=True, stdout=PIPE, stderr=PIPE).communicate()
|
||||||
|
|
||||||
|
size = "-"
|
||||||
|
if len(du[1].strip()) > 0:
|
||||||
|
sys.stderr.write(du[1])
|
||||||
|
print >>sys.stderr, "zfs get terminated unsuccessfully for %s" % item
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
size = parse_size(du[0].strip())
|
||||||
|
total_size += size
|
||||||
|
|
||||||
|
info = {'dir':item, 'size':reformat_size(size)}
|
||||||
|
|
||||||
|
# use info from config.yaml, if found
|
||||||
|
# otherwise, skip this directory
|
||||||
|
if item in config['exclude']:
|
||||||
|
continue
|
||||||
|
elif item in config['directories']:
|
||||||
|
info.update(config['directories'][item])
|
||||||
|
else:
|
||||||
|
info.update({ 'site': '', 'url': '' })
|
||||||
|
|
||||||
|
directories.append(info)
|
||||||
|
|
||||||
|
# Sort the directories
|
||||||
|
directories.sort(key=lambda d : d['dir'].lower())
|
||||||
|
|
||||||
# Call du to compute size
|
# Call du to compute size
|
||||||
du = Popen(
|
#du = Popen(
|
||||||
"/usr/bin/du %s %s | /usr/bin/sort -fk2" % (docroot, duflags),
|
# "/usr/bin/du %s/* %s | /usr/bin/sort -fk2" % (docroot, duflags),
|
||||||
shell=True, stdout=PIPE, stderr=PIPE).communicate()
|
# shell=True, stdout=PIPE, stderr=PIPE).communicate()
|
||||||
|
# du = []
|
||||||
|
|
||||||
# Check that du executed successfully
|
# Check that du executed successfully
|
||||||
# If there's anything on stderr, send it
|
# If there's anything on stderr, send it
|
||||||
# out our own stderr and terminate.
|
# out our own stderr and terminate.
|
||||||
if len(du[1].strip()) > 0:
|
#if len(du[1].strip()) > 0:
|
||||||
sys.stderr.write(du[1])
|
# sys.stderr.write(du[1])
|
||||||
print >>sys.stderr, "du terminated unsuccessfully. Not generating index."
|
# print >>sys.stderr, "du terminated unsuccessfully. Not generating index."
|
||||||
sys.exit(-1)
|
# sys.exit(-1)
|
||||||
|
|
||||||
# first one should be total, grab its size and format
|
# first one should be total, grab its size and format
|
||||||
du = du[0].splitlines() # we only care about stdout now
|
#du = du[0].splitlines() # we only care about stdout now
|
||||||
total_size = reformat_size(du[0].split(None,2)[0])
|
#total_size = reformat_size(du[0].split(None,2)[0])
|
||||||
|
|
||||||
# the rest are the sizes we want
|
# the rest are the sizes we want
|
||||||
directories = []
|
# directories = []
|
||||||
for line in du[1:]:
|
# total_size = 0
|
||||||
(size, dir) = line.split(None, 2)
|
|
||||||
dir = os.path.basename(dir)
|
# for line in du:
|
||||||
info = {'dir':dir, 'size':reformat_size(size)}
|
# (size, path) = line.split(None, 2)
|
||||||
|
# dir = os.path.basename(path)
|
||||||
|
# total_size += int(size)
|
||||||
|
# info = {'dir':dir, 'size':reformat_size(int(size))}
|
||||||
|
|
||||||
# use info from config.yaml, if found
|
# use info from config.yaml, if found
|
||||||
# otherwise, skip this directory
|
# otherwise, skip this directory
|
||||||
if dir in config['directories']:
|
# if dir in config['exclude'] or not os.path.isdir(path):
|
||||||
info.update(config['directories'][dir])
|
# continue
|
||||||
else:
|
# elif dir in config['directories']:
|
||||||
continue
|
# info.update(config['directories'][dir])
|
||||||
|
# else:
|
||||||
|
# info.update({ 'site': '', 'url': '' })
|
||||||
|
|
||||||
directories.append(info)
|
# directories.append(info)
|
||||||
|
|
||||||
# render the template to a string
|
# render the template to a string
|
||||||
body = Template(filename=template).render(
|
body = Template(filename=template).render(
|
||||||
total_size=total_size,
|
total_size=reformat_size(total_size),
|
||||||
directories=directories,
|
directories=directories,
|
||||||
|
generated=generated,
|
||||||
config=config,
|
config=config,
|
||||||
h=webhelpers.html.tags)
|
h=webhelpers.html.tags)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue