blackbinbin 6 anni fa
parent
commit
692f997109
48 ha cambiato i file con 4 aggiunte e 4313 eliminazioni
  1. 4 1
      README.md
  2. 0 70
      _book/code/README.md
  3. 0 478
      _book/code/index.html
  4. BIN
      _book/gitbook/fonts/fontawesome/FontAwesome.otf
  5. BIN
      _book/gitbook/fonts/fontawesome/fontawesome-webfont.eot
  6. 0 196
      _book/gitbook/fonts/fontawesome/fontawesome-webfont.svg
  7. BIN
      _book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf
  8. BIN
      _book/gitbook/fonts/fontawesome/fontawesome-webfont.woff
  9. BIN
      _book/gitbook/fonts/fontawesome/fontawesome-webfont.woff2
  10. 0 240
      _book/gitbook/gitbook-plugin-fontsettings/fontsettings.js
  11. 0 291
      _book/gitbook/gitbook-plugin-fontsettings/website.css
  12. 0 135
      _book/gitbook/gitbook-plugin-highlight/ebook.css
  13. 0 434
      _book/gitbook/gitbook-plugin-highlight/website.css
  14. 0 11
      _book/gitbook/gitbook-plugin-livereload/plugin.js
  15. 0 6
      _book/gitbook/gitbook-plugin-lunr/lunr.min.js
  16. 0 59
      _book/gitbook/gitbook-plugin-lunr/search-lunr.js
  17. 0 6
      _book/gitbook/gitbook-plugin-search/lunr.min.js
  18. 0 50
      _book/gitbook/gitbook-plugin-search/search-engine.js
  19. 0 35
      _book/gitbook/gitbook-plugin-search/search.css
  20. 0 213
      _book/gitbook/gitbook-plugin-search/search.js
  21. 0 90
      _book/gitbook/gitbook-plugin-sharing/buttons.js
  22. 0 0
      _book/gitbook/gitbook.js
  23. BIN
      _book/gitbook/images/apple-touch-icon-precomposed-152.png
  24. BIN
      _book/gitbook/images/favicon.ico
  25. 0 0
      _book/gitbook/style.css
  26. 0 0
      _book/gitbook/theme.js
  27. BIN
      _book/img/图1-1.jpg
  28. BIN
      _book/img/图1-2.jpg
  29. BIN
      _book/img/图1-3.jpg
  30. BIN
      _book/img/图2-1.jpg
  31. BIN
      _book/img/图3-1.jpg
  32. BIN
      _book/img/图3-2.jpg
  33. BIN
      _book/img/图3-3.jpg
  34. BIN
      _book/img/图4-1.jpg
  35. BIN
      _book/img/图4-2.jpg
  36. BIN
      _book/img/图4-3.jpg
  37. BIN
      _book/img/图4-4.jpg
  38. BIN
      _book/img/图4-5.jpg
  39. BIN
      _book/img/图4-6.jpg
  40. BIN
      _book/img/图4-7.jpg
  41. 0 416
      _book/index.html
  42. 0 74
      _book/install/README.md
  43. 0 478
      _book/install/index.html
  44. 0 28
      _book/run/README.md
  45. 0 390
      _book/run/index.html
  46. 0 0
      _book/search_index.json
  47. 0 119
      _book/use/README.md
  48. 0 493
      _book/use/index.html

+ 4 - 1
README.md

@@ -1,3 +1,6 @@
 #多玩可视化爬虫系统
 
-基于nodejs的可视化爬虫,满足大部分网站的爬取需求,可视化编写网页采集过滤器,根据设置爬取规则自定义爬取顺序,图片等资源可转存。
+基于nodejs的可视化爬虫,满足大部分网站的爬取需求,可视化编写网页采集过滤器,根据设置爬取规则自定义爬取顺序,图片等资源可转存。
+
+>svn仓库地址
+svn://dev.webdev.ouj.com/php/trunk/base_services/crawl

+ 0 - 70
_book/code/README.md

@@ -1,70 +0,0 @@
-#code
-
-目录结构
-```
-│  app.js	//处理路由和异常捕捉
-│  common.js	//配置环境config
-│  index.js		//多进程启动
-│
-├─bin
-│  │  checkProxyPool.js		//从redis代理池中拿出ip直接请求某个网址,如果失效则删除
-│  │  checkZombieChrome.js	//使用headless浏览器模式会出现很多僵尸chrome进程,用此脚本杀死
-│  │  checkZombieSpider.js	//检查所有crawlworker并记录到表proc_log,并且杀死proc_log中运行太久的僵尸程序
-│  │  crawl.js		//获取浏览器模式和普通模式的规则然后进行任务
-│  │  crawlMaster.js 	//抓取任务的master分配入redis队列
-│  │  crawlWorker.js	//从redis获取抓取任务
-│  │  fetchPage.js		
-│  │  test.js
-│  │
-│  ├─linux_bash
-│  │      crontab.sh
-│  │      supervisor.ini
-│  │
-│  └─NameClient
-│          subNsEvent.js
-│
-├─conf	//配置目录
-│  │  code.inc.js
-│  │  config.dev.inc.js
-│  │  config.form.inc.js
-│  │  config.inc.js
-│  │  r2m_config.inc.js
-│  │
-│  └─conf_ns	//名字服务器配置
-│          config.code.inc.js
-│          config.globals.inc.js
-│          config.r2m.inc.js
-│          config.shop.inc.js
-│
-├─controllers	//爬虫开放的api,用于预览爬取获取页面和网页上执行任务查看任务执行情况
-│      DefaultController.js
-│
-├─extensions
-│      function_extend.js
-│
-├─models
-│      AmcMsg.js	//爬虫爬取报警上报
-│      Browser.js	//headless浏览器模式下的浏览器类
-│      JTool.js		//选择器使用的类工具,例如格式化时间等
-│      MapData.js	//名字服务中配置的数据库表内字段的操作类
-│      ProxyPool.js		//代理池类
-│      Spider.js	//爬虫类,非常重要,包含了爬取过程中的一系列函数
-│
-└─views
-    │  doc.ejs
-    │  error.ejs
-    │  index.ejs
-    │
-    └─name_server
-            js.ejs
-```
-
----
-#系统示意图
-![图片](/img/图1-2.jpg)
-
-#请求代理示意图
-![图片](/img/图1-1.jpg)
-
-#可视化流程示意图
-![图片](/img/图1-3.jpg)

+ 0 - 478
_book/code/index.html

@@ -1,478 +0,0 @@
-
-<!DOCTYPE HTML>
-<html lang="" >
-    <head>
-        <meta charset="UTF-8">
-        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
-        <title>目录 · GitBook</title>
-        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-        <meta name="description" content="">
-        <meta name="generator" content="GitBook 3.2.3">
-        
-        
-        
-    
-    <link rel="stylesheet" href="../gitbook/style.css">
-
-    
-            
-                
-                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
-                
-            
-                
-                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
-                
-            
-                
-                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
-                
-            
-        
-
-    
-
-    
-        
-    
-        
-    
-        
-    
-        
-    
-        
-    
-        
-    
-
-        
-    
-    
-    <meta name="HandheldFriendly" content="true"/>
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
-    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
-
-    
-    
-
-    </head>
-    <body>
-        
-<div class="book">
-    <div class="book-summary">
-        
-            
-<div id="book-search-input" role="search">
-    <input type="text" placeholder="Type to search" />
-</div>
-
-            
-                <nav role="navigation">
-                
-
-
-<ul class="summary">
-    
-    
-
-    
-
-    
-        
-        
-    
-        <li class="chapter " data-level="1.1" data-path="../">
-            
-                <a href="../">
-            
-                    
-                    简介
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.2" >
-            
-                <span>
-            
-                    
-                    安装以及配置
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.2.1" data-path="../install/">
-            
-                <a href="../install/#install">
-            
-                    
-                    安装
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.2.2" data-path="../install/">
-            
-                <a href="../install/#config">
-            
-                    
-                    配置
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.3" >
-            
-                <span>
-            
-                    
-                    目录结构
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.3.1" data-path="./">
-            
-                <a href="./#code">
-            
-                    
-                    目录
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.4" >
-            
-                <span>
-            
-                    
-                    部署
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.4.1" data-path="../run/">
-            
-                <a href="../run/#run">
-            
-                    
-                    部署
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5" >
-            
-                <span>
-            
-                    
-                    使用
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.5.1" data-path="../use/">
-            
-                <a href="../use/#规则">
-            
-                    
-                    新建规则
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.2" data-path="../use/">
-            
-                <a href="../use/#选择器">
-            
-                    
-                    选择器
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.3" data-path="../use/">
-            
-                <a href="../use/#配置库表">
-            
-                    
-                    配置库表
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.4" data-path="../use/">
-            
-                <a href="../use/#任务">
-            
-                    
-                    任务
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.5" data-path="../use/">
-            
-                <a href="../use/#调试">
-            
-                    
-                    调试
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-
-    
-
-    <li class="divider"></li>
-
-    <li>
-        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
-            Published with GitBook
-        </a>
-    </li>
-</ul>
-
-
-                </nav>
-            
-        
-    </div>
-
-    <div class="book-body">
-        
-            <div class="body-inner">
-                
-                    
-
-<div class="book-header" role="navigation">
-    
-
-    <!-- Title -->
-    <h1>
-        <i class="fa fa-circle-o-notch fa-spin"></i>
-        <a href=".." >目录</a>
-    </h1>
-</div>
-
-
-
-
-                    <div class="page-wrapper" tabindex="-1" role="main">
-                        <div class="page-inner">
-                            
-<div id="book-search-results">
-    <div class="search-noresults">
-    
-                                <section class="normal markdown-section">
-                                
-                                <h1 id="code">code</h1>
-<p>&#x76EE;&#x5F55;&#x7ED3;&#x6784;</p>
-<pre><code>&#x2502;  app.js    //&#x5904;&#x7406;&#x8DEF;&#x7531;&#x548C;&#x5F02;&#x5E38;&#x6355;&#x6349;
-&#x2502;  common.js    //&#x914D;&#x7F6E;&#x73AF;&#x5883;config
-&#x2502;  index.js        //&#x591A;&#x8FDB;&#x7A0B;&#x542F;&#x52A8;
-&#x2502;
-&#x251C;&#x2500;bin
-&#x2502;  &#x2502;  checkProxyPool.js        //&#x4ECE;redis&#x4EE3;&#x7406;&#x6C60;&#x4E2D;&#x62FF;&#x51FA;ip&#x76F4;&#x63A5;&#x8BF7;&#x6C42;&#x67D0;&#x4E2A;&#x7F51;&#x5740;&#xFF0C;&#x5982;&#x679C;&#x5931;&#x6548;&#x5219;&#x5220;&#x9664;
-&#x2502;  &#x2502;  checkZombieChrome.js    //&#x4F7F;&#x7528;headless&#x6D4F;&#x89C8;&#x5668;&#x6A21;&#x5F0F;&#x4F1A;&#x51FA;&#x73B0;&#x5F88;&#x591A;&#x50F5;&#x5C38;chrome&#x8FDB;&#x7A0B;&#xFF0C;&#x7528;&#x6B64;&#x811A;&#x672C;&#x6740;&#x6B7B;
-&#x2502;  &#x2502;  checkZombieSpider.js    //&#x68C0;&#x67E5;&#x6240;&#x6709;crawlworker&#x5E76;&#x8BB0;&#x5F55;&#x5230;&#x8868;proc_log&#xFF0C;&#x5E76;&#x4E14;&#x6740;&#x6B7B;proc_log&#x4E2D;&#x8FD0;&#x884C;&#x592A;&#x4E45;&#x7684;&#x50F5;&#x5C38;&#x7A0B;&#x5E8F;
-&#x2502;  &#x2502;  crawl.js        //&#x83B7;&#x53D6;&#x6D4F;&#x89C8;&#x5668;&#x6A21;&#x5F0F;&#x548C;&#x666E;&#x901A;&#x6A21;&#x5F0F;&#x7684;&#x89C4;&#x5219;&#x7136;&#x540E;&#x8FDB;&#x884C;&#x4EFB;&#x52A1;
-&#x2502;  &#x2502;  crawlMaster.js     //&#x6293;&#x53D6;&#x4EFB;&#x52A1;&#x7684;master&#x5206;&#x914D;&#x5165;redis&#x961F;&#x5217;
-&#x2502;  &#x2502;  crawlWorker.js    //&#x4ECE;redis&#x83B7;&#x53D6;&#x6293;&#x53D6;&#x4EFB;&#x52A1;
-&#x2502;  &#x2502;  fetchPage.js        
-&#x2502;  &#x2502;  test.js
-&#x2502;  &#x2502;
-&#x2502;  &#x251C;&#x2500;linux_bash
-&#x2502;  &#x2502;      crontab.sh
-&#x2502;  &#x2502;      supervisor.ini
-&#x2502;  &#x2502;
-&#x2502;  &#x2514;&#x2500;NameClient
-&#x2502;          subNsEvent.js
-&#x2502;
-&#x251C;&#x2500;conf    //&#x914D;&#x7F6E;&#x76EE;&#x5F55;
-&#x2502;  &#x2502;  code.inc.js
-&#x2502;  &#x2502;  config.dev.inc.js
-&#x2502;  &#x2502;  config.form.inc.js
-&#x2502;  &#x2502;  config.inc.js
-&#x2502;  &#x2502;  r2m_config.inc.js
-&#x2502;  &#x2502;
-&#x2502;  &#x2514;&#x2500;conf_ns    //&#x540D;&#x5B57;&#x670D;&#x52A1;&#x5668;&#x914D;&#x7F6E;
-&#x2502;          config.code.inc.js
-&#x2502;          config.globals.inc.js
-&#x2502;          config.r2m.inc.js
-&#x2502;          config.shop.inc.js
-&#x2502;
-&#x251C;&#x2500;controllers    //&#x722C;&#x866B;&#x5F00;&#x653E;&#x7684;api&#xFF0C;&#x7528;&#x4E8E;&#x9884;&#x89C8;&#x722C;&#x53D6;&#x83B7;&#x53D6;&#x9875;&#x9762;&#x548C;&#x7F51;&#x9875;&#x4E0A;&#x6267;&#x884C;&#x4EFB;&#x52A1;&#x67E5;&#x770B;&#x4EFB;&#x52A1;&#x6267;&#x884C;&#x60C5;&#x51B5;
-&#x2502;      DefaultController.js
-&#x2502;
-&#x251C;&#x2500;extensions
-&#x2502;      function_extend.js
-&#x2502;
-&#x251C;&#x2500;models
-&#x2502;      AmcMsg.js    //&#x722C;&#x866B;&#x722C;&#x53D6;&#x62A5;&#x8B66;&#x4E0A;&#x62A5;
-&#x2502;      Browser.js    //headless&#x6D4F;&#x89C8;&#x5668;&#x6A21;&#x5F0F;&#x4E0B;&#x7684;&#x6D4F;&#x89C8;&#x5668;&#x7C7B;
-&#x2502;      JTool.js        //&#x9009;&#x62E9;&#x5668;&#x4F7F;&#x7528;&#x7684;&#x7C7B;&#x5DE5;&#x5177;&#xFF0C;&#x4F8B;&#x5982;&#x683C;&#x5F0F;&#x5316;&#x65F6;&#x95F4;&#x7B49;
-&#x2502;      MapData.js    //&#x540D;&#x5B57;&#x670D;&#x52A1;&#x4E2D;&#x914D;&#x7F6E;&#x7684;&#x6570;&#x636E;&#x5E93;&#x8868;&#x5185;&#x5B57;&#x6BB5;&#x7684;&#x64CD;&#x4F5C;&#x7C7B;
-&#x2502;      ProxyPool.js        //&#x4EE3;&#x7406;&#x6C60;&#x7C7B;
-&#x2502;      Spider.js    //&#x722C;&#x866B;&#x7C7B;&#xFF0C;&#x975E;&#x5E38;&#x91CD;&#x8981;&#xFF0C;&#x5305;&#x542B;&#x4E86;&#x722C;&#x53D6;&#x8FC7;&#x7A0B;&#x4E2D;&#x7684;&#x4E00;&#x7CFB;&#x5217;&#x51FD;&#x6570;
-&#x2502;
-&#x2514;&#x2500;views
-    &#x2502;  doc.ejs
-    &#x2502;  error.ejs
-    &#x2502;  index.ejs
-    &#x2502;
-    &#x2514;&#x2500;name_server
-            js.ejs
-</code></pre><hr>
-<h1 id="&#x7CFB;&#x7EDF;&#x793A;&#x610F;&#x56FE;">&#x7CFB;&#x7EDF;&#x793A;&#x610F;&#x56FE;</h1>
-<p><img src="../img/&#x56FE;1-2.jpg" alt="&#x56FE;&#x7247;"></p>
-<h1 id="&#x8BF7;&#x6C42;&#x4EE3;&#x7406;&#x793A;&#x610F;&#x56FE;">&#x8BF7;&#x6C42;&#x4EE3;&#x7406;&#x793A;&#x610F;&#x56FE;</h1>
-<p><img src="../img/&#x56FE;1-1.jpg" alt="&#x56FE;&#x7247;"></p>
-<h1 id="&#x53EF;&#x89C6;&#x5316;&#x6D41;&#x7A0B;&#x793A;&#x610F;&#x56FE;">&#x53EF;&#x89C6;&#x5316;&#x6D41;&#x7A0B;&#x793A;&#x610F;&#x56FE;</h1>
-<p><img src="../img/&#x56FE;1-3.jpg" alt="&#x56FE;&#x7247;"></p>
-
-                                
-                                </section>
-                            
-    </div>
-    <div class="search-results">
-        <div class="has-results">
-            
-            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
-            <ul class="search-results-list"></ul>
-            
-        </div>
-        <div class="no-results">
-            
-            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
-            
-        </div>
-    </div>
-</div>
-
-                        </div>
-                    </div>
-                
-            </div>
-
-            
-                
-                
-            
-        
-    </div>
-
-    <script>
-        var gitbook = gitbook || [];
-        gitbook.push(function() {
-            gitbook.page.hasChanged({"page":{"title":"目录","level":"1.3.1","depth":2,"next":{"title":"部署","level":"1.4","depth":1,"ref":"","articles":[{"title":"部署","level":"1.4.1","depth":2,"anchor":"#run","path":"run/README.md","ref":"run/README.md#run","articles":[]}]},"previous":{"title":"目录结构","level":"1.3","depth":1,"ref":"","articles":[{"title":"目录","level":"1.3.1","depth":2,"anchor":"#code","path":"code/README.md","ref":"code/README.md#code","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"code/README.md","mtime":"2018-10-10T06:52:47.360Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-10T09:36:34.980Z"},"basePath":"..","book":{"language":""}});
-        });
-    </script>
-</div>
-
-        
-    <script src="../gitbook/gitbook.js"></script>
-    <script src="../gitbook/theme.js"></script>
-    
-        
-        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
-        
-    
-
-    </body>
-</html>
-

BIN
_book/gitbook/fonts/fontawesome/FontAwesome.otf


BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot


File diff suppressed because it is too large
+ 0 - 196
_book/gitbook/fonts/fontawesome/fontawesome-webfont.svg


BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf


BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff


BIN
_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff2


+ 0 - 240
_book/gitbook/gitbook-plugin-fontsettings/fontsettings.js

@@ -1,240 +0,0 @@
-require(['gitbook', 'jquery'], function(gitbook, $) {
-    // Configuration
-    var MAX_SIZE       = 4,
-        MIN_SIZE       = 0,
-        BUTTON_ID;
-
-    // Current fontsettings state
-    var fontState;
-
-    // Default themes
-    var THEMES = [
-        {
-            config: 'white',
-            text: 'White',
-            id: 0
-        },
-        {
-            config: 'sepia',
-            text: 'Sepia',
-            id: 1
-        },
-        {
-            config: 'night',
-            text: 'Night',
-            id: 2
-        }
-    ];
-
-    // Default font families
-    var FAMILIES = [
-        {
-            config: 'serif',
-            text: 'Serif',
-            id: 0
-        },
-        {
-            config: 'sans',
-            text: 'Sans',
-            id: 1
-        }
-    ];
-
-    // Return configured themes
-    function getThemes() {
-        return THEMES;
-    }
-
-    // Modify configured themes
-    function setThemes(themes) {
-        THEMES = themes;
-        updateButtons();
-    }
-
-    // Return configured font families
-    function getFamilies() {
-        return FAMILIES;
-    }
-
-    // Modify configured font families
-    function setFamilies(families) {
-        FAMILIES = families;
-        updateButtons();
-    }
-
-    // Save current font settings
-    function saveFontSettings() {
-        gitbook.storage.set('fontState', fontState);
-        update();
-    }
-
-    // Increase font size
-    function enlargeFontSize(e) {
-        e.preventDefault();
-        if (fontState.size >= MAX_SIZE) return;
-
-        fontState.size++;
-        saveFontSettings();
-    }
-
-    // Decrease font size
-    function reduceFontSize(e) {
-        e.preventDefault();
-        if (fontState.size <= MIN_SIZE) return;
-
-        fontState.size--;
-        saveFontSettings();
-    }
-
-    // Change font family
-    function changeFontFamily(configName, e) {
-        if (e && e instanceof Event) {
-            e.preventDefault();
-        }
-
-        var familyId = getFontFamilyId(configName);
-        fontState.family = familyId;
-        saveFontSettings();
-    }
-
-    // Change type of color theme
-    function changeColorTheme(configName, e) {
-        if (e && e instanceof Event) {
-            e.preventDefault();
-        }
-
-        var $book = gitbook.state.$book;
-
-        // Remove currently applied color theme
-        if (fontState.theme !== 0)
-            $book.removeClass('color-theme-'+fontState.theme);
-
-        // Set new color theme
-        var themeId = getThemeId(configName);
-        fontState.theme = themeId;
-        if (fontState.theme !== 0)
-            $book.addClass('color-theme-'+fontState.theme);
-
-        saveFontSettings();
-    }
-
-    // Return the correct id for a font-family config key
-    // Default to first font-family
-    function getFontFamilyId(configName) {
-        // Search for plugin configured font family
-        var configFamily = $.grep(FAMILIES, function(family) {
-            return family.config == configName;
-        })[0];
-        // Fallback to default font family
-        return (!!configFamily)? configFamily.id : 0;
-    }
-
-    // Return the correct id for a theme config key
-    // Default to first theme
-    function getThemeId(configName) {
-        // Search for plugin configured theme
-        var configTheme = $.grep(THEMES, function(theme) {
-            return theme.config == configName;
-        })[0];
-        // Fallback to default theme
-        return (!!configTheme)? configTheme.id : 0;
-    }
-
-    function update() {
-        var $book = gitbook.state.$book;
-
-        $('.font-settings .font-family-list li').removeClass('active');
-        $('.font-settings .font-family-list li:nth-child('+(fontState.family+1)+')').addClass('active');
-
-        $book[0].className = $book[0].className.replace(/\bfont-\S+/g, '');
-        $book.addClass('font-size-'+fontState.size);
-        $book.addClass('font-family-'+fontState.family);
-
-        if(fontState.theme !== 0) {
-            $book[0].className = $book[0].className.replace(/\bcolor-theme-\S+/g, '');
-            $book.addClass('color-theme-'+fontState.theme);
-        }
-    }
-
-    function init(config) {
-        // Search for plugin configured font family
-        var configFamily = getFontFamilyId(config.family),
-            configTheme = getThemeId(config.theme);
-
-        // Instantiate font state object
-        fontState = gitbook.storage.get('fontState', {
-            size:   config.size || 2,
-            family: configFamily,
-            theme:  configTheme
-        });
-
-        update();
-    }
-
-    function updateButtons() {
-        // Remove existing fontsettings buttons
-        if (!!BUTTON_ID) {
-            gitbook.toolbar.removeButton(BUTTON_ID);
-        }
-
-        // Create buttons in toolbar
-        BUTTON_ID = gitbook.toolbar.createButton({
-            icon: 'fa fa-font',
-            label: 'Font Settings',
-            className: 'font-settings',
-            dropdown: [
-                [
-                    {
-                        text: 'A',
-                        className: 'font-reduce',
-                        onClick: reduceFontSize
-                    },
-                    {
-                        text: 'A',
-                        className: 'font-enlarge',
-                        onClick: enlargeFontSize
-                    }
-                ],
-                $.map(FAMILIES, function(family) {
-                    family.onClick = function(e) {
-                        return changeFontFamily(family.config, e);
-                    };
-
-                    return family;
-                }),
-                $.map(THEMES, function(theme) {
-                    theme.onClick = function(e) {
-                        return changeColorTheme(theme.config, e);
-                    };
-
-                    return theme;
-                })
-            ]
-        });
-    }
-
-    // Init configuration at start
-    gitbook.events.bind('start', function(e, config) {
-        var opts = config.fontsettings;
-
-        // Generate buttons at start
-        updateButtons();
-
-        // Init current settings
-        init(opts);
-    });
-
-    // Expose API
-    gitbook.fontsettings = {
-        enlargeFontSize: enlargeFontSize,
-        reduceFontSize:  reduceFontSize,
-        setTheme:        changeColorTheme,
-        setFamily:       changeFontFamily,
-        getThemes:       getThemes,
-        setThemes:       setThemes,
-        getFamilies:     getFamilies,
-        setFamilies:     setFamilies
-    };
-});
-
-

+ 0 - 291
_book/gitbook/gitbook-plugin-fontsettings/website.css

@@ -1,291 +0,0 @@
-/*
- * Theme 1
- */
-.color-theme-1 .dropdown-menu {
-  background-color: #111111;
-  border-color: #7e888b;
-}
-.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner {
-  border-bottom: 9px solid #111111;
-}
-.color-theme-1 .dropdown-menu .buttons {
-  border-color: #7e888b;
-}
-.color-theme-1 .dropdown-menu .button {
-  color: #afa790;
-}
-.color-theme-1 .dropdown-menu .button:hover {
-  color: #73553c;
-}
-/*
- * Theme 2
- */
-.color-theme-2 .dropdown-menu {
-  background-color: #2d3143;
-  border-color: #272a3a;
-}
-.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner {
-  border-bottom: 9px solid #2d3143;
-}
-.color-theme-2 .dropdown-menu .buttons {
-  border-color: #272a3a;
-}
-.color-theme-2 .dropdown-menu .button {
-  color: #62677f;
-}
-.color-theme-2 .dropdown-menu .button:hover {
-  color: #f4f4f5;
-}
-.book .book-header .font-settings .font-enlarge {
-  line-height: 30px;
-  font-size: 1.4em;
-}
-.book .book-header .font-settings .font-reduce {
-  line-height: 30px;
-  font-size: 1em;
-}
-.book.color-theme-1 .book-body {
-  color: #704214;
-  background: #f3eacb;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section {
-  background: #f3eacb;
-}
-.book.color-theme-2 .book-body {
-  color: #bdcadb;
-  background: #1c1f2b;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section {
-  background: #1c1f2b;
-}
-.book.font-size-0 .book-body .page-inner section {
-  font-size: 1.2rem;
-}
-.book.font-size-1 .book-body .page-inner section {
-  font-size: 1.4rem;
-}
-.book.font-size-2 .book-body .page-inner section {
-  font-size: 1.6rem;
-}
-.book.font-size-3 .book-body .page-inner section {
-  font-size: 2.2rem;
-}
-.book.font-size-4 .book-body .page-inner section {
-  font-size: 4rem;
-}
-.book.font-family-0 {
-  font-family: Georgia, serif;
-}
-.book.font-family-1 {
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal {
-  color: #704214;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal a {
-  color: inherit;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h3,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h4,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h5,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
-  color: inherit;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h1,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h2 {
-  border-color: inherit;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal h6 {
-  color: inherit;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal hr {
-  background-color: inherit;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal blockquote {
-  border-color: inherit;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
-  background: #fdf6e3;
-  color: #657b83;
-  border-color: #f8df9c;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal .highlight {
-  background-color: inherit;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table th,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table td {
-  border-color: #f5d06c;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr {
-  color: inherit;
-  background-color: #fdf6e3;
-  border-color: #444444;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
-  background-color: #fbeecb;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal {
-  color: #bdcadb;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal a {
-  color: #3eb1d0;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h3,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h4,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h5,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
-  color: #fffffa;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h1,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h2 {
-  border-color: #373b4e;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal h6 {
-  color: #373b4e;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal hr {
-  background-color: #373b4e;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal blockquote {
-  border-color: #373b4e;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
-  color: #9dbed8;
-  background: #2d3143;
-  border-color: #2d3143;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal .highlight {
-  background-color: #282a39;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table th,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table td {
-  border-color: #3b3f54;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr {
-  color: #b6c2d2;
-  background-color: #2d3143;
-  border-color: #3b3f54;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal table tr:nth-child(2n) {
-  background-color: #35394b;
-}
-.book.color-theme-1 .book-header {
-  color: #afa790;
-  background: transparent;
-}
-.book.color-theme-1 .book-header .btn {
-  color: #afa790;
-}
-.book.color-theme-1 .book-header .btn:hover {
-  color: #73553c;
-  background: none;
-}
-.book.color-theme-1 .book-header h1 {
-  color: #704214;
-}
-.book.color-theme-2 .book-header {
-  color: #7e888b;
-  background: transparent;
-}
-.book.color-theme-2 .book-header .btn {
-  color: #3b3f54;
-}
-.book.color-theme-2 .book-header .btn:hover {
-  color: #fffff5;
-  background: none;
-}
-.book.color-theme-2 .book-header h1 {
-  color: #bdcadb;
-}
-.book.color-theme-1 .book-body .navigation {
-  color: #afa790;
-}
-.book.color-theme-1 .book-body .navigation:hover {
-  color: #73553c;
-}
-.book.color-theme-2 .book-body .navigation {
-  color: #383f52;
-}
-.book.color-theme-2 .book-body .navigation:hover {
-  color: #fffff5;
-}
-/*
- * Theme 1
- */
-.book.color-theme-1 .book-summary {
-  color: #afa790;
-  background: #111111;
-  border-right: 1px solid rgba(0, 0, 0, 0.07);
-}
-.book.color-theme-1 .book-summary .book-search {
-  background: transparent;
-}
-.book.color-theme-1 .book-summary .book-search input,
-.book.color-theme-1 .book-summary .book-search input:focus {
-  border: 1px solid transparent;
-}
-.book.color-theme-1 .book-summary ul.summary li.divider {
-  background: #7e888b;
-  box-shadow: none;
-}
-.book.color-theme-1 .book-summary ul.summary li i.fa-check {
-  color: #33cc33;
-}
-.book.color-theme-1 .book-summary ul.summary li.done > a {
-  color: #877f6a;
-}
-.book.color-theme-1 .book-summary ul.summary li a,
-.book.color-theme-1 .book-summary ul.summary li span {
-  color: #877f6a;
-  background: transparent;
-  font-weight: normal;
-}
-.book.color-theme-1 .book-summary ul.summary li.active > a,
-.book.color-theme-1 .book-summary ul.summary li a:hover {
-  color: #704214;
-  background: transparent;
-  font-weight: normal;
-}
-/*
- * Theme 2
- */
-.book.color-theme-2 .book-summary {
-  color: #bcc1d2;
-  background: #2d3143;
-  border-right: none;
-}
-.book.color-theme-2 .book-summary .book-search {
-  background: transparent;
-}
-.book.color-theme-2 .book-summary .book-search input,
-.book.color-theme-2 .book-summary .book-search input:focus {
-  border: 1px solid transparent;
-}
-.book.color-theme-2 .book-summary ul.summary li.divider {
-  background: #272a3a;
-  box-shadow: none;
-}
-.book.color-theme-2 .book-summary ul.summary li i.fa-check {
-  color: #33cc33;
-}
-.book.color-theme-2 .book-summary ul.summary li.done > a {
-  color: #62687f;
-}
-.book.color-theme-2 .book-summary ul.summary li a,
-.book.color-theme-2 .book-summary ul.summary li span {
-  color: #c1c6d7;
-  background: transparent;
-  font-weight: 600;
-}
-.book.color-theme-2 .book-summary ul.summary li.active > a,
-.book.color-theme-2 .book-summary ul.summary li a:hover {
-  color: #f4f4f5;
-  background: #252737;
-  font-weight: 600;
-}

+ 0 - 135
_book/gitbook/gitbook-plugin-highlight/ebook.css

@@ -1,135 +0,0 @@
-pre,
-code {
-  /* http://jmblog.github.io/color-themes-for-highlightjs */
-  /* Tomorrow Comment */
-  /* Tomorrow Red */
-  /* Tomorrow Orange */
-  /* Tomorrow Yellow */
-  /* Tomorrow Green */
-  /* Tomorrow Aqua */
-  /* Tomorrow Blue */
-  /* Tomorrow Purple */
-}
-pre .hljs-comment,
-code .hljs-comment,
-pre .hljs-title,
-code .hljs-title {
-  color: #8e908c;
-}
-pre .hljs-variable,
-code .hljs-variable,
-pre .hljs-attribute,
-code .hljs-attribute,
-pre .hljs-tag,
-code .hljs-tag,
-pre .hljs-regexp,
-code .hljs-regexp,
-pre .hljs-deletion,
-code .hljs-deletion,
-pre .ruby .hljs-constant,
-code .ruby .hljs-constant,
-pre .xml .hljs-tag .hljs-title,
-code .xml .hljs-tag .hljs-title,
-pre .xml .hljs-pi,
-code .xml .hljs-pi,
-pre .xml .hljs-doctype,
-code .xml .hljs-doctype,
-pre .html .hljs-doctype,
-code .html .hljs-doctype,
-pre .css .hljs-id,
-code .css .hljs-id,
-pre .css .hljs-class,
-code .css .hljs-class,
-pre .css .hljs-pseudo,
-code .css .hljs-pseudo {
-  color: #c82829;
-}
-pre .hljs-number,
-code .hljs-number,
-pre .hljs-preprocessor,
-code .hljs-preprocessor,
-pre .hljs-pragma,
-code .hljs-pragma,
-pre .hljs-built_in,
-code .hljs-built_in,
-pre .hljs-literal,
-code .hljs-literal,
-pre .hljs-params,
-code .hljs-params,
-pre .hljs-constant,
-code .hljs-constant {
-  color: #f5871f;
-}
-pre .ruby .hljs-class .hljs-title,
-code .ruby .hljs-class .hljs-title,
-pre .css .hljs-rules .hljs-attribute,
-code .css .hljs-rules .hljs-attribute {
-  color: #eab700;
-}
-pre .hljs-string,
-code .hljs-string,
-pre .hljs-value,
-code .hljs-value,
-pre .hljs-inheritance,
-code .hljs-inheritance,
-pre .hljs-header,
-code .hljs-header,
-pre .hljs-addition,
-code .hljs-addition,
-pre .ruby .hljs-symbol,
-code .ruby .hljs-symbol,
-pre .xml .hljs-cdata,
-code .xml .hljs-cdata {
-  color: #718c00;
-}
-pre .css .hljs-hexcolor,
-code .css .hljs-hexcolor {
-  color: #3e999f;
-}
-pre .hljs-function,
-code .hljs-function,
-pre .python .hljs-decorator,
-code .python .hljs-decorator,
-pre .python .hljs-title,
-code .python .hljs-title,
-pre .ruby .hljs-function .hljs-title,
-code .ruby .hljs-function .hljs-title,
-pre .ruby .hljs-title .hljs-keyword,
-code .ruby .hljs-title .hljs-keyword,
-pre .perl .hljs-sub,
-code .perl .hljs-sub,
-pre .javascript .hljs-title,
-code .javascript .hljs-title,
-pre .coffeescript .hljs-title,
-code .coffeescript .hljs-title {
-  color: #4271ae;
-}
-pre .hljs-keyword,
-code .hljs-keyword,
-pre .javascript .hljs-function,
-code .javascript .hljs-function {
-  color: #8959a8;
-}
-pre .hljs,
-code .hljs {
-  display: block;
-  background: white;
-  color: #4d4d4c;
-  padding: 0.5em;
-}
-pre .coffeescript .javascript,
-code .coffeescript .javascript,
-pre .javascript .xml,
-code .javascript .xml,
-pre .tex .hljs-formula,
-code .tex .hljs-formula,
-pre .xml .javascript,
-code .xml .javascript,
-pre .xml .vbscript,
-code .xml .vbscript,
-pre .xml .css,
-code .xml .css,
-pre .xml .hljs-cdata,
-code .xml .hljs-cdata {
-  opacity: 0.5;
-}

+ 0 - 434
_book/gitbook/gitbook-plugin-highlight/website.css

@@ -1,434 +0,0 @@
-.book .book-body .page-wrapper .page-inner section.normal pre,
-.book .book-body .page-wrapper .page-inner section.normal code {
-  /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-  /* Tomorrow Comment */
-  /* Tomorrow Red */
-  /* Tomorrow Orange */
-  /* Tomorrow Yellow */
-  /* Tomorrow Green */
-  /* Tomorrow Aqua */
-  /* Tomorrow Blue */
-  /* Tomorrow Purple */
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-title {
-  color: #8e908c;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
-.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
-.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
-.book .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
-.book .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
-.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
-.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
-.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
-.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
-.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
-.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
-  color: #c82829;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-number,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-params,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
-  color: #f5871f;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
-.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
-  color: #eab700;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-string,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-value,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-header,
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
-.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
-.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
-  color: #718c00;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
-.book .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
-  color: #3e999f;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-function,
-.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
-.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
-.book .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
-.book .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
-.book .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
-.book .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
-.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
-.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
-  color: #4271ae;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
-.book .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
-.book .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
-  color: #8959a8;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .hljs,
-.book .book-body .page-wrapper .page-inner section.normal code .hljs {
-  display: block;
-  background: white;
-  color: #4d4d4c;
-  padding: 0.5em;
-}
-.book .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
-.book .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
-.book .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
-.book .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
-.book .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
-.book .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .css,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .css,
-.book .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
-.book .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
-  opacity: 0.5;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
-  /*
-
-Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
-
-*/
-  /* Solarized Green */
-  /* Solarized Cyan */
-  /* Solarized Blue */
-  /* Solarized Yellow */
-  /* Solarized Orange */
-  /* Solarized Red */
-  /* Solarized Violet */
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs {
-  display: block;
-  padding: 0.5em;
-  background: #fdf6e3;
-  color: #657b83;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-template_comment,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-template_comment,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-header,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-header,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-doctype,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-doctype,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pi,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pi,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-string,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-string,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-javadoc,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-javadoc {
-  color: #93a1a1;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-winutils,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-winutils,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .method,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .method,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-tag,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-tag,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-request,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-request,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-status,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-status,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .nginx .hljs-title,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .nginx .hljs-title {
-  color: #859900;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-command,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-command,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag .hljs-value,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-tag .hljs-value,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-rules .hljs-value,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-rules .hljs-value,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-phpdoc,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-phpdoc,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-hexcolor,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-hexcolor,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_url,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_url {
-  color: #2aa198;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-title,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-localvars,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-localvars,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-chunk,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-chunk,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-decorator,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-decorator,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-identifier,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-identifier,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .vhdl .hljs-literal,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .vhdl .hljs-literal,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-id,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-id,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-function,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-function {
-  color: #268bd2;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .lisp .hljs-body,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .lisp .hljs-body,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .smalltalk .hljs-number,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .smalltalk .hljs-number,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-constant,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-class .hljs-title,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-class .hljs-title,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-parent,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-parent,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .haskell .hljs-type,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .haskell .hljs-type,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_reference,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_reference {
-  color: #b58900;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor .hljs-keyword,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor .hljs-keyword,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-shebang,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-shebang,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-symbol .hljs-string,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-symbol .hljs-string,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .diff .hljs-change,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .diff .hljs-change,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-special,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-special,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-attr_selector,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-attr_selector,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-subst,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-subst,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-cdata,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-cdata,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .clojure .hljs-title,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .clojure .hljs-title,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-header {
-  color: #cb4b16;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-important,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-important {
-  color: #dc322f;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .hljs-link_label,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .hljs-link_label {
-  color: #6c71c4;
-}
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
-.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula {
-  background: #eee8d5;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code {
-  /* Tomorrow Night Bright Theme */
-  /* Original theme - https://github.com/chriskempson/tomorrow-theme */
-  /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-  /* Tomorrow Comment */
-  /* Tomorrow Red */
-  /* Tomorrow Orange */
-  /* Tomorrow Yellow */
-  /* Tomorrow Green */
-  /* Tomorrow Aqua */
-  /* Tomorrow Blue */
-  /* Tomorrow Purple */
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-comment,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-comment,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-title {
-  color: #969896;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-variable,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-variable,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-attribute,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-attribute,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-tag,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-tag,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-regexp,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-regexp,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-deletion,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-deletion,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-constant,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-constant,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-tag .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-tag .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-pi,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-pi,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-doctype,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-doctype,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .html .hljs-doctype,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .html .hljs-doctype,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-id,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-id,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-class,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-class,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-pseudo,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-pseudo {
-  color: #d54e53;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-number,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-number,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-preprocessor,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-preprocessor,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-pragma,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-pragma,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-built_in,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-built_in,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-literal,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-literal,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-params,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-params,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-constant,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-constant {
-  color: #e78c45;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-class .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-class .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-rules .hljs-attribute,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-rules .hljs-attribute {
-  color: #e7c547;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-string,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-string,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-value,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-value,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-inheritance,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-inheritance,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-header,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-header,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-addition,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-addition,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-symbol,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-symbol,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
-  color: #b9ca4a;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .css .hljs-hexcolor,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .css .hljs-hexcolor {
-  color: #70c0b1;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-function,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-function,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-decorator,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-decorator,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .python .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .python .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-function .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-function .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .ruby .hljs-title .hljs-keyword,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .ruby .hljs-title .hljs-keyword,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .perl .hljs-sub,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .perl .hljs-sub,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .hljs-title,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .hljs-title {
-  color: #7aa6da;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs-keyword,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs-keyword,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .hljs-function,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .hljs-function {
-  color: #c397d8;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .hljs,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .hljs {
-  display: block;
-  background: black;
-  color: #eaeaea;
-  padding: 0.5em;
-}
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .coffeescript .javascript,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .coffeescript .javascript,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .javascript .xml,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .javascript .xml,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .tex .hljs-formula,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .tex .hljs-formula,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .javascript,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .javascript,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .vbscript,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .vbscript,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .css,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .css,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal pre .xml .hljs-cdata,
-.book.color-theme-2 .book-body .page-wrapper .page-inner section.normal code .xml .hljs-cdata {
-  opacity: 0.5;
-}

+ 0 - 11
_book/gitbook/gitbook-plugin-livereload/plugin.js

@@ -1,11 +0,0 @@
-(function() {
-  var newEl = document.createElement('script'),
-      firstScriptTag = document.getElementsByTagName('script')[0];
-
-  if (firstScriptTag) {
-    newEl.async = 1;
-    newEl.src = '//' + window.location.hostname + ':35729/livereload.js';
-    firstScriptTag.parentNode.insertBefore(newEl, firstScriptTag);
-  }
-
-})();

File diff suppressed because it is too large
+ 0 - 6
_book/gitbook/gitbook-plugin-lunr/lunr.min.js


+ 0 - 59
_book/gitbook/gitbook-plugin-lunr/search-lunr.js

@@ -1,59 +0,0 @@
-require([
-    'gitbook',
-    'jquery'
-], function(gitbook, $) {
-    // Define global search engine
-    function LunrSearchEngine() {
-        this.index = null;
-        this.store = {};
-        this.name = 'LunrSearchEngine';
-    }
-
-    // Initialize lunr by fetching the search index
-    LunrSearchEngine.prototype.init = function() {
-        var that = this;
-        var d = $.Deferred();
-
-        $.getJSON(gitbook.state.basePath+'/search_index.json')
-        .then(function(data) {
-            // eslint-disable-next-line no-undef
-            that.index = lunr.Index.load(data.index);
-            that.store = data.store;
-            d.resolve();
-        });
-
-        return d.promise();
-    };
-
-    // Search for a term and return results
-    LunrSearchEngine.prototype.search = function(q, offset, length) {
-        var that = this;
-        var results = [];
-
-        if (this.index) {
-            results = $.map(this.index.search(q), function(result) {
-                var doc = that.store[result.ref];
-
-                return {
-                    title: doc.title,
-                    url: doc.url,
-                    body: doc.summary || doc.body
-                };
-            });
-        }
-
-        return $.Deferred().resolve({
-            query: q,
-            results: results.slice(0, length),
-            count: results.length
-        }).promise();
-    };
-
-    // Set gitbook research
-    gitbook.events.bind('start', function(e, config) {
-        var engine = gitbook.search.getEngine();
-        if (!engine) {
-            gitbook.search.setEngine(LunrSearchEngine, config);
-        }
-    });
-});

File diff suppressed because it is too large
+ 0 - 6
_book/gitbook/gitbook-plugin-search/lunr.min.js


+ 0 - 50
_book/gitbook/gitbook-plugin-search/search-engine.js

@@ -1,50 +0,0 @@
-require([
-    'gitbook',
-    'jquery'
-], function(gitbook, $) {
-    // Global search objects
-    var engine      = null;
-    var initialized = false;
-
-    // Set a new search engine
-    function setEngine(Engine, config) {
-        initialized = false;
-        engine      = new Engine(config);
-
-        init(config);
-    }
-
-    // Initialize search engine with config
-    function init(config) {
-        if (!engine) throw new Error('No engine set for research. Set an engine using gitbook.research.setEngine(Engine).');
-
-        return engine.init(config)
-        .then(function() {
-            initialized = true;
-            gitbook.events.trigger('search.ready');
-        });
-    }
-
-    // Launch search for query q
-    function query(q, offset, length) {
-        if (!initialized) throw new Error('Search has not been initialized');
-        return engine.search(q, offset, length);
-    }
-
-    // Get stats about search
-    function getEngine() {
-        return engine? engine.name : null;
-    }
-
-    function isInitialized() {
-        return initialized;
-    }
-
-    // Initialize gitbook.search
-    gitbook.search = {
-        setEngine:     setEngine,
-        getEngine:     getEngine,
-        query:         query,
-        isInitialized: isInitialized
-    };
-});

+ 0 - 35
_book/gitbook/gitbook-plugin-search/search.css

@@ -1,35 +0,0 @@
-/*
-    This CSS only styled the search results section, not the search input
-    It defines the basic interraction to hide content when displaying results, etc
-*/
-#book-search-results .search-results {
-  display: none;
-}
-#book-search-results .search-results ul.search-results-list {
-  list-style-type: none;
-  padding-left: 0;
-}
-#book-search-results .search-results ul.search-results-list li {
-  margin-bottom: 1.5rem;
-  padding-bottom: 0.5rem;
-  /* Highlight results */
-}
-#book-search-results .search-results ul.search-results-list li p em {
-  background-color: rgba(255, 220, 0, 0.4);
-  font-style: normal;
-}
-#book-search-results .search-results .no-results {
-  display: none;
-}
-#book-search-results.open .search-results {
-  display: block;
-}
-#book-search-results.open .search-noresults {
-  display: none;
-}
-#book-search-results.no-results .search-results .has-results {
-  display: none;
-}
-#book-search-results.no-results .search-results .no-results {
-  display: block;
-}

+ 0 - 213
_book/gitbook/gitbook-plugin-search/search.js

@@ -1,213 +0,0 @@
-require([
-    'gitbook',
-    'jquery'
-], function(gitbook, $) {
-    var MAX_RESULTS = 15;
-    var MAX_DESCRIPTION_SIZE = 500;
-
-    var usePushState = (typeof history.pushState !== 'undefined');
-
-    // DOM Elements
-    var $body = $('body');
-    var $bookSearchResults;
-    var $searchInput;
-    var $searchList;
-    var $searchTitle;
-    var $searchResultsCount;
-    var $searchQuery;
-
-    // Throttle search
-    function throttle(fn, wait) {
-        var timeout;
-
-        return function() {
-            var ctx = this, args = arguments;
-            if (!timeout) {
-                timeout = setTimeout(function() {
-                    timeout = null;
-                    fn.apply(ctx, args);
-                }, wait);
-            }
-        };
-    }
-
-    function displayResults(res) {
-        $bookSearchResults.addClass('open');
-
-        var noResults = res.count == 0;
-        $bookSearchResults.toggleClass('no-results', noResults);
-
-        // Clear old results
-        $searchList.empty();
-
-        // Display title for research
-        $searchResultsCount.text(res.count);
-        $searchQuery.text(res.query);
-
-        // Create an <li> element for each result
-        res.results.forEach(function(res) {
-            var $li = $('<li>', {
-                'class': 'search-results-item'
-            });
-
-            var $title = $('<h3>');
-
-            var $link = $('<a>', {
-                'href': gitbook.state.basePath + '/' + res.url,
-                'text': res.title
-            });
-
-            var content = res.body.trim();
-            if (content.length > MAX_DESCRIPTION_SIZE) {
-                content = content.slice(0, MAX_DESCRIPTION_SIZE).trim()+'...';
-            }
-            var $content = $('<p>').html(content);
-
-            $link.appendTo($title);
-            $title.appendTo($li);
-            $content.appendTo($li);
-            $li.appendTo($searchList);
-        });
-    }
-
-    function launchSearch(q) {
-        // Add class for loading
-        $body.addClass('with-search');
-        $body.addClass('search-loading');
-
-        // Launch search query
-        throttle(gitbook.search.query(q, 0, MAX_RESULTS)
-        .then(function(results) {
-            displayResults(results);
-        })
-        .always(function() {
-            $body.removeClass('search-loading');
-        }), 1000);
-    }
-
-    function closeSearch() {
-        $body.removeClass('with-search');
-        $bookSearchResults.removeClass('open');
-    }
-
-    function launchSearchFromQueryString() {
-        var q = getParameterByName('q');
-        if (q && q.length > 0) {
-            // Update search input
-            $searchInput.val(q);
-
-            // Launch search
-            launchSearch(q);
-        }
-    }
-
-    function bindSearch() {
-        // Bind DOM
-        $searchInput        = $('#book-search-input input');
-        $bookSearchResults  = $('#book-search-results');
-        $searchList         = $bookSearchResults.find('.search-results-list');
-        $searchTitle        = $bookSearchResults.find('.search-results-title');
-        $searchResultsCount = $searchTitle.find('.search-results-count');
-        $searchQuery        = $searchTitle.find('.search-query');
-
-        // Launch query based on input content
-        function handleUpdate() {
-            var q = $searchInput.val();
-
-            if (q.length == 0) {
-                closeSearch();
-            }
-            else {
-                launchSearch(q);
-            }
-        }
-
-        // Detect true content change in search input
-        // Workaround for IE < 9
-        var propertyChangeUnbound = false;
-        $searchInput.on('propertychange', function(e) {
-            if (e.originalEvent.propertyName == 'value') {
-                handleUpdate();
-            }
-        });
-
-        // HTML5 (IE9 & others)
-        $searchInput.on('input', function(e) {
-            // Unbind propertychange event for IE9+
-            if (!propertyChangeUnbound) {
-                $(this).unbind('propertychange');
-                propertyChangeUnbound = true;
-            }
-
-            handleUpdate();
-        });
-
-        // Push to history on blur
-        $searchInput.on('blur', function(e) {
-            // Update history state
-            if (usePushState) {
-                var uri = updateQueryString('q', $(this).val());
-                history.pushState({ path: uri }, null, uri);
-            }
-        });
-    }
-
-    gitbook.events.on('page.change', function() {
-        bindSearch();
-        closeSearch();
-
-        // Launch search based on query parameter
-        if (gitbook.search.isInitialized()) {
-            launchSearchFromQueryString();
-        }
-    });
-
-    gitbook.events.on('search.ready', function() {
-        bindSearch();
-
-        // Launch search from query param at start
-        launchSearchFromQueryString();
-    });
-
-    function getParameterByName(name) {
-        var url = window.location.href;
-        name = name.replace(/[\[\]]/g, '\\$&');
-        var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', 'i'),
-            results = regex.exec(url);
-        if (!results) return null;
-        if (!results[2]) return '';
-        return decodeURIComponent(results[2].replace(/\+/g, ' '));
-    }
-
-    function updateQueryString(key, value) {
-        value = encodeURIComponent(value);
-
-        var url = window.location.href;
-        var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'),
-            hash;
-
-        if (re.test(url)) {
-            if (typeof value !== 'undefined' && value !== null)
-                return url.replace(re, '$1' + key + '=' + value + '$2$3');
-            else {
-                hash = url.split('#');
-                url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, '');
-                if (typeof hash[1] !== 'undefined' && hash[1] !== null)
-                    url += '#' + hash[1];
-                return url;
-            }
-        }
-        else {
-            if (typeof value !== 'undefined' && value !== null) {
-                var separator = url.indexOf('?') !== -1 ? '&' : '?';
-                hash = url.split('#');
-                url = hash[0] + separator + key + '=' + value;
-                if (typeof hash[1] !== 'undefined' && hash[1] !== null)
-                    url += '#' + hash[1];
-                return url;
-            }
-            else
-                return url;
-        }
-    }
-});

+ 0 - 90
_book/gitbook/gitbook-plugin-sharing/buttons.js

@@ -1,90 +0,0 @@
-require(['gitbook', 'jquery'], function(gitbook, $) {
-    var SITES = {
-        'facebook': {
-            'label': 'Facebook',
-            'icon': 'fa fa-facebook',
-            'onClick': function(e) {
-                e.preventDefault();
-                window.open('http://www.facebook.com/sharer/sharer.php?s=100&p[url]='+encodeURIComponent(location.href));
-            }
-        },
-        'twitter': {
-            'label': 'Twitter',
-            'icon': 'fa fa-twitter',
-            'onClick': function(e) {
-                e.preventDefault();
-                window.open('http://twitter.com/home?status='+encodeURIComponent(document.title+' '+location.href));
-            }
-        },
-        'google': {
-            'label': 'Google+',
-            'icon': 'fa fa-google-plus',
-            'onClick': function(e) {
-                e.preventDefault();
-                window.open('https://plus.google.com/share?url='+encodeURIComponent(location.href));
-            }
-        },
-        'weibo': {
-            'label': 'Weibo',
-            'icon': 'fa fa-weibo',
-            'onClick': function(e) {
-                e.preventDefault();
-                window.open('http://service.weibo.com/share/share.php?content=utf-8&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title));
-            }
-        },
-        'instapaper': {
-            'label': 'Instapaper',
-            'icon': 'fa fa-instapaper',
-            'onClick': function(e) {
-                e.preventDefault();
-                window.open('http://www.instapaper.com/text?u='+encodeURIComponent(location.href));
-            }
-        },
-        'vk': {
-            'label': 'VK',
-            'icon': 'fa fa-vk',
-            'onClick': function(e) {
-                e.preventDefault();
-                window.open('http://vkontakte.ru/share.php?url='+encodeURIComponent(location.href));
-            }
-        }
-    };
-
-
-
-    gitbook.events.bind('start', function(e, config) {
-        var opts = config.sharing;
-
-        // Create dropdown menu
-        var menu = $.map(opts.all, function(id) {
-            var site = SITES[id];
-
-            return {
-                text: site.label,
-                onClick: site.onClick
-            };
-        });
-
-        // Create main button with dropdown
-        if (menu.length > 0) {
-            gitbook.toolbar.createButton({
-                icon: 'fa fa-share-alt',
-                label: 'Share',
-                position: 'right',
-                dropdown: [menu]
-            });
-        }
-
-        // Direct actions to share
-        $.each(SITES, function(sideId, site) {
-            if (!opts[sideId]) return;
-
-            gitbook.toolbar.createButton({
-                icon: site.icon,
-                label: site.text,
-                position: 'right',
-                onClick: site.onClick
-            });
-        });
-    });
-});

File diff suppressed because it is too large
+ 0 - 0
_book/gitbook/gitbook.js


BIN
_book/gitbook/images/apple-touch-icon-precomposed-152.png


BIN
_book/gitbook/images/favicon.ico


File diff suppressed because it is too large
+ 0 - 0
_book/gitbook/style.css


File diff suppressed because it is too large
+ 0 - 0
_book/gitbook/theme.js


BIN
_book/img/图1-1.jpg


BIN
_book/img/图1-2.jpg


BIN
_book/img/图1-3.jpg


BIN
_book/img/图2-1.jpg


BIN
_book/img/图3-1.jpg


BIN
_book/img/图3-2.jpg


BIN
_book/img/图3-3.jpg


BIN
_book/img/图4-1.jpg


BIN
_book/img/图4-2.jpg


BIN
_book/img/图4-3.jpg


BIN
_book/img/图4-4.jpg


BIN
_book/img/图4-5.jpg


BIN
_book/img/图4-6.jpg


BIN
_book/img/图4-7.jpg


+ 0 - 416
_book/index.html

@@ -1,416 +0,0 @@
-
-<!DOCTYPE HTML>
-<html lang="" >
-    <head>
-        <meta charset="UTF-8">
-        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
-        <title>简介 · GitBook</title>
-        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-        <meta name="description" content="">
-        <meta name="generator" content="GitBook 3.2.3">
-        
-        
-        
-    
-    <link rel="stylesheet" href="gitbook/style.css">
-
-    
-            
-                
-                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
-                
-            
-                
-                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
-                
-            
-                
-                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
-                
-            
-        
-
-    
-
-    
-        
-    
-        
-    
-        
-    
-        
-    
-        
-    
-        
-    
-
-        
-    
-    
-    <meta name="HandheldFriendly" content="true"/>
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
-    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
-
-    
-    
-
-    </head>
-    <body>
-        
-<div class="book">
-    <div class="book-summary">
-        
-            
-<div id="book-search-input" role="search">
-    <input type="text" placeholder="Type to search" />
-</div>
-
-            
-                <nav role="navigation">
-                
-
-
-<ul class="summary">
-    
-    
-
-    
-
-    
-        
-        
-    
-        <li class="chapter active" data-level="1.1" data-path="./">
-            
-                <a href="./">
-            
-                    
-                    简介
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.2" >
-            
-                <span>
-            
-                    
-                    安装以及配置
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.2.1" data-path="install/">
-            
-                <a href="install/#install">
-            
-                    
-                    安装
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.2.2" data-path="install/">
-            
-                <a href="install/#config">
-            
-                    
-                    配置
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.3" >
-            
-                <span>
-            
-                    
-                    目录结构
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.3.1" data-path="code/">
-            
-                <a href="code/#code">
-            
-                    
-                    目录
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.4" >
-            
-                <span>
-            
-                    
-                    部署
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.4.1" data-path="run/">
-            
-                <a href="run/#run">
-            
-                    
-                    部署
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5" >
-            
-                <span>
-            
-                    
-                    使用
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.5.1" data-path="use/">
-            
-                <a href="use/#规则">
-            
-                    
-                    新建规则
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.2" data-path="use/">
-            
-                <a href="use/#选择器">
-            
-                    
-                    选择器
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.3" data-path="use/">
-            
-                <a href="use/#配置库表">
-            
-                    
-                    配置库表
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.4" data-path="use/">
-            
-                <a href="use/#任务">
-            
-                    
-                    任务
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.5" data-path="use/">
-            
-                <a href="use/#调试">
-            
-                    
-                    调试
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-
-    
-
-    <li class="divider"></li>
-
-    <li>
-        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
-            Published with GitBook
-        </a>
-    </li>
-</ul>
-
-
-                </nav>
-            
-        
-    </div>
-
-    <div class="book-body">
-        
-            <div class="body-inner">
-                
-                    
-
-<div class="book-header" role="navigation">
-    
-
-    <!-- Title -->
-    <h1>
-        <i class="fa fa-circle-o-notch fa-spin"></i>
-        <a href="." >简介</a>
-    </h1>
-</div>
-
-
-
-
-                    <div class="page-wrapper" tabindex="-1" role="main">
-                        <div class="page-inner">
-                            
-<div id="book-search-results">
-    <div class="search-noresults">
-    
-                                <section class="normal markdown-section">
-                                
-                                <h1 id="&#x591A;&#x73A9;&#x53EF;&#x89C6;&#x5316;&#x722C;&#x866B;&#x7CFB;&#x7EDF;">&#x591A;&#x73A9;&#x53EF;&#x89C6;&#x5316;&#x722C;&#x866B;&#x7CFB;&#x7EDF;</h1>
-<p>&#x57FA;&#x4E8E;nodejs&#x7684;&#x53EF;&#x89C6;&#x5316;&#x722C;&#x866B;&#xFF0C;&#x6EE1;&#x8DB3;&#x5927;&#x90E8;&#x5206;&#x7F51;&#x7AD9;&#x7684;&#x722C;&#x53D6;&#x9700;&#x6C42;&#xFF0C;&#x53EF;&#x89C6;&#x5316;&#x7F16;&#x5199;&#x7F51;&#x9875;&#x91C7;&#x96C6;&#x8FC7;&#x6EE4;&#x5668;&#xFF0C;&#x6839;&#x636E;&#x8BBE;&#x7F6E;&#x722C;&#x53D6;&#x89C4;&#x5219;&#x81EA;&#x5B9A;&#x4E49;&#x722C;&#x53D6;&#x987A;&#x5E8F;&#xFF0C;&#x56FE;&#x7247;&#x7B49;&#x8D44;&#x6E90;&#x53EF;&#x8F6C;&#x5B58;&#x3002;</p>
-
-                                
-                                </section>
-                            
-    </div>
-    <div class="search-results">
-        <div class="has-results">
-            
-            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
-            <ul class="search-results-list"></ul>
-            
-        </div>
-        <div class="no-results">
-            
-            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
-            
-        </div>
-    </div>
-</div>
-
-                        </div>
-                    </div>
-                
-            </div>
-
-            
-                
-                
-            
-        
-    </div>
-
-    <script>
-        var gitbook = gitbook || [];
-        gitbook.push(function() {
-            gitbook.page.hasChanged({"page":{"title":"简介","level":"1.1","depth":1,"next":{"title":"安装以及配置","level":"1.2","depth":1,"ref":"","articles":[{"title":"安装","level":"1.2.1","depth":2,"anchor":"#install","path":"install/README.md","ref":"install/README.md#install","articles":[]},{"title":"配置","level":"1.2.2","depth":2,"anchor":"#config","path":"install/README.md","ref":"install/README.md#config","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"README.md","mtime":"2018-10-09T09:29:15.034Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-10T09:36:34.980Z"},"basePath":".","book":{"language":""}});
-        });
-    </script>
-</div>
-
-        
-    <script src="gitbook/gitbook.js"></script>
-    <script src="gitbook/theme.js"></script>
-    
-        
-        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
-        
-    
-        
-        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
-        
-    
-        
-        <script src="gitbook/gitbook-plugin-search/search.js"></script>
-        
-    
-        
-        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
-        
-    
-        
-        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
-        
-    
-        
-        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
-        
-    
-        
-        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
-        
-    
-
-    </body>
-</html>
-

+ 0 - 74
_book/install/README.md

@@ -1,74 +0,0 @@
-#install
-
-安装node相关依赖,node要求v8.0以上
-```
-npm install
-```
-如果pupperteer安装出现问题,请参考如下
-```
-安装 1.15.0 版本的 puppeteer
-1.
-下载安装包
-https://github.com/GoogleChrome/puppeteer/releases
-
-2.这里的路径根据项目地址来
-安装包解压到/data/webapps/test.spider.duowan.com/protected/node_modules目录下的puppeteer
-
-3.
-进入puppeteer
-执行:
-sudo npm install -d package.json  安装好依赖模块
-sudo node install.js              安装puppeteer 服务(这个命令会自己安装chromium)
-
-缺什么模块用 sudo npm install 模块名
-```
-
-
-#config
-配置项目
-
-* 设置端口
-  /protected/conf/config.${env}.inc.js	其中 ${env} 是环境,分别为 dev-开发,form-正式
-```
-process.env.PORT = 端口号;
-```
-
-* 配置数据库
-  /protected/conf/config.${env}.inc.js
-
-```
-let dbInfo = {};
-//数据库配置
-dbInfo['Web'] = {
-    host : '61.160.36.225',
-    user : 'ojiatest',
-    password : 'ojia305',
-    database : 'Web',
-    port : 3306,
-    connectionLimit : 100
-};
-
-//redis配置
-let redisInfo = {};
-redisInfo['name_serv'] = {
-    'host' : '61.160.36.225',
-    'port' : 6405,
-    'pwd' : 'ojia123',
-    'db' : 1,
-    'connet_timeout' : 0
-};
-```
-
-**需要注意的是名字服务器发布后,会自动更新到 /protected/conf/conf_ns ,但是需要重启node进程,否则不会生效**
-
-
-
-* 代理
-  爬虫需要代理池,所有的代理ip获取都是通过访问 cjms 管理后台的接口:/protected/models/ProxyPool.js
-
-   
-
-     1.获取ip列表:getXProxyList()
-     2.获取某个域名效果最好的代理:getXProxyBest(domain)
-     3.每次上报使用的代理好坏情况:reportProxy(domain, proxy, score)
-

+ 0 - 478
_book/install/index.html

@@ -1,478 +0,0 @@
-
-<!DOCTYPE HTML>
-<html lang="" >
-    <head>
-        <meta charset="UTF-8">
-        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
-        <title>安装 · GitBook</title>
-        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-        <meta name="description" content="">
-        <meta name="generator" content="GitBook 3.2.3">
-        
-        
-        
-    
-    <link rel="stylesheet" href="../gitbook/style.css">
-
-    
-            
-                
-                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
-                
-            
-                
-                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
-                
-            
-                
-                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
-                
-            
-        
-
-    
-
-    
-        
-    
-        
-    
-        
-    
-        
-    
-        
-    
-        
-    
-
-        
-    
-    
-    <meta name="HandheldFriendly" content="true"/>
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-    <meta name="apple-mobile-web-app-capable" content="yes">
-    <meta name="apple-mobile-web-app-status-bar-style" content="black">
-    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
-    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
-
-    
-    <link rel="next" href="./" />
-    
-    
-
-    </head>
-    <body>
-        
-<div class="book">
-    <div class="book-summary">
-        
-            
-<div id="book-search-input" role="search">
-    <input type="text" placeholder="Type to search" />
-</div>
-
-            
-                <nav role="navigation">
-                
-
-
-<ul class="summary">
-    
-    
-
-    
-
-    
-        
-        
-    
-        <li class="chapter " data-level="1.1" data-path="../">
-            
-                <a href="../">
-            
-                    
-                    简介
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.2" >
-            
-                <span>
-            
-                    
-                    安装以及配置
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.2.1" data-path="./">
-            
-                <a href="./#install">
-            
-                    
-                    安装
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.2.2" data-path="./">
-            
-                <a href="./#config">
-            
-                    
-                    配置
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.3" >
-            
-                <span>
-            
-                    
-                    目录结构
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.3.1" data-path="../code/">
-            
-                <a href="../code/#code">
-            
-                    
-                    目录
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.4" >
-            
-                <span>
-            
-                    
-                    部署
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.4.1" data-path="../run/">
-            
-                <a href="../run/#run">
-            
-                    
-                    部署
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5" >
-            
-                <span>
-            
-                    
-                    使用
-            
-                </span>
-            
-
-            
-            <ul class="articles">
-                
-    
-        <li class="chapter " data-level="1.5.1" data-path="../use/">
-            
-                <a href="../use/#规则">
-            
-                    
-                    新建规则
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.2" data-path="../use/">
-            
-                <a href="../use/#选择器">
-            
-                    
-                    选择器
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.3" data-path="../use/">
-            
-                <a href="../use/#配置库表">
-            
-                    
-                    配置库表
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.4" data-path="../use/">
-            
-                <a href="../use/#任务">
-            
-                    
-                    任务
-            
-                </a>
-            
-
-            
-        </li>
-    
-        <li class="chapter " data-level="1.5.5" data-path="../use/">
-            
-                <a href="../use/#调试">
-            
-                    
-                    调试
-            
-                </a>
-            
-
-            
-        </li>
-    
-
-            </ul>
-            
-        </li>
-    
-
-    
-
-    <li class="divider"></li>
-
-    <li>
-        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
-            Published with GitBook
-        </a>
-    </li>
-</ul>
-
-
-                </nav>
-            
-        
-    </div>
-
-    <div class="book-body">
-        
-            <div class="body-inner">
-                
-                    
-
-<div class="book-header" role="navigation">
-    
-
-    <!-- Title -->
-    <h1>
-        <i class="fa fa-circle-o-notch fa-spin"></i>
-        <a href=".." >安装</a>
-    </h1>
-</div>
-
-
-
-
-                    <div class="page-wrapper" tabindex="-1" role="main">
-                        <div class="page-inner">
-                            
-<div id="book-search-results">
-    <div class="search-noresults">
-    
-                                <section class="normal markdown-section">
-                                
-                                <h1 id="install">install</h1>
-<p>&#x5B89;&#x88C5;node&#x76F8;&#x5173;&#x4F9D;&#x8D56;&#xFF0C;node&#x8981;&#x6C42;v8.0&#x4EE5;&#x4E0A;</p>
-<pre><code>npm install
-</code></pre><p>&#x5982;&#x679C;pupperteer&#x5B89;&#x88C5;&#x51FA;&#x73B0;&#x95EE;&#x9898;&#xFF0C;&#x8BF7;&#x53C2;&#x8003;&#x5982;&#x4E0B;</p>
-<pre><code>&#x5B89;&#x88C5; 1.15.0 &#x7248;&#x672C;&#x7684; puppeteer
-1.
-&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#x5305;
-https://github.com/GoogleChrome/puppeteer/releases
-
-2.&#x8FD9;&#x91CC;&#x7684;&#x8DEF;&#x5F84;&#x6839;&#x636E;&#x9879;&#x76EE;&#x5730;&#x5740;&#x6765;
-&#x5B89;&#x88C5;&#x5305;&#x89E3;&#x538B;&#x5230;/data/webapps/test.spider.duowan.com/protected/node_modules&#x76EE;&#x5F55;&#x4E0B;&#x7684;puppeteer
-
-3.
-&#x8FDB;&#x5165;puppeteer
-&#x6267;&#x884C;&#xFF1A;
-sudo npm install -d package.json  &#x5B89;&#x88C5;&#x597D;&#x4F9D;&#x8D56;&#x6A21;&#x5757;
-sudo node install.js              &#x5B89;&#x88C5;puppeteer &#x670D;&#x52A1;&#xFF08;&#x8FD9;&#x4E2A;&#x547D;&#x4EE4;&#x4F1A;&#x81EA;&#x5DF1;&#x5B89;&#x88C5;chromium)
-
-&#x7F3A;&#x4EC0;&#x4E48;&#x6A21;&#x5757;&#x7528; sudo npm install &#x6A21;&#x5757;&#x540D;
-</code></pre><h1 id="config">config</h1>
-<p>&#x914D;&#x7F6E;&#x9879;&#x76EE;</p>
-<ul>
-<li><p>&#x8BBE;&#x7F6E;&#x7AEF;&#x53E3;
-/protected/conf/config.${env}.inc.js    &#x5176;&#x4E2D; ${env} &#x662F;&#x73AF;&#x5883;&#xFF0C;&#x5206;&#x522B;&#x4E3A; dev-&#x5F00;&#x53D1;&#xFF0C;form-&#x6B63;&#x5F0F;</p>
-<pre><code>process.env.PORT = &#x7AEF;&#x53E3;&#x53F7;;
-</code></pre></li>
-<li><p>&#x914D;&#x7F6E;&#x6570;&#x636E;&#x5E93;
-/protected/conf/config.${env}.inc.js</p>
-</li>
-</ul>
-<pre><code>let dbInfo = {};
-//&#x6570;&#x636E;&#x5E93;&#x914D;&#x7F6E;
-dbInfo[&apos;Web&apos;] = {
-    host : &apos;61.160.36.225&apos;,
-    user : &apos;ojiatest&apos;,
-    password : &apos;ojia305&apos;,
-    database : &apos;Web&apos;,
-    port : 3306,
-    connectionLimit : 100
-};
-
-//redis&#x914D;&#x7F6E;
-let redisInfo = {};
-redisInfo[&apos;name_serv&apos;] = {
-    &apos;host&apos; : &apos;61.160.36.225&apos;,
-    &apos;port&apos; : 6405,
-    &apos;pwd&apos; : &apos;ojia123&apos;,
-    &apos;db&apos; : 1,
-    &apos;connet_timeout&apos; : 0
-};
-</code></pre><p><strong>&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;&#x540D;&#x5B57;&#x670D;&#x52A1;&#x5668;&#x53D1;&#x5E03;&#x540E;&#xFF0C;&#x4F1A;&#x81EA;&#x52A8;&#x66F4;&#x65B0;&#x5230; /protected/conf/conf_ns &#xFF0C;&#x4F46;&#x662F;&#x9700;&#x8981;&#x91CD;&#x542F;node&#x8FDB;&#x7A0B;&#xFF0C;&#x5426;&#x5219;&#x4E0D;&#x4F1A;&#x751F;&#x6548;</strong></p>
-<ul>
-<li>&#x4EE3;&#x7406;
-&#x722C;&#x866B;&#x9700;&#x8981;&#x4EE3;&#x7406;&#x6C60;&#xFF0C;&#x6240;&#x6709;&#x7684;&#x4EE3;&#x7406;ip&#x83B7;&#x53D6;&#x90FD;&#x662F;&#x901A;&#x8FC7;&#x8BBF;&#x95EE; cjms &#x7BA1;&#x7406;&#x540E;&#x53F0;&#x7684;&#x63A5;&#x53E3;&#xFF1A;/protected/models/ProxyPool.js</li>
-</ul>
-<pre><code> 1.&#x83B7;&#x53D6;ip&#x5217;&#x8868;&#xFF1A;getXProxyList()
- 2.&#x83B7;&#x53D6;&#x67D0;&#x4E2A;&#x57DF;&#x540D;&#x6548;&#x679C;&#x6700;&#x597D;&#x7684;&#x4EE3;&#x7406;&#xFF1A;getXProxyBest(domain)
- 3.&#x6BCF;&#x6B21;&#x4E0A;&#x62A5;&#x4F7F;&#x7528;&#x7684;&#x4EE3;&#x7406;&#x597D;&#x574F;&#x60C5;&#x51B5;&#xFF1A;reportProxy(domain, proxy, score)
-</code></pre>
-                                
-                                </section>
-                            
-    </div>
-    <div class="search-results">
-        <div class="has-results">
-            
-            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
-            <ul class="search-results-list"></ul>
-            
-        </div>
-        <div class="no-results">
-            
-            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
-            
-        </div>
-    </div>
-</div>
-
-                        </div>
-                    </div>
-                
-            </div>
-
-            
-                
-                
-                <a href="./#config" class="navigation navigation-next navigation-unique" aria-label="Next page: 配置">
-                    <i class="fa fa-angle-right"></i>
-                </a>
-                
-            
-        
-    </div>
-
-    <script>
-        var gitbook = gitbook || [];
-        gitbook.push(function() {
-            gitbook.page.hasChanged({"page":{"title":"安装","level":"1.2.1","depth":2,"next":{"title":"配置","level":"1.2.2","depth":2,"anchor":"#config","path":"install/README.md","ref":"install/README.md#config","articles":[]},"previous":{"title":"安装以及配置","level":"1.2","depth":1,"ref":"","articles":[{"title":"安装","level":"1.2.1","depth":2,"anchor":"#install","path":"install/README.md","ref":"install/README.md#install","articles":[]},{"title":"配置","level":"1.2.2","depth":2,"anchor":"#config","path":"install/README.md","ref":"install/README.md#config","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"install/README.md","mtime":"2018-10-10T06:42:56.680Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-10T09:36:34.980Z"},"basePath":"..","book":{"language":""}});
-        });
-    </script>
-</div>
-
-        
-    <script src="../gitbook/gitbook.js"></script>
-    <script src="../gitbook/theme.js"></script>
-    
-        
-        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
-        
-    
-        
-        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
-        
-    
-
-    </body>
-</html>
-

+ 0 - 28
_book/run/README.md

@@ -1,28 +0,0 @@
-#run
-
-用 supervisor 守护进程来启动node爬虫进程
-```
-vim /data/services/supervisor.conf
-```
-
-举个栗子:
-```
-[program:node1]
-command=node /data/webapps/test.spider.duowan.com/protected/index.js
-process_name=WEB_test.spider.duowan.com
-directory=/data/webapps/test.spider.duowan.com/protected/
-numprocs=1
-autostart=true
-autorestart=true
-stdout_logfile=/tmp/WEB_test.spider.duowan.com.log
-
-```
-
-设置进程后,查看:
-```
-sudo supervisorctl
-```
-可以看到
-![图片](/img/图2-1.jpg)
-
-**主要启动的脚本为 index.js checkProxyPool.js crawlMaster.js crawlWorker.js**

File diff suppressed because it is too large
+ 0 - 390
_book/run/index.html


File diff suppressed because it is too large
+ 0 - 0
_book/search_index.json


+ 0 - 119
_book/use/README.md

@@ -1,119 +0,0 @@
-#规则
->新建规则,规则对应需要抓取的相同类型的网页,比如列表页,详情页
->无论是 /list?page=1 还是 /list?page=n 只要是抓取这个类型的页面获取的数据结构一样的都可以归类成一个规则内
-
-![图片](/img/图3-1.jpg)
-
-* 规则id是唯一的
-
-* 示例url是此规则的举例url,在此url上写采集规则
-
-* 请求模式:普通和浏览器模式,默认普通模式,如果页面是js渲染的则用浏览器模式
-
-* 数据类型:html/json,如果是爬取的api那么使用json,如果是普通页面则用html
-
-* 等待条件,如果是请求模式选择浏览器模式,那么爬虫会根据这里设置的等待条件等待页面加载出这个等待的元素后才回调返回此页面的渲染好的html
-
-* 页面预处理,可以在爬虫获取返回html后先处理页面html,然后再接下去用选择器获取去页面数据,比如有些页面是404,此404是一张图片,如果是直接传下去给选择器,那么会报错缺少字段,如果是预处理时就判断是否404图片,那么直接返回当做抓取成功不会进入选择器。$html, $, page,_task, JTool, Tool 这几个变量可以直接使用,在爬虫内部定义如下:
-
-```
-	async _preprocess(content, page) {
-        if (this.rule.data_type === 'json') {
-            content = content.trim();
-            let lastChar = php.substr(content, -1);
-            if (lastChar === ')') {
-                let pos = content.indexOf('(');
-                content = content.substr(pos + 1, content.length - pos - 2);
-            }
-        }
-
-        let preprocess = this.rule.preprocess && this.rule.preprocess.trim();
-        if (preprocess) {
-            let func = php.create_function('$html, $, page, _task, JTool, Tool', preprocess);
-
-            let $ = null;
-            let $html = null;
-            if (this.rule.data_type === 'html') {
-                $ = cheerio.load(content, { decodeEntities: false });
-                JTool.initJquery($);
-
-                $html = $('html');
-                let flag = func($html, $, page, this.task, JTool, Tool);
-                if (flag === false) {
-                    this.skip = true;
-                }
-                return $('<div></div>').html($html).html();
-            } else if (this.rule.data_type === 'json') {
-                $html = content;
-                return func($html, $, page, JTool, Tool);
-            }
-        }
-        
-        return content;
-    }
-```
-
----
-
-#选择器
->选择器负责拾取页面的数据,在浏览器上用js调试,可以立马生效查看获取的数据,这是可视化的基础,而不必如同其他爬虫一样需要每个网页手写不同的选择器
-
-![图片](/img/图3-2.jpg)
-
-* 选择器:查找页面元素并返回
-* 解析$el:上面选择器获取的节点元素,返回的变量用 $el 表示,和jquery操作节点元素一致
-```
-可用变量如下
-_task:任务对象,[ 'url', 'rule_id', 'task_id', 'task_key' ]
-JTool.fixColspan($table, $): 展开表格colspan,删除不合法的列
-JTool.formatDate(date): 把int/Date类型的数据,格式化为:Y-m-d
-JTool.formatDateTime(date): 把int/Date类型的数据,格式化为:Y-m-d H:i:s
-JTool.formatUrl(url): 把相对地址变化成绝对地址
-JTool.formaRichText(content): 富文本的图片相对地址变化成绝对地址,去掉script标签
-JTool.md5(str): md5加密
-```
-* Next规则id:指定当爬取玩此规则后进入的下一个规则,可以设置上下文逻辑,比如列表页面的下一个规则应该是详情页
-* 选择 单项/多项:如果是爬取的数据是多行的则选择多项,如果是只有一项那么选择单项。这里插入的逻辑是,如果是多项的取各个列名字段相同下标的数据处理组成一条数据记录插入数据库例如:
-```
-a 列名:选择多项获取到的是一个数组 ['a', 'b', 'c']
-b 列名:选择多项获取到的是一个数组 ['d', 'e', 'f']
-
-爬虫会将上面的数据格式化成:
-[['a','d'], ['b','e'], ['c','f']]
-逐条插入/更新到数据库
-```
-* 数据-仅插入/更新/仅更新:仅插入(insert)是当数据是新数据的时候插入到数据库,第二次爬取的时候数据不会再更新入库,更新(replace)是当第二次爬取的时候会执行更新到数据库,仅更新(update)是第二次爬取的数据和当前的数据库的数据不一致才会入库更新
-* 必填:如果是在选择器分析页面数据中没有此字段,那么会报错,如果是可选,则不会报错
-* 开关:开启后选择器会解析页面抓取数据,否则不进入此选择器的逻辑
-* 转存:如果是图片,可以将此图片转存至自己服务器然后更新到数据库,这是一个异步的过程,入库后,转存脚本会扫描需要转存的数据,如果没有转存则将其下载到bs2然后重新将新的资源url地址更新到数据库内
-* 只填充:只填充的字段,只在更新模式有效,选择器获取的数据会和临时表中上次抓取的老数据对比,老数据不存在时才填充
-
----
-
-#配置库表
->爬虫的数据库表从名字服务器内的配置拉取到表 db_table,data_db中,这里需要注意的是,当名字服务器发布新的数据库配置后,需要重启node进程才能让爬虫的配置生效
-
-![图片](/img/图4-3.jpg)
-![图片](/img/图4-2.jpg)
-
----
-
-#任务
->当规则添加后,需要配置任务,爬虫才能进行入库 
-
-![图片](/img/图4-1.jpg)
-* 爬虫的地址:指的爬虫的初始入口url,爬虫任务根据此url,开始爬取,如果你配置了Next规则id,那么爬虫当爬取完此规则后会自动进入下一规则,这样就实现了上下问逻辑的网页爬取
-
-当添加完任务后还可以在网页上尝试点击执行,网页返回的是此任务执行期间的打印的日志
-![图片](/img/图4-4.jpg)
-![图片](/img/图4-7.jpg)
-
----
-
-#调试
->通过日志和网页运行爬取任务可以调试一个规则是否有报错
-
-![图片](/img/图4-6.jpg)
-![图片](/img/图4-5.jpg)
-
-

File diff suppressed because it is too large
+ 0 - 493
_book/use/index.html


Some files were not shown because too many files changed in this diff