commit 2f6859bc733b34336ad8eb428d28b655142f053f Author: brett_langdon Date: Wed May 30 15:03:13 2012 -0400 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d8fcade --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*.aux +*.dvi +*.bbl +*.log +*.toc +*.pdf +*.blg +*/*/ diff --git a/.tex b/.tex new file mode 100644 index 0000000..9c9a67d --- /dev/null +++ b/.tex @@ -0,0 +1,23 @@ +\relax +\@setckpt{\@@par }{ +\setcounter{page}{9} +\setcounter{equation}{0} +\setcounter{enumi}{0} +\setcounter{enumii}{0} +\setcounter{enumiii}{0} +\setcounter{enumiv}{0} +\setcounter{footnote}{0} +\setcounter{mpfootnote}{0} +\setcounter{part}{0} +\setcounter{chapter}{0} +\setcounter{section}{2} +\setcounter{subsection}{0} +\setcounter{subsubsection}{0} +\setcounter{paragraph}{0} +\setcounter{subparagraph}{0} +\setcounter{figure}{0} +\setcounter{table}{0} +\setcounter{parentequation}{0} +\setcounter{lstnumber}{1} +\setcounter{lstlisting}{0} +} diff --git a/1 - Introduction/Introduction.tex b/1 - Introduction/Introduction.tex new file mode 100644 index 0000000..fcb410d --- /dev/null +++ b/1 - Introduction/Introduction.tex @@ -0,0 +1,14 @@ +Greetings and welcome to Programming In General. This is a book that I started writting to try and provide +free resources to those who either wanted to learn programming or who wanted to further their knowledge of +programming. +\newline +\\ +This book is provided completely free to anyone who wishes to use it. +\newline +\\ +For suggestions, comments or corrections please feel free to e-mail me at: +\newline +brett@blangdon.com +\newline +\\ +Thank you and I hope you enjoy this book as much as I enjoyed writting it. diff --git a/2 - Functional Programming/Functional Programming.tex b/2 - Functional Programming/Functional Programming.tex new file mode 100644 index 0000000..e9b6c55 --- /dev/null +++ b/2 - Functional Programming/Functional Programming.tex @@ -0,0 +1,2 @@ +Functional programming, simply put, is programming by the use of functions. Functional programming does not utilitize the use of +classes and objects in order to create applications. diff --git a/3 - Object Oriented Programming/Object Oriented Programming.tex b/3 - Object Oriented Programming/Object Oriented Programming.tex new file mode 100644 index 0000000..e69de29 diff --git a/4 - Data Structures/Data Structures.tex b/4 - Data Structures/Data Structures.tex new file mode 100644 index 0000000..e69de29 diff --git a/5 - Algorithms/Algorithms.tex b/5 - Algorithms/Algorithms.tex new file mode 100644 index 0000000..e69de29 diff --git a/Programming In General.tex b/Programming In General.tex new file mode 100644 index 0000000..f2416b7 --- /dev/null +++ b/Programming In General.tex @@ -0,0 +1,32 @@ +\documentclass[10pt,a4paper,titlepage]{book} +\usepackage[utf8]{inputenc} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{amssymb} +\usepackage{moreverb} +\usepackage{listings} +\author{Brett Langdon} +\title{Programming In General} +\lstset{language=php,numbers=left,stepnumber=1} +\begin{document} +\maketitle +\tableofcontents + +\chapter{Introduction} +\input{"./1 - Introduction/Introduction"} + +\section{Who This Book Is For} +\input{"./1 - Introduction/1.0 - Who This Book Is For"} + +\section{Code Examples} +\input{"./1 - Introduction/1.1 - Code Examples"} + +\chapter{Functional Programming} +\input{"./2 - Functional Programming/Functional Programming"} + +\chapter{Object Oriented Programming} + +\chapter{Data Structures} + +\chapter{Algorithms} +\end{document} diff --git a/build b/build new file mode 100755 index 0000000..80be94e --- /dev/null +++ b/build @@ -0,0 +1,35 @@ +#!/usr/bin/env python +import os +import re +from subprocess import call + +header = open('./header.tex', 'r'); +footer = open('./footer.tex', 'r'); +book = open('./Programming In General.tex', 'w'); + +book.write(header.read()); +header.close(); + +dirs = [x[0] for x in os.walk('.')][1:] + +for d in dirs: + chapter = re.sub('\d+\s-\s', '', d[2:]) + book.write('\r\n\chapter{' + chapter + '}\r\n') + if os.path.exists(d + '/' + chapter + '.tex'): + book.write('\input{"' + d + '/' + chapter + '"}\r\n') + files = os.listdir(d) + for f in filter(lambda f: re.search('^\d+.\d+\s-\s',f), files): + section = re.sub('\d+.\d+\s-\s|.tex', '', f) + book.write('\r\n\section{' + section + '}\r\n') + book.write('\input{"' + d + '/' + f.replace('.tex', '') + '"}\r\n') + + +book.write(footer.read()); +footer.close(); + +book.close(); + + + +call(['latex', './Programming In General.tex']) +call(['pdflatex', './Programming In General.tex']) diff --git a/footer.tex b/footer.tex new file mode 100644 index 0000000..6b47932 --- /dev/null +++ b/footer.tex @@ -0,0 +1 @@ +\end{document} diff --git a/header.tex b/header.tex new file mode 100644 index 0000000..fb6a97d --- /dev/null +++ b/header.tex @@ -0,0 +1,13 @@ +\documentclass[10pt,a4paper,titlepage]{book} +\usepackage[utf8]{inputenc} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{amssymb} +\usepackage{moreverb} +\usepackage{listings} +\author{Brett Langdon} +\title{Programming In General} +\lstset{language=php,numbers=left,stepnumber=1} +\begin{document} +\maketitle +\tableofcontents