Permalink
Browse files

Cleaned=up parts processing

  • Loading branch information...
hintjens committed Dec 16, 2012
1 parent e7b400a commit 5645959760ac8c1ec389df8d296a7ba192f90b7d
Showing with 340 additions and 317 deletions.
  1. +21 −21 .bookmarks
  2. +4 −4 .signatures
  3. +13 −1 bin/buildguide
  4. +13 −1 bin/buildpdfs
  5. +6 −5 bin/mkdocbook
  6. +3 −3 bin/mkwikidot
  7. +16 −20 chapter1.txt
  8. +27 −27 chapter2.txt
  9. +35 −35 chapter3.txt
  10. +27 −27 chapter4.txt
  11. +17 −17 chapter5.txt
  12. +57 −61 chapter6.txt
  13. +39 −39 chapter7.txt
  14. +34 −34 chapter8.txt
  15. +3 −0 part1.txt
  16. +3 −0 part2.txt
  17. +9 −9 postface.txt
  18. +7 −7 preface_print.txt
  19. +6 −6 preface_web.txt
View
@@ -1,42 +1,42 @@
-Architecture-of-the-MQ-Community Architecture of the 0MQ Community
Binary-Star-Implementation Binary Star Implementation
+Architecture-of-the-MQ-Community Architecture of the 0MQ Community
Protocol-Assertions Protocol Assertions
The-ROUTER-to-ROUTER-Combination The ROUTER to ROUTER Combination
Burnout Burnout
Upgrading-from-MQ-to-MQ Upgrading from 0MQ/2.2 to 0MQ/3.2
+Vadim-Shalts-s-Story Vadim Shalts's Story
Writing-the-Unprotocol Writing the Unprotocol
Republishing-Updates-from-Clients Republishing Updates from Clients
-Vadim-Shalts-s-Story Vadim Shalts's Story
-the-community The ØMQ Community
Service-Oriented-Reliable-Queuing-Majordomo-Pattern Service-Oriented Reliable Queuing (Majordomo Pattern)
-Preemptive-Discovery-over-Raw-Sockets Preemptive Discovery over Raw Sockets
-Goals Goals
+the-community The ØMQ Community
ROUTER-Broker-and-DEALER-Workers ROUTER Broker and DEALER Workers
-Symbolic-Links Symbolic Links
-Crazy-Beautiful-and-Easy Crazy, Beautiful, and Easy
+Goals Goals
+Preemptive-Discovery-over-Raw-Sockets Preemptive Discovery over Raw Sockets
Messaging-Patterns Messaging Patterns
-Step-Draw-a-Rough-Architecture Step 2: Draw a Rough Architecture
+Crazy-Beautiful-and-Easy Crazy, Beautiful, and Easy
+Symbolic-Links Symbolic Links
Divide-and-Conquer Divide and Conquer
+Step-Draw-a-Rough-Architecture Step 2: Draw a Rough Architecture
Group-Messaging Group Messaging
-Getting-an-Out-of-band-Snapshot Getting an Out-of-band Snapshot
A-Minor-Note-on-Strings A Minor Note on Strings
+Getting-an-Out-of-band-Snapshot Getting an Out-of-band Snapshot
The-Flash-Mob The Flash Mob
The-Mystic The Mystic
-advanced-architecture Advanced Architecture using ØMQ
ROUTER-Broker-and-REQ-Workers ROUTER Broker and REQ Workers
+advanced-architecture Advanced Architecture using ØMQ
Initial-Design-Cut-the-API Initial Design Cut - the API
Making-a-Clean-Exit Making a Clean Exit
-MQ-is-Not-a-Neutral-Carrier 0MQ is Not a Neutral Carrier
Upfront-Coordination Upfront Coordination
Chapter-A-Framework-for-Distributed-Computing Chapter 8 - A Framework for Distributed Computing
-The-Zen-of-Zero The Zen of Zero
Why-We-Needed-MQ Why We Needed 0MQ
+The-Zen-of-Zero The Zen of Zero
Tom-van-Leeuwen-s-Story Tom van Leeuwen's Story
A-Plausible-Minimal-Implementation A Plausible Minimal Implementation
Using-Sockets-to-Carry-Data Using Sockets to Carry Data
Chapter-Reliable-Request-Reply-Patterns Chapter 4 - Reliable Request-Reply Patterns
-Configuration Configuration
Slow-Subscriber-Detection-Suicidal-Snail-Pattern Slow Subscriber Detection (Suicidal Snail Pattern)
+Configuration Configuration
How-the-Guide-Happened How the Guide Happened
Working-with-Messages Working with Messages
Heartbeating Heartbeating
@@ -68,8 +68,8 @@ Ephemeral-Values Ephemeral Values
Pub-Sub-Message-Envelopes Pub-Sub Message Envelopes
Step-Decide-on-the-Contracts Step 3: Decide on the Contracts
Tracing-Activity Tracing Activity
-Simplicity-vs-Complexity Simplicity vs. Complexity
Language Language
+Simplicity-vs-Complexity Simplicity vs. Complexity
reliable-request-reply Reliable Request-Reply Patterns
Idempotent-Services Idempotent Services
Audience-for-This-Book Audience for This Book
@@ -124,15 +124,15 @@ File-Stability File Stability
Programming-with-MQ Programming with 0MQ
Step-Internalize-the-Semantics Step 1: Internalize the Semantics
The-Constant-Gardener The Constant Gardener
+Unprotocols Unprotocols
Robustness-in-Conflict Robustness in Conflict
Representing-State-as-Key-Value-Pairs Representing State as Key-Value Pairs
-Unprotocols Unprotocols
Exploring-ROUTER-Sockets Exploring ROUTER Sockets
How-MQ-Lost-its-Road-map How 0MQ Lost its Road-map
-Transport-Bridging Transport Bridging
Chapter-Advanced-Publish-Subscribe-Patterns Chapter 5 - Advanced Publish-Subscribe Patterns
-Delivery-Notifications Delivery Notifications
+Transport-Bridging Transport Bridging
The-DEALER-to-REP-Combination The DEALER to REP Combination
+Delivery-Notifications Delivery Notifications
The-Benevolent-Tyrant The Benevolent Tyrant
Cost-of-Failure Cost of Failure
Identities-and-Addresses Identities and Addresses
@@ -258,19 +258,19 @@ Architecture-of-a-Single-Cluster Architecture of a Single Cluster
Audience Audience
Model-Three-Complex-and-Nasty Model Three - Complex and Nasty
Development-Process Development Process
-Infinite-Property Infinite Property
The-Rolling-Stone The Rolling Stone
+Infinite-Property Infinite Property
Example-Zyre-Application Example Zyre Application
Postface Postface
Making-a-Detour Making a Detour
-Complexity-Oriented-Design Complexity-Oriented Design
State-Machines State Machines
-Multiple-Nodes-on-One-Device Multiple Nodes on One Device
+Complexity-Oriented-Design Complexity-Oriented Design
More-about-UDP More about UDP
+Multiple-Nodes-on-One-Device Multiple Nodes on One Device
Intermediaries-and-Proxies Intermediaries and Proxies
Reliable-Publish-Subscribe-Clone-Pattern Reliable Publish-Subscribe (Clone Pattern)
-The-Process The Process
Evolution-of-Public-Contracts Evolution of Public Contracts
+The-Process The Process
Rob-Gagnon-s-Story Rob Gagnon's Story
-Handling-Interrupt-Signals Handling Interrupt Signals
Code-Generation Code Generation
+Handling-Interrupt-Signals Handling Interrupt Signals
View
@@ -70,8 +70,8 @@ b02005487696f2e75f5fe6ebc2a9d6f34d425425 examples/Erlang/hwclient.es
8d65609f4c5a245f18abdf39ea5f17378ebe7949 examples/Python/clonecli1.py
0d7cef0ec7297fd380180395ac75a3cfca055d99 images/fig34.txt
19950526a70c9d6d69aa49e26410278a76a2c7b9 examples/Python/mdcliapi2.py
-5e920cc8ab69c567a8e86f514ed330b684ec8803 examples/Java/lpclient.java
533912e22da75f4c27e8f865dca8858b804f0346 examples/C++/mtserver.cpp
+5e920cc8ab69c567a8e86f514ed330b684ec8803 examples/Java/lpclient.java
f5255561e6c274c9214ca1e53e4b40d6fff86d47 examples/Java/tripping.java
b9176d1cf9d04301ee470dbe13e3abb4baee3360 examples/Java/version.java
dfe97e2297014f74a9941bbe0d28d6021de0eb51 examples/F#/syncpub.fsx
@@ -133,8 +133,8 @@ aa7f062cb4b086f3c00fd02a769fc15c41751829 images/fig55.html
8aa0ee8cdceada1858674ac5f7766ccd1391e0c1 examples/Ruby/psenvsub.rb
89e33e7a0541c59b007ed1cd5a7906c7f29f1e54 images/fig14.html
ddfc2281b409a383f380b8bbd2ef8b63916740e3 examples/Clojure/tasksink2.clj
-757c637e8ce0b9cdedceab28224d7081baef0172 examples/Tcl/rtdealer.tcl
6e6502fd6552b22bc7b2ac4b3a5b1e3bf0fbafc5 examples/Python/syncpub.py
+757c637e8ce0b9cdedceab28224d7081baef0172 examples/Tcl/rtdealer.tcl
d50c97ecd4fdfc0c982323734e4f7a3554366b0b fragments/C/endpoint-hashing.c
a3c78d15e03ff754a35ad2d4d9c5129bd6e0781b examples/Erlang/syncsub.es
d4a51d25b984a549dd99076aa80900d071f9c2d1 examples/Ruby/hwclient.rb
@@ -1024,8 +1024,8 @@ ac1156ba2f953b3997550affe245164d50925024 examples/PHP/lbbroker2.php
a58db4e6242dcbd31dcfe8248382a69cb5ebf4dc examples/C/rtdealer.c
cbbcc35dbc862d7626072c3c2a7b154423ebd3bb images/fig4.txt
98913d674c40172faadc26833ee49e6b298c507c fragments/C/proxy.c
-2f7baf7baed1713272d61725d94f3aa7859e47a1 examples/Go/mspoller.go
b59f86b32ba40e90f104ba6aa9cbb683876b9853 examples/Java/ppworker.java
+2f7baf7baed1713272d61725d94f3aa7859e47a1 examples/Go/mspoller.go
7377682230bfb1631480a93cd27cadacaeb4f1e3 examples/Python/psenvpub.py
-b9ff6aeed1217c6d57d072f4a11ab336d3137eda images/fig26.txt
cf00f05adee687a45fa3c0bd1d1b90a7843f0070 images/fig63.html
+b9ff6aeed1217c6d57d072f4a11ab336d3137eda images/fig26.txt
View
@@ -24,6 +24,18 @@ function upload {
function mkone {
export Z2W_LANG=$1
export Z2W_FORM=$2
+ bin/mkwikidot \
+ preface_web.txt \
+ chapter1.txt \
+ chapter2.txt \
+ chapter3.txt \
+ chapter4.txt \
+ chapter5.txt \
+ chapter6.txt \
+ chapter7.txt \
+ chapter8.txt \
+ postface.txt
+
echo "[[include $3:preface]]" > all.wd
echo "[[include $3:chapter1]]" >> all.wd
echo "[[include $3:chapter2]]" >> all.wd
@@ -34,7 +46,7 @@ function mkone {
echo "[[include $3:chapter7]]" >> all.wd
echo "[[include $3:chapter8]]" >> all.wd
echo "[[include $3:postface]]" >> all.wd
- bin/mkwikidot preface_web.txt chapter*.txt postface.txt
+
upload $3 preface "Preface"
upload $3 chapter1 "Chapter One"
upload $3 chapter2 "Chapter Two"
View
@@ -9,7 +9,19 @@ BOOK=zguide
function mkone {
export BOOK_LANG=$1
export BOOK_FORM=pdf
- bin/mkdocbook preface_print.txt chapter*.txt postface.txt
+ bin/mkdocbook \
+ preface_print.txt \
+ part1.txt \
+ chapter1.txt \
+ chapter2.txt \
+ chapter3.txt \
+ chapter4.txt \
+ chapter5.txt \
+ part2.txt \
+ chapter6.txt \
+ chapter7.txt \
+ chapter8.txt \
+ postface.txt
# Produce and upload PDF
docbook2ps book.xml
View
@@ -60,6 +60,7 @@ $cutoff = 60;
signatures_load ();
bookmarks_load ();
+# If we have parts, content is indented one extra level
$have_parts = 0;
die "Can't create book.xml: $!"
@@ -135,31 +136,31 @@ while (<>) {
writeln (requote ("<title>$'</title>"));
start_block (2, "partintro");
}
- elsif (/^\+\+\s+Preface/) {
+ elsif (/^\+\s+Preface/) {
$bookmarks{$anchor} = "Preface" if $anchor;
close_list ();
start_block (1 + $have_parts, "preface");
writeln (requote ("<title>Preface</title>"));
}
- elsif (/^\+\+\s+(.*)$/) {
+ elsif (/^\+\s+(.*)$/) {
$bookmarks{$anchor} = zmq_symbol ($1) if $anchor;
close_list ();
start_block (1 + $have_parts, "chapter");
writeln (requote ("<title>$1</title>"));
}
- elsif (/^\+\+\s+Postface/) {
+ elsif (/^\+\s+Postface/) {
$bookmarks{$anchor} = "Postface" if $anchor;
close_list ();
# Don't have a Postface item, so make this a chapter
start_block (1 + $have_parts, "chapter");
writeln (requote ("<title>Postface</title>"));
}
- elsif (/^\+\+\+\s+(.*)$/) {
+ elsif (/^\+\+\s+(.*)$/) {
close_list ();
start_block (2 + $have_parts, "sect1");
writeln (requote ("<title>$1</title>"));
}
- elsif (/^\+\+\+\+\s+(.*)$/) {
+ elsif (/^\+\+\+\s+(.*)$/) {
close_list ();
start_block (3 + $have_parts, "sect2");
writeln (requote ("<title>$1</title>"));
View
@@ -134,9 +134,9 @@ while (<>) {
$this++;
$prev = $this - 1;
$next = $this + 1;
- $indent = $1;
+ $level = $1;
$header = $2;
- if ($indent eq "++" && $header ne "Preface" && $header ne "Postface") {
+ if ($level eq "+" && $header ne "Preface" && $header ne "Postface") {
$chapter++;
$header = "Chapter $chapter - $header";
}
@@ -153,7 +153,7 @@ while (<>) {
writeln ("[[table style=\"width:100%\"]]");
writeln ("[[row]]");
writeln ("[[cell]]");
- writeln ("$indent [#$anchor $header]");
+ writeln ("+$level [#$anchor $header]");
writeln ("[[/cell]]");
writeln ("[[cell style=\"text-align:right; font-size:80%;\"]]");
writeln ("[#top top] [#header-$prev prev] [#header-$next next]");
Oops, something went wrong.

0 comments on commit 5645959

Please sign in to comment.