Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
eoa-1.0/website/publications/management/commands/statistic.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28 lines (25 sloc)
891 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: UTF-8 -*- | |
__author__ = 'kai' | |
from django.core.management.base import BaseCommand | |
from django.conf import settings | |
from publications.models import * | |
import ConfigParser | |
import os | |
import shutil | |
from lxml import etree | |
import Image | |
import shlex | |
import subprocess | |
""" | |
export PYTHONPATH="/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages" | |
""" | |
class Command(BaseCommand): | |
help = "RTFM!" | |
# process as string to be used to create html text for elements | |
def handle(self, **options): | |
Publications = Publication.objects.all() | |
print ("Number of Publications: " + str(len(Publications))) | |
Chapters = Chapter.objects.all() | |
print ("Number of Chapters: " + str(len(Chapters))) | |
Elements = Element.objects.all() | |
print ("Number of Elementes (i.e. Paragraphs, Figures,...): " + str(len(Elements))) |