├── .gitignore ├── License.md ├── Readme.md ├── document └── Readme.md ├── package.json ├── projects ├── wapp2md │ ├── .npmignore │ ├── License.md │ ├── Readme.md │ ├── package.json │ ├── source │ │ ├── config.ts │ │ ├── index.ts │ │ ├── tieba │ │ │ ├── index.ts │ │ │ ├── page.ts │ │ │ └── parser.ts │ │ └── tiezi │ │ │ ├── index.ts │ │ │ ├── page.ts │ │ │ └── parser.ts │ ├── test │ │ ├── 5544838611.md │ │ ├── page.ts │ │ ├── tieba.ts │ │ └── 数学吧.json │ └── tsconfig.json └── web2md │ ├── .npmignore │ ├── License.md │ ├── Readme.md │ ├── package.json │ └── tsconfig.json ├── scripts └── Readme.md ├── tsconfig.base.json ├── tsconfig.json └── tslint.json /.gitignore: -------------------------------------------------------------------------------- 1 | # System 2 | .DS_Store 3 | 4 | # IDE 5 | .idea 6 | .vscode 7 | *.iml 8 | 9 | # Build 10 | node_modules/ 11 | **/static/ 12 | **/dist/ 13 | **/out/ 14 | 15 | # log 16 | npm-debug.log 17 | yarn-debug.log 18 | yarn-error.log 19 | 20 | # Tools 21 | yarn.lock 22 | package-lock.json -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | ### 1. Definitions 5 | 6 | **1.1. “Contributor”** 7 | means each individual or legal entity that creates, contributes to 8 | the creation of, or owns Covered Software. 9 | 10 | **1.2. “Contributor Version”** 11 | means the combination of the Contributions of others (if any) used 12 | by a Contributor and that particular Contributor's Contribution. 13 | 14 | **1.3. “Contribution”** 15 | means Covered Software of a particular Contributor. 16 | 17 | **1.4. “Covered Software”** 18 | means Source Code Form to which the initial Contributor has attached 19 | the notice in Exhibit A, the Executable Form of such Source Code 20 | Form, and Modifications of such Source Code Form, in each case 21 | including portions thereof. 22 | 23 | **1.5. “Incompatible With Secondary Licenses”** 24 | means 25 | 26 | * **(a)** that the initial Contributor has attached the notice described 27 | in Exhibit B to the Covered Software; or 28 | * **(b)** that the Covered Software was made available under the terms of 29 | version 1.1 or earlier of the License, but not also under the 30 | terms of a Secondary License. 31 | 32 | **1.6. “Executable Form”** 33 | means any form of the work other than Source Code Form. 34 | 35 | **1.7. “Larger Work”** 36 | means a work that combines Covered Software with other material, in 37 | a separate file or files, that is not Covered Software. 38 | 39 | **1.8. “License”** 40 | means this document. 41 | 42 | **1.9. “Licensable”** 43 | means having the right to grant, to the maximum extent possible, 44 | whether at the time of the initial grant or subsequently, any and 45 | all of the rights conveyed by this License. 46 | 47 | **1.10. “Modifications”** 48 | means any of the following: 49 | 50 | * **(a)** any file in Source Code Form that results from an addition to, 51 | deletion from, or modification of the contents of Covered 52 | Software; or 53 | * **(b)** any new file in Source Code Form that contains any Covered 54 | Software. 55 | 56 | **1.11. “Patent Claims” of a Contributor** 57 | means any patent claim(s), including without limitation, method, 58 | process, and apparatus claims, in any patent Licensable by such 59 | Contributor that would be infringed, but for the grant of the 60 | License, by the making, using, selling, offering for sale, having 61 | made, import, or transfer of either its Contributions or its 62 | Contributor Version. 63 | 64 | **1.12. “Secondary License”** 65 | means either the GNU General Public License, Version 2.0, the GNU 66 | Lesser General Public License, Version 2.1, the GNU Affero General 67 | Public License, Version 3.0, or any later versions of those 68 | licenses. 69 | 70 | **1.13. “Source Code Form”** 71 | means the form of the work preferred for making modifications. 72 | 73 | **1.14. “You” (or “Your”)** 74 | means an individual or a legal entity exercising rights under this 75 | License. For legal entities, “You” includes any entity that 76 | controls, is controlled by, or is under common control with You. For 77 | purposes of this definition, “control” means **(a)** the power, direct 78 | or indirect, to cause the direction or management of such entity, 79 | whether by contract or otherwise, or **(b)** ownership of more than 80 | fifty percent (50%) of the outstanding shares or beneficial 81 | ownership of such entity. 82 | 83 | 84 | ### 2. License Grants and Conditions 85 | 86 | #### 2.1. Grants 87 | 88 | Each Contributor hereby grants You a world-wide, royalty-free, 89 | non-exclusive license: 90 | 91 | * **(a)** under intellectual property rights (other than patent or trademark) 92 | Licensable by such Contributor to use, reproduce, make available, 93 | modify, display, perform, distribute, and otherwise exploit its 94 | Contributions, either on an unmodified basis, with Modifications, or 95 | as part of a Larger Work; and 96 | * **(b)** under Patent Claims of such Contributor to make, use, sell, offer 97 | for sale, have made, import, and otherwise transfer either its 98 | Contributions or its Contributor Version. 99 | 100 | #### 2.2. Effective Date 101 | 102 | The licenses granted in Section 2.1 with respect to any Contribution 103 | become effective for each Contribution on the date the Contributor first 104 | distributes such Contribution. 105 | 106 | #### 2.3. Limitations on Grant Scope 107 | 108 | The licenses granted in this Section 2 are the only rights granted under 109 | this License. No additional rights or licenses will be implied from the 110 | distribution or licensing of Covered Software under this License. 111 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 112 | Contributor: 113 | 114 | * **(a)** for any code that a Contributor has removed from Covered Software; 115 | or 116 | * **(b)** for infringements caused by: **(i)** Your and any other third party's 117 | modifications of Covered Software, or **(ii)** the combination of its 118 | Contributions with other software (except as part of its Contributor 119 | Version); or 120 | * **(c)** under Patent Claims infringed by Covered Software in the absence of 121 | its Contributions. 122 | 123 | This License does not grant any rights in the trademarks, service marks, 124 | or logos of any Contributor (except as may be necessary to comply with 125 | the notice requirements in Section 3.4). 126 | 127 | #### 2.4. Subsequent Licenses 128 | 129 | No Contributor makes additional grants as a result of Your choice to 130 | distribute the Covered Software under a subsequent version of this 131 | License (see Section 10.2) or under the terms of a Secondary License (if 132 | permitted under the terms of Section 3.3). 133 | 134 | #### 2.5. Representation 135 | 136 | Each Contributor represents that the Contributor believes its 137 | Contributions are its original creation(s) or it has sufficient rights 138 | to grant the rights to its Contributions conveyed by this License. 139 | 140 | #### 2.6. Fair Use 141 | 142 | This License is not intended to limit any rights You have under 143 | applicable copyright doctrines of fair use, fair dealing, or other 144 | equivalents. 145 | 146 | #### 2.7. Conditions 147 | 148 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 149 | in Section 2.1. 150 | 151 | 152 | ### 3. Responsibilities 153 | 154 | #### 3.1. Distribution of Source Form 155 | 156 | All distribution of Covered Software in Source Code Form, including any 157 | Modifications that You create or to which You contribute, must be under 158 | the terms of this License. You must inform recipients that the Source 159 | Code Form of the Covered Software is governed by the terms of this 160 | License, and how they can obtain a copy of this License. You may not 161 | attempt to alter or restrict the recipients' rights in the Source Code 162 | Form. 163 | 164 | #### 3.2. Distribution of Executable Form 165 | 166 | If You distribute Covered Software in Executable Form then: 167 | 168 | * **(a)** such Covered Software must also be made available in Source Code 169 | Form, as described in Section 3.1, and You must inform recipients of 170 | the Executable Form how they can obtain a copy of such Source Code 171 | Form by reasonable means in a timely manner, at a charge no more 172 | than the cost of distribution to the recipient; and 173 | 174 | * **(b)** You may distribute such Executable Form under the terms of this 175 | License, or sublicense it under different terms, provided that the 176 | license for the Executable Form does not attempt to limit or alter 177 | the recipients' rights in the Source Code Form under this License. 178 | 179 | #### 3.3. Distribution of a Larger Work 180 | 181 | You may create and distribute a Larger Work under terms of Your choice, 182 | provided that You also comply with the requirements of this License for 183 | the Covered Software. If the Larger Work is a combination of Covered 184 | Software with a work governed by one or more Secondary Licenses, and the 185 | Covered Software is not Incompatible With Secondary Licenses, this 186 | License permits You to additionally distribute such Covered Software 187 | under the terms of such Secondary License(s), so that the recipient of 188 | the Larger Work may, at their option, further distribute the Covered 189 | Software under the terms of either this License or such Secondary 190 | License(s). 191 | 192 | #### 3.4. Notices 193 | 194 | You may not remove or alter the substance of any license notices 195 | (including copyright notices, patent notices, disclaimers of warranty, 196 | or limitations of liability) contained within the Source Code Form of 197 | the Covered Software, except that You may alter any license notices to 198 | the extent required to remedy known factual inaccuracies. 199 | 200 | #### 3.5. Application of Additional Terms 201 | 202 | You may choose to offer, and to charge a fee for, warranty, support, 203 | indemnity or liability obligations to one or more recipients of Covered 204 | Software. However, You may do so only on Your own behalf, and not on 205 | behalf of any Contributor. You must make it absolutely clear that any 206 | such warranty, support, indemnity, or liability obligation is offered by 207 | You alone, and You hereby agree to indemnify every Contributor for any 208 | liability incurred by such Contributor as a result of warranty, support, 209 | indemnity or liability terms You offer. You may include additional 210 | disclaimers of warranty and limitations of liability specific to any 211 | jurisdiction. 212 | 213 | 214 | ### 4. Inability to Comply Due to Statute or Regulation 215 | 216 | If it is impossible for You to comply with any of the terms of this 217 | License with respect to some or all of the Covered Software due to 218 | statute, judicial order, or regulation then You must: **(a)** comply with 219 | the terms of this License to the maximum extent possible; and **(b)** 220 | describe the limitations and the code they affect. Such description must 221 | be placed in a text file included with all distributions of the Covered 222 | Software under this License. Except to the extent prohibited by statute 223 | or regulation, such description must be sufficiently detailed for a 224 | recipient of ordinary skill to be able to understand it. 225 | 226 | 227 | ### 5. Termination 228 | 229 | **5.1.** The rights granted under this License will terminate automatically 230 | if You fail to comply with any of its terms. However, if You become 231 | compliant, then the rights granted under this License from a particular 232 | Contributor are reinstated **(a)** provisionally, unless and until such 233 | Contributor explicitly and finally terminates Your grants, and **(b)** on an 234 | ongoing basis, if such Contributor fails to notify You of the 235 | non-compliance by some reasonable means prior to 60 days after You have 236 | come back into compliance. Moreover, Your grants from a particular 237 | Contributor are reinstated on an ongoing basis if such Contributor 238 | notifies You of the non-compliance by some reasonable means, this is the 239 | first time You have received notice of non-compliance with this License 240 | from such Contributor, and You become compliant prior to 30 days after 241 | Your receipt of the notice. 242 | 243 | **5.2.** If You initiate litigation against any entity by asserting a patent 244 | infringement claim (excluding declaratory judgment actions, 245 | counter-claims, and cross-claims) alleging that a Contributor Version 246 | directly or indirectly infringes any patent, then the rights granted to 247 | You by any and all Contributors for the Covered Software under Section 248 | 2.1 of this License shall terminate. 249 | 250 | **5.3.** In the event of termination under Sections 5.1 or 5.2 above, all 251 | end user license agreements (excluding distributors and resellers) which 252 | have been validly granted by You or Your distributors under this License 253 | prior to termination shall survive termination. 254 | 255 | 256 | ### 6. Disclaimer of Warranty 257 | 258 | > Covered Software is provided under this License on an “as is” 259 | > basis, without warranty of any kind, either expressed, implied, or 260 | > statutory, including, without limitation, warranties that the 261 | > Covered Software is free of defects, merchantable, fit for a 262 | > particular purpose or non-infringing. The entire risk as to the 263 | > quality and performance of the Covered Software is with You. 264 | > Should any Covered Software prove defective in any respect, You 265 | > (not any Contributor) assume the cost of any necessary servicing, 266 | > repair, or correction. This disclaimer of warranty constitutes an 267 | > essential part of this License. No use of any Covered Software is 268 | > authorized under this License except under this disclaimer. 269 | 270 | ### 7. Limitation of Liability 271 | 272 | > Under no circumstances and under no legal theory, whether tort 273 | > (including negligence), contract, or otherwise, shall any 274 | > Contributor, or anyone who distributes Covered Software as 275 | > permitted above, be liable to You for any direct, indirect, 276 | > special, incidental, or consequential damages of any character 277 | > including, without limitation, damages for lost profits, loss of 278 | > goodwill, work stoppage, computer failure or malfunction, or any 279 | > and all other commercial damages or losses, even if such party 280 | > shall have been informed of the possibility of such damages. This 281 | > limitation of liability shall not apply to liability for death or 282 | > personal injury resulting from such party's negligence to the 283 | > extent applicable law prohibits such limitation. Some 284 | > jurisdictions do not allow the exclusion or limitation of 285 | > incidental or consequential damages, so this exclusion and 286 | > limitation may not apply to You. 287 | 288 | 289 | ### 8. Litigation 290 | 291 | Any litigation relating to this License may be brought only in the 292 | courts of a jurisdiction where the defendant maintains its principal 293 | place of business and such litigation shall be governed by laws of that 294 | jurisdiction, without reference to its conflict-of-law provisions. 295 | Nothing in this Section shall prevent a party's ability to bring 296 | cross-claims or counter-claims. 297 | 298 | 299 | ### 9. Miscellaneous 300 | 301 | This License represents the complete agreement concerning the subject 302 | matter hereof. If any provision of this License is held to be 303 | unenforceable, such provision shall be reformed only to the extent 304 | necessary to make it enforceable. Any law or regulation which provides 305 | that the language of a contract shall be construed against the drafter 306 | shall not be used to construe this License against a Contributor. 307 | 308 | 309 | ### 10. Versions of the License 310 | 311 | #### 10.1. New Versions 312 | 313 | Mozilla Foundation is the license steward. Except as provided in Section 314 | 10.3, no one other than the license steward has the right to modify or 315 | publish new versions of this License. Each version will be given a 316 | distinguishing version number. 317 | 318 | #### 10.2. Effect of New Versions 319 | 320 | You may distribute the Covered Software under the terms of the version 321 | of the License under which You originally received the Covered Software, 322 | or under the terms of any subsequent version published by the license 323 | steward. 324 | 325 | #### 10.3. Modified Versions 326 | 327 | If you create software not governed by this License, and you want to 328 | create a new license for such software, you may create and use a 329 | modified version of this License if you rename the license and remove 330 | any references to the name of the license steward (except to note that 331 | such modified license differs from this License). 332 | 333 | #### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses 334 | 335 | If You choose to distribute Source Code Form that is Incompatible With 336 | Secondary Licenses under the terms of this version of the License, the 337 | notice described in Exhibit B of this License must be attached. 338 | 339 | ## Exhibit A - Source Code Form License Notice 340 | 341 | This Source Code Form is subject to the terms of the Mozilla Public 342 | License, v. 2.0. If a copy of the MPL was not distributed with this 343 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 344 | 345 | If it is not possible or desirable to put the notice in a particular 346 | file, then You may include the notice in a location (such as a LICENSE 347 | file in a relevant directory) where a recipient would be likely to look 348 | for such a notice. 349 | 350 | You may add additional accurate notices of copyright ownership. 351 | 352 | ## Exhibit B - “Incompatible With Secondary Licenses” Notice 353 | 354 | This Source Code Form is "Incompatible With Secondary Licenses", as 355 | defined by the Mozilla Public License, v. 2.0. 356 | 357 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | Tieba => Markdown 2 | ================= 3 | [![Site](https://img.shields.io/badge/Version-v0.2.x-%23FF4D5B.svg?style=flat-square)](https://github.com/uupers/save-tieba) 4 | ![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg?style=flat-square) 5 | ![LICENSE](https://img.shields.io/badge/license-MPL%202.0-blue.svg?style=flat-square) 6 | 7 | 保存贴吧的精品文章, 转化为 markdown 格式. 8 | 9 | ## Tutorial 10 | 11 | 使用 `npm` 或 `yarn` 安装 12 | 13 | ```bash 14 | yarn add @vutex/wapp2md 15 | npm install @vutex/wapp2md 16 | ``` 17 | 18 | 然后输入帖子 `id` 就能下载并转换为 `markdown` 文件了. 19 | 20 | ```typescript 21 | import { writeFileSync } from 'fs' 22 | import { parserPage } from '@vutex/wapp2md' 23 | parseTiezi(5544838611).then($ => { writeFileSync(`${__dirname}/5544838611.md`, $) }) 24 | ``` 25 | 26 | 网页: http://tieba.baidu.com/p/5544838611 27 | 28 | 脚本: https://github.com/uupers/save-tieba/blob/master/projects/wapp2md/test/page.ts 29 | 30 | 效果: https://github.com/uupers/save-tieba/blob/master/projects/wapp2md/test/5544838611.md 31 | 32 | 33 | 获取贴吧精品编号: 34 | 35 | ```typescript 36 | parseTieba('数学').then($ => { writeFileSync(`${__dirname}/数学吧.json`, JSON.stringify($, null, 4)) }) 37 | ``` 38 | 39 | 效果: https://github.com/uupers/save-tieba/blob/master/projects/wapp2md/test/数学吧.json -------------------------------------------------------------------------------- /document/Readme.md: -------------------------------------------------------------------------------- 1 | ## User 类 2 | 3 | name 4 | cookies 5 | 6 | 7 | 8 | 9 | ## Config 类 10 | 11 | 12 | 13 | 14 | 15 | 16 | ## tieba.arc 17 | 18 | ### 精品贴 19 | 20 | ```arc 21 | 22 | * title: #string 23 | id : #number 24 | ``` 25 | 26 | 27 | ```arc 28 | (Album) 29 | name = [ 30 | %urls 31 | ] 32 | ``` 33 | 34 | 35 | ## @id.md 36 | 37 | ### 元信息 38 | 39 | 40 | ### 楼信息 41 | 42 | 43 | ### 楼内容 44 | 45 | 46 | 47 | ### 楼中楼 48 | 49 | 50 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "workspaces": [ 4 | "projects/*" 5 | ], 6 | "scripts": { 7 | "lint": "tslint projects/**/*.ts --fix" 8 | }, 9 | "devDependencies": { 10 | "@types/cheerio": "^0.22.11", 11 | "@types/circular-json": "^0.4.0", 12 | "@types/node": "^12.0.2", 13 | "@types/request": "^2.48.1", 14 | "@types/request-promise": "^4.1.43" 15 | }, 16 | "dependencies": { 17 | "chalk": "^2.4.2", 18 | "circular-json": "^0.5.9", 19 | "commander": "^2.19.0", 20 | "semver": "^5.6.0", 21 | "ts-loader": "^5.3.2", 22 | "tslint": "^5.12.0", 23 | "typescript": "^3.2.2" 24 | }, 25 | "engines": { 26 | "node": ">= 8.0.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /projects/wapp2md/.npmignore: -------------------------------------------------------------------------------- 1 | source/* 2 | test/* 3 | .vscode/* 4 | tsconfig.json -------------------------------------------------------------------------------- /projects/wapp2md/License.md: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | ### 1. Definitions 5 | 6 | **1.1. “Contributor”** 7 | means each individual or legal entity that creates, contributes to 8 | the creation of, or owns Covered Software. 9 | 10 | **1.2. “Contributor Version”** 11 | means the combination of the Contributions of others (if any) used 12 | by a Contributor and that particular Contributor's Contribution. 13 | 14 | **1.3. “Contribution”** 15 | means Covered Software of a particular Contributor. 16 | 17 | **1.4. “Covered Software”** 18 | means Source Code Form to which the initial Contributor has attached 19 | the notice in Exhibit A, the Executable Form of such Source Code 20 | Form, and Modifications of such Source Code Form, in each case 21 | including portions thereof. 22 | 23 | **1.5. “Incompatible With Secondary Licenses”** 24 | means 25 | 26 | * **(a)** that the initial Contributor has attached the notice described 27 | in Exhibit B to the Covered Software; or 28 | * **(b)** that the Covered Software was made available under the terms of 29 | version 1.1 or earlier of the License, but not also under the 30 | terms of a Secondary License. 31 | 32 | **1.6. “Executable Form”** 33 | means any form of the work other than Source Code Form. 34 | 35 | **1.7. “Larger Work”** 36 | means a work that combines Covered Software with other material, in 37 | a separate file or files, that is not Covered Software. 38 | 39 | **1.8. “License”** 40 | means this document. 41 | 42 | **1.9. “Licensable”** 43 | means having the right to grant, to the maximum extent possible, 44 | whether at the time of the initial grant or subsequently, any and 45 | all of the rights conveyed by this License. 46 | 47 | **1.10. “Modifications”** 48 | means any of the following: 49 | 50 | * **(a)** any file in Source Code Form that results from an addition to, 51 | deletion from, or modification of the contents of Covered 52 | Software; or 53 | * **(b)** any new file in Source Code Form that contains any Covered 54 | Software. 55 | 56 | **1.11. “Patent Claims” of a Contributor** 57 | means any patent claim(s), including without limitation, method, 58 | process, and apparatus claims, in any patent Licensable by such 59 | Contributor that would be infringed, but for the grant of the 60 | License, by the making, using, selling, offering for sale, having 61 | made, import, or transfer of either its Contributions or its 62 | Contributor Version. 63 | 64 | **1.12. “Secondary License”** 65 | means either the GNU General Public License, Version 2.0, the GNU 66 | Lesser General Public License, Version 2.1, the GNU Affero General 67 | Public License, Version 3.0, or any later versions of those 68 | licenses. 69 | 70 | **1.13. “Source Code Form”** 71 | means the form of the work preferred for making modifications. 72 | 73 | **1.14. “You” (or “Your”)** 74 | means an individual or a legal entity exercising rights under this 75 | License. For legal entities, “You” includes any entity that 76 | controls, is controlled by, or is under common control with You. For 77 | purposes of this definition, “control” means **(a)** the power, direct 78 | or indirect, to cause the direction or management of such entity, 79 | whether by contract or otherwise, or **(b)** ownership of more than 80 | fifty percent (50%) of the outstanding shares or beneficial 81 | ownership of such entity. 82 | 83 | 84 | ### 2. License Grants and Conditions 85 | 86 | #### 2.1. Grants 87 | 88 | Each Contributor hereby grants You a world-wide, royalty-free, 89 | non-exclusive license: 90 | 91 | * **(a)** under intellectual property rights (other than patent or trademark) 92 | Licensable by such Contributor to use, reproduce, make available, 93 | modify, display, perform, distribute, and otherwise exploit its 94 | Contributions, either on an unmodified basis, with Modifications, or 95 | as part of a Larger Work; and 96 | * **(b)** under Patent Claims of such Contributor to make, use, sell, offer 97 | for sale, have made, import, and otherwise transfer either its 98 | Contributions or its Contributor Version. 99 | 100 | #### 2.2. Effective Date 101 | 102 | The licenses granted in Section 2.1 with respect to any Contribution 103 | become effective for each Contribution on the date the Contributor first 104 | distributes such Contribution. 105 | 106 | #### 2.3. Limitations on Grant Scope 107 | 108 | The licenses granted in this Section 2 are the only rights granted under 109 | this License. No additional rights or licenses will be implied from the 110 | distribution or licensing of Covered Software under this License. 111 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 112 | Contributor: 113 | 114 | * **(a)** for any code that a Contributor has removed from Covered Software; 115 | or 116 | * **(b)** for infringements caused by: **(i)** Your and any other third party's 117 | modifications of Covered Software, or **(ii)** the combination of its 118 | Contributions with other software (except as part of its Contributor 119 | Version); or 120 | * **(c)** under Patent Claims infringed by Covered Software in the absence of 121 | its Contributions. 122 | 123 | This License does not grant any rights in the trademarks, service marks, 124 | or logos of any Contributor (except as may be necessary to comply with 125 | the notice requirements in Section 3.4). 126 | 127 | #### 2.4. Subsequent Licenses 128 | 129 | No Contributor makes additional grants as a result of Your choice to 130 | distribute the Covered Software under a subsequent version of this 131 | License (see Section 10.2) or under the terms of a Secondary License (if 132 | permitted under the terms of Section 3.3). 133 | 134 | #### 2.5. Representation 135 | 136 | Each Contributor represents that the Contributor believes its 137 | Contributions are its original creation(s) or it has sufficient rights 138 | to grant the rights to its Contributions conveyed by this License. 139 | 140 | #### 2.6. Fair Use 141 | 142 | This License is not intended to limit any rights You have under 143 | applicable copyright doctrines of fair use, fair dealing, or other 144 | equivalents. 145 | 146 | #### 2.7. Conditions 147 | 148 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 149 | in Section 2.1. 150 | 151 | 152 | ### 3. Responsibilities 153 | 154 | #### 3.1. Distribution of Source Form 155 | 156 | All distribution of Covered Software in Source Code Form, including any 157 | Modifications that You create or to which You contribute, must be under 158 | the terms of this License. You must inform recipients that the Source 159 | Code Form of the Covered Software is governed by the terms of this 160 | License, and how they can obtain a copy of this License. You may not 161 | attempt to alter or restrict the recipients' rights in the Source Code 162 | Form. 163 | 164 | #### 3.2. Distribution of Executable Form 165 | 166 | If You distribute Covered Software in Executable Form then: 167 | 168 | * **(a)** such Covered Software must also be made available in Source Code 169 | Form, as described in Section 3.1, and You must inform recipients of 170 | the Executable Form how they can obtain a copy of such Source Code 171 | Form by reasonable means in a timely manner, at a charge no more 172 | than the cost of distribution to the recipient; and 173 | 174 | * **(b)** You may distribute such Executable Form under the terms of this 175 | License, or sublicense it under different terms, provided that the 176 | license for the Executable Form does not attempt to limit or alter 177 | the recipients' rights in the Source Code Form under this License. 178 | 179 | #### 3.3. Distribution of a Larger Work 180 | 181 | You may create and distribute a Larger Work under terms of Your choice, 182 | provided that You also comply with the requirements of this License for 183 | the Covered Software. If the Larger Work is a combination of Covered 184 | Software with a work governed by one or more Secondary Licenses, and the 185 | Covered Software is not Incompatible With Secondary Licenses, this 186 | License permits You to additionally distribute such Covered Software 187 | under the terms of such Secondary License(s), so that the recipient of 188 | the Larger Work may, at their option, further distribute the Covered 189 | Software under the terms of either this License or such Secondary 190 | License(s). 191 | 192 | #### 3.4. Notices 193 | 194 | You may not remove or alter the substance of any license notices 195 | (including copyright notices, patent notices, disclaimers of warranty, 196 | or limitations of liability) contained within the Source Code Form of 197 | the Covered Software, except that You may alter any license notices to 198 | the extent required to remedy known factual inaccuracies. 199 | 200 | #### 3.5. Application of Additional Terms 201 | 202 | You may choose to offer, and to charge a fee for, warranty, support, 203 | indemnity or liability obligations to one or more recipients of Covered 204 | Software. However, You may do so only on Your own behalf, and not on 205 | behalf of any Contributor. You must make it absolutely clear that any 206 | such warranty, support, indemnity, or liability obligation is offered by 207 | You alone, and You hereby agree to indemnify every Contributor for any 208 | liability incurred by such Contributor as a result of warranty, support, 209 | indemnity or liability terms You offer. You may include additional 210 | disclaimers of warranty and limitations of liability specific to any 211 | jurisdiction. 212 | 213 | 214 | ### 4. Inability to Comply Due to Statute or Regulation 215 | 216 | If it is impossible for You to comply with any of the terms of this 217 | License with respect to some or all of the Covered Software due to 218 | statute, judicial order, or regulation then You must: **(a)** comply with 219 | the terms of this License to the maximum extent possible; and **(b)** 220 | describe the limitations and the code they affect. Such description must 221 | be placed in a text file included with all distributions of the Covered 222 | Software under this License. Except to the extent prohibited by statute 223 | or regulation, such description must be sufficiently detailed for a 224 | recipient of ordinary skill to be able to understand it. 225 | 226 | 227 | ### 5. Termination 228 | 229 | **5.1.** The rights granted under this License will terminate automatically 230 | if You fail to comply with any of its terms. However, if You become 231 | compliant, then the rights granted under this License from a particular 232 | Contributor are reinstated **(a)** provisionally, unless and until such 233 | Contributor explicitly and finally terminates Your grants, and **(b)** on an 234 | ongoing basis, if such Contributor fails to notify You of the 235 | non-compliance by some reasonable means prior to 60 days after You have 236 | come back into compliance. Moreover, Your grants from a particular 237 | Contributor are reinstated on an ongoing basis if such Contributor 238 | notifies You of the non-compliance by some reasonable means, this is the 239 | first time You have received notice of non-compliance with this License 240 | from such Contributor, and You become compliant prior to 30 days after 241 | Your receipt of the notice. 242 | 243 | **5.2.** If You initiate litigation against any entity by asserting a patent 244 | infringement claim (excluding declaratory judgment actions, 245 | counter-claims, and cross-claims) alleging that a Contributor Version 246 | directly or indirectly infringes any patent, then the rights granted to 247 | You by any and all Contributors for the Covered Software under Section 248 | 2.1 of this License shall terminate. 249 | 250 | **5.3.** In the event of termination under Sections 5.1 or 5.2 above, all 251 | end user license agreements (excluding distributors and resellers) which 252 | have been validly granted by You or Your distributors under this License 253 | prior to termination shall survive termination. 254 | 255 | 256 | ### 6. Disclaimer of Warranty 257 | 258 | > Covered Software is provided under this License on an “as is” 259 | > basis, without warranty of any kind, either expressed, implied, or 260 | > statutory, including, without limitation, warranties that the 261 | > Covered Software is free of defects, merchantable, fit for a 262 | > particular purpose or non-infringing. The entire risk as to the 263 | > quality and performance of the Covered Software is with You. 264 | > Should any Covered Software prove defective in any respect, You 265 | > (not any Contributor) assume the cost of any necessary servicing, 266 | > repair, or correction. This disclaimer of warranty constitutes an 267 | > essential part of this License. No use of any Covered Software is 268 | > authorized under this License except under this disclaimer. 269 | 270 | ### 7. Limitation of Liability 271 | 272 | > Under no circumstances and under no legal theory, whether tort 273 | > (including negligence), contract, or otherwise, shall any 274 | > Contributor, or anyone who distributes Covered Software as 275 | > permitted above, be liable to You for any direct, indirect, 276 | > special, incidental, or consequential damages of any character 277 | > including, without limitation, damages for lost profits, loss of 278 | > goodwill, work stoppage, computer failure or malfunction, or any 279 | > and all other commercial damages or losses, even if such party 280 | > shall have been informed of the possibility of such damages. This 281 | > limitation of liability shall not apply to liability for death or 282 | > personal injury resulting from such party's negligence to the 283 | > extent applicable law prohibits such limitation. Some 284 | > jurisdictions do not allow the exclusion or limitation of 285 | > incidental or consequential damages, so this exclusion and 286 | > limitation may not apply to You. 287 | 288 | 289 | ### 8. Litigation 290 | 291 | Any litigation relating to this License may be brought only in the 292 | courts of a jurisdiction where the defendant maintains its principal 293 | place of business and such litigation shall be governed by laws of that 294 | jurisdiction, without reference to its conflict-of-law provisions. 295 | Nothing in this Section shall prevent a party's ability to bring 296 | cross-claims or counter-claims. 297 | 298 | 299 | ### 9. Miscellaneous 300 | 301 | This License represents the complete agreement concerning the subject 302 | matter hereof. If any provision of this License is held to be 303 | unenforceable, such provision shall be reformed only to the extent 304 | necessary to make it enforceable. Any law or regulation which provides 305 | that the language of a contract shall be construed against the drafter 306 | shall not be used to construe this License against a Contributor. 307 | 308 | 309 | ### 10. Versions of the License 310 | 311 | #### 10.1. New Versions 312 | 313 | Mozilla Foundation is the license steward. Except as provided in Section 314 | 10.3, no one other than the license steward has the right to modify or 315 | publish new versions of this License. Each version will be given a 316 | distinguishing version number. 317 | 318 | #### 10.2. Effect of New Versions 319 | 320 | You may distribute the Covered Software under the terms of the version 321 | of the License under which You originally received the Covered Software, 322 | or under the terms of any subsequent version published by the license 323 | steward. 324 | 325 | #### 10.3. Modified Versions 326 | 327 | If you create software not governed by this License, and you want to 328 | create a new license for such software, you may create and use a 329 | modified version of this License if you rename the license and remove 330 | any references to the name of the license steward (except to note that 331 | such modified license differs from this License). 332 | 333 | #### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses 334 | 335 | If You choose to distribute Source Code Form that is Incompatible With 336 | Secondary Licenses under the terms of this version of the License, the 337 | notice described in Exhibit B of this License must be attached. 338 | 339 | ## Exhibit A - Source Code Form License Notice 340 | 341 | This Source Code Form is subject to the terms of the Mozilla Public 342 | License, v. 2.0. If a copy of the MPL was not distributed with this 343 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 344 | 345 | If it is not possible or desirable to put the notice in a particular 346 | file, then You may include the notice in a location (such as a LICENSE 347 | file in a relevant directory) where a recipient would be likely to look 348 | for such a notice. 349 | 350 | You may add additional accurate notices of copyright ownership. 351 | 352 | ## Exhibit B - “Incompatible With Secondary Licenses” Notice 353 | 354 | This Source Code Form is "Incompatible With Secondary Licenses", as 355 | defined by the Mozilla Public License, v. 2.0. 356 | 357 | -------------------------------------------------------------------------------- /projects/wapp2md/Readme.md: -------------------------------------------------------------------------------- 1 | WAPP2MD 2 | ======= 3 | 4 | 5 | 6 | ## Configs 7 | 8 | ```js 9 | let config = { 10 | /* Tieba level */ 11 | // 只要精品, 默认是 12 | // 爬取本吧图库, 默认否 13 | 14 | /* Tiezi level*/ 15 | // 只要楼主, 默认否 16 | // 抓取层主信息, 默认是 17 | // 抓取楼中楼, 无此接口 18 | } 19 | ``` -------------------------------------------------------------------------------- /projects/wapp2md/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vutex/wapp2md", 3 | "version": "0.2.1", 4 | "main": "dist/index.js", 5 | "scripts": { 6 | "test": "ts-node ./test/page.ts", 7 | "build": "yarn install && tsc -b", 8 | "upload": "yarn build && npm publish --access public" 9 | }, 10 | "dependencies": { 11 | "cheerio": "^1.0.0-rc.3", 12 | "request": "^2.88.0", 13 | "request-promise": "^4.2.4" 14 | } 15 | } -------------------------------------------------------------------------------- /projects/wapp2md/source/config.ts: -------------------------------------------------------------------------------- 1 | export class Config { 2 | /* Tieba level */ 3 | 精品: true// 只要精品 4 | 图库: false// 爬取本吧图库 5 | 6 | /* Tiezi level*/ 7 | 只要楼主: false// 只要楼主 8 | 楼中楼: false// 抓取楼中楼, 无此接口 9 | // 抓取层主信息 10 | constructor () { 11 | } 12 | } -------------------------------------------------------------------------------- /projects/wapp2md/source/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config' 2 | export * from './tieba' 3 | export * from './tiezi' -------------------------------------------------------------------------------- /projects/wapp2md/source/tieba/index.ts: -------------------------------------------------------------------------------- 1 | import { parsePage } from './page' 2 | import { parseFloor } from './parser' 3 | 4 | export {parsePage as parseTieba} -------------------------------------------------------------------------------- /projects/wapp2md/source/tieba/page.ts: -------------------------------------------------------------------------------- 1 | import * as request from 'request-promise' 2 | import * as cheerio from 'cheerio' 3 | import { parseFloor, parsePageNumber } from './parser' 4 | 5 | export interface Tiezi { 6 | title: string 7 | id: number 8 | click?: number 9 | reply?: number 10 | date?: string 11 | } 12 | 13 | // 精品 lm=4, 否则 lm=1 14 | async function getSelector(name: string, offset: number) { 15 | const options = { 16 | uri: encodeURI(`https://tieba.baidu.com/mo/m?kw=${name}&lm=4&pn=${offset}`), 17 | transform: function (body: string) { 18 | return cheerio.load(body, { xmlMode: true }) 19 | } 20 | } 21 | const selector = await request(options) as CheerioStatic 22 | return selector 23 | } 24 | 25 | export async function parsePage(name: string) { 26 | async function getArray(page: number) { 27 | const selector = await getSelector(name, 20 * page) // 当前 API 单次获取上限为 20 28 | const floors = selector('body > div') 29 | return floors.children().map(parseFloor).toArray() 30 | } 31 | const selector = await getSelector(name, 0) 32 | const floors = selector('body > div') 33 | let list = floors.children().map(parseFloor).toArray() 34 | // first catch 35 | for (let index = 1; index < parsePageNumber(floors); index++) { 36 | list = await getArray(index).then(_ => { return list.concat(_) }) 37 | } 38 | return (list as unknown as Tiezi[]).sort((a, b) => a.id - b.id) 39 | } -------------------------------------------------------------------------------- /projects/wapp2md/source/tieba/parser.ts: -------------------------------------------------------------------------------- 1 | class Info { 2 | title?: string 3 | id?: number 4 | click?: number 5 | reply?: number 6 | author?: string 7 | date?: string 8 | } 9 | 10 | 11 | function parseHead(o: CheerioElement, info: Info) { 12 | const s = o.firstChild.data 13 | const href = o.attribs.href.split('/m?kz=')[1] 14 | info.title = s.substring(s.indexOf('.') + 2) 15 | info.id = parseInt(href.substring(0, href.indexOf('&'))) 16 | } 17 | 18 | function parseTail(o: CheerioElement, info: Info) { 19 | const s = o.firstChild.data.split(' ') // fuck!!! 全角空格! 20 | info.click = parseInt(s[0].substring(1)) 21 | info.reply = parseInt(s[1].substring(1)) 22 | //info.author = s[2] // 最终回复者 23 | info.date = s[3] 24 | } 25 | 26 | 27 | export function parseFloor(i: number, o: CheerioElement) { 28 | let info = {} 29 | switch (o.name) { 30 | case 'div': 31 | if (!['i', 'i x'].includes(o.attribs.class)) { return } 32 | parseHead(o.firstChild, info) 33 | // parseTail(o.lastChild, info) 34 | return info 35 | default: 36 | //调试 37 | //console.log(o) 38 | break 39 | } 40 | } 41 | 42 | export function parsePageNumber(floors: Cheerio) { 43 | function parseNumber(i: number, o: CheerioElement) { 44 | if (o.name != 'form') { return } 45 | const c = o.firstChild 46 | if (c.attribs.class != 'bc p') { return } 47 | return parseInt(c.children[3].attribs.value) 48 | } 49 | const answer = floors.children().map(parseNumber) 50 | return answer.toArray()[0] as unknown as number 51 | } -------------------------------------------------------------------------------- /projects/wapp2md/source/tiezi/index.ts: -------------------------------------------------------------------------------- 1 | import { parsePage } from './page' 2 | import { parseFloor, parseLine } from './parser' 3 | 4 | export {parsePage as parseTiezi} -------------------------------------------------------------------------------- /projects/wapp2md/source/tiezi/page.ts: -------------------------------------------------------------------------------- 1 | import * as request from 'request-promise' 2 | import * as cheerio from 'cheerio' 3 | import { parseFloor } from './parser' 4 | 5 | 6 | async function getSelector(id: number, offset: number) { 7 | const options = { 8 | uri: `https://tieba.baidu.com/mo/m?kz=${id}&pn=${offset}`, 9 | transform: function (body: string) { 10 | return cheerio.load(body, { xmlMode: true }) 11 | } 12 | } 13 | const selector = await request(options) as CheerioStatic 14 | return selector 15 | } 16 | 17 | export async function parsePage(id: number) { 18 | async function getArray(page: number) { 19 | const selector = await getSelector(id, 30 * page) // 当前 API 单次获取上限为 30 20 | const floors = selector('body > div > div:nth-child(4)') 21 | return floors.children().map(parseFloor).toArray() 22 | } 23 | const selector = await getSelector(id, 0) 24 | const floors = selector('body > div > div:nth-child(4)') 25 | const pages = selector('body > div > div:nth-child(4) > form > div > input[type=text]:nth-child(7)') 26 | let list = floors.children().map(parseFloor).toArray() 27 | // first catch 28 | for (let index = 1; index < parseInt(pages.attr().value); index++) { 29 | list = await getArray(index).then(_ => { return list.concat(_) }) 30 | } 31 | return list.join('\n\n') 32 | } -------------------------------------------------------------------------------- /projects/wapp2md/source/tiezi/parser.ts: -------------------------------------------------------------------------------- 1 | function fixLink(src: string) { 2 | if (src.endsWith('.jpg')) { 3 | const img = decodeURIComponent(src.split('src=')[1]) 4 | return `![](${img})` 5 | } 6 | } 7 | 8 | function fixEmoji(src: string) { 9 | const img = decodeURIComponent(src) 10 | return `![](${img})` 11 | } 12 | 13 | function fixText(s: string) { 14 | return s.substring(s.indexOf('楼. ') + 3) // 因为是三个字符 15 | } 16 | 17 | function parserTable(o: CheerioElement) { 18 | console.log(o.children) 19 | return '' 20 | } 21 | 22 | function parseSpan(o: CheerioElement) { 23 | console.log(o.children) 24 | return '' 25 | } 26 | 27 | function parseHead(o: CheerioElement) { 28 | switch (o.type) { 29 | case 'text': 30 | const s = o.data.indexOf('楼. ') 31 | const rest = o.data.substring(s + 3) 32 | const head = o.data.substring(0, s) 33 | return `## ${head}楼\n${rest}` 34 | default: 35 | //调试 36 | //console.log(o) 37 | break 38 | } 39 | } 40 | 41 | function parseTail(o: CheerioElement) { 42 | switch (o.type) { 43 | case 'tag': 44 | const part = o.firstChild.children 45 | switch (part.length) { 46 | case 0: return '' 47 | case 2: 48 | const who = part[0].firstChild.firstChild.firstChild.data 49 | const when = part[0].lastChild.firstChild.data 50 | return `- Author: ${who}\n- Date: ${when}` 51 | default: 52 | //调试 53 | //console.log(o) 54 | break 55 | } 56 | default: 57 | //调试 58 | //console.log(o) 59 | break 60 | } 61 | } 62 | 63 | 64 | export function parseLine(o: CheerioElement) { 65 | switch (o.type) { 66 | case 'text': return o.data 67 | case 'tag': 68 | switch (o.name) { 69 | case 'br': return '\n\n' 70 | case 'a': return fixLink(o.attribs.href) 71 | case 'img': return fixEmoji(o.attribs.src) 72 | case 'span': return parseSpan(o) 73 | } 74 | default: 75 | //调试 76 | //console.log(o) 77 | break 78 | } 79 | } 80 | 81 | export function parseFloor(i: number, o: CheerioElement) { 82 | const cells = o.children 83 | let element: string[] = [parseHead(cells[0])] 84 | for (let x = 1; x < cells.length - 1; x++) { 85 | element = element.concat(parseLine(cells[x])) 86 | } 87 | return element.concat(parseTail(cells.slice(-1)[0])).join('') 88 | } -------------------------------------------------------------------------------- /projects/wapp2md/test/5544838611.md: -------------------------------------------------------------------------------- 1 | ## 1楼 2 | 大家好,我是渣渣辉。只要你发五昏钟,造会含我一样,学会则种解法。 3 | 4 | 因为是现场码字,所以有几率半途鸽。 5 | 6 | 一个比较简洁的方程镇楼。 7 | 8 | ![](http://imgsrc.baidu.com/forum/pic/item/4e5f251f95cad1c8c2330214733e6709c93d510e.jpg) 9 | 10 | 11 | 12 | - Author: 鉲钯锶基 13 | - Date: 2018-2-8 14 | 15 | ## 2楼 16 | “你知道吗?一元五次方程是没有求根公式的。” 17 | 18 | “哦,证给我看啊。” 19 | 20 | “涉及Galois理论,你不懂的。” 21 | 22 | “那你解一下下面那个方程。” 23 | 24 | “都跟你说了没有...**你怎么把解写出来了?!” 25 | 26 | “哇,好棒棒啊!大家来看数学大神!” 27 | 28 | -------------------------------------------------------- 29 | 30 | 适合各种场合装X,不需要懂Galois,不需要懂高数。只要五分钟,你就能学会这种方法! 31 | 32 | ![](http://imgsrc.baidu.com/forum/pic/item/f402632762d0f70349bf6cef04fa513d2697c582.jpg) 33 | 34 | - Author: 鉲钯锶基 35 | - Date: 2018-2-8 36 | 37 | ## 3楼 38 | ![](http://imgsrc.baidu.com/forum/pic/item/c95443a98226cffcb5854681b5014a90f603ea6c.jpg) 39 | 40 | ![](http://imgsrc.baidu.com/forum/pic/item/aa2e8794a4c27d1eaf42c2f717d5ad6eddc438aa.jpg) 41 | 42 | - Author: 鉲钯锶基 43 | - Date: 2018-2-8 44 | 45 | ## 4楼 46 | 学会这种方法后,你可以解的五次方程(少量示例): 47 | 48 | ![](http://imgsrc.baidu.com/forum/pic/item/c7104a90f603738d18b4f511bf1bb051f819ec1d.jpg) 49 | 50 | - Author: 鉲钯锶基 51 | - Date: 2018-2-8 52 | 53 | ## 5楼 54 | ![](http://imgsrc.baidu.com/forum/pic/item/74c062d9f2d3572cc37c65ef8613632762d0c37d.jpg) 55 | 56 | 我们要用的例子是五次方程里最经典最简单的不可约可解整系数方程x^5-5x+12=0. 57 | 58 | 任何将解五次方程的课程都必讲的例子。 59 | 60 | - Author: 鉲钯锶基 61 | - Date: 2018-2-8 62 | 63 | ## 6楼 64 | 首先,你需要打开Mathematica。Maple或Matlab亦可,不过我喜欢用Mathematica。 65 | 66 | 使用Mathematica解出这个方程的近似解。如果系数较大,精确度稍微调高一点,后面会有用。 67 | 68 | ![](http://imgsrc.baidu.com/forum/pic/item/7735ab18972bd407be912bce77899e510fb30944.jpg) 69 | 70 | - Author: 鉲钯锶基 71 | - Date: 2018-2-8 72 | 73 | ## 7楼 74 | ![](http://tb2.bdstatic.com/tb/editor/images/client/image_emoticon25.png) 75 | 76 | - Author: 园田海未😘 77 | - Date: 2018-2-8 78 | 79 | ## 8楼 80 | 哦补充一句,首先尝试直接解方程,如果方程可约,就直接用公式了。我们不介绍因式分解。 81 | 82 | 我们的方法只对不可约有用。 83 | 84 | 之后任意找一个五次本原单位根zeta,这里我用的是e^(4pi*i/5),你可以随你喜好选。 85 | 86 | 之后你的五个根应该是有两对互相长得很像的根和一个孤独的根。把它们简单的分一下组,然后算一下下面的ksi(k),k=1,2,3,4,这个数叫做五次方程的Lagrange预解式。 87 | 88 | ![](http://imgsrc.baidu.com/forum/pic/item/eefe76c6a7efce1ba81d32f9a351f3deb48f65e4.jpg) 89 | 90 | 之后把它们全部五次方,叫做真正的ksi(k)(不好意思我Mathematica力里面符号没选好),它们应该都很接近于实数。 91 | 92 | ![](http://imgsrc.baidu.com/forum/pic/item/0ede3bc79f3df8dcbb0f75a2c111728b471028e0.jpg) 93 | 94 | - Author: 鉲钯锶基 95 | - Date: 2018-2-8 96 | 97 | ## 9楼 98 | 接下来,你需要算ksi们的各种对称和。ksi(1)+...+ksi(4)呀,ksi(1)ksi(2)+ksi(1)ksi(3)+...+ksi(3)ksi(4)呀,ksi(1)ksi(2)ksi(3)+...呀,ksi(1)ksi(2)ksi(3)ksi(4)什么的。你会发现,它们都几乎是一个漂亮的整数。如果不是,第一你可能精度不够;第二你可能需要再换换几个根的位置。在我们的情况中,这四个对称和分别是-12500,7812500,8*5^12以及-5^15. 99 | 100 | ![](http://imgsrc.baidu.com/forum/pic/item/60068a82b9014a905ddca38ea5773912b31bee31.jpg) 101 | 102 | - Author: 鉲钯锶基 103 | - Date: 2018-2-8 104 | 105 | ## 10楼 106 | 之后用这四个整数作为一个四次方程的系数,用Mathematica把它的根解出来。 107 | 108 | 注意符号和韦达公式是一样的,所以是要负正负正原来的系数,别忘了。 109 | 110 | ![](http://imgsrc.baidu.com/forum/pic/item/791928381f30e9247965780240086e061c95f7d6.jpg) 111 | 112 | - Author: 鉲钯锶基 113 | - Date: 2018-2-8 114 | 115 | ## 11楼 116 | 你这个开头什么鬼![](http://tb2.bdstatic.com/tb/editor/images/client/image_emoticon25.png) 117 | 118 | - Author: 命令附魔书 119 | - Date: 2018-2-8 120 | 121 | ## 12楼 122 | 然后?然后还等什么啊,你的终点就在眼前啦!摆盘就完啦。 123 | 124 | 这四个根的和的五分之一就是你要的根啦!怎么把这个数字写的好看那就是你的事啦。 125 | 126 | 你不信吗?我们用近似值试试看? 127 | 128 | 哇哦! 129 | 130 | ![](http://imgsrc.baidu.com/forum/pic/item/a93b6059252dd42addd3e0980f3b5bb5c9eab839.jpg) 131 | 132 | - Author: 鉲钯锶基 133 | - Date: 2018-2-8 134 | 135 | ## 13楼 136 | 该方法不适用于非轮换的情况。 137 | 138 | 如果五次方程四次项不为零,你可以用简单的线性代换(二项式展开)消掉四次项,这个应该属于高中内容。 139 | 140 | 之后如果系数不是整数,你可以把根放缩一下。比如把x换成1000x,这样总可以让系数为整数。(看标题,我只讲有理数系数的方程) 141 | 142 | 之后你就可以背上几个解,然后在同学老师面前大肆炫耀啦! 143 | 144 | - Author: 鉲钯锶基 145 | - Date: 2018-2-8 146 | 147 | ## 14楼 148 | 好啦,这个是不是很简单啊?当然,它靠的是近似。所以不是普遍适用的。那么还有没有别的简单方法呢?有啊。不过这个方法由于比较严谨,所以五分钟估计是学不会啦!当然,依然不需要你了解Galois理论。顺便,我会在结尾给出所有方法的理论支撑,当然这个看懂就必须要你懂Galois理论了。(不过也可能直接鸽掉,我现在都不想打字了) 149 | 150 | - Author: 鉲钯锶基 151 | - Date: 2018-2-8 152 | 153 | ## 15楼 154 | 这个方法来自于Watson,它也部分归功于Cayley. 155 | 156 | 这并不是主流的做法,因为Dummit的做法更为流行,而且它的f20判别法很精巧。但是,我就是不用,你打我啊。![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803) 157 | 158 | - Author: 鉲钯锶基 159 | - Date: 2018-2-8 160 | 161 | ## 16楼 162 | 做笔记中,学习了。原来这些五次方程是用来坑好石大师的,果然高明(阴险) 163 | 164 | PS:您是mathematica派啊,太好了(#好感度+1) 可以多点到数吧科普 165 | 166 | 另外mathematica吧置顶说过了 要直接粘代码 不要截图 别人不好调试(复制)的 这样会减少粉丝数量 167 | 168 | - Author: KeyTo9 169 | - Date: 2018-2-8 170 | 171 | ## 17楼 172 | 首先面对一个方程,你需要用线性变换把它的四次项消掉,这个上面说过了,用二项式定理就可以了。 173 | 174 | 之后你需要先算一下它的判别式delta,它长这样: 175 | 176 | ![](http://imgsrc.baidu.com/forum/pic/item/b50249540923dd5417e14a5bdd09b3de9c824800.jpg) 177 | 178 | 先别急着骂,因为这里a=0,所以其实一些项是不用算的。 179 | 180 | 而且如果你用Dummit的方法,他附录有47页长的式子![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803)你到时候再骂不迟。 181 | 182 | - Author: 鉲钯锶基 183 | - Date: 2018-2-8 184 | 185 | ## 18楼 186 | 感谢@好石彩印超市 187 | 188 | 为我提供的例子,它非常适合讲解这种做法。我就恭敬不如从命了。 189 | 190 | ![](http://imgsrc.baidu.com/forum/pic/item/72228744ebf81a4cb85803fadb2a6059252da6a9.jpg) 191 | 192 | - Author: 鉲钯锶基 193 | - Date: 2018-2-8 194 | 195 | ## 19楼 196 | 首先,我们令y=k+x,它会变成这样 197 | 198 | ![](http://imgsrc.baidu.com/forum/pic/item/4710213fb80e7bec4f6bedd2232eb9389b506b65.jpg) 199 | 200 | - Author: 鉲钯锶基 201 | - Date: 2018-2-8 202 | 203 | ## 20楼 204 | 之后对照算出C,D,E,F 205 | 206 | ![](http://imgsrc.baidu.com/forum/pic/item/ee439822720e0cf30cf8a7c80646f21fbe09aa8c.jpg) 207 | 208 | 这个例子由于太为巧妙,所有的系数都非常完美,我怀疑这个例子是刻意用来证明这个方法的强大的。 209 | 210 | ![](http://imgsrc.baidu.com/forum/pic/item/07200a55b319ebc421429eaa8e26cffc1e1716d8.jpg) 211 | 212 | - Author: 鉲钯锶基 213 | - Date: 2018-2-8 214 | 215 | ## 21楼 216 | 之后算出K,L,M. 217 | 218 | ![](http://imgsrc.baidu.com/forum/pic/item/8e0e3a292df5e0feabec6132506034a85edf721a.jpg) 219 | 220 | 代码如下: 221 | 222 | c1 = -k^2 - 1; d1 = -2 k^3 - 2 k; e1 = -3 k^4 - 2 k^2 +  223 | 224 |  1; f1 = -4 k^5 + 4 k; k1 =  225 | 226 |  e1 + 3 c1^2; l1 = -2 d1 f1 + 3 e1^2 - 2 c1^2 e1 + 8 c1 d1^2 +  227 | 228 |  15 c1^4; m1 =  229 | 230 |  c1 f1^2 - 2 d1 e1 f1 + e1^3 - 2 c1^2 d1 f1 - 11 c1^2 e1^2 +  231 | 232 |  28 c1 d1^2 e1 - 16 d1^4 + 35 c1^4 e1 - 40 c1^3 d1^2 -  233 | 234 |  25 c1^6; FullSimplify[{k1, l1, m1}] 235 | 236 | 结果是: 237 | 238 | ![](http://imgsrc.baidu.com/forum/pic/item/31d3d5628535e5ddc69f4eec7ac6a7efce1b6267.jpg) 239 | 240 | - Author: 鉲钯锶基 241 | - Date: 2018-2-8 242 | 243 | ## 23楼 244 | 好了,算完K,L,M,delta之后,我们要看一下这个方程的根: 245 | 246 | ![](http://imgsrc.baidu.com/forum/pic/item/ab28b6003af33a871cb3ea29ca5c10385343b53d.jpg) 247 | 248 | Watson证明了如果五次方程不可约而可解,那么这个方程必有c*Sqrt[delta]型的根,其中c为有理数,delta是判别式。我们把这个根记作theta。 249 | 250 | 在我们的例子里,因为M是0,所以方程自动有零根,theta=0. 251 | 252 | - Author: 鉲钯锶基 253 | - Date: 2018-2-8 254 | 255 | ## 24楼 256 | 稍微修正一下,方程的根我们叫做phi,然后我们令theta=Sqrt[5]*phi/50,但这不改变我们这里的结果 257 | 258 | - Author: 鉲钯锶基 259 | - Date: 2018-2-8 260 | 261 | ## 25楼 262 | 之后theta和C将会有三种情况,均不为0,均为0,一个为0一个不是0.我们的方程满足最后一个条件。按照定理 263 | 264 | ![](http://imgsrc.baidu.com/forum/pic/item/4b3bc65c1038534303ad53129f13b07eca8088b1.jpg) 265 | 266 | ![](http://imgsrc.baidu.com/forum/pic/item/c95443a98226cffc88a06b81b5014a90f603ea09.jpg) 267 | 268 | 我们依次计算给定量,我们碰巧发现T=0,所以R1=R2=2(k^2+1)*i(i是虚数单位).从而算出u1=(1+k^2) (i + k)^3,之后依次算出u2,u3,u4.所以方程的解是: 269 | 270 | ![](http://imgsrc.baidu.com/forum/pic/item/65c4ad6eddc451daed1fdad8bafd5266d016322d.jpg) 271 | 272 | 我就直接用那个帖子里的解了。但说明一下,下面这个解是错误的,因为它的单值分支不同,所以不能直接写成下面的形式,而是要用五次方单位根表示,不过小问题无大碍。 273 | 274 | ![](http://imgsrc.baidu.com/forum/pic/item/f24594eef01f3a29079b03fd9525bc315c607c47.jpg) 275 | 276 | 所以最后的解是x=k+上面那串 277 | 278 | - Author: 鉲钯锶基 279 | - Date: 2018-2-8 280 | 281 | ## 26楼 282 | 那么如果是其他两种呢?参见下面的方法。 283 | 284 | ![](http://imgsrc.baidu.com/forum/pic/item/aeb30cf431adcbef7302ae35a0af2edda3cc9fe4.jpg) 285 | 286 | ![](http://imgsrc.baidu.com/forum/pic/item/7ff83901213fb80e6b96b1e43ad12f2eb938944b.jpg) 287 | 288 | 当两者均不为零时的情况,照着上面一步步算就是了。 289 | 290 | - Author: 鉲钯锶基 291 | - Date: 2018-2-8 292 | 293 | ## 27楼 294 | ![](http://imgsrc.baidu.com/forum/pic/item/b2ae6c81800a19d8815457363ffa828ba61e46bb.jpg) 295 | 296 | ![](http://imgsrc.baidu.com/forum/pic/item/ab28b6003af33a8707cdd329ca5c10385343b577.jpg) 297 | 298 | ![](http://imgsrc.baidu.com/forum/pic/item/d1d279310a55b319673551464fa98226cefc17c2.jpg) 299 | 300 | theta=正负C但不是0,依旧是照着算 301 | 302 | - Author: 鉲钯锶基 303 | - Date: 2018-2-8 304 | 305 | ## 28楼 306 | ![](http://imgsrc.baidu.com/forum/pic/item/0de182025aafa40fcadd1ceea764034f78f019ff.jpg) 307 | 308 | 最后一种情况,照情况代值即可。 309 | 310 | - Author: 鉲钯锶基 311 | - Date: 2018-2-8 312 | 313 | ## 29楼 314 | 上面是watson的方法,接下来我要介绍比它更有名且更流行的方法,Dummit的方法。 315 | 316 | 在介绍之前,我给你看一下它大概需要你算什么。 317 | 318 | 我们需要算一下一些系数b_ij,然后把T1到T4算出来。 319 | 320 | ![](http://imgsrc.baidu.com/forum/pic/item/f493b9014a90f603e77141743512b31bb151edd6.jpg) 321 | 322 | 然后每个系数是怎么算的呢?比如说b20吧, 323 | 324 | ![](http://imgsrc.baidu.com/forum/pic/item/d6c2fd1f4134970a733ccc1c99cad1c8a7865d43.jpg) 325 | 326 | ![](http://imgsrc.baidu.com/forum/pic/item/d140f3deb48f8c54b553191c36292df5e0fe7f16.jpg) 327 | 328 | 这大概是其中一个系数,像这样的还有39个.你把它们都算出来就可以啦。 329 | 330 | 在这里放弃还来得及。![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803) 331 | 332 | - Author: 鉲钯锶基 333 | - Date: 2018-2-8 334 | 335 | ## 30楼 336 | 但是Dummit的可贵之处在于,他的Galois对应很明晰,所以很学术化 337 | 338 | ![](http://imgsrc.baidu.com/forum/pic/item/3481f603738da977aabf5818bc51f8198618e307.jpg) 339 | 340 | 哦不懂也没关系,我还没打算讲证明 341 | 342 | - Author: 鉲钯锶基 343 | - Date: 2018-2-8 344 | 345 | ## 31楼 346 | 我首先简单介绍一下Dummit的f20判别法,这样你可以先用判别法判断是否可解,之后再用近似做。 347 | 348 | 我们依然假设五次方程不可约,而且四次项为0,所以形式为x^5+px^3+qx^2+rx+s=0. 349 | 350 | 之后把f20算出来。 351 | 352 | ![](http://imgsrc.baidu.com/forum/pic/item/72e531adcbef7609b40240ac22dda3cc7cd99e8e.jpg) 353 | 354 | Dummit观察到,五次方程可解,当且仅当上面的方程有唯一的有理根。所以你因式分解一下就可以知道原方程是否可解了。 355 | 356 | - Author: 鉲钯锶基 357 | - Date: 2018-2-8 358 | 359 | 360 | 361 | ## 33楼 362 | 顺便我能问一下这个能申精吗![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803) 363 | 364 | - Author: 鉲钯锶基 365 | - Date: 2018-2-8 366 | 367 | ## 34楼 368 | 有事,先鸽一下。 369 | 370 | 想知道为什么这样是对的,有两个选择。等我不知猴年马月的再次更新,努力学习近世代数,我建议后者。![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803) 371 | 372 | 我们后会有期。 373 | 374 | - Author: 鉲钯锶基 375 | - Date: 2018-2-8 376 | 377 | ## 35楼 378 | 走之前说一下,这个方法不适用于七次,或更高次的方程。如果我详细证明后,你一定会知道为什么。但是目前,我只能这么解释:因为可解五次方程的Galois群一定是F20的子群,所以它的Lagrange预解式几乎掌控了全局。但是因为S7太大,七次方程的Galois群比较复杂,即使是可解群也有很多怪异的可能性,所以不一定可以用这个方法做出来。 379 | 380 | - Author: 鉲钯锶基 381 | - Date: 2018-2-8 382 | 383 | ## 36楼 384 | 已加精液 385 | 386 | - Author: 越今朝💯 387 | - Date: 2018-2-8 388 | 389 | ## 37楼 390 | 快手 也解方程了,666 391 | 392 | - Author: 大将军00000 393 | - Date: 2018-2-8 394 | 395 | ## 38楼 396 | 真大师!![](http://tb2.bdstatic.com/tb/editor/images/face/i_f13.png?t=20140803)能指点一下我五次方程的解法是否有逻辑漏洞吗?谢谢! 397 | 398 | - Author: 😜好石 399 | - Date: 2018-2-8 400 | 401 | ## 39楼 402 | 太精彩了![](http://tb2.bdstatic.com/tb/editor/images/client/image_emoticon13.png)![](http://tb2.bdstatic.com/tb/editor/images/client/image_emoticon25.png) 403 | 404 | - Author: 驿外八春草 405 | - Date: 2018-2-8 406 | 407 | ## 40楼 408 | 有没有什么方法能解决所有x^5+px+q=0的方程![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803)![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803) 409 | 410 | - Author: Kemono🐶 411 | - Date: 2018-2-9 412 | 413 | ## 41楼 414 | ![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803)求爱技巧2333 415 | 416 | - Author: 杀意的百合♤♤ 417 | - Date: 2018-2-9 418 | 419 | ## 42楼 420 | 我五分钟并没有学会,并且可能50年都学不会![](http://tb2.bdstatic.com/tb/editor/images/face/i_f06.png?t=20140803) 421 | 422 | - Author: 雨夜里♬ 423 | - Date: 2018-2-9 424 | 425 | ## 43楼 426 | 我有个帖子是难题..谁能帮我解一下 427 | 428 | - Author: 爱情是伤感的Ai 429 | - Date: 2018-3-10 430 | 431 | ## 44楼 432 | 不知道有什么用~![](http://imgsrc.baidu.com/forum/pic/item/05da0a46f21fbe092ad28d1a67600c338644adc5.jpg) 433 | 434 | - Author: 喵酱💕156 435 | - Date: 2018-3-26 436 | 437 | ## 46楼 438 | ![](http://tb2.bdstatic.com/tb/editor/images/client/image_emoticon27.png)我还是老老实实求个数值解得了 439 | 440 | - Author: 849687583 441 | - Date: 2018-3-27 442 | 443 | ## 47楼 444 | ![](http://tb2.bdstatic.com/tb/editor/images/client/image_emoticon3.png) 445 | 446 | - Author: 蓝白胖次😄 447 | - Date: 2018-3-31 448 | 449 | ## 48楼 450 | 不错 451 | 452 | 顶一下 453 | 454 | - Author: pisco125 455 | - Date: 2018-4-1 456 | 457 | ## 50楼 458 | 啥,,,,,, 459 | 460 | - Author: 云紫枫溪 461 | - Date: 2018-4-21 462 | 463 | ## 51楼 464 | 用椭圆函数或者牛顿切线法 465 | 466 | - Author: 垃圾佬🌱 467 | - Date: 2018-4-29 468 | 469 | ## 52楼 470 | 厉害 471 | 472 | - Author: mazhigang0312 473 | - Date: 2018-5-3 474 | 475 | ## 53楼 476 | n个未知数,如果能列出n个正确的方程,是否必然有解呢 477 | 478 | - Author: 占星魔法师♂ 479 | - Date: 2018-6-12 480 | 481 | ## 54楼 482 | 我随便写几个数,根据这几个数写对应数量的方程,把这些数字变成未知数。理论上是不是一定有有限个解而且不会有无数个解。 483 | 484 | - Author: 占星魔法师♂ 485 | - Date: 2018-6-12 486 | 487 | ## 55楼 488 | 看不懂,先收藏了,慢慢研究 489 | 490 | - Author: 占星魔法师♂ 491 | - Date: 2018-6-12 492 | 493 | ## 56楼 494 | 5分钟没会,求打人地址。 495 | 496 | - Author: 哆嗒数学网🌐 497 | - Date: 2018-6-12 498 | 499 | ## 57楼 500 | u,v1,v2,w1,w2是多大,随便取值吗 501 | 502 | - Author: 占星魔法师♂ 503 | - Date: 2018-6-13 504 | 505 | ## 58楼 506 | 哦补充一句,首先尝试直接解方程,如果方程可约,就直接用公式了。我们不介绍因式分解。 507 | 508 | 我们的方法只对不可约有用。 509 | 510 | 之后任意找一个五次本原单位根zeta,这里我用的是e^(4pi*i/5),你可以随你喜好选。 511 | 512 | 之后你的五个根应该是有两对互相长得很像的根和一个孤独的根。把它们简单的分一下组,然后算一下下面的ksi(k),k=1,2,3,4,这个数叫做五次方程的Lagrange预解式。【图片】之后把它们全部五次方,叫做真正的ksi(k)(不好意思我Mathematica力里面符号没选好),它们应该都很接近于实数。(到底是任意找一个根还是五个根) 513 | 514 | - Author: 占星魔法师♂ 515 | - Date: 2018-6-13 516 | 517 | ## 60楼 518 | 能说一下的Watson名字吗?还有Dummit的. 519 | 520 | - Author: 数学真迷糊 521 | - Date: 2018-7-6 522 | 523 | ## 61楼 524 | 楼主这个帖子总结几位前辈的文章总结的很好。 525 | 526 | 23楼的六次方程是一个非常重要的物件,它的解直接联系到原本的五次方程是否代数可解。如果该六次方程无给定形式的根,说明五次方程代数不可解。因此就需要将这个六次方程联系到Jaccobi和Perron的六次方程,前者转换成后者以后,再利用椭圆函数(维尔斯特拉斯P函数)求解。当然后者的解不长,但推导之长之复杂也令人发指了。 527 | 528 | 最后我是不是应该吐槽一下“没有‘求爱技巧’”![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803)。多少年前的事情楼主居然还记得![](http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png?t=20140803) 529 | 530 | - Author: 丁香丛中的雪狼 531 | - Date: 2018-7-15 532 | 533 | ## 63楼 534 | 数值解: 535 | 536 | ![](http://imgsrc.baidu.com/forum/pic/item/4fbccbef76094b363d9c753aafcc7cd98c109de8.jpg) 537 | 538 | - Author: 拉马努金控1 539 | - Date: 2018-7-24 540 | 541 | ## 64楼 542 | 真是闲了,普及一下微积分不行吗? 543 | 544 | - Author: 爷的霸气十 545 | - Date: 2018-8-4 546 | 547 | ## 66楼 548 | 高于四次的一般代数方程不是没有一般形式的代数解吗? 549 | 550 | - Author: 墨染殇---- 551 | - Date: 2018-8-6 552 | 553 | ## 67楼 554 | 可以,![](http://tb2.bdstatic.com/tb/editor/images/client/image_emoticon6.png)少量高中数学? 555 | 556 | - Author: 神级24kAu 557 | - Date: 2018-9-28 558 | 559 | 560 | 561 | ## 68楼 562 | 告辞 563 | 564 | - Author: 超影º 565 | - Date: 1-5 08:34 566 | 567 | -------------------------------------------------------------------------------- /projects/wapp2md/test/page.ts: -------------------------------------------------------------------------------- 1 | import { writeFileSync } from 'fs' 2 | import { parseTiezi } from '../source' 3 | 4 | 5 | 6 | 7 | parseTiezi(5544838611) 8 | .then($ => { writeFileSync(`${__dirname}/5544838611.md`, $) }) -------------------------------------------------------------------------------- /projects/wapp2md/test/tieba.ts: -------------------------------------------------------------------------------- 1 | import { writeFileSync } from 'fs' 2 | import { parseTieba } from '../source' 3 | 4 | parseTieba('数学') 5 | .then($ => { writeFileSync(`${__dirname}/数学吧.json`, JSON.stringify($, null, 4)) }) 6 | 7 | 8 | parseTieba('galgame') 9 | .then($ => { writeFileSync(`${__dirname}/galgame 吧.json`, JSON.stringify($, null, 4)) }) 10 | -------------------------------------------------------------------------------- /projects/wapp2md/test/数学吧.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "title": "数学符号", 4 | "id": 4947394 5 | }, 6 | { 7 | "title": "◆ 数 ◆ 学 ◆ 吧 ◆ 花 ◆ 名 ◆ 册 ◆ [朋友们都...", 8 | "id": 5079602 9 | }, 10 | { 11 | "title": "连载之三——【非欧几何】", 12 | "id": 7003321 13 | }, 14 | { 15 | "title": "连载之四——【高等代数】", 16 | "id": 7003500 17 | }, 18 | { 19 | "title": "连载之五——【符号的逻辑——数理逻辑】", 20 | "id": 7073689 21 | }, 22 | { 23 | "title": "连载之六——【射影几何】", 24 | "id": 7513074 25 | }, 26 | { 27 | "title": "数学概论与数学年谱", 28 | "id": 8365135 29 | }, 30 | { 31 | "title": "《视觉过山车》(系列活动一)", 32 | "id": 9333795 33 | }, 34 | { 35 | "title": "《欺骗你的眼睛》(系列活动一,2)", 36 | "id": 9334733 37 | }, 38 | { 39 | "title": "《幻觉之中……》(系列活动一,3)", 40 | "id": 9335428 41 | }, 42 | { 43 | "title": "世界著名学术、政府部门站点", 44 | "id": 9611108 45 | }, 46 | { 47 | "title": "数学趣闻集粹", 48 | "id": 10941118 49 | }, 50 | { 51 | "title": "100个著名初等数学问题", 52 | "id": 11110790 53 | }, 54 | { 55 | "title": "证明的证明 作者:异调", 56 | "id": 11112257 57 | }, 58 | { 59 | "title": "♡♡♡世界上最经典智力题锦集&#...", 60 | "id": 12679845 61 | }, 62 | { 63 | "title": "陈省身教授的演讲:中国的数学", 64 | "id": 13116612 65 | }, 66 | { 67 | "title": "九 章 算 术(全)", 68 | "id": 13121965 69 | }, 70 | { 71 | "title": "与数学有关的一些英语词汇", 72 | "id": 14731326 73 | }, 74 | { 75 | "title": "希尔伯特23个数学问题", 76 | "id": 15254649 77 | }, 78 | { 79 | "title": "[推荐!!!]你可以学会如何解决一个难题!-", 80 | "id": 15327262 81 | }, 82 | { 83 | "title": "21世纪七大数学难题 【每题悬赏100万美元】", 84 | "id": 16678955 85 | }, 86 | { 87 | "title": "数学思维比数学运算更重要", 88 | "id": 18466107 89 | }, 90 | { 91 | "title": "趣味数学题", 92 | "id": 19160657 93 | }, 94 | { 95 | "title": "考好数学的四大绝招", 96 | "id": 19161214 97 | }, 98 | { 99 | "title": "浅谈数学学习方法", 100 | "id": 19163804 101 | }, 102 | { 103 | "title": "数学书籍下载", 104 | "id": 19553060 105 | }, 106 | { 107 | "title": "心目中的英雄", 108 | "id": 20093755 109 | }, 110 | { 111 | "title": "数学家名中英文对照", 112 | "id": 20219114 113 | }, 114 | { 115 | "title": "古典难题的挑战——几何三大难题及其解决", 116 | "id": 20881288 117 | }, 118 | { 119 | "title": "解答这些问题~~~~", 120 | "id": 21101111 121 | }, 122 | { 123 | "title": "第44届IMO试题", 124 | "id": 22030545 125 | }, 126 | { 127 | "title": "暑假活动一--【数学游戏做起来】", 128 | "id": 22034089 129 | }, 130 | { 131 | "title": "数学的分支", 132 | "id": 22080169 133 | }, 134 | { 135 | "title": "原创,各国算圆周率!", 136 | "id": 22348163 137 | }, 138 | { 139 | "title": "丘成桐的话", 140 | "id": 22657267 141 | }, 142 | { 143 | "title": "BIRCH AND SWINNERTON-DYER CONJE...", 144 | "id": 23096992 145 | }, 146 | { 147 | "title": "Riemannζ函数与Riemann猜想", 148 | "id": 23097418 149 | }, 150 | { 151 | "title": "考试折磨不了真雄杰——-记厄尔米特", 152 | "id": 23693285 153 | }, 154 | { 155 | "title": "2006年高考数学备考建议", 156 | "id": 23889819 157 | }, 158 | { 159 | "title": "2005年IMO试题", 160 | "id": 24024202 161 | }, 162 | { 163 | "title": "朗兰兹纲领", 164 | "id": 24412223 165 | }, 166 | { 167 | "title": "以华人命名的数学成果", 168 | "id": 24412569 169 | }, 170 | { 171 | "title": "巧用智能ABC输入数学符号", 172 | "id": 24675659 173 | }, 174 | { 175 | "title": "因特网上的数学竞赛资源(国外和港澳台部分)", 176 | "id": 24677053 177 | }, 178 | { 179 | "title": "【数学吧导航中心】——「思考着,快乐着」", 180 | "id": 28216656 181 | }, 182 | { 183 | "title": "问题是数学发展的源泉(转)", 184 | "id": 29643646 185 | }, 186 | { 187 | "title": "追求好的数学  ——叶中豪先生答《科学时报》温新红的采访", 188 | "id": 33140140 189 | }, 190 | { 191 | "title": "《孙子算经》", 192 | "id": 34469141 193 | }, 194 | { 195 | "title": "回忆做华罗庚研究生的日子 冯克勤", 196 | "id": 39248675 197 | }, 198 | { 199 | "title": "数学自修推荐书目", 200 | "id": 45449053 201 | }, 202 | { 203 | "title": "数学悖论与三次数学危机", 204 | "id": 46797017 205 | }, 206 | { 207 | "title": "浙大数学系主任的一篇演讲:知识,技巧与想象力[转]", 208 | "id": 49772742 209 | }, 210 | { 211 | "title": "对国内数学的思考(转贴)", 212 | "id": 54934297 213 | }, 214 | { 215 | "title": "世界第一数学强校的背后", 216 | "id": 70785981 217 | }, 218 | { 219 | "title": "数学家简介[转帖][申精]", 220 | "id": 74634646 221 | }, 222 | { 223 | "title": "[转帖]数学危机与数学的发展(一)", 224 | "id": 74636032 225 | }, 226 | { 227 | "title": "[转帖]数学危机与数学的发展(二)", 228 | "id": 74636567 229 | }, 230 | { 231 | "title": "初中几何一般证题途径[转]", 232 | "id": 75485001 233 | }, 234 | { 235 | "title": "数学奥林匹克升级题", 236 | "id": 80322749 237 | }, 238 | { 239 | "title": "【数学难题碎锦】(第一期)", 240 | "id": 85981562 241 | }, 242 | { 243 | "title": "调查一下", 244 | "id": 88505449 245 | }, 246 | { 247 | "title": "吧里最近未解决或未完全解决的题目", 248 | "id": 88507892 249 | }, 250 | { 251 | "title": "\"十亿\"以内质数分布及概率", 252 | "id": 92696823 253 | }, 254 | { 255 | "title": "数学科普之数学史上的天才——伽罗华的传奇人生!", 256 | "id": 104010379 257 | }, 258 | { 259 | "title": "我国科学家破解百年数学难题庞加莱猜想(图)", 260 | "id": 104469606 261 | }, 262 | { 263 | "title": "【原创】数学定义学习方法", 264 | "id": 108840498 265 | }, 266 | { 267 | "title": "复数的萌芽、形成与发展----学学辩证法", 268 | "id": 109080476 269 | }, 270 | { 271 | "title": "数学悖论奇景[转自百科知识吧]", 272 | "id": 109455010 273 | }, 274 | { 275 | "title": "数学无穷思想的发展历程[韩雪涛 作]", 276 | "id": 109584490 277 | }, 278 | { 279 | "title": "【精选】数学大师华罗庚治学语录及其小结", 280 | "id": 109627562 281 | }, 282 | { 283 | "title": "离散数学图灵机文章!!!加精!!!", 284 | "id": 110147201 285 | }, 286 | { 287 | "title": "【经典的题】数字学的世界名题,献给数学吧的各位", 288 | "id": 111871770 289 | }, 290 | { 291 | "title": "著名数学大师朱熹平教授的经典语录(精心整理, 欢迎转载)", 292 | "id": 113477405 293 | }, 294 | { 295 | "title": "2006年imo试题", 296 | "id": 114215869 297 | }, 298 | { 299 | "title": "【专贴】2006 菲尔兹奖", 300 | "id": 128218612 301 | }, 302 | { 303 | "title": "说数学分析难的同学,请听菜鸟一言(高手勿进)(申精)", 304 | "id": 136858948 305 | }, 306 | { 307 | "title": "丘成桐:新一代华人数学家代表", 308 | "id": 151671665 309 | }, 310 | { 311 | "title": "陈省身教授谈中国数学教育", 312 | "id": 151677247 313 | }, 314 | { 315 | "title": "数学家闵嗣鹤", 316 | "id": 151691514 317 | }, 318 | { 319 | "title": "从高次代数方程和求根公式到伽罗华理论", 320 | "id": 157424994 321 | }, 322 | { 323 | "title": "关于数学大师佩雷尔曼的趣闻", 324 | "id": 158530660 325 | }, 326 | { 327 | "title": "2007年CMO试题及答案", 328 | "id": 171721817 329 | }, 330 | { 331 | "title": "把1kg初始温度为0度的水烧开至少需要多少能量?", 332 | "id": 175625965 333 | }, 334 | { 335 | "title": "数学吧游戏", 336 | "id": 177432993 337 | }, 338 | { 339 | "title": "!!圆周率专辑!!", 340 | "id": 183230396 341 | }, 342 | { 343 | "title": "数学.人生{原创}", 344 | "id": 236406857 345 | }, 346 | { 347 | "title": "4个数字加减乘除运算后最多可以有多少个结果?", 348 | "id": 239846151 349 | }, 350 | { 351 | "title": "【高中数学】★个人学习的经验★【申精】", 352 | "id": 279135950 353 | }, 354 | { 355 | "title": "【怀念】东方角落的所有题目,一起来回忆一下整理一下吧", 356 | "id": 280612643 357 | }, 358 | { 359 | "title": "埃舍尔的不可能世界(数学家?艺术家?思想家?都是!)", 360 | "id": 287950835 361 | }, 362 | { 363 | "title": "数学吧吧主守则7条", 364 | "id": 295484678 365 | }, 366 | { 367 | "title": "数列专题", 368 | "id": 302228271 369 | }, 370 | { 371 | "title": "不定方程专题", 372 | "id": 305156999 373 | }, 374 | { 375 | "title": "不等式专题", 376 | "id": 305647608 377 | }, 378 | { 379 | "title": "数论专题", 380 | "id": 310850398 381 | }, 382 | { 383 | "title": "数学归纳法专题", 384 | "id": 310884267 385 | }, 386 | { 387 | "title": "CMO2008", 388 | "id": 313204063 389 | }, 390 | { 391 | "title": "费马点探索", 392 | "id": 313357951 393 | }, 394 | { 395 | "title": "复数专题", 396 | "id": 313949041 397 | }, 398 | { 399 | "title": "函数方程专题", 400 | "id": 314623857 401 | }, 402 | { 403 | "title": "Michael Atiyah:二十世纪的数学", 404 | "id": 320440646 405 | }, 406 | { 407 | "title": "【探索】立体解析几何", 408 | "id": 321786456 409 | }, 410 | { 411 | "title": "围棋问题", 412 | "id": 372248697 413 | }, 414 | { 415 | "title": "数学吧同学逐一数", 416 | "id": 382517457 417 | }, 418 | { 419 | "title": "2008全国高考数学部分试题", 420 | "id": 402202605 421 | }, 422 | { 423 | "title": "【推荐】Microsoft Math——最强大的数学计算器(申...", 424 | "id": 444275593 425 | }, 426 | { 427 | "title": "未解之题集", 428 | "id": 498917274 429 | }, 430 | { 431 | "title": "数学家名言(全集)【申精】", 432 | "id": 499333630 433 | }, 434 | { 435 | "title": "美国数学那么简单怎么科技还是那么发达?", 436 | "id": 503906751 437 | }, 438 | { 439 | "title": "【震惊!】【原创!】【空间分割定理!】【精品】", 440 | "id": 529415996 441 | }, 442 | { 443 | "title": "【数学动态】浙大博士解开一个世界数学难题 赢得哈佛人尊重", 444 | "id": 529828326 445 | }, 446 | { 447 | "title": "【概率问题】最佳策略设计", 448 | "id": 530627072 449 | }, 450 | { 451 | "title": "【重发】(双曲)三角函数的无穷乘积、幂级数展开,及某些级数的和", 452 | "id": 544160792 453 | }, 454 | { 455 | "title": "◆◆◆【最终圣战】【双心五边终结篇】◆◆◆", 456 | "id": 550180654 457 | }, 458 | { 459 | "title": "中学数学的若干经验【连载】", 460 | "id": 554995031 461 | }, 462 | { 463 | "title": "数学分支之父", 464 | "id": 557506291 465 | }, 466 | { 467 | "title": "数学吧广告区", 468 | "id": 558575524 469 | }, 470 | { 471 | "title": "转载一篇文章——齐次不等式的schur分拆处理法", 472 | "id": 559358243 473 | }, 474 | { 475 | "title": "【IMO试题汇总】(带答案)(更新)", 476 | "id": 570669708 477 | }, 478 | { 479 | "title": "不等试题库", 480 | "id": 571438327 481 | }, 482 | { 483 | "title": "我也来提出巴赫猜想的一种“解决”方法,娱乐一下,勿拍砖", 484 | "id": 592037661 485 | }, 486 | { 487 | "title": "IMO2009试题[转自奥数之家)", 488 | "id": 612243812 489 | }, 490 | { 491 | "title": "1986~2005CMO试题及答案", 492 | "id": 612610970 493 | }, 494 | { 495 | "title": "尺规问题 能否找到椭圆的焦点?", 496 | "id": 663494813 497 | }, 498 | { 499 | "title": "令人敬畏的数学:整系数多项式的根在复平面上的图像", 500 | "id": 680714841 501 | }, 502 | { 503 | "title": "二十棵树问题", 504 | "id": 688015174 505 | }, 506 | { 507 | "title": "[资料/解答]关于n次代数方程有n个根", 508 | "id": 700717036 509 | }, 510 | { 511 | "title": "打公式 发图片 重要资源 吧规 意见箱≡∮∪∩∈θ≠", 512 | "id": 710364703 513 | }, 514 | { 515 | "title": "常问数学问题集合(问智力题的请先进)", 516 | "id": 722957917 517 | }, 518 | { 519 | "title": "【知识】数学专题——数学近现代史介绍(独家报道)(震撼)!", 520 | "id": 744151367 521 | }, 522 | { 523 | "title": "晒晒我看过的一部分数学物理书!", 524 | "id": 761404281 525 | }, 526 | { 527 | "title": "重发歌德巴赫猜想1+2证明!!1", 528 | "id": 765746943 529 | }, 530 | { 531 | "title": "【欧拉专贴】", 532 | "id": 804137811 533 | }, 534 | { 535 | "title": "【公理化】", 536 | "id": 807071987 537 | }, 538 | { 539 | "title": "【重发】数学著作列表", 540 | "id": 839802808 541 | }, 542 | { 543 | "title": "【转】几何吧日志 1月号", 544 | "id": 839995426 545 | }, 546 | { 547 | "title": "ζ(3) Is Irrational!【中文版】", 548 | "id": 844856054 549 | }, 550 | { 551 | "title": "【资料·整理】无理数指数方幂", 552 | "id": 855910112 553 | }, 554 | { 555 | "title": "【资料、原创】基础不等式", 556 | "id": 858907690 557 | }, 558 | { 559 | "title": "平面几何定理", 560 | "id": 859700321 561 | }, 562 | { 563 | "title": "2010IMO51的试题及答案", 564 | "id": 861687099 565 | }, 566 | { 567 | "title": "【资料、原创】浅谈不等式证明二三事", 568 | "id": 862802914 569 | }, 570 | { 571 | "title": "【收题了】几何题,大家踊跃发问呵、", 572 | "id": 866693188 573 | }, 574 | { 575 | "title": "高中函数的12种求法", 576 | "id": 904392763 577 | }, 578 | { 579 | "title": "(搬运自校内)老丘的讲话,个人以为很切中要害", 580 | "id": 929971703 581 | }, 582 | { 583 | "title": "余弦加法定理的几种新证法", 584 | "id": 950833083 585 | }, 586 | { 587 | "title": "【好题供讨论】usrbin能活下来吗?", 588 | "id": 953682039 589 | }, 590 | { 591 | "title": "本人本学期的集盒论课程内容连载", 592 | "id": 979753067 593 | }, 594 | { 595 | "title": "你不一定知道的一些数学事实", 596 | "id": 1003040383 597 | }, 598 | { 599 | "title": "一道著名试题漂亮解法。(推荐)", 600 | "id": 1289786452 601 | }, 602 | { 603 | "title": "龙年气象新,梦想定成真!数学吧祝算子们春节快乐!", 604 | "id": 1384969339 605 | }, 606 | { 607 | "title": "咳咳。貌似建立了个百度贴吧数学吧官方QQ群……", 608 | "id": 1386714435 609 | }, 610 | { 611 | "title": "数学吧祝算子们有情人终成眷属!Happy Valentine'...", 612 | "id": 1412233246 613 | }, 614 | { 615 | "title": "那些年,竞赛党的暧昧故事", 616 | "id": 1482674823 617 | }, 618 | { 619 | "title": "过不了英语六级 在数吧裸奔一圈", 620 | "id": 1592981060 621 | }, 622 | { 623 | "title": "【科普】希尔伯特几何基础的五组公理", 624 | "id": 2115311311 625 | }, 626 | { 627 | "title": "畅游数吧之常用帖子推荐", 628 | "id": 2154550068 629 | }, 630 | { 631 | "title": "【水星】数学毁灭者", 632 | "id": 2154629372 633 | }, 634 | { 635 | "title": "★ ★   亲爱的算子们 新年快乐~~  ★ ★", 636 | "id": 2156141876 637 | }, 638 | { 639 | "title": "【水星】图像证明者", 640 | "id": 2300227678 641 | }, 642 | { 643 | "title": "高考数学讨论专用贴", 644 | "id": 2379623485 645 | }, 646 | { 647 | "title": "【高考题库】", 648 | "id": 2535775861 649 | }, 650 | { 651 | "title": "【水】   最后一水", 652 | "id": 2541337029 653 | }, 654 | { 655 | "title": "【水星】看似寻常最奇崛——一些“简单”的开放性问题与进展", 656 | "id": 2552506167 657 | }, 658 | { 659 | "title": "【水星】走进数学——雅可比猜想,它的思想与进展", 660 | "id": 2747840829 661 | }, 662 | { 663 | "title": "Dirichlet 积分", 664 | "id": 2792928789 665 | }, 666 | { 667 | "title": "【水星】1/1^2+1/2^2+1/3^2+..+1/n^2+...", 668 | "id": 2831426005 669 | }, 670 | { 671 | "title": "[吧内搜索]. 这些帖子都挺好 【精品】", 672 | "id": 3050268036 673 | }, 674 | { 675 | "title": "平面几何趣题", 676 | "id": 3105717339 677 | }, 678 | { 679 | "title": "[水] [竞赛渣渣] 一些特殊定积分的计算", 680 | "id": 3247156530 681 | }, 682 | { 683 | "title": "【庆某节&论坛】闲话不等式。。。(高考前最后的小礼物)", 684 | "id": 3586543250 685 | }, 686 | { 687 | "title": "我是不是天才?", 688 | "id": 4053607295 689 | }, 690 | { 691 | "title": "删帖投诉", 692 | "id": 4072369248 693 | }, 694 | { 695 | "title": "日经贴的定义与常见日经总结", 696 | "id": 4072369350 697 | }, 698 | { 699 | "title": "发表提问帖的操作指导规范", 700 | "id": 4072369848 701 | }, 702 | { 703 | "title": "主题帖与回复发帖细则【试行】", 704 | "id": 4075377440 705 | }, 706 | { 707 | "title": "QQ群与贴吧群宣传帖", 708 | "id": 4075389331 709 | }, 710 | { 711 | "title": "【难题向】为妹妹征集一万道优美的难题", 712 | "id": 4079508846 713 | }, 714 | { 715 | "title": "数学吧基础吧规 2015版", 716 | "id": 4125342442 717 | }, 718 | { 719 | "title": "【点进本帖以防制杖】日经汇总", 720 | "id": 4221254448 721 | }, 722 | { 723 | "title": "数学吧基础吧规  2015修订版", 724 | "id": 4222848414 725 | }, 726 | { 727 | "title": "【2016高考讨论楼】数列", 728 | "id": 4595187831 729 | }, 730 | { 731 | "title": "【2016高考讨论楼】其他", 732 | "id": 4595249563 733 | }, 734 | { 735 | "title": "【2016高考讨论楼】计数原理", 736 | "id": 4595261103 737 | }, 738 | { 739 | "title": "【2016高考题讨论】三角函数", 740 | "id": 4595264458 741 | }, 742 | { 743 | "title": "【2016高考题讨论】导数及其运用", 744 | "id": 4595545559 745 | }, 746 | { 747 | "title": "【2016高考讨论楼】解析几何", 748 | "id": 4595564685 749 | }, 750 | { 751 | "title": "【宣群】真·百度数学吧官方群", 752 | "id": 4857507933 753 | }, 754 | { 755 | "title": "[自己手写答案]数学分析习题集 北京大学数学系", 756 | "id": 4919747990 757 | }, 758 | { 759 | "title": "首届数学吧吧赛试题格式改良版", 760 | "id": 4953644921 761 | }, 762 | { 763 | "title": "浅谈一些有关积分证明的东西", 764 | "id": 4970395362 765 | }, 766 | { 767 | "title": "问题接龙第一弹", 768 | "id": 5078559800 769 | }, 770 | { 771 | "title": "【日更】每天三道高考题", 772 | "id": 5080318023 773 | }, 774 | { 775 | "title": "数学分析看起来显然却又很难写出的题接龙", 776 | "id": 5080474134 777 | }, 778 | { 779 | "title": "【樱花】【连载】无理性的证明和判定准则", 780 | "id": 5115713105 781 | }, 782 | { 783 | "title": "【樱花】cosx=x的解析解的计算", 784 | "id": 5137327406 785 | }, 786 | { 787 | "title": "这会是一个精品贴", 788 | "id": 5144601571 789 | }, 790 | { 791 | "title": "第二届吧赛群大学组讨论暨答案发布", 792 | "id": 5242688277 793 | }, 794 | { 795 | "title": "征解,首个在本帖发答案的将得到", 796 | "id": 5278087584 797 | }, 798 | { 799 | "title": "【吧赛】百度数学吧第二届吧赛(中学组)试卷及答案", 800 | "id": 5366561840 801 | }, 802 | { 803 | "title": "近日吧内涌现一些收钱解答题目的回复", 804 | "id": 5483460734 805 | }, 806 | { 807 | "title": "【通知】关于第三届数吧吧赛的紧急通知", 808 | "id": 5536620603 809 | }, 810 | { 811 | "title": "最快手的可解有理五次方程解法,五分钟包会,不会你来打我!", 812 | "id": 5544838611 813 | }, 814 | { 815 | "title": "吧赛题目已发布置顶", 816 | "id": 5825650016 817 | }, 818 | { 819 | "title": "吧主发日经数列", 820 | "id": 5850666268 821 | } 822 | ] -------------------------------------------------------------------------------- /projects/wapp2md/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "include": [ 4 | "source" 5 | ], 6 | "exclude": [ 7 | "test" 8 | ], 9 | "compilerOptions": { 10 | "outDir": "dist" 11 | } 12 | } -------------------------------------------------------------------------------- /projects/web2md/.npmignore: -------------------------------------------------------------------------------- 1 | source/* 2 | test/* 3 | .vscode/* 4 | tsconfig.json -------------------------------------------------------------------------------- /projects/web2md/License.md: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | ### 1. Definitions 5 | 6 | **1.1. “Contributor”** 7 | means each individual or legal entity that creates, contributes to 8 | the creation of, or owns Covered Software. 9 | 10 | **1.2. “Contributor Version”** 11 | means the combination of the Contributions of others (if any) used 12 | by a Contributor and that particular Contributor's Contribution. 13 | 14 | **1.3. “Contribution”** 15 | means Covered Software of a particular Contributor. 16 | 17 | **1.4. “Covered Software”** 18 | means Source Code Form to which the initial Contributor has attached 19 | the notice in Exhibit A, the Executable Form of such Source Code 20 | Form, and Modifications of such Source Code Form, in each case 21 | including portions thereof. 22 | 23 | **1.5. “Incompatible With Secondary Licenses”** 24 | means 25 | 26 | * **(a)** that the initial Contributor has attached the notice described 27 | in Exhibit B to the Covered Software; or 28 | * **(b)** that the Covered Software was made available under the terms of 29 | version 1.1 or earlier of the License, but not also under the 30 | terms of a Secondary License. 31 | 32 | **1.6. “Executable Form”** 33 | means any form of the work other than Source Code Form. 34 | 35 | **1.7. “Larger Work”** 36 | means a work that combines Covered Software with other material, in 37 | a separate file or files, that is not Covered Software. 38 | 39 | **1.8. “License”** 40 | means this document. 41 | 42 | **1.9. “Licensable”** 43 | means having the right to grant, to the maximum extent possible, 44 | whether at the time of the initial grant or subsequently, any and 45 | all of the rights conveyed by this License. 46 | 47 | **1.10. “Modifications”** 48 | means any of the following: 49 | 50 | * **(a)** any file in Source Code Form that results from an addition to, 51 | deletion from, or modification of the contents of Covered 52 | Software; or 53 | * **(b)** any new file in Source Code Form that contains any Covered 54 | Software. 55 | 56 | **1.11. “Patent Claims” of a Contributor** 57 | means any patent claim(s), including without limitation, method, 58 | process, and apparatus claims, in any patent Licensable by such 59 | Contributor that would be infringed, but for the grant of the 60 | License, by the making, using, selling, offering for sale, having 61 | made, import, or transfer of either its Contributions or its 62 | Contributor Version. 63 | 64 | **1.12. “Secondary License”** 65 | means either the GNU General Public License, Version 2.0, the GNU 66 | Lesser General Public License, Version 2.1, the GNU Affero General 67 | Public License, Version 3.0, or any later versions of those 68 | licenses. 69 | 70 | **1.13. “Source Code Form”** 71 | means the form of the work preferred for making modifications. 72 | 73 | **1.14. “You” (or “Your”)** 74 | means an individual or a legal entity exercising rights under this 75 | License. For legal entities, “You” includes any entity that 76 | controls, is controlled by, or is under common control with You. For 77 | purposes of this definition, “control” means **(a)** the power, direct 78 | or indirect, to cause the direction or management of such entity, 79 | whether by contract or otherwise, or **(b)** ownership of more than 80 | fifty percent (50%) of the outstanding shares or beneficial 81 | ownership of such entity. 82 | 83 | 84 | ### 2. License Grants and Conditions 85 | 86 | #### 2.1. Grants 87 | 88 | Each Contributor hereby grants You a world-wide, royalty-free, 89 | non-exclusive license: 90 | 91 | * **(a)** under intellectual property rights (other than patent or trademark) 92 | Licensable by such Contributor to use, reproduce, make available, 93 | modify, display, perform, distribute, and otherwise exploit its 94 | Contributions, either on an unmodified basis, with Modifications, or 95 | as part of a Larger Work; and 96 | * **(b)** under Patent Claims of such Contributor to make, use, sell, offer 97 | for sale, have made, import, and otherwise transfer either its 98 | Contributions or its Contributor Version. 99 | 100 | #### 2.2. Effective Date 101 | 102 | The licenses granted in Section 2.1 with respect to any Contribution 103 | become effective for each Contribution on the date the Contributor first 104 | distributes such Contribution. 105 | 106 | #### 2.3. Limitations on Grant Scope 107 | 108 | The licenses granted in this Section 2 are the only rights granted under 109 | this License. No additional rights or licenses will be implied from the 110 | distribution or licensing of Covered Software under this License. 111 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 112 | Contributor: 113 | 114 | * **(a)** for any code that a Contributor has removed from Covered Software; 115 | or 116 | * **(b)** for infringements caused by: **(i)** Your and any other third party's 117 | modifications of Covered Software, or **(ii)** the combination of its 118 | Contributions with other software (except as part of its Contributor 119 | Version); or 120 | * **(c)** under Patent Claims infringed by Covered Software in the absence of 121 | its Contributions. 122 | 123 | This License does not grant any rights in the trademarks, service marks, 124 | or logos of any Contributor (except as may be necessary to comply with 125 | the notice requirements in Section 3.4). 126 | 127 | #### 2.4. Subsequent Licenses 128 | 129 | No Contributor makes additional grants as a result of Your choice to 130 | distribute the Covered Software under a subsequent version of this 131 | License (see Section 10.2) or under the terms of a Secondary License (if 132 | permitted under the terms of Section 3.3). 133 | 134 | #### 2.5. Representation 135 | 136 | Each Contributor represents that the Contributor believes its 137 | Contributions are its original creation(s) or it has sufficient rights 138 | to grant the rights to its Contributions conveyed by this License. 139 | 140 | #### 2.6. Fair Use 141 | 142 | This License is not intended to limit any rights You have under 143 | applicable copyright doctrines of fair use, fair dealing, or other 144 | equivalents. 145 | 146 | #### 2.7. Conditions 147 | 148 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 149 | in Section 2.1. 150 | 151 | 152 | ### 3. Responsibilities 153 | 154 | #### 3.1. Distribution of Source Form 155 | 156 | All distribution of Covered Software in Source Code Form, including any 157 | Modifications that You create or to which You contribute, must be under 158 | the terms of this License. You must inform recipients that the Source 159 | Code Form of the Covered Software is governed by the terms of this 160 | License, and how they can obtain a copy of this License. You may not 161 | attempt to alter or restrict the recipients' rights in the Source Code 162 | Form. 163 | 164 | #### 3.2. Distribution of Executable Form 165 | 166 | If You distribute Covered Software in Executable Form then: 167 | 168 | * **(a)** such Covered Software must also be made available in Source Code 169 | Form, as described in Section 3.1, and You must inform recipients of 170 | the Executable Form how they can obtain a copy of such Source Code 171 | Form by reasonable means in a timely manner, at a charge no more 172 | than the cost of distribution to the recipient; and 173 | 174 | * **(b)** You may distribute such Executable Form under the terms of this 175 | License, or sublicense it under different terms, provided that the 176 | license for the Executable Form does not attempt to limit or alter 177 | the recipients' rights in the Source Code Form under this License. 178 | 179 | #### 3.3. Distribution of a Larger Work 180 | 181 | You may create and distribute a Larger Work under terms of Your choice, 182 | provided that You also comply with the requirements of this License for 183 | the Covered Software. If the Larger Work is a combination of Covered 184 | Software with a work governed by one or more Secondary Licenses, and the 185 | Covered Software is not Incompatible With Secondary Licenses, this 186 | License permits You to additionally distribute such Covered Software 187 | under the terms of such Secondary License(s), so that the recipient of 188 | the Larger Work may, at their option, further distribute the Covered 189 | Software under the terms of either this License or such Secondary 190 | License(s). 191 | 192 | #### 3.4. Notices 193 | 194 | You may not remove or alter the substance of any license notices 195 | (including copyright notices, patent notices, disclaimers of warranty, 196 | or limitations of liability) contained within the Source Code Form of 197 | the Covered Software, except that You may alter any license notices to 198 | the extent required to remedy known factual inaccuracies. 199 | 200 | #### 3.5. Application of Additional Terms 201 | 202 | You may choose to offer, and to charge a fee for, warranty, support, 203 | indemnity or liability obligations to one or more recipients of Covered 204 | Software. However, You may do so only on Your own behalf, and not on 205 | behalf of any Contributor. You must make it absolutely clear that any 206 | such warranty, support, indemnity, or liability obligation is offered by 207 | You alone, and You hereby agree to indemnify every Contributor for any 208 | liability incurred by such Contributor as a result of warranty, support, 209 | indemnity or liability terms You offer. You may include additional 210 | disclaimers of warranty and limitations of liability specific to any 211 | jurisdiction. 212 | 213 | 214 | ### 4. Inability to Comply Due to Statute or Regulation 215 | 216 | If it is impossible for You to comply with any of the terms of this 217 | License with respect to some or all of the Covered Software due to 218 | statute, judicial order, or regulation then You must: **(a)** comply with 219 | the terms of this License to the maximum extent possible; and **(b)** 220 | describe the limitations and the code they affect. Such description must 221 | be placed in a text file included with all distributions of the Covered 222 | Software under this License. Except to the extent prohibited by statute 223 | or regulation, such description must be sufficiently detailed for a 224 | recipient of ordinary skill to be able to understand it. 225 | 226 | 227 | ### 5. Termination 228 | 229 | **5.1.** The rights granted under this License will terminate automatically 230 | if You fail to comply with any of its terms. However, if You become 231 | compliant, then the rights granted under this License from a particular 232 | Contributor are reinstated **(a)** provisionally, unless and until such 233 | Contributor explicitly and finally terminates Your grants, and **(b)** on an 234 | ongoing basis, if such Contributor fails to notify You of the 235 | non-compliance by some reasonable means prior to 60 days after You have 236 | come back into compliance. Moreover, Your grants from a particular 237 | Contributor are reinstated on an ongoing basis if such Contributor 238 | notifies You of the non-compliance by some reasonable means, this is the 239 | first time You have received notice of non-compliance with this License 240 | from such Contributor, and You become compliant prior to 30 days after 241 | Your receipt of the notice. 242 | 243 | **5.2.** If You initiate litigation against any entity by asserting a patent 244 | infringement claim (excluding declaratory judgment actions, 245 | counter-claims, and cross-claims) alleging that a Contributor Version 246 | directly or indirectly infringes any patent, then the rights granted to 247 | You by any and all Contributors for the Covered Software under Section 248 | 2.1 of this License shall terminate. 249 | 250 | **5.3.** In the event of termination under Sections 5.1 or 5.2 above, all 251 | end user license agreements (excluding distributors and resellers) which 252 | have been validly granted by You or Your distributors under this License 253 | prior to termination shall survive termination. 254 | 255 | 256 | ### 6. Disclaimer of Warranty 257 | 258 | > Covered Software is provided under this License on an “as is” 259 | > basis, without warranty of any kind, either expressed, implied, or 260 | > statutory, including, without limitation, warranties that the 261 | > Covered Software is free of defects, merchantable, fit for a 262 | > particular purpose or non-infringing. The entire risk as to the 263 | > quality and performance of the Covered Software is with You. 264 | > Should any Covered Software prove defective in any respect, You 265 | > (not any Contributor) assume the cost of any necessary servicing, 266 | > repair, or correction. This disclaimer of warranty constitutes an 267 | > essential part of this License. No use of any Covered Software is 268 | > authorized under this License except under this disclaimer. 269 | 270 | ### 7. Limitation of Liability 271 | 272 | > Under no circumstances and under no legal theory, whether tort 273 | > (including negligence), contract, or otherwise, shall any 274 | > Contributor, or anyone who distributes Covered Software as 275 | > permitted above, be liable to You for any direct, indirect, 276 | > special, incidental, or consequential damages of any character 277 | > including, without limitation, damages for lost profits, loss of 278 | > goodwill, work stoppage, computer failure or malfunction, or any 279 | > and all other commercial damages or losses, even if such party 280 | > shall have been informed of the possibility of such damages. This 281 | > limitation of liability shall not apply to liability for death or 282 | > personal injury resulting from such party's negligence to the 283 | > extent applicable law prohibits such limitation. Some 284 | > jurisdictions do not allow the exclusion or limitation of 285 | > incidental or consequential damages, so this exclusion and 286 | > limitation may not apply to You. 287 | 288 | 289 | ### 8. Litigation 290 | 291 | Any litigation relating to this License may be brought only in the 292 | courts of a jurisdiction where the defendant maintains its principal 293 | place of business and such litigation shall be governed by laws of that 294 | jurisdiction, without reference to its conflict-of-law provisions. 295 | Nothing in this Section shall prevent a party's ability to bring 296 | cross-claims or counter-claims. 297 | 298 | 299 | ### 9. Miscellaneous 300 | 301 | This License represents the complete agreement concerning the subject 302 | matter hereof. If any provision of this License is held to be 303 | unenforceable, such provision shall be reformed only to the extent 304 | necessary to make it enforceable. Any law or regulation which provides 305 | that the language of a contract shall be construed against the drafter 306 | shall not be used to construe this License against a Contributor. 307 | 308 | 309 | ### 10. Versions of the License 310 | 311 | #### 10.1. New Versions 312 | 313 | Mozilla Foundation is the license steward. Except as provided in Section 314 | 10.3, no one other than the license steward has the right to modify or 315 | publish new versions of this License. Each version will be given a 316 | distinguishing version number. 317 | 318 | #### 10.2. Effect of New Versions 319 | 320 | You may distribute the Covered Software under the terms of the version 321 | of the License under which You originally received the Covered Software, 322 | or under the terms of any subsequent version published by the license 323 | steward. 324 | 325 | #### 10.3. Modified Versions 326 | 327 | If you create software not governed by this License, and you want to 328 | create a new license for such software, you may create and use a 329 | modified version of this License if you rename the license and remove 330 | any references to the name of the license steward (except to note that 331 | such modified license differs from this License). 332 | 333 | #### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses 334 | 335 | If You choose to distribute Source Code Form that is Incompatible With 336 | Secondary Licenses under the terms of this version of the License, the 337 | notice described in Exhibit B of this License must be attached. 338 | 339 | ## Exhibit A - Source Code Form License Notice 340 | 341 | This Source Code Form is subject to the terms of the Mozilla Public 342 | License, v. 2.0. If a copy of the MPL was not distributed with this 343 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 344 | 345 | If it is not possible or desirable to put the notice in a particular 346 | file, then You may include the notice in a location (such as a LICENSE 347 | file in a relevant directory) where a recipient would be likely to look 348 | for such a notice. 349 | 350 | You may add additional accurate notices of copyright ownership. 351 | 352 | ## Exhibit B - “Incompatible With Secondary Licenses” Notice 353 | 354 | This Source Code Form is "Incompatible With Secondary Licenses", as 355 | defined by the Mozilla Public License, v. 2.0. 356 | 357 | -------------------------------------------------------------------------------- /projects/web2md/Readme.md: -------------------------------------------------------------------------------- 1 | WAPP2MD 2 | ======= 3 | 4 | 5 | 6 | ## Configs 7 | 8 | ```js 9 | let config = { 10 | /* Tieba level */ 11 | // 只要精品, 默认是 12 | // 爬取本吧图库, 默认否 13 | 14 | /* Tiezi level*/ 15 | // 只要楼主, 默认否 16 | // 抓取层主信息, 默认是 17 | // 抓取楼中楼, 无此接口 18 | } 19 | ``` -------------------------------------------------------------------------------- /projects/web2md/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vutex/tieba2md", 3 | "version": "0.2.0", 4 | "main": "dist/index.js", 5 | "scripts": { 6 | "test": "ts-node ./test/page.ts", 7 | "build": "yarn install && tsc -b", 8 | "upload": "yarn build && npm publish --access public" 9 | }, 10 | "dependencies": { 11 | "cheerio": "^1.0.0-rc.3", 12 | "request": "^2.88.0", 13 | "request-promise": "^4.2.4" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /projects/web2md/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "include": [ 4 | "source" 5 | ], 6 | "exclude": [ 7 | "test" 8 | ], 9 | "compilerOptions": { 10 | "outDir": "dist" 11 | } 12 | } -------------------------------------------------------------------------------- /scripts/Readme.md: -------------------------------------------------------------------------------- 1 | Scripts 2 | ======= -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "module": "commonjs", 5 | "target": "esnext" 6 | }, 7 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "references": [ 3 | { "path": "./projects/wapp2md/" }, 4 | { "path": "./projects/web2md/" } 5 | ], 6 | "files": [] 7 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [true, "never"], 4 | "quotemark": [true, "single", "avoid-escape", "avoid-template"], 5 | "indent": 4 6 | } 7 | } 8 | --------------------------------------------------------------------------------