Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

created the files for chapters, make now works but produces a empty b…

…ook, progress has been made
  • Loading branch information...
commit 8e1b35ac28115598aba86fe769bd3dfbc3f61153 1 parent 81437a1
RailsFactory authored
71  Makefile
... ...
@@ -0,0 +1,71 @@
  1
+
  2
+PDF_FLAGS = --fontsize 9.0 \
  3
+			--linkstyle plain \
  4
+			--linkcolor green \
  5
+			--embedfonts \
  6
+			--footer "c 1" \
  7
+			--no-toc
  8
+
  9
+MD = pages/index.md \
  10
+	 chapters/installation.md \
  11
+	 chapters/gettingstarted.md \
  12
+	 chapters/bestpractices.md \
  13
+	 chapters/controllers.md \
  14
+	 chapters/views.md \
  15
+	 chapters/tableview.md \
  16
+	 chapters/repl.md \
  17
+	 chapters/corelocation.md \
  18
+	 chapters/coredata.md \
  19
+	 chapters/camera.md \
  20
+	 chapters/audio.md \
  21
+	 chapters/video.md \
  22
+	 chapters/graphics.md \
  23
+	 chapters/addressbook.md \
  24
+	 chapters/corelocation.md \
  25
+	 chapters/cocoapods.md \
  26
+	 chapters/facebook.md \
  27
+	 chapters/restfulapi.md \
  28
+	 chapters/testflight.md \
  29
+	 chapters/appstore.md
  30
+
  31
+HTML = $(MD:.md=.html)
  32
+
  33
+all: book.html book.pdf book.mobi book.epub
  34
+
  35
+regenerate: clean all
  36
+	git commit -a -m 'Regenerated book' && echo done
  37
+
  38
+book.pdf: $(HTML)
  39
+	@echo "\n... generating $@"
  40
+	htmldoc $(HTML) $(PDF_FLAGS) --outfile $@
  41
+
  42
+book.html: html/head.html html/tail.html $(HTML)
  43
+	@echo "\n... generating $@"
  44
+	cat html/head.html $(HTML) html/tail.html > book.html
  45
+
  46
+%.html: %.md
  47
+	ronn --pipe --fragment $< \
  48
+		| sed -E 's/<h1>([^ ]+) - /<h1>/' \
  49
+		> $@
  50
+
  51
+book.mobi:
  52
+	@echo "\n... generating $@"
  53
+	ebook-convert book.html book.mobi --output-profile kindle
  54
+
  55
+book.epub:
  56
+	@echo "\n... generating $@"
  57
+	ebook-convert book.html book.epub \
  58
+		--title "Mastering Node" \
  59
+		--no-default-epub-cover \
  60
+		--authors "TJ Holowaychuk" \
  61
+		--language en \
  62
+		--cover pages/cover.jpg
  63
+
  64
+view: book.pdf
  65
+	open book.pdf
  66
+
  67
+clean:
  68
+	rm -f book.*
  69
+	rm -f chapters/*.html
  70
+
  71
+.PHONY: view clean regenerate
2  README.md
Source Rendered
@@ -6,7 +6,7 @@ what I learnt by reading and testing rubymotion code from other developers
6 6
 
7 7
 I like https://github.com/visionmedia/masteringnode system of building book(generously copying its code and structure) which is easy to build and publish
8 8
 
9  
-Work in Progress
  9
+Work in Progress, chapter structure and content is subject to change as it is in very preliminary stages
10 10
 
11 11
 
12 12
 
1  chapters/.gitignore
... ...
@@ -0,0 +1 @@
  1
+*.html
0  chapters/addressbook.md
Source Rendered
No changes.
0  chapters/appstore.md
Source Rendered
No changes.
0  chapters/audio.md
Source Rendered
No changes.
0  chapters/bestpractices.md
Source Rendered
No changes.
0  chapters/camera.md
Source Rendered
No changes.
0  chapters/cocoapods.md
Source Rendered
No changes.
0  chapters/controllers.md
Source Rendered
No changes.
0  chapters/coredata.md
Source Rendered
No changes.
0  chapters/corelocation.md
Source Rendered
No changes.
0  chapters/facebook.md
Source Rendered
No changes.
0  chapters/gettingstarted.md
Source Rendered
No changes.
0  chapters/graphics.md
Source Rendered
No changes.
0  chapters/installation.md
Source Rendered
No changes.
0  chapters/repl.md
Source Rendered
No changes.
0  chapters/restfulapi.md
Source Rendered
No changes.
0  chapters/tableview.md
Source Rendered
No changes.
0  chapters/testflight.md
Source Rendered
No changes.
0  chapters/video.md
Source Rendered
No changes.
0  chapters/views.md
Source Rendered
No changes.
2  clean.sh
... ...
@@ -0,0 +1,2 @@
  1
+cd pages && rm -f *.html && cd ..
  2
+cd chapters && rm -f *.html && cd ..
0  html/head.html
No changes.
0  html/tail.html
No changes.
1  pages/.gitignore
... ...
@@ -0,0 +1 @@
  1
+*.html
0  pages/index.md
Source Rendered
No changes.

0 notes on commit 8e1b35a

Please sign in to comment.
Something went wrong with that request. Please try again.