summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gen_changelog37
-rwxr-xr-xbin/gen_changelog_cleanup20
-rwxr-xr-xbin/gendoc104
-rwxr-xr-xbin/gendoc.py80
4 files changed, 0 insertions, 241 deletions
diff --git a/bin/gen_changelog b/bin/gen_changelog
deleted file mode 100755
index 91ef158..0000000
--- a/bin/gen_changelog
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-# This file is part of targetcli.
-# Copyright (c) 2011 by RisingTide Systems LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, version 3 (AGPLv3).
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-NAME=$(git config --get user.name)
-EMAIL=$(git config --get user.email)
-DATE=$(date +'%a, %d %b %Y %H:%M:%S %z')
-
-SRCPKG=$(cat debian/control | grep ^Source | awk '{print $2}')
-VERSION=$(basename $(git describe --tags | tr - .))
-
-sed -i "s/__version__ = .*/__version__ = '${VERSION}'/g" ${SRCPKG}/__init__.py
-
-echo "${SRCPKG} (${VERSION}) unstable; urgency=low" > debian/changelog
-echo >> debian/changelog
-echo " * Generated package." >> debian/changelog
-echo >> debian/changelog
-echo " -- ${NAME} <${EMAIL}> ${DATE}" >> debian/changelog
-
-RH_SPEC="redhat/targetcli.spec"
-cp redhat/targetcli.spec.tmpl $RH_SPEC
-sed -i "s/Version:\( *\).*/Version:\1${VERSION}/g" $RH_SPEC
-echo "* $(date +'%a %b %d %Y') ${NAME} <${EMAIL}> - ${VERSION}" >> $RH_SPEC
-echo "- Generated package." >> $RH_SPEC
diff --git a/bin/gen_changelog_cleanup b/bin/gen_changelog_cleanup
deleted file mode 100755
index bb3dc05..0000000
--- a/bin/gen_changelog_cleanup
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-# This file is part of targetcli.
-# Copyright (c) 2011 by RisingTide Systems LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, version 3 (AGPLv3).
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-SRCPKG=$(cat debian/control | grep ^Source | awk '{print $2}')
-rm -f debian/changelog
-sed -i "s/__version__ = .*/__version__ = 'GIT_VERSION'/g" ${SRCPKG}/__init__.py
diff --git a/bin/gendoc b/bin/gendoc
deleted file mode 100755
index f14ce2e..0000000
--- a/bin/gendoc
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/bash
-
-# This file is part of targetcli.
-# Copyright (c) 2011 by RisingTide Systems LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, version 3 (AGPLv3).
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-path=$PWD
-
-rm -rf doc &>/dev/null
-mkdir doc
-cp README COPYING doc/
-cp targetcli_doc/rtslogo.* doc/
-
-CSS=../targetcli_doc/html4css1.css
-#CSS=../targetcli_doc/voidspace.css
-RSTTITLE="targetcli_reference"
-TITLE=$RSTTITLE
-#MARK="% generated by Docutils"
-MARK="\documentclass.*"
-#./bin/gendoc.py > doc/$TITLE.rst
-echo > doc/$TITLE.rst
-
-cd doc
-rst2html $TITLE.rst --stylesheet-path $CSS --embed-stylesheet --no-xml-declaration $TITLE.html
-cat $TITLE.rst | grep -v ".. sectnum::" | grep -v "header::" > $TITLE.rst2
-mv $TITLE.rst2 $TITLE.rst
-
-rst2latex $RSTTITLE.rst --toc-entry-backlinks --compound-enumerators --use-verbatim-when-possible --use-latex-toc --section-numbering --documentclass article --documentoptions "10pt,a4paper" --use-latex-toc --use-latex-docinfo --hyperlink-color black $TITLE.tex
-
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{fancyhdr}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{lastpage}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{color}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{titlesec}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage[utf8]{inputenc}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\pagestyle{fancy}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\\definecolor{rtsblue}{RGB}{79,130,189}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\rhead{\\\includegraphics[height=13pt]{rtslogo.eps}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\chead{}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\lhead{\\\leftmark}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\headrule}{{\\\color{rtsblue}\\\hrule width\\\headwidth height\\\headrulewidth \\\vskip-\\\headrulewidth}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\cfoot{}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\lfoot{Copyright \\\copyright2009-2010 by RisingTide Systems LLC}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\rfoot{Page \\\thepage\\\ of\\\ \\\pageref{LastPage}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\footrule}{{\\\color{rtsblue}\\\hrule width\\\headwidth height\\\headrulewidth \\\vskip-\\\headrulewidth}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\headrulewidth}{0.4pt}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\footrulewidth}{0.4pt}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\\titleformat{\\\chapter}\[display\]{\\\color{rtsblue}\\\normalfont\\\huge\\\bfseries}{\\\chaptertitlename\\\thechapter}{20pt}{\\\Huge}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\\titleformat{\\\section}{\\\color{rtsblue}\\\normalfont\\\Large\\\bfseries}{\\\thesection}{1em}{}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\\titleformat{\\\subsection}{\\\color{rtsblue}\\\normalfont\\\large\\\bfseries}{\\\thesubsection}{1em}{}/g" $TITLE.tex
-
-# once for generating the formatting
-latex $TITLE.tex $TITLE.dvi
-# once more for the TOC
-latex $TITLE.tex $TITLE.dvi
-# And now get the labels right
-latex $TITLE.tex $TITLE.dvi
-dvipdf $TITLE.dvi $TITLE.pdf
-
-TITLE="targetcli_reference_for_print"
-
-rst2latex $RSTTITLE.rst --toc-entry-backlinks --compound-enumerators --use-verbatim-when-possible --use-latex-toc --section-numbering --documentclass book --documentoptions "10pt,a4paper" --use-latex-toc --use-latex-docinfo --hyperlink-color black $TITLE.tex
-
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{fancyhdr}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{lastpage}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{color}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage{titlesec}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\usepackage[utf8]{inputenc}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\\definecolor{rtsblue}{RGB}{79,130,189}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\pagestyle{fancy}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\rhead{\\\includegraphics[height=13pt]{rtslogo.eps}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\chead{}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\lhead{\\\leftmark}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\headrule}{{\\\color{rtsblue}\\\hrule width\\\headwidth height\\\headrulewidth \\\vskip-\\\headrulewidth}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\cfoot{}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\lfoot{Copyright \\\copyright2009-2010 by RisingTide Systems LLC}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\rfoot{Page \\\thepage\\\ of\\\ \\\pageref{LastPage}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\footrule}{{\\\color{rtsblue}\\\hrule width\\\headwidth height\\\headrulewidth \\\vskip-\\\headrulewidth}}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\headrulewidth}{0.4pt}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\renewcommand{\\\footrulewidth}{0.4pt}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\\titleformat{\\\chapter}\[display\]{\\\color{rtsblue}\\\normalfont\\\huge\\\bfseries}{\\\chaptertitlename\\\thechapter}{20pt}{\\\Huge}/g" $TITLE.tex
-perl -pi -e "s/\($MARK\)/\1\n\\\\titleformat{\\\section}{\\\color{rtsblue}\\\normalfont\\\Large\\\bfseries}{\\\thesection}{1em}{}/g" $TITLE.tex
-
-# once for generating the formatting
-latex $TITLE.tex $TITLE.dvi
-# once more for the TOC
-latex $TITLE.tex $TITLE.dvi
-# And now get the labels right
-latex $TITLE.tex $TITLE.dvi
-dvipdf $TITLE.dvi $TITLE.pdf
-
-
-cd ..
-
diff --git a/bin/gendoc.py b/bin/gendoc.py
deleted file mode 100755
index 74bc433..0000000
--- a/bin/gendoc.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/python
-
-# This file is part of targetcli.
-# Copyright (c) 2011 by RisingTide Systems LLC
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, version 3 (AGPLv3).
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-import os
-import re
-import sys
-import inspect
-import textwrap
-import datetime
-sys.path.insert(0, os.path.realpath("."))
-import targetcli
-
-def doctitle(txt):
- return "%s\n%s\n%s\n\n" \
- % ("".ljust(len(txt), "="), txt, "".ljust(len(txt), "="))
-
-def docsubtitle(txt):
- return "%s\n%s\n%s\n\n" \
- % ("".ljust(len(txt), "-"), txt, "".ljust(len(txt), "-"))
-
-def title(txt):
- return "%s\n%s\n\n" % (txt, "".ljust(len(txt), "="))
-
-def subtitle(txt):
- return "%s\n%s\n\n" % (txt, "".ljust(len(txt), "-"))
-
-def gen_context_reference():
- string = ""
- string += "Documentation extract not implemented yet"
- return string
-
-def gen_help_misc():
- string = ""
- string += "Documentation extract not implemented yet"
- return string
-
-def gen_help_cmd():
- string = title("Globally Available Commands")
- string += "Documentation extract not implemented yet"
- return string
-
-def gen_title():
- string = ""
- string += doctitle("The targetcli Reference Guide")
- string += docsubtitle(targetcli.__description__)
- string += ":Date: version %s built on %s\n" \
- % (str(targetcli.__version__),
- str(datetime.datetime.now().date()))
- license_fields = targetcli.__license__.split(".")
- string += ":Author: %s. %s.\n" % (license_fields[0], license_fields[1])
- string += "\n"
- return string
-
-def gen_toc():
- return ".. contents:: **Table of Contents**\n\n"
-
-def gen_options():
- return ".. sectnum::\n\n.. header:: .. image:: rtslogo.png\n\n"
-
-if __name__ == "__main__":
- print gen_title()
- print gen_options()
- print gen_toc()
- print gen_help_misc()
- print gen_help_cmd()
- print gen_context_reference()