├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── app ├── app.coffee ├── assets │ ├── images │ │ └── img.png │ └── index.html ├── config.coffee ├── styles │ ├── jsprint.css │ ├── prettify-desert.css │ └── theme.css └── utils.coffee ├── bower.json ├── coffeelint.json ├── config.coffee ├── package.json ├── public ├── images │ └── img.png ├── index.html ├── jsprint.css ├── jsprint.css.map ├── jsprint.js ├── jsprint.js.map ├── vendor.js └── vendor.js.map ├── tools ├── htmlconverter │ └── htmlconvert.html └── jsprint_old.js └── vendor ├── jquery.min.js └── prettify.js /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components/ 2 | node_modules/ 3 | 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Author: Kursion/Yves Lange 2 | Project: started on 14/05/2014 3 | Dependencies: D3JS 4 | License: GPL V3 5 | 6 | GNU GENERAL PUBLIC LICENSE 7 | Version 3, 29 June 2007 8 | 9 | Copyright (C) 2007 Free Software Foundation, Inc. 10 | Everyone is permitted to copy and distribute verbatim copies 11 | of this license document, but changing it is not allowed. 12 | 13 | Preamble 14 | 15 | The GNU General Public License is a free, copyleft license for 16 | software and other kinds of works. 17 | 18 | The licenses for most software and other practical works are designed 19 | to take away your freedom to share and change the works. By contrast, 20 | the GNU General Public License is intended to guarantee your freedom to 21 | share and change all versions of a program--to make sure it remains free 22 | software for all its users. We, the Free Software Foundation, use the 23 | GNU General Public License for most of our software; it applies also to 24 | any other work released this way by its authors. You can apply it to 25 | your programs, too. 26 | 27 | When we speak of free software, we are referring to freedom, not 28 | price. Our General Public Licenses are designed to make sure that you 29 | have the freedom to distribute copies of free software (and charge for 30 | them if you wish), that you receive source code or can get it if you 31 | want it, that you can change the software or use pieces of it in new 32 | free programs, and that you know you can do these things. 33 | 34 | To protect your rights, we need to prevent others from denying you 35 | these rights or asking you to surrender the rights. Therefore, you have 36 | certain responsibilities if you distribute copies of the software, or if 37 | you modify it: responsibilities to respect the freedom of others. 38 | 39 | For example, if you distribute copies of such a program, whether 40 | gratis or for a fee, you must pass on to the recipients the same 41 | freedoms that you received. You must make sure that they, too, receive 42 | or can get the source code. And you must show them these terms so they 43 | know their rights. 44 | 45 | Developers that use the GNU GPL protect your rights with two steps: 46 | (1) assert copyright on the software, and (2) offer you this License 47 | giving you legal permission to copy, distribute and/or modify it. 48 | 49 | For the developers' and authors' protection, the GPL clearly explains 50 | that there is no warranty for this free software. For both users' and 51 | authors' sake, the GPL requires that modified versions be marked as 52 | changed, so that their problems will not be attributed erroneously to 53 | authors of previous versions. 54 | 55 | Some devices are designed to deny users access to install or run 56 | modified versions of the software inside them, although the manufacturer 57 | can do so. This is fundamentally incompatible with the aim of 58 | protecting users' freedom to change the software. The systematic 59 | pattern of such abuse occurs in the area of products for individuals to 60 | use, which is precisely where it is most unacceptable. Therefore, we 61 | have designed this version of the GPL to prohibit the practice for those 62 | products. If such problems arise substantially in other domains, we 63 | stand ready to extend this provision to those domains in future versions 64 | of the GPL, as needed to protect the freedom of users. 65 | 66 | Finally, every program is threatened constantly by software patents. 67 | States should not allow patents to restrict development and use of 68 | software on general-purpose computers, but in those that do, we wish to 69 | avoid the special danger that patents applied to a free program could 70 | make it effectively proprietary. To prevent this, the GPL assures that 71 | patents cannot be used to render the program non-free. 72 | 73 | The precise terms and conditions for copying, distribution and 74 | modification follow. 75 | 76 | TERMS AND CONDITIONS 77 | 78 | 0. Definitions. 79 | 80 | "This License" refers to version 3 of the GNU General Public License. 81 | 82 | "Copyright" also means copyright-like laws that apply to other kinds of 83 | works, such as semiconductor masks. 84 | 85 | "The Program" refers to any copyrightable work licensed under this 86 | License. Each licensee is addressed as "you". "Licensees" and 87 | "recipients" may be individuals or organizations. 88 | 89 | To "modify" a work means to copy from or adapt all or part of the work 90 | in a fashion requiring copyright permission, other than the making of an 91 | exact copy. The resulting work is called a "modified version" of the 92 | earlier work or a work "based on" the earlier work. 93 | 94 | A "covered work" means either the unmodified Program or a work based 95 | on the Program. 96 | 97 | To "propagate" a work means to do anything with it that, without 98 | permission, would make you directly or secondarily liable for 99 | infringement under applicable copyright law, except executing it on a 100 | computer or modifying a private copy. Propagation includes copying, 101 | distribution (with or without modification), making available to the 102 | public, and in some countries other activities as well. 103 | 104 | To "convey" a work means any kind of propagation that enables other 105 | parties to make or receive copies. Mere interaction with a user through 106 | a computer network, with no transfer of a copy, is not conveying. 107 | 108 | An interactive user interface displays "Appropriate Legal Notices" 109 | to the extent that it includes a convenient and prominently visible 110 | feature that (1) displays an appropriate copyright notice, and (2) 111 | tells the user that there is no warranty for the work (except to the 112 | extent that warranties are provided), that licensees may convey the 113 | work under this License, and how to view a copy of this License. If 114 | the interface presents a list of user commands or options, such as a 115 | menu, a prominent item in the list meets this criterion. 116 | 117 | 1. Source Code. 118 | 119 | The "source code" for a work means the preferred form of the work 120 | for making modifications to it. "Object code" means any non-source 121 | form of a work. 122 | 123 | A "Standard Interface" means an interface that either is an official 124 | standard defined by a recognized standards body, or, in the case of 125 | interfaces specified for a particular programming language, one that 126 | is widely used among developers working in that language. 127 | 128 | The "System Libraries" of an executable work include anything, other 129 | than the work as a whole, that (a) is included in the normal form of 130 | packaging a Major Component, but which is not part of that Major 131 | Component, and (b) serves only to enable use of the work with that 132 | Major Component, or to implement a Standard Interface for which an 133 | implementation is available to the public in source code form. A 134 | "Major Component", in this context, means a major essential component 135 | (kernel, window system, and so on) of the specific operating system 136 | (if any) on which the executable work runs, or a compiler used to 137 | produce the work, or an object code interpreter used to run it. 138 | 139 | The "Corresponding Source" for a work in object code form means all 140 | the source code needed to generate, install, and (for an executable 141 | work) run the object code and to modify the work, including scripts to 142 | control those activities. However, it does not include the work's 143 | System Libraries, or general-purpose tools or generally available free 144 | programs which are used unmodified in performing those activities but 145 | which are not part of the work. For example, Corresponding Source 146 | includes interface definition files associated with source files for 147 | the work, and the source code for shared libraries and dynamically 148 | linked subprograms that the work is specifically designed to require, 149 | such as by intimate data communication or control flow between those 150 | subprograms and other parts of the work. 151 | 152 | The Corresponding Source need not include anything that users 153 | can regenerate automatically from other parts of the Corresponding 154 | Source. 155 | 156 | The Corresponding Source for a work in source code form is that 157 | same work. 158 | 159 | 2. Basic Permissions. 160 | 161 | All rights granted under this License are granted for the term of 162 | copyright on the Program, and are irrevocable provided the stated 163 | conditions are met. This License explicitly affirms your unlimited 164 | permission to run the unmodified Program. The output from running a 165 | covered work is covered by this License only if the output, given its 166 | content, constitutes a covered work. This License acknowledges your 167 | rights of fair use or other equivalent, as provided by copyright law. 168 | 169 | You may make, run and propagate covered works that you do not 170 | convey, without conditions so long as your license otherwise remains 171 | in force. You may convey covered works to others for the sole purpose 172 | of having them make modifications exclusively for you, or provide you 173 | with facilities for running those works, provided that you comply with 174 | the terms of this License in conveying all material for which you do 175 | not control copyright. Those thus making or running the covered works 176 | for you must do so exclusively on your behalf, under your direction 177 | and control, on terms that prohibit them from making any copies of 178 | your copyrighted material outside their relationship with you. 179 | 180 | Conveying under any other circumstances is permitted solely under 181 | the conditions stated below. Sublicensing is not allowed; section 10 182 | makes it unnecessary. 183 | 184 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 185 | 186 | No covered work shall be deemed part of an effective technological 187 | measure under any applicable law fulfilling obligations under article 188 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 189 | similar laws prohibiting or restricting circumvention of such 190 | measures. 191 | 192 | When you convey a covered work, you waive any legal power to forbid 193 | circumvention of technological measures to the extent such circumvention 194 | is effected by exercising rights under this License with respect to 195 | the covered work, and you disclaim any intention to limit operation or 196 | modification of the work as a means of enforcing, against the work's 197 | users, your or third parties' legal rights to forbid circumvention of 198 | technological measures. 199 | 200 | 4. Conveying Verbatim Copies. 201 | 202 | You may convey verbatim copies of the Program's source code as you 203 | receive it, in any medium, provided that you conspicuously and 204 | appropriately publish on each copy an appropriate copyright notice; 205 | keep intact all notices stating that this License and any 206 | non-permissive terms added in accord with section 7 apply to the code; 207 | keep intact all notices of the absence of any warranty; and give all 208 | recipients a copy of this License along with the Program. 209 | 210 | You may charge any price or no price for each copy that you convey, 211 | and you may offer support or warranty protection for a fee. 212 | 213 | 5. Conveying Modified Source Versions. 214 | 215 | You may convey a work based on the Program, or the modifications to 216 | produce it from the Program, in the form of source code under the 217 | terms of section 4, provided that you also meet all of these conditions: 218 | 219 | a) The work must carry prominent notices stating that you modified 220 | it, and giving a relevant date. 221 | 222 | b) The work must carry prominent notices stating that it is 223 | released under this License and any conditions added under section 224 | 7. This requirement modifies the requirement in section 4 to 225 | "keep intact all notices". 226 | 227 | c) You must license the entire work, as a whole, under this 228 | License to anyone who comes into possession of a copy. This 229 | License will therefore apply, along with any applicable section 7 230 | additional terms, to the whole of the work, and all its parts, 231 | regardless of how they are packaged. This License gives no 232 | permission to license the work in any other way, but it does not 233 | invalidate such permission if you have separately received it. 234 | 235 | d) If the work has interactive user interfaces, each must display 236 | Appropriate Legal Notices; however, if the Program has interactive 237 | interfaces that do not display Appropriate Legal Notices, your 238 | work need not make them do so. 239 | 240 | A compilation of a covered work with other separate and independent 241 | works, which are not by their nature extensions of the covered work, 242 | and which are not combined with it such as to form a larger program, 243 | in or on a volume of a storage or distribution medium, is called an 244 | "aggregate" if the compilation and its resulting copyright are not 245 | used to limit the access or legal rights of the compilation's users 246 | beyond what the individual works permit. Inclusion of a covered work 247 | in an aggregate does not cause this License to apply to the other 248 | parts of the aggregate. 249 | 250 | 6. Conveying Non-Source Forms. 251 | 252 | You may convey a covered work in object code form under the terms 253 | of sections 4 and 5, provided that you also convey the 254 | machine-readable Corresponding Source under the terms of this License, 255 | in one of these ways: 256 | 257 | a) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by the 259 | Corresponding Source fixed on a durable physical medium 260 | customarily used for software interchange. 261 | 262 | b) Convey the object code in, or embodied in, a physical product 263 | (including a physical distribution medium), accompanied by a 264 | written offer, valid for at least three years and valid for as 265 | long as you offer spare parts or customer support for that product 266 | model, to give anyone who possesses the object code either (1) a 267 | copy of the Corresponding Source for all the software in the 268 | product that is covered by this License, on a durable physical 269 | medium customarily used for software interchange, for a price no 270 | more than your reasonable cost of physically performing this 271 | conveying of source, or (2) access to copy the 272 | Corresponding Source from a network server at no charge. 273 | 274 | c) Convey individual copies of the object code with a copy of the 275 | written offer to provide the Corresponding Source. This 276 | alternative is allowed only occasionally and noncommercially, and 277 | only if you received the object code with such an offer, in accord 278 | with subsection 6b. 279 | 280 | d) Convey the object code by offering access from a designated 281 | place (gratis or for a charge), and offer equivalent access to the 282 | Corresponding Source in the same way through the same place at no 283 | further charge. You need not require recipients to copy the 284 | Corresponding Source along with the object code. If the place to 285 | copy the object code is a network server, the Corresponding Source 286 | may be on a different server (operated by you or a third party) 287 | that supports equivalent copying facilities, provided you maintain 288 | clear directions next to the object code saying where to find the 289 | Corresponding Source. Regardless of what server hosts the 290 | Corresponding Source, you remain obligated to ensure that it is 291 | available for as long as needed to satisfy these requirements. 292 | 293 | e) Convey the object code using peer-to-peer transmission, provided 294 | you inform other peers where the object code and Corresponding 295 | Source of the work are being offered to the general public at no 296 | charge under subsection 6d. 297 | 298 | A separable portion of the object code, whose source code is excluded 299 | from the Corresponding Source as a System Library, need not be 300 | included in conveying the object code work. 301 | 302 | A "User Product" is either (1) a "consumer product", which means any 303 | tangible personal property which is normally used for personal, family, 304 | or household purposes, or (2) anything designed or sold for incorporation 305 | into a dwelling. In determining whether a product is a consumer product, 306 | doubtful cases shall be resolved in favor of coverage. For a particular 307 | product received by a particular user, "normally used" refers to a 308 | typical or common use of that class of product, regardless of the status 309 | of the particular user or of the way in which the particular user 310 | actually uses, or expects or is expected to use, the product. A product 311 | is a consumer product regardless of whether the product has substantial 312 | commercial, industrial or non-consumer uses, unless such uses represent 313 | the only significant mode of use of the product. 314 | 315 | "Installation Information" for a User Product means any methods, 316 | procedures, authorization keys, or other information required to install 317 | and execute modified versions of a covered work in that User Product from 318 | a modified version of its Corresponding Source. The information must 319 | suffice to ensure that the continued functioning of the modified object 320 | code is in no case prevented or interfered with solely because 321 | modification has been made. 322 | 323 | If you convey an object code work under this section in, or with, or 324 | specifically for use in, a User Product, and the conveying occurs as 325 | part of a transaction in which the right of possession and use of the 326 | User Product is transferred to the recipient in perpetuity or for a 327 | fixed term (regardless of how the transaction is characterized), the 328 | Corresponding Source conveyed under this section must be accompanied 329 | by the Installation Information. But this requirement does not apply 330 | if neither you nor any third party retains the ability to install 331 | modified object code on the User Product (for example, the work has 332 | been installed in ROM). 333 | 334 | The requirement to provide Installation Information does not include a 335 | requirement to continue to provide support service, warranty, or updates 336 | for a work that has been modified or installed by the recipient, or for 337 | the User Product in which it has been modified or installed. Access to a 338 | network may be denied when the modification itself materially and 339 | adversely affects the operation of the network or violates the rules and 340 | protocols for communication across the network. 341 | 342 | Corresponding Source conveyed, and Installation Information provided, 343 | in accord with this section must be in a format that is publicly 344 | documented (and with an implementation available to the public in 345 | source code form), and must require no special password or key for 346 | unpacking, reading or copying. 347 | 348 | 7. Additional Terms. 349 | 350 | "Additional permissions" are terms that supplement the terms of this 351 | License by making exceptions from one or more of its conditions. 352 | Additional permissions that are applicable to the entire Program shall 353 | be treated as though they were included in this License, to the extent 354 | that they are valid under applicable law. If additional permissions 355 | apply only to part of the Program, that part may be used separately 356 | under those permissions, but the entire Program remains governed by 357 | this License without regard to the additional permissions. 358 | 359 | When you convey a copy of a covered work, you may at your option 360 | remove any additional permissions from that copy, or from any part of 361 | it. (Additional permissions may be written to require their own 362 | removal in certain cases when you modify the work.) You may place 363 | additional permissions on material, added by you to a covered work, 364 | for which you have or can give appropriate copyright permission. 365 | 366 | Notwithstanding any other provision of this License, for material you 367 | add to a covered work, you may (if authorized by the copyright holders of 368 | that material) supplement the terms of this License with terms: 369 | 370 | a) Disclaiming warranty or limiting liability differently from the 371 | terms of sections 15 and 16 of this License; or 372 | 373 | b) Requiring preservation of specified reasonable legal notices or 374 | author attributions in that material or in the Appropriate Legal 375 | Notices displayed by works containing it; or 376 | 377 | c) Prohibiting misrepresentation of the origin of that material, or 378 | requiring that modified versions of such material be marked in 379 | reasonable ways as different from the original version; or 380 | 381 | d) Limiting the use for publicity purposes of names of licensors or 382 | authors of the material; or 383 | 384 | e) Declining to grant rights under trademark law for use of some 385 | trade names, trademarks, or service marks; or 386 | 387 | f) Requiring indemnification of licensors and authors of that 388 | material by anyone who conveys the material (or modified versions of 389 | it) with contractual assumptions of liability to the recipient, for 390 | any liability that these contractual assumptions directly impose on 391 | those licensors and authors. 392 | 393 | All other non-permissive additional terms are considered "further 394 | restrictions" within the meaning of section 10. If the Program as you 395 | received it, or any part of it, contains a notice stating that it is 396 | governed by this License along with a term that is a further 397 | restriction, you may remove that term. If a license document contains 398 | a further restriction but permits relicensing or conveying under this 399 | License, you may add to a covered work material governed by the terms 400 | of that license document, provided that the further restriction does 401 | not survive such relicensing or conveying. 402 | 403 | If you add terms to a covered work in accord with this section, you 404 | must place, in the relevant source files, a statement of the 405 | additional terms that apply to those files, or a notice indicating 406 | where to find the applicable terms. 407 | 408 | Additional terms, permissive or non-permissive, may be stated in the 409 | form of a separately written license, or stated as exceptions; 410 | the above requirements apply either way. 411 | 412 | 8. Termination. 413 | 414 | You may not propagate or modify a covered work except as expressly 415 | provided under this License. Any attempt otherwise to propagate or 416 | modify it is void, and will automatically terminate your rights under 417 | this License (including any patent licenses granted under the third 418 | paragraph of section 11). 419 | 420 | However, if you cease all violation of this License, then your 421 | license from a particular copyright holder is reinstated (a) 422 | provisionally, unless and until the copyright holder explicitly and 423 | finally terminates your license, and (b) permanently, if the copyright 424 | holder fails to notify you of the violation by some reasonable means 425 | prior to 60 days after the cessation. 426 | 427 | Moreover, your license from a particular copyright holder is 428 | reinstated permanently if the copyright holder notifies you of the 429 | violation by some reasonable means, this is the first time you have 430 | received notice of violation of this License (for any work) from that 431 | copyright holder, and you cure the violation prior to 30 days after 432 | your receipt of the notice. 433 | 434 | Termination of your rights under this section does not terminate the 435 | licenses of parties who have received copies or rights from you under 436 | this License. If your rights have been terminated and not permanently 437 | reinstated, you do not qualify to receive new licenses for the same 438 | material under section 10. 439 | 440 | 9. Acceptance Not Required for Having Copies. 441 | 442 | You are not required to accept this License in order to receive or 443 | run a copy of the Program. Ancillary propagation of a covered work 444 | occurring solely as a consequence of using peer-to-peer transmission 445 | to receive a copy likewise does not require acceptance. However, 446 | nothing other than this License grants you permission to propagate or 447 | modify any covered work. These actions infringe copyright if you do 448 | not accept this License. Therefore, by modifying or propagating a 449 | covered work, you indicate your acceptance of this License to do so. 450 | 451 | 10. Automatic Licensing of Downstream Recipients. 452 | 453 | Each time you convey a covered work, the recipient automatically 454 | receives a license from the original licensors, to run, modify and 455 | propagate that work, subject to this License. You are not responsible 456 | for enforcing compliance by third parties with this License. 457 | 458 | An "entity transaction" is a transaction transferring control of an 459 | organization, or substantially all assets of one, or subdividing an 460 | organization, or merging organizations. If propagation of a covered 461 | work results from an entity transaction, each party to that 462 | transaction who receives a copy of the work also receives whatever 463 | licenses to the work the party's predecessor in interest had or could 464 | give under the previous paragraph, plus a right to possession of the 465 | Corresponding Source of the work from the predecessor in interest, if 466 | the predecessor has it or can get it with reasonable efforts. 467 | 468 | You may not impose any further restrictions on the exercise of the 469 | rights granted or affirmed under this License. For example, you may 470 | not impose a license fee, royalty, or other charge for exercise of 471 | rights granted under this License, and you may not initiate litigation 472 | (including a cross-claim or counterclaim in a lawsuit) alleging that 473 | any patent claim is infringed by making, using, selling, offering for 474 | sale, or importing the Program or any portion of it. 475 | 476 | 11. Patents. 477 | 478 | A "contributor" is a copyright holder who authorizes use under this 479 | License of the Program or a work on which the Program is based. The 480 | work thus licensed is called the contributor's "contributor version". 481 | 482 | A contributor's "essential patent claims" are all patent claims 483 | owned or controlled by the contributor, whether already acquired or 484 | hereafter acquired, that would be infringed by some manner, permitted 485 | by this License, of making, using, or selling its contributor version, 486 | but do not include claims that would be infringed only as a 487 | consequence of further modification of the contributor version. For 488 | purposes of this definition, "control" includes the right to grant 489 | patent sublicenses in a manner consistent with the requirements of 490 | this License. 491 | 492 | Each contributor grants you a non-exclusive, worldwide, royalty-free 493 | patent license under the contributor's essential patent claims, to 494 | make, use, sell, offer for sale, import and otherwise run, modify and 495 | propagate the contents of its contributor version. 496 | 497 | In the following three paragraphs, a "patent license" is any express 498 | agreement or commitment, however denominated, not to enforce a patent 499 | (such as an express permission to practice a patent or covenant not to 500 | sue for patent infringement). To "grant" such a patent license to a 501 | party means to make such an agreement or commitment not to enforce a 502 | patent against the party. 503 | 504 | If you convey a covered work, knowingly relying on a patent license, 505 | and the Corresponding Source of the work is not available for anyone 506 | to copy, free of charge and under the terms of this License, through a 507 | publicly available network server or other readily accessible means, 508 | then you must either (1) cause the Corresponding Source to be so 509 | available, or (2) arrange to deprive yourself of the benefit of the 510 | patent license for this particular work, or (3) arrange, in a manner 511 | consistent with the requirements of this License, to extend the patent 512 | license to downstream recipients. "Knowingly relying" means you have 513 | actual knowledge that, but for the patent license, your conveying the 514 | covered work in a country, or your recipient's use of the covered work 515 | in a country, would infringe one or more identifiable patents in that 516 | country that you have reason to believe are valid. 517 | 518 | If, pursuant to or in connection with a single transaction or 519 | arrangement, you convey, or propagate by procuring conveyance of, a 520 | covered work, and grant a patent license to some of the parties 521 | receiving the covered work authorizing them to use, propagate, modify 522 | or convey a specific copy of the covered work, then the patent license 523 | you grant is automatically extended to all recipients of the covered 524 | work and works based on it. 525 | 526 | A patent license is "discriminatory" if it does not include within 527 | the scope of its coverage, prohibits the exercise of, or is 528 | conditioned on the non-exercise of one or more of the rights that are 529 | specifically granted under this License. You may not convey a covered 530 | work if you are a party to an arrangement with a third party that is 531 | in the business of distributing software, under which you make payment 532 | to the third party based on the extent of your activity of conveying 533 | the work, and under which the third party grants, to any of the 534 | parties who would receive the covered work from you, a discriminatory 535 | patent license (a) in connection with copies of the covered work 536 | conveyed by you (or copies made from those copies), or (b) primarily 537 | for and in connection with specific products or compilations that 538 | contain the covered work, unless you entered into that arrangement, 539 | or that patent license was granted, prior to 28 March 2007. 540 | 541 | Nothing in this License shall be construed as excluding or limiting 542 | any implied license or other defenses to infringement that may 543 | otherwise be available to you under applicable patent law. 544 | 545 | 12. No Surrender of Others' Freedom. 546 | 547 | If conditions are imposed on you (whether by court order, agreement or 548 | otherwise) that contradict the conditions of this License, they do not 549 | excuse you from the conditions of this License. If you cannot convey a 550 | covered work so as to satisfy simultaneously your obligations under this 551 | License and any other pertinent obligations, then as a consequence you may 552 | not convey it at all. For example, if you agree to terms that obligate you 553 | to collect a royalty for further conveying from those to whom you convey 554 | the Program, the only way you could satisfy both those terms and this 555 | License would be to refrain entirely from conveying the Program. 556 | 557 | 13. Use with the GNU Affero General Public License. 558 | 559 | Notwithstanding any other provision of this License, you have 560 | permission to link or combine any covered work with a work licensed 561 | under version 3 of the GNU Affero General Public License into a single 562 | combined work, and to convey the resulting work. The terms of this 563 | License will continue to apply to the part which is the covered work, 564 | but the special requirements of the GNU Affero General Public License, 565 | section 13, concerning interaction through a network will apply to the 566 | combination as such. 567 | 568 | 14. Revised Versions of this License. 569 | 570 | The Free Software Foundation may publish revised and/or new versions of 571 | the GNU General Public License from time to time. Such new versions will 572 | be similar in spirit to the present version, but may differ in detail to 573 | address new problems or concerns. 574 | 575 | Each version is given a distinguishing version number. If the 576 | Program specifies that a certain numbered version of the GNU General 577 | Public License "or any later version" applies to it, you have the 578 | option of following the terms and conditions either of that numbered 579 | version or of any later version published by the Free Software 580 | Foundation. If the Program does not specify a version number of the 581 | GNU General Public License, you may choose any version ever published 582 | by the Free Software Foundation. 583 | 584 | If the Program specifies that a proxy can decide which future 585 | versions of the GNU General Public License can be used, that proxy's 586 | public statement of acceptance of a version permanently authorizes you 587 | to choose that version for the Program. 588 | 589 | Later license versions may give you additional or different 590 | permissions. However, no additional obligations are imposed on any 591 | author or copyright holder as a result of your choosing to follow a 592 | later version. 593 | 594 | 15. Disclaimer of Warranty. 595 | 596 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 597 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 598 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 599 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 600 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 601 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 602 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 603 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 604 | 605 | 16. Limitation of Liability. 606 | 607 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 608 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 609 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 610 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 611 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 612 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 613 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 614 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 615 | SUCH DAMAGES. 616 | 617 | 17. Interpretation of Sections 15 and 16. 618 | 619 | If the disclaimer of warranty and limitation of liability provided 620 | above cannot be given local legal effect according to their terms, 621 | reviewing courts shall apply local law that most closely approximates 622 | an absolute waiver of all civil liability in connection with the 623 | Program, unless a warranty or assumption of liability accompanies a 624 | copy of the Program in return for a fee. 625 | 626 | END OF TERMS AND CONDITIONS 627 | 628 | How to Apply These Terms to Your New Programs 629 | 630 | If you develop a new program, and you want it to be of the greatest 631 | possible use to the public, the best way to achieve this is to make it 632 | free software which everyone can redistribute and change under these terms. 633 | 634 | To do so, attach the following notices to the program. It is safest 635 | to attach them to the start of each source file to most effectively 636 | state the exclusion of warranty; and each file should have at least 637 | the "copyright" line and a pointer to where the full notice is found. 638 | 639 | {one line to give the program's name and a brief idea of what it does.} 640 | Copyright (C) {year} {name of author} 641 | 642 | This program is free software: you can redistribute it and/or modify 643 | it under the terms of the GNU General Public License as published by 644 | the Free Software Foundation, either version 3 of the License, or 645 | (at your option) any later version. 646 | 647 | This program is distributed in the hope that it will be useful, 648 | but WITHOUT ANY WARRANTY; without even the implied warranty of 649 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 650 | GNU General Public License for more details. 651 | 652 | You should have received a copy of the GNU General Public License 653 | along with this program. If not, see . 654 | 655 | Also add information on how to contact you by electronic and paper mail. 656 | 657 | If the program does terminal interaction, make it output a short 658 | notice like this when it starts in an interactive mode: 659 | 660 | {project} Copyright (C) {year} {fullname} 661 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 662 | This is free software, and you are welcome to redistribute it 663 | under certain conditions; type `show c' for details. 664 | 665 | The hypothetical commands `show w' and `show c' should show the appropriate 666 | parts of the General Public License. Of course, your program's commands 667 | might be different; for a GUI interface, you would use an "about box". 668 | 669 | You should also get your employer (if you work as a programmer) or school, 670 | if any, to sign a "copyright disclaimer" for the program, if necessary. 671 | For more information on this, and how to apply and follow the GNU GPL, see 672 | . 673 | 674 | The GNU General Public License does not permit incorporating your program 675 | into proprietary programs. If your program is a subroutine library, you 676 | may consider it more useful to permit linking proprietary applications with 677 | the library. If this is what you want to do, use the GNU Lesser General 678 | Public License instead of this License. But first, please read 679 | . -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | build: 2 | @echo "Build the project (BRUNCH)" 3 | @./node_modules/brunch/bin/brunch build 4 | watch: 5 | @echo "Running the watcher (BRUNCH)" 6 | @./node_modules/brunch/bin/brunch watch --server 7 | install: 8 | #@echo "Installing brunch & bower (NPM)" 9 | #@sudo npm install -g brunch 10 | #@sudo npm install -g bower 11 | @echo "Installing brunch dependencies (NPM)" 12 | @npm install 13 | @bower install 14 | clean: 15 | @cd release/;rm -rf *;cd .. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JSPrint 2 | This module can be use to create printable report (instead of Word, OpenOffice, Latex, ...) 3 | directly with HTML, CSS, JS. 4 | 5 | # Recommendations 6 | > We recommend you to print documents using Google Chrome (you can even save it to PDF). 7 | > With Firefox you should play with the scale in the print preview mode (sometime you can 8 | > let the "Shrink to fit" option, else choose 100%, 90%, 80%... and check if the page is 9 | > correct), then print. On windows you can install CutePDF Writer to export document from 10 | > firefox to PDF (but Chrome is better). 11 | 12 | # Printing 13 | In the dialog box (of Chrome), make sure to choose those settings: 14 | 15 | 1. Paper size: "A4" 16 | 2. Disable "Headers and footers" 17 | 3. Margins: "Default" 18 | 4. Check in the preview window that everythings is alright 19 | 5. Print ;) 20 | 21 | # Install 22 | > You will need to have jQuery in order to make JSPrint works. 23 | 24 | 1. Download jsprint.css and jsprint.js to your directory 25 | 2. Create your .html file 26 | 3. Import the default JSPrint CSS style: jsprint.css between 'head' tags (`...`), 27 | 4. Import the vendor file at the end of your html document, eg: after `` 28 | 5. Include JSprint library after jQuery and load it. 29 | ```html 30 | 31 | 32 | ``` 33 | 34 | ```html 35 | 36 | 37 | ``` 38 | 39 | ```html 40 | 41 | 42 | ``` 43 | 44 | ```html 45 | 46 | 49 | ``` 50 | 51 | # Functionalities 52 | - Auto refresh the content 53 | - Printable with all browsers 54 | - CSS, JavaScript (+jQuery) only 55 | - Easy to learn, use and adapt 56 | - Header can be customize 57 | - Auto-generating of the summary (from H1 to H4) 58 | - Auto-generating pages number 59 | - Auto-generating bibliography with reference number for links 60 | - Adding legend to images 61 | - Auto-generating bibliography with title and reference for image 62 | 63 | 64 | # Classname glossary 65 | | Classname | Description | 66 | | --------------- | ------------------------ | 67 | | jsprint-def-header | Definition of the header | 68 | | jsprint-summary | Summary container | 69 | | jsprint-page | Creates a new page | 70 | | jsprint-title | Title of the section that is included in the summary | 71 | | jsprint-bibligraphy | Bibliography container | 72 | | jsprint-imageography | Bibliography container | 73 | 74 | 75 | # Settings 76 | | Option | Default | Description | 77 | | -----------|-------------- | ------------------------ | 78 | | title-nbr | true | Show the number aside the title and according to the summary | 79 | | page-nbr | true | Show or hide page number | 80 | | page-outof | true | Show outof page number | 81 | | page-outof-symbole | "/" | Symbole to show for outof page number | 82 | | auto-refresh | false | Auto refresh (beta) HTML page | 83 | | auto-interval | 2000 | Auto refresh interval | 84 | 85 | 86 | # Attribut glossary 87 | | TAG | Attribut | Description | 88 | | --------------- | ---------|-------------- | 89 | | img | title | Create a nice legend for a specific image | 90 | | img | ref | Reference of the image | 91 | | a | ref | Reference of the link | 92 | 93 | 94 | # Create a new page 95 | You will need to add a container with the classname **jsprint-page**, eg: 96 | ```html 97 | 98 |
99 |

Introduction

100 |

Check the source code of this example in order to learn how to use this module

101 |
102 | ``` 103 | 104 | # Create a "summary" 105 | In order to have a proper summary of your report, you just need to add the class name **jsprint-title** to the 106 | title of a new section, eg: 107 | ```html 108 |

Introduction

109 |

Subsection

110 |

Subsubsection

111 |

Subsubsubsection

112 | ``` 113 | 114 | then you will need to add the container where the summary should start and add the proper class 115 | to your page **jsprint-page-summary**. Here is a little example of how the structure should look like: 116 | ```html 117 |
118 |
119 |
120 | ``` 121 | 122 | # Adding a header 123 | Create a container with the classname **jsprint-def-header**. This will define the header of the page. 124 | This one will be added to every single pages of your report, so you need to define the content 125 | of it only once. The content of the header can be valid HTML or normal text, eg: 126 | ```html 127 |
128 |

This is my header - on every pages

129 |
130 | ``` 131 | 132 | # Adding bibliography 133 | Create a container with the classname **jsprint-bibliography**. This will define the container 134 | that will contains the the bibliography. All the links that you define with `` tags will 135 | appear as: link, text of the link and a reference number. 136 | ```html 137 | This is a link 138 | ``` 139 | 140 | then you will need to add the container where you want to show the biblography 141 | ```html 142 |
143 | ``` 144 | 145 | # Adding a legend to an image 146 | In order to add a legend after the image, just use the **title** attribut from the image tag, eg: 147 | ```html 148 | 149 | ``` 150 | 151 | # Adding imageography 152 | ```html 153 | 154 | ``` 155 | 156 | then you will need to add the container where you want to show the imageography 157 | ```html 158 |
159 | ``` 160 | 161 | # Configuration 162 | ## Refresh the content automatically 163 | While you are editing your document, you can enable the option to automatically refresh it every X milliseconds. 164 | You can modify the interval of refreshes in the settings by changing: 165 | ```javascript 166 | "auto-refresh": true, 167 | "auto-interval": 5000 168 | ``` 169 | 170 | ## Adding number of the page 171 | The number of the page is automatically added by default. You can show or hide it by modifying 172 | the variable : 173 | ```javascript 174 | "page-nbr": true, 175 | ``` 176 | 177 | ## Adding number to titles 178 | The number of the title is automatically added by default. You can show or hide it by modifying 179 | the variable : 180 | ```javascript 181 | "title-nbr": true, 182 | ``` 183 | 184 | 185 | # Style customization 186 | Just edit the ***theme.css*** as you wish. It is not recommended to update 187 | ***jsprint.css*** if you don't understand everything in that file. 188 | 189 | # FAQ 190 | ## I don't want my title to appear in the summary 191 | When creating your title tag (H1, H2, H3, ...) don't add the class **jsprint-title** 192 | to it. This will avoid the title to be added into the summary. 193 | 194 | # Contributions 195 | Yves Lange (author) 196 | 197 | # Comments 198 | ```text 199 | Wanted to say thanks. You've done groundbreaking work on JsPrint. 200 | Its a simple and elegant solution to reporting problem in PHP apps. 201 | We've been thinking about a solution for months and finally someone 202 | comes up with an excellent answer. 203 | So we'll be waiting for the next update. 204 | 205 | Thanks again. 206 | Peace be with you, Mohsin .R 207 | @WaysAll 208 | p.s. What is on the roadmap? 209 | ``` 210 | I'm waiting for some feedbacks and I'll continue to improve this lib that I'm using everyday. 211 | I already converted this lib into CoffeeScript so now... it's less verbose and I'll improve the 212 | H1,2,3,4 with the summarize functionnality. I also have the project to make it a bit more 213 | compatible with the other browser. 214 | -------------------------------------------------------------------------------- /app/app.coffee: -------------------------------------------------------------------------------- 1 | M = { 2 | config: require 'jsprint/config' 3 | utils: require 'jsprint/utils' 4 | } 5 | 6 | class Jsprint 7 | # Configuration for Jsprint 8 | CONFIG = new M.config.Main() 9 | 10 | constructor: () -> 11 | console.info? "Jsprint version:", CONFIG.getVersion() 12 | @init() 13 | 14 | init: -> 15 | @renderImgLegends() 16 | @renderHeader() 17 | @renderFooter() 18 | @renderLinkReferences() 19 | @createSummary() 20 | 21 | createSummary: -> 22 | # Generating tags 23 | 24 | # TODO: test new method 25 | # tags = [] 26 | # tagsCounter = {} 27 | # for i in [1..10] 28 | # tags.push "H#{i}" 29 | # tagsCounter["H#{i}"] ||= 0 30 | # tagsCounter["H#{i}"]++ 31 | # 32 | # console.log tags, tagsCounter 33 | # console.log tags.join(" ") 34 | # $("." + CONFIG.getClass("page")).each((i, page) -> 35 | # console.log i, page 36 | # $(tags.join(" ")).each( -> 37 | # console.log i 38 | # ) 39 | # ) 40 | 41 | # ----------------- Old 42 | nbrtitle = undefined 43 | pagenbr = undefined 44 | JSP_TITLE_NBR = 0 45 | JSP_TITLE2_NBR = 0 46 | JSP_TITLE3_NBR = 0 47 | JSP_TITLE4_NBR = 0 48 | pagenbr = 0 49 | nbrtitle = 0 50 | header = @_getHeader() 51 | $("." + CONFIG.getClass("page")).each (i, page) -> 52 | pagenbr++ 53 | $(page).find("." + CONFIG.getClass("title")).each (_, title) -> 54 | h_nbr = undefined 55 | t = undefined 56 | tag = undefined 57 | t = $(title).text() 58 | tag = $(this)[0].tagName 59 | h_nbr = "" 60 | nbrtitle++ 61 | if tag is "H1" 62 | JSP_TITLE_NBR++ 63 | JSP_TITLE2_NBR = 0 64 | h_nbr = JSP_TITLE_NBR 65 | if tag is "H2" 66 | JSP_TITLE2_NBR++ 67 | JSP_TITLE3_NBR = 0 68 | h_nbr = JSP_TITLE_NBR + "." + JSP_TITLE2_NBR 69 | if tag is "H3" 70 | JSP_TITLE3_NBR++ 71 | JSP_TITLE4_NBR = 0 72 | h_nbr = JSP_TITLE_NBR + "." + JSP_TITLE2_NBR + "." + JSP_TITLE3_NBR 73 | if tag is "H4" 74 | JSP_TITLE4_NBR++ 75 | h_nbr = JSP_TITLE_NBR + "." + JSP_TITLE2_NBR + "." + 76 | JSP_TITLE3_NBR + "." + JSP_TITLE4_NBR 77 | $(title).text h_nbr + " " + t 78 | if nbrtitle % CONFIG.get("summary", "nbrtitle") is 0 79 | $("." + CONFIG.getClass("page-summary")) 80 | .last().after "
" 84 | $("." + CONFIG.getClass("page-summary")).last().prepend header 85 | $("." + CONFIG.getClass("summary")) 86 | .last().append "
" + h_nbr + " " + t + "
" + pagenbr + "
" 89 | 90 | renderLinkReferences: -> 91 | $("a").each (i) -> 92 | i++ 93 | link = $(this).attr("href") 94 | text = $(this).text() 95 | ref = $(this).attr("ref") 96 | show = text 97 | show = "#{ref} (#{text})" if ref isnt undefined 98 | $(this).append( 99 | $("").text(" [#{i}]") 100 | ) 101 | line = $("
").append( 102 | $("").attr("class", "index").text("[#{i}]") 103 | $("").attr("class", "text").text(" #{show}: ") 104 | $("").attr("class", "link").append( 105 | $("").attr("href", link).text(link) 106 | ) 107 | ) 108 | $(".#{CONFIG.getClass("bibliography")}").append(line) 109 | 110 | renderImgLegends: -> 111 | i = 0 112 | $("img").each -> 113 | title = $(this).attr("title") 114 | ref = $(this).attr("ref") 115 | if title? || ref? 116 | i++ 117 | legendDOM = $("
") 118 | .attr('class', CONFIG.getClass("img-legend")) 119 | .html("#{title} #{i}") 120 | $(this).after(legendDOM) 121 | 122 | legendLineDOM = $("
") 123 | .html("[#{i}] #{title} (#{ref})") 124 | M.utils.appendToClass(CONFIG.getClass("imageography"), legendLineDOM) 125 | 126 | _getHeader: -> 127 | defHeader = $(".#{CONFIG.getClass('def-header')}").html() or "" 128 | headerContent = $("
") 129 | .attr("class", CONFIG.getClass("header")) 130 | .html(defHeader) 131 | 132 | _getFooter: (i) -> 133 | outof = $("
") 134 | .attr("class", CONFIG.getClass("footer-pagenbr")) 135 | .text("#{i+1}/#{$(".#{CONFIG.getClass("page")}").length}") 136 | $("
") 137 | .attr("class", CONFIG.getClass("footer")) 138 | .append(outof) 139 | 140 | renderHeader: -> 141 | $(".#{CONFIG.getClass("page")}").each (i, page) => 142 | $(page).prepend @_getHeader() 143 | 144 | renderFooter: -> 145 | $(".#{CONFIG.getClass("page")}").each (i, page) => 146 | $(page).append @_getFooter(i) 147 | 148 | toString: -> 149 | return "Version: JSPrint #{CONFIG.getVersion()}\n 150 | CLASSES: #{CONFIG.getClasses()}" 151 | 152 | jsprint = new Jsprint() 153 | console.log jsprint.toString() 154 | -------------------------------------------------------------------------------- /app/assets/images/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kursion/jsprint/f56a21068221d87d3f623e6f9be423a2fcf90445/app/assets/images/img.png -------------------------------------------------------------------------------- /app/assets/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test of JSPrint 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |

Jsprint by Yves Lange
14 | This is my header - on every pages

15 |
16 | 17 | 18 |
19 |

Jsprint library

20 |

Make document with HTML !

21 | 22 |

Author: Yves Lange/Kursion

23 |
24 | 25 | 26 |
27 |

Summary

28 | 29 |
30 |
31 | 32 | 33 |
34 |

Introduction

35 |

Check the example of this example in order to learn how to use this module

36 |

37 | You can check the documentation on the repository: 38 | Yves Lange - JSPrint 39 |

40 |

Subsection H2

41 |

Here is an example of a subsection

42 |

Subsection H3

43 |

Here is an example of a subsection

44 |

Subsection H4

45 |

Here is an example of a subsection

46 |
47 | 48 | 49 |
50 |

Functionalities

51 |

- Printable with all browsers

52 |

- CSS, JavaScript (+jQuery) only

53 |

- Easy to learn, use and adapt

54 |

- Header can be customize

55 |

- Auto-generating of the summary

56 |

- Auto-generating pages number

57 |
58 | 59 |
60 |

Example of auto separated page

61 |

62 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer at tempor metus. Mauris ut ante a lacus ornare tempor eget et nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lorem ipsum, dictum vitae mauris eget, congue consectetur neque. Cras faucibus diam a nisi mattis malesuada. Proin pulvinar vitae erat ac porttitor. Curabitur sit amet justo sed sem pretium consequat ut at nisl. Curabitur mattis mauris ut egestas pretium. Fusce imperdiet felis sit amet lacus accumsan, sit amet tristique lacus suscipit. 63 |

64 |

65 | This is a sample note using the p.note class 66 |

67 |

68 |

var str = "Some code in JavaScript, C, C++, Python, ..."; 
69 |

70 |

71 | Nulla vitae sem fringilla, ultrices ante vel, elementum nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nullam quis pretium mi. Ut dapibus nisl quis lacus interdum, a rutrum sapien imperdiet. Nunc vitae tincidunt enim. Donec ut porttitor tellus. Sed posuere ipsum diam, sed elementum quam vehicula vel. Fusce nec dapibus nisl. Curabitur gravida varius sapien sit amet sodales. 72 |

73 |

74 | Sed lorem magna, scelerisque pellentesque aliquet vel, gravida non eros. Aliquam erat volutpat. Vestibulum eu arcu id risus dapibus accumsan quis hendrerit enim. Nulla eleifend lorem ut interdum mollis. Phasellus eleifend justo quis hendrerit placerat. Duis sodales, ligula nec luctus dapibus, orci mauris condimentum purus, in adipiscing dolor nisi at mauris. Morbi facilisis rhoncus ipsum, ut luctus orci dictum non. Ut nulla metus, suscipit nec sapien at, viverra euismod nisi. Nullam non consectetur lorem. Morbi ipsum tellus, condimentum at tortor tempus, tempor lobortis sem. Praesent orci est, feugiat sit amet purus quis, convallis sollicitudin metus. Nulla semper consectetur erat, id interdum orci. Nullam nec ornare ipsum, ut pulvinar velit. 75 |

76 |

77 | Nulla placerat risus iaculis, iaculis velit ut, gravida justo. Integer id euismod enim. Nunc rhoncus nunc nec est tempus, sit amet condimentum nisl consectetur. Nulla ultrices lorem ut suscipit placerat. Donec eu massa dictum, blandit dolor eget, tempus sapien. Cras ac aliquet augue, ac vehicula ante. Quisque congue lectus id arcu commodo convallis. 78 |

79 |

80 | Nullam varius mauris ante, suscipit placerat velit tristique nec. Vivamus faucibus nibh sed aliquam sagittis. Duis eu bibendum orci, eget vestibulum enim. Aenean ut faucibus leo. Donec euismod tristique odio nec viverra. Suspendisse sem arcu, pulvinar quis nibh suscipit, ornare eleifend nisl. Donec molestie tortor vitae tincidunt pharetra. Donec fermentum suscipit massa, nec ultricies sem tincidunt ut. Morbi mattis sagittis purus eu tincidunt. Quisque dictum tortor non ligula scelerisque dictum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc sed pellentesque nibh. Nulla varius, elit sed sollicitudin pulvinar, augue metus pharetra metus, in ultricies lorem risus in ligula. Ut varius sapien tortor. Quisque imperdiet euismod leo pharetra suscipit. 81 |

82 |

83 | Phasellus consequat gravida mauris vitae aliquam. Aliquam eleifend est ligula, fringilla vestibulum purus vehicula vel. Ut sed sollicitudin nibh. Donec aliquet gravida odio id volutpat. Phasellus ac ante a lacus egestas egestas. Donec imperdiet malesuada libero. Vivamus fermentum a erat id congue. Sed faucibus risus quis massa vestibulum, sit amet aliquam sem lobortis. Sed dignissim, lectus quis semper ullamcorper, dolor orci bibendum lacus, quis rhoncus neque nisi ut magna. Morbi id ante in nisi aliquet tristique a ut justo. Mauris convallis nibh mauris, at aliquam nisl porta id. Donec enim nunc, ullamcorper vel felis id, pulvinar tempor libero. Integer vestibulum molestie nisi. Etiam nec quam a urna vehicula egestas nec at odio. 84 |

85 |

86 | In scelerisque odio metus, non feugiat neque egestas vestibulum. Proin ut enim placerat, lacinia ante nec, convallis orci. Quisque lacinia magna ut leo pulvinar facilisis ac et mi. Nulla eget molestie turpis. Quisque vestibulum euismod justo at tincidunt. Sed volutpat turpis sapien, et sodales lorem tristique in. Ut gravida, ligula id molestie lacinia, sapien tellus faucibus metus, eu sagittis quam augue nec dolor. Duis non ligula a mi blandit molestie. Etiam semper felis a neque tincidunt aliquet. Suspendisse augue velit, volutpat sed sollicitudin sit amet, tristique quis nisl. Vestibulum quis semper nisi. Nam sagittis eu elit a accumsan. 87 |

88 |

89 | Nunc iaculis vitae tellus quis lobortis. Mauris convallis viverra magna id rutrum. Ut bibendum malesuada aliquam. Proin sit amet sodales orci, nec aliquet turpis. Morbi vel eros orci. Phasellus a pulvinar urna, ac laoreet magna. Proin non turpis malesuada, blandit mauris in, ultricies velit. Duis hendrerit suscipit mi nec facilisis. 90 |

91 |
92 | 93 |
94 |

95 | Vestibulum a consequat turpis, vel congue turpis. Nullam placerat leo porttitor risus tincidunt faucibus. Nulla venenatis aliquam orci, commodo lobortis leo egestas vel. Nullam nec magna mollis, feugiat mi vel, eleifend velit. Nunc iaculis, libero at consectetur dapibus, urna sem egestas leo, quis ultrices neque lorem vel urna. Donec laoreet est nec nisl dignissim molestie. Aenean ut facilisis turpis, et pharetra eros. Nulla libero libero, vehicula vitae auctor ut, scelerisque nec nunc. Sed facilisis rhoncus leo, et accumsan magna congue pharetra. Donec lacinia eu lectus nec cursus. Maecenas ullamcorper augue tincidunt porttitor tempor. Quisque posuere, felis sed aliquam auctor, turpis erat molestie libero, at porta diam massa vitae ligula. Sed non est in elit mattis dictum. Praesent ac porttitor nisi. Sed lacinia, magna a porta venenatis, urna lorem pellentesque neque, a auctor nisi dui sed nisi. 96 |

97 |

98 | Curabitur consectetur libero id diam varius, quis commodo justo adipiscing. Phasellus interdum consectetur malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas adipiscing commodo lacus, quis tempor lorem eleifend ac. Donec iaculis sit amet dui nec porttitor. Nunc id leo at ligula fringilla fringilla sed hendrerit diam. Phasellus facilisis at est a suscipit. Donec ac sollicitudin neque, non accumsan nibh. Donec a risus mi. Suspendisse potenti. Quisque viverra nunc ut urna tincidunt, et ultricies odio eleifend. Nam volutpat turpis nec sollicitudin gravida. Nulla dignissim ipsum ut ligula pellentesque, eget dictum massa luctus. Donec consequat odio vel massa congue lobortis. In sem neque, pretium eu tincidunt a, laoreet eget justo. 99 |

100 |

101 | Morbi tincidunt, dolor vel consequat scelerisque, ante urna ultricies dolor, in rutrum dui magna eu dolor. Aenean pulvinar semper tellus, eget venenatis ante cursus nec. Sed non porta eros, vitae sodales eros. In elementum justo nec arcu cursus, sit amet dignissim sapien elementum. Cras ullamcorper ut sem vitae suscipit. Sed commodo nulla et mattis fringilla. Sed mattis tortor placerat eros dictum facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras malesuada velit a neque feugiat vulputate. Aliquam ut dui odio. 102 |

103 |

104 | Integer nibh diam, lobortis sed leo et, facilisis faucibus dolor. Praesent varius euismod ultricies. Sed condimentum euismod nulla dignissim porta. Donec dictum ipsum ac elit sodales dictum. Maecenas sollicitudin, eros non iaculis condimentum, purus justo scelerisque erat, et tincidunt turpis velit ut sapien. Mauris ut risus in metus lobortis lacinia ac vel velit. Integer scelerisque, magna eget feugiat adipiscing, turpis diam laoreet leo, eget pharetra urna sem id diam. Mauris augue elit, pharetra quis ipsum sagittis, consectetur interdum odio. Maecenas vel rutrum tortor. Donec posuere risus eget velit ullamcorper, at posuere tellus laoreet. Integer elementum dignissim urna eu elementum. 105 |

106 |

107 | Sed molestie, erat vel consectetur cursus, enim purus varius orci, nec pulvinar tortor nunc vel tellus. Proin vulputate lectus ac molestie cursus. Mauris vel eros ut sapien porttitor gravida vel eu lacus. Phasellus quis venenatis nibh. Fusce sit amet ullamcorper leo. Praesent purus urna, aliquet nec lorem eu, accumsan tempus lorem. Cras vehicula faucibus consequat. Vestibulum quis orci lectus. 108 |

109 |

110 | Vivamus velit enim, hendrerit ut nulla id, commodo blandit eros. In sed felis turpis. In porta, nisi sit amet posuere adipiscing, quam augue ultricies nisl, et tempor velit massa sed justo. Morbi nulla diam, placerat vitae rutrum quis, sodales quis tortor. Ut vel lacus tempus, fermentum nulla ac, pretium erat. Nulla facilisi. Quisque libero massa, vulputate quis molestie ut, adipiscing non nisi. Nullam facilisis, felis in fringilla aliquam, libero dui rhoncus odio, non tincidunt metus nibh vitae augue. Quisque id dui eleifend, semper nunc sit amet, egestas nisi. Sed rhoncus sem magna, vitae tincidunt nunc pellentesque ut. Mauris consequat sodales est, vitae interdum tortor tempor ut. Nam non mi rutrum libero condimentum condimentum. Proin dapibus sollicitudin auctor. In aliquet massa nibh, sit amet vulputate lectus eleifend ut. 111 |

112 |

113 | Vivamus varius purus elit, ac consectetur risus tristique eu. Ut nec condimentum ante, eget laoreet turpis. Maecenas at magna ac velit faucibus vehicula. Praesent interdum mi enim, quis tempus diam varius eu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aliquam tempus lorem tincidunt, condimentum eros eget, viverra est. Phasellus cursus in quam in elementum. Aliquam erat volutpat. Cras sollicitudin pellentesque justo vel scelerisque. Suspendisse imperdiet eros eu ante tincidunt tincidunt. Aenean sit amet arcu tortor. Sed fermentum eget ligula id viverra. Aenean gravida pretium justo, et scelerisque urna bibendum a. 114 |

115 |

116 | Morbi rutrum, tellus et laoreet laoreet, metus erat vestibulum risus, at sagittis elit metus sit amet arcu. Donec mollis tincidunt eleifend. Morbi eget euismod metus. Donec euismod mattis justo, vitae mattis sapien mollis quis. Maecenas ullamcorper metus eros, non blandit est rhoncus quis. Aliquam in mauris et elit porttitor convallis ut vel ante. Vestibulum congue aliquet massa quis auctor. Duis sapien augue, aliquet ac urna in, consectetur tempus quam. In hac habitasse platea dictumst. Duis dictum imperdiet fringilla. Nam diam elit, consequat sit amet justo nec, adipiscing laoreet tellus. Vivamus ut sapien ligula. Nullam interdum tristique tortor, ut adipiscing dolor dictum non. Curabitur posuere, felis vel sagittis eleifend, tellus sapien eleifend turpis, id posuere justo eros id leo. 117 |

118 |
119 | 120 |
121 |

122 | Donec iaculis, arcu eget euismod dapibus, ante ligula convallis nisi, eu luctus mauris libero a tortor. Vestibulum ultricies enim justo, sit amet euismod neque pellentesque at. Phasellus sed augue sit amet mauris iaculis dictum. Nunc at nunc ut mi ultricies congue quis quis urna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin sodales orci sapien, vel suscipit nisl euismod rhoncus. Vestibulum sed justo ac mauris dapibus tempus quis eget orci. Nullam nec tortor dolor. Pellentesque mollis purus eu eros fermentum fermentum. Praesent quis suscipit erat. In lacinia ultrices pellentesque. Aliquam erat volutpat. Aliquam et venenatis lacus, ac laoreet justo. 123 |

124 |

125 | Sed ac eros euismod, tincidunt arcu scelerisque, viverra neque. Phasellus et euismod mauris. Nunc id pellentesque ligula. Duis quis metus ornare, suscipit augue non, varius lectus. Proin mollis volutpat risus non imperdiet. Nam velit leo, facilisis ut porttitor vel, tincidunt quis eros. Aenean facilisis ultricies erat, sed blandit sem sagittis id. Duis egestas adipiscing nunc, faucibus condimentum nunc semper in. Vivamus at auctor metus. Nunc non mi dui. Duis molestie fringilla justo, ut placerat odio volutpat in. Praesent a augue at sapien blandit ultricies non eu erat. 126 |

127 |

128 | Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce egestas lacus a justo dapibus, vel dictum libero viverra. Maecenas ac lacus dolor. Donec dictum vulputate neque sed eleifend. Curabitur lacinia augue eget semper suscipit. Sed metus felis, elementum et justo a, vestibulum pretium augue. Phasellus lectus est, pulvinar non arcu vitae, dictum mattis tortor. Nunc commodo diam vel lectus auctor accumsan. Morbi vehicula pellentesque sem, sit amet facilisis diam sodales et. Phasellus ac mattis sem, sed elementum libero. Nulla facilisi. 129 |

130 |
131 | 132 |
133 |

Bibliography

134 | 135 |
136 |
137 | 138 |
139 |

Images

140 | 141 |
142 |
143 | 144 | 145 | 146 | 147 | 148 | 149 | 152 | 153 | -------------------------------------------------------------------------------- /app/config.coffee: -------------------------------------------------------------------------------- 1 | module.exports = exp = {} 2 | 3 | exp.Main = class Main 4 | VERSION = "1.2" 5 | 6 | CLASS = 7 | "title": "jsprint-title" 8 | "page": "jsprint-page" 9 | "header": "jsprint-page-header" 10 | "footer": "jsprint-page-footer" 11 | "summary": "jsprint-summary" 12 | "bibliography": "jsprint-bibliography" 13 | "imageography": "jsprint-imageography" 14 | "footer-pagenbr": "jsprint-pagenbr" 15 | "def-header": "jsprint-def-header" 16 | "page-summary": "jsprint-page-summary" 17 | "summary-entry": "jsprint-summary-entry" 18 | "img-legend": "jsprint-img-legend" 19 | 20 | CONFIG = 21 | summary: 22 | nbrtitle: 45 23 | 24 | constructor: -> null 25 | 26 | getClass: (className) -> CLASS[className] 27 | 28 | getClasses: -> [k] for k, v of CLASS 29 | 30 | getVersion: -> VERSION 31 | 32 | get: (configName, option) -> CONFIG[configName][option] 33 | -------------------------------------------------------------------------------- /app/styles/jsprint.css: -------------------------------------------------------------------------------- 1 | body{ 2 | width: 200mm; 3 | margin: auto; 4 | } 5 | 6 | *{ 7 | -webkit-print-color-adjust:exact; 8 | } 9 | pre{ 10 | -webkit-print-color-adjust:economy; 11 | } 12 | 13 | /* Header */ 14 | .jsprint-page-header{ 15 | text-align: right; 16 | margin-top: 10px; 17 | } 18 | .jsprint-def-header{ display: none; } 19 | .jsprint-page-header{ 20 | postition: absolute; 21 | top: 0px; 22 | } 23 | 24 | /* Summary */ 25 | .jsprint-summary-entry{ border-bottom: #afafaf 1px dotted; } 26 | .jsprint-summary-H1{ font-size: 1.2em; font-weight: bold; } 27 | .jsprint-summary-H2{ font-size: 1.1em; padding-left: 10px; } 28 | .jsprint-summary-H3{ font-size: 1em; padding-left: 20px; } 29 | .jsprint-summary-H4{ font-size: 0.9em; padding-left: 30px; } 30 | .jsprint-summary-entry div{ width: 20px; float: right; } 31 | 32 | /* Page content */ 33 | 34 | .jsprint-page{ 35 | padding-left: 20px; 36 | padding-right: 25px; 37 | page-break-after: always; 38 | height: 290mm; 39 | position: relative; 40 | } 41 | 42 | .jsprint-summary{ 43 | padding-top: 20px; 44 | } 45 | 46 | .jsprint-page-footer{ 47 | position: absolute; 48 | bottom: 0px; 49 | right: 1px; 50 | } 51 | .jsprint-page-footer .jsprint-pagenbr{ 52 | width: 20px; 53 | padding-right: 10px; 54 | padding-bottom: 10px; 55 | } 56 | .jsprint-img-legend{ 57 | text-align: center; 58 | font-style: italic; 59 | } 60 | -------------------------------------------------------------------------------- /app/styles/prettify-desert.css: -------------------------------------------------------------------------------- 1 | /* desert scheme ported from vim to google prettify */ 2 | pre.prettyprint { display: block; background-color: #333 } 3 | pre .nocode { background-color: none; color: #000 } 4 | pre .str { color: #ffa0a0 } /* string - pink */ 5 | pre .kwd { color: #f0e68c; font-weight: bold } 6 | pre .com { color: #87ceeb } /* comment - skyblue */ 7 | pre .typ { color: #98fb98 } /* type - lightgreen */ 8 | pre .lit { color: #cd5c5c } /* literal - darkred */ 9 | pre .pun { color: #fff } /* punctuation */ 10 | pre .pln { color: #fff } /* plaintext */ 11 | pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */ 12 | pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */ 13 | pre .atv { color: #ffa0a0 } /* attribute value - pink */ 14 | pre .dec { color: #98fb98 } /* decimal - lightgreen */ 15 | 16 | /* Specify class=linenums on a pre to get line numbering */ 17 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */ 18 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 19 | /* Alternate shading for lines */ 20 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 21 | 22 | @media print { 23 | pre.prettyprint { background-color: none } 24 | pre .str, code .str { color: #060 } 25 | pre .kwd, code .kwd { color: #006; font-weight: bold } 26 | pre .com, code .com { color: #600; font-style: italic } 27 | pre .typ, code .typ { color: #404; font-weight: bold } 28 | pre .lit, code .lit { color: #044 } 29 | pre .pun, code .pun { color: #440 } 30 | pre .pln, code .pln { color: #000 } 31 | pre .tag, code .tag { color: #006; font-weight: bold } 32 | pre .atn, code .atn { color: #404 } 33 | pre .atv, code .atv { color: #060 } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /app/styles/theme.css: -------------------------------------------------------------------------------- 1 | /*****************************************************/ 2 | /* General customization */ 3 | /*****************************************************/ 4 | body{ 5 | font-family: arial; 6 | } 7 | h1{ 8 | color: #D5BB94; 9 | margin: 0px; 10 | margin-bottom: 10px; 11 | } 12 | h2{ 13 | padding-top: 20px; 14 | color: #F8BA1C; 15 | font-size: 20px; 16 | padding-left: 5px; 17 | margin: 0px; 18 | font-style: italic; 19 | margin-bottom: 10px; 20 | } 21 | h3{ 22 | color: #EABB7A; 23 | font-size: 16px; 24 | padding-left: 10px; 25 | margin: 0px; 26 | font-style: italic; 27 | } 28 | h4{ 29 | color: #EBCC9A; 30 | font-size: 14px; 31 | padding-left: 10px; 32 | margin: 0px; 33 | font-style: italic; 34 | } 35 | p{ 36 | font-size: 14px; 37 | text-align: justify; 38 | } 39 | 40 | ul{ 41 | list-style: none; 42 | padding: 0; 43 | margin: 0; 44 | } 45 | 46 | 47 | li{ 48 | padding-left: 1em; 49 | text-indent: -.7em; 50 | font-size: 14px; 51 | margin-bottom: 5px; 52 | } 53 | li:before{ 54 | color: #B09367; 55 | content: "• "; 56 | } 57 | 58 | a{ 59 | color: #7f7f7f; 60 | font-style: italic; 61 | text-decoration: none; 62 | } 63 | 64 | table{ 65 | border-spacing:0; 66 | border: #cfcfcf 1px solid; 67 | margin: auto; 68 | } 69 | 70 | table tr th{ 71 | background-color: #C3AD7A; 72 | color: #fefefe; 73 | font-size: 14px; 74 | text-align: left; 75 | 76 | } 77 | table tr td{ 78 | font-size: 12px; 79 | margin: 0px; 80 | color: #5f5f5f; 81 | padding: 2px 10px; 82 | } 83 | table tr:nth-child(even) {background: #CCC} 84 | 85 | img{ 86 | width: 95%; 87 | margin: 0 auto; 88 | display: block; 89 | border: #cfcfcf 1px solid; 90 | padding: 5px 5px; 91 | } 92 | 93 | pre{ 94 | background-color: #3f3f3f; 95 | color: #efefef; 96 | } 97 | 98 | 99 | 100 | 101 | /*****************************************************/ 102 | /* JSP Customization */ 103 | /*****************************************************/ 104 | 105 | /* Page border */ 106 | .jsprint-page{ border: #cecece 1px solid; } 107 | 108 | 109 | /* Page number color */ 110 | .jsprint-page-footer .jsprint-pagenbr{ color: #9f9f9f; } 111 | 112 | 113 | /* Summary color */ 114 | .jsprint-summary{ color: #9f9f9f; } 115 | 116 | 117 | /* Header */ 118 | .jsprint-page-header p{ 119 | text-align: right; 120 | color: #9f9f9f; 121 | border-bottom: #dfdfdf 1px solid; 122 | padding-bottom: 5px; 123 | } 124 | 125 | 126 | /* Image legend style */ 127 | .jsprint-img-legend{ 128 | color: #9f9f9f; 129 | font-size: 0.7em; 130 | } 131 | 132 | /*****************************************************/ 133 | /* JSP Personalization */ 134 | /*****************************************************/ 135 | 136 | p.note{ 137 | background-color: #cfcfcf; 138 | border: #9f9f9f 2px solid; 139 | padding: 5px; 140 | border-top: 0; 141 | border-bottom: 0; 142 | font-style: italic; 143 | color: #3f3f3f; 144 | } 145 | -------------------------------------------------------------------------------- /app/utils.coffee: -------------------------------------------------------------------------------- 1 | module.exports = exp = {} 2 | 3 | exp.appendToClass = appendToClass = (className, content) -> 4 | $(".#{className}").append(content) 5 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jsprint", 3 | "version": "0.1.0", 4 | "main": "release/jsprint.js", 5 | "dependencies": { 6 | "jquery": "~2.1.1" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /coffeelint.json: -------------------------------------------------------------------------------- 1 | { 2 | "arrow_spacing": { 3 | "level": "ignore" 4 | }, 5 | "camel_case_classes": { 6 | "level": "error" 7 | }, 8 | "coffeescript_error": { 9 | "level": "error" 10 | }, 11 | "colon_assignment_spacing": { 12 | "level": "ignore", 13 | "spacing": { 14 | "left": 0, 15 | "right": 0 16 | } 17 | }, 18 | "cyclomatic_complexity": { 19 | "value": 10, 20 | "level": "ignore" 21 | }, 22 | "duplicate_key": { 23 | "level": "error" 24 | }, 25 | "empty_constructor_needs_parens": { 26 | "level": "ignore" 27 | }, 28 | "indentation": { 29 | "value": 2, 30 | "level": "error" 31 | }, 32 | "line_endings": { 33 | "level": "ignore", 34 | "value": "unix" 35 | }, 36 | "max_line_length": { 37 | "value": 96, 38 | "level": "warn", 39 | "limitComments": true 40 | }, 41 | "missing_fat_arrows": { 42 | "level": "ignore" 43 | }, 44 | "newlines_after_classes": { 45 | "value": 3, 46 | "level": "ignore" 47 | }, 48 | "no_backticks": { 49 | "level": "error" 50 | }, 51 | "no_debugger": { 52 | "level": "warn" 53 | }, 54 | "no_empty_functions": { 55 | "level": "ignore" 56 | }, 57 | "no_empty_param_list": { 58 | "level": "ignore" 59 | }, 60 | "no_implicit_braces": { 61 | "level": "ignore", 62 | "strict": true 63 | }, 64 | "no_implicit_parens": { 65 | "strict": true, 66 | "level": "ignore" 67 | }, 68 | "no_interpolation_in_single_quotes": { 69 | "level": "ignore" 70 | }, 71 | "no_plusplus": { 72 | "level": "ignore" 73 | }, 74 | "no_stand_alone_at": { 75 | "level": "ignore" 76 | }, 77 | "no_tabs": { 78 | "level": "error" 79 | }, 80 | "no_throwing_strings": { 81 | "level": "error" 82 | }, 83 | "no_trailing_semicolons": { 84 | "level": "error" 85 | }, 86 | "no_trailing_whitespace": { 87 | "level": "error", 88 | "allowed_in_comments": false, 89 | "allowed_in_empty_lines": true 90 | }, 91 | "no_unnecessary_double_quotes": { 92 | "level": "ignore" 93 | }, 94 | "no_unnecessary_fat_arrows": { 95 | "level": "warn" 96 | }, 97 | "non_empty_constructor_needs_parens": { 98 | "level": "ignore" 99 | }, 100 | "space_operators": { 101 | "level": "ignore" 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /config.coffee: -------------------------------------------------------------------------------- 1 | # Brunch.io configuration file 2 | {name} = require './package' 3 | 4 | exports.config = 5 | modules: 6 | nameCleaner: (path) -> 7 | path.replace /^app/, name 8 | 9 | path: 10 | public: 'public' 11 | files: 12 | javascripts: 13 | joinTo: 14 | 'vendor.js': /^vendor/ 15 | 'jsprint.js': /^app/ 16 | stylesheets: 17 | joinTo: 'jsprint.css': /^app\/styles/ 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Yves Lange", 3 | "name": "jsprint", 4 | "description": "Creates printable documents", 5 | "version": "0.0.1", 6 | "homepage": "https://github.com/kursion/jsprint", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/kursion/jsprint" 10 | }, 11 | "dependencies": {}, 12 | "devDependencies": { 13 | "brunch": "1.7.14", 14 | "bower": "1.3.3", 15 | "javascript-brunch": ">= 1.0 < 1.8", 16 | "coffee-script-brunch": ">= 1.0 < 1.8", 17 | "css-brunch": ">= 1.0 < 1.8", 18 | "uglify-js-brunch": ">= 1.0 < 1.8", 19 | "clean-css-brunch": ">= 1.0 < 1.8", 20 | "auto-reload-brunch": ">= 1.0 < 1.8", 21 | "less-brunch": "~1.5.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /public/images/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kursion/jsprint/f56a21068221d87d3f623e6f9be423a2fcf90445/public/images/img.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test of JSPrint 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |

Jsprint by Yves Lange
14 | This is my header - on every pages

15 |
16 | 17 | 18 |
19 |

Jsprint library

20 |

Make document with HTML !

21 | 22 |

Author: Yves Lange/Kursion

23 |
24 | 25 | 26 |
27 |

Summary

28 | 29 |
30 |
31 | 32 | 33 |
34 |

Introduction

35 |

Check the example of this example in order to learn how to use this module

36 |

37 | You can check the documentation on the repository: 38 | Yves Lange - JSPrint 39 |

40 |

Subsection H2

41 |

Here is an example of a subsection

42 |

Subsection H3

43 |

Here is an example of a subsection

44 |

Subsection H4

45 |

Here is an example of a subsection

46 |
47 | 48 | 49 |
50 |

Functionalities

51 |

- Printable with all browsers

52 |

- CSS, JavaScript (+jQuery) only

53 |

- Easy to learn, use and adapt

54 |

- Header can be customize

55 |

- Auto-generating of the summary

56 |

- Auto-generating pages number

57 |
58 | 59 |
60 |

Example of auto separated page

61 |

62 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer at tempor metus. Mauris ut ante a lacus ornare tempor eget et nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed lorem ipsum, dictum vitae mauris eget, congue consectetur neque. Cras faucibus diam a nisi mattis malesuada. Proin pulvinar vitae erat ac porttitor. Curabitur sit amet justo sed sem pretium consequat ut at nisl. Curabitur mattis mauris ut egestas pretium. Fusce imperdiet felis sit amet lacus accumsan, sit amet tristique lacus suscipit. 63 |

64 |

65 | This is a sample note using the p.note class 66 |

67 |

68 |

var str = "Some code in JavaScript, C, C++, Python, ..."; 
69 |

70 |

71 | Nulla vitae sem fringilla, ultrices ante vel, elementum nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nullam quis pretium mi. Ut dapibus nisl quis lacus interdum, a rutrum sapien imperdiet. Nunc vitae tincidunt enim. Donec ut porttitor tellus. Sed posuere ipsum diam, sed elementum quam vehicula vel. Fusce nec dapibus nisl. Curabitur gravida varius sapien sit amet sodales. 72 |

73 |

74 | Sed lorem magna, scelerisque pellentesque aliquet vel, gravida non eros. Aliquam erat volutpat. Vestibulum eu arcu id risus dapibus accumsan quis hendrerit enim. Nulla eleifend lorem ut interdum mollis. Phasellus eleifend justo quis hendrerit placerat. Duis sodales, ligula nec luctus dapibus, orci mauris condimentum purus, in adipiscing dolor nisi at mauris. Morbi facilisis rhoncus ipsum, ut luctus orci dictum non. Ut nulla metus, suscipit nec sapien at, viverra euismod nisi. Nullam non consectetur lorem. Morbi ipsum tellus, condimentum at tortor tempus, tempor lobortis sem. Praesent orci est, feugiat sit amet purus quis, convallis sollicitudin metus. Nulla semper consectetur erat, id interdum orci. Nullam nec ornare ipsum, ut pulvinar velit. 75 |

76 |

77 | Nulla placerat risus iaculis, iaculis velit ut, gravida justo. Integer id euismod enim. Nunc rhoncus nunc nec est tempus, sit amet condimentum nisl consectetur. Nulla ultrices lorem ut suscipit placerat. Donec eu massa dictum, blandit dolor eget, tempus sapien. Cras ac aliquet augue, ac vehicula ante. Quisque congue lectus id arcu commodo convallis. 78 |

79 |

80 | Nullam varius mauris ante, suscipit placerat velit tristique nec. Vivamus faucibus nibh sed aliquam sagittis. Duis eu bibendum orci, eget vestibulum enim. Aenean ut faucibus leo. Donec euismod tristique odio nec viverra. Suspendisse sem arcu, pulvinar quis nibh suscipit, ornare eleifend nisl. Donec molestie tortor vitae tincidunt pharetra. Donec fermentum suscipit massa, nec ultricies sem tincidunt ut. Morbi mattis sagittis purus eu tincidunt. Quisque dictum tortor non ligula scelerisque dictum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc sed pellentesque nibh. Nulla varius, elit sed sollicitudin pulvinar, augue metus pharetra metus, in ultricies lorem risus in ligula. Ut varius sapien tortor. Quisque imperdiet euismod leo pharetra suscipit. 81 |

82 |

83 | Phasellus consequat gravida mauris vitae aliquam. Aliquam eleifend est ligula, fringilla vestibulum purus vehicula vel. Ut sed sollicitudin nibh. Donec aliquet gravida odio id volutpat. Phasellus ac ante a lacus egestas egestas. Donec imperdiet malesuada libero. Vivamus fermentum a erat id congue. Sed faucibus risus quis massa vestibulum, sit amet aliquam sem lobortis. Sed dignissim, lectus quis semper ullamcorper, dolor orci bibendum lacus, quis rhoncus neque nisi ut magna. Morbi id ante in nisi aliquet tristique a ut justo. Mauris convallis nibh mauris, at aliquam nisl porta id. Donec enim nunc, ullamcorper vel felis id, pulvinar tempor libero. Integer vestibulum molestie nisi. Etiam nec quam a urna vehicula egestas nec at odio. 84 |

85 |

86 | In scelerisque odio metus, non feugiat neque egestas vestibulum. Proin ut enim placerat, lacinia ante nec, convallis orci. Quisque lacinia magna ut leo pulvinar facilisis ac et mi. Nulla eget molestie turpis. Quisque vestibulum euismod justo at tincidunt. Sed volutpat turpis sapien, et sodales lorem tristique in. Ut gravida, ligula id molestie lacinia, sapien tellus faucibus metus, eu sagittis quam augue nec dolor. Duis non ligula a mi blandit molestie. Etiam semper felis a neque tincidunt aliquet. Suspendisse augue velit, volutpat sed sollicitudin sit amet, tristique quis nisl. Vestibulum quis semper nisi. Nam sagittis eu elit a accumsan. 87 |

88 |

89 | Nunc iaculis vitae tellus quis lobortis. Mauris convallis viverra magna id rutrum. Ut bibendum malesuada aliquam. Proin sit amet sodales orci, nec aliquet turpis. Morbi vel eros orci. Phasellus a pulvinar urna, ac laoreet magna. Proin non turpis malesuada, blandit mauris in, ultricies velit. Duis hendrerit suscipit mi nec facilisis. 90 |

91 |
92 | 93 |
94 |

95 | Vestibulum a consequat turpis, vel congue turpis. Nullam placerat leo porttitor risus tincidunt faucibus. Nulla venenatis aliquam orci, commodo lobortis leo egestas vel. Nullam nec magna mollis, feugiat mi vel, eleifend velit. Nunc iaculis, libero at consectetur dapibus, urna sem egestas leo, quis ultrices neque lorem vel urna. Donec laoreet est nec nisl dignissim molestie. Aenean ut facilisis turpis, et pharetra eros. Nulla libero libero, vehicula vitae auctor ut, scelerisque nec nunc. Sed facilisis rhoncus leo, et accumsan magna congue pharetra. Donec lacinia eu lectus nec cursus. Maecenas ullamcorper augue tincidunt porttitor tempor. Quisque posuere, felis sed aliquam auctor, turpis erat molestie libero, at porta diam massa vitae ligula. Sed non est in elit mattis dictum. Praesent ac porttitor nisi. Sed lacinia, magna a porta venenatis, urna lorem pellentesque neque, a auctor nisi dui sed nisi. 96 |

97 |

98 | Curabitur consectetur libero id diam varius, quis commodo justo adipiscing. Phasellus interdum consectetur malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas adipiscing commodo lacus, quis tempor lorem eleifend ac. Donec iaculis sit amet dui nec porttitor. Nunc id leo at ligula fringilla fringilla sed hendrerit diam. Phasellus facilisis at est a suscipit. Donec ac sollicitudin neque, non accumsan nibh. Donec a risus mi. Suspendisse potenti. Quisque viverra nunc ut urna tincidunt, et ultricies odio eleifend. Nam volutpat turpis nec sollicitudin gravida. Nulla dignissim ipsum ut ligula pellentesque, eget dictum massa luctus. Donec consequat odio vel massa congue lobortis. In sem neque, pretium eu tincidunt a, laoreet eget justo. 99 |

100 |

101 | Morbi tincidunt, dolor vel consequat scelerisque, ante urna ultricies dolor, in rutrum dui magna eu dolor. Aenean pulvinar semper tellus, eget venenatis ante cursus nec. Sed non porta eros, vitae sodales eros. In elementum justo nec arcu cursus, sit amet dignissim sapien elementum. Cras ullamcorper ut sem vitae suscipit. Sed commodo nulla et mattis fringilla. Sed mattis tortor placerat eros dictum facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras malesuada velit a neque feugiat vulputate. Aliquam ut dui odio. 102 |

103 |

104 | Integer nibh diam, lobortis sed leo et, facilisis faucibus dolor. Praesent varius euismod ultricies. Sed condimentum euismod nulla dignissim porta. Donec dictum ipsum ac elit sodales dictum. Maecenas sollicitudin, eros non iaculis condimentum, purus justo scelerisque erat, et tincidunt turpis velit ut sapien. Mauris ut risus in metus lobortis lacinia ac vel velit. Integer scelerisque, magna eget feugiat adipiscing, turpis diam laoreet leo, eget pharetra urna sem id diam. Mauris augue elit, pharetra quis ipsum sagittis, consectetur interdum odio. Maecenas vel rutrum tortor. Donec posuere risus eget velit ullamcorper, at posuere tellus laoreet. Integer elementum dignissim urna eu elementum. 105 |

106 |

107 | Sed molestie, erat vel consectetur cursus, enim purus varius orci, nec pulvinar tortor nunc vel tellus. Proin vulputate lectus ac molestie cursus. Mauris vel eros ut sapien porttitor gravida vel eu lacus. Phasellus quis venenatis nibh. Fusce sit amet ullamcorper leo. Praesent purus urna, aliquet nec lorem eu, accumsan tempus lorem. Cras vehicula faucibus consequat. Vestibulum quis orci lectus. 108 |

109 |

110 | Vivamus velit enim, hendrerit ut nulla id, commodo blandit eros. In sed felis turpis. In porta, nisi sit amet posuere adipiscing, quam augue ultricies nisl, et tempor velit massa sed justo. Morbi nulla diam, placerat vitae rutrum quis, sodales quis tortor. Ut vel lacus tempus, fermentum nulla ac, pretium erat. Nulla facilisi. Quisque libero massa, vulputate quis molestie ut, adipiscing non nisi. Nullam facilisis, felis in fringilla aliquam, libero dui rhoncus odio, non tincidunt metus nibh vitae augue. Quisque id dui eleifend, semper nunc sit amet, egestas nisi. Sed rhoncus sem magna, vitae tincidunt nunc pellentesque ut. Mauris consequat sodales est, vitae interdum tortor tempor ut. Nam non mi rutrum libero condimentum condimentum. Proin dapibus sollicitudin auctor. In aliquet massa nibh, sit amet vulputate lectus eleifend ut. 111 |

112 |

113 | Vivamus varius purus elit, ac consectetur risus tristique eu. Ut nec condimentum ante, eget laoreet turpis. Maecenas at magna ac velit faucibus vehicula. Praesent interdum mi enim, quis tempus diam varius eu. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aliquam tempus lorem tincidunt, condimentum eros eget, viverra est. Phasellus cursus in quam in elementum. Aliquam erat volutpat. Cras sollicitudin pellentesque justo vel scelerisque. Suspendisse imperdiet eros eu ante tincidunt tincidunt. Aenean sit amet arcu tortor. Sed fermentum eget ligula id viverra. Aenean gravida pretium justo, et scelerisque urna bibendum a. 114 |

115 |

116 | Morbi rutrum, tellus et laoreet laoreet, metus erat vestibulum risus, at sagittis elit metus sit amet arcu. Donec mollis tincidunt eleifend. Morbi eget euismod metus. Donec euismod mattis justo, vitae mattis sapien mollis quis. Maecenas ullamcorper metus eros, non blandit est rhoncus quis. Aliquam in mauris et elit porttitor convallis ut vel ante. Vestibulum congue aliquet massa quis auctor. Duis sapien augue, aliquet ac urna in, consectetur tempus quam. In hac habitasse platea dictumst. Duis dictum imperdiet fringilla. Nam diam elit, consequat sit amet justo nec, adipiscing laoreet tellus. Vivamus ut sapien ligula. Nullam interdum tristique tortor, ut adipiscing dolor dictum non. Curabitur posuere, felis vel sagittis eleifend, tellus sapien eleifend turpis, id posuere justo eros id leo. 117 |

118 |
119 | 120 |
121 |

122 | Donec iaculis, arcu eget euismod dapibus, ante ligula convallis nisi, eu luctus mauris libero a tortor. Vestibulum ultricies enim justo, sit amet euismod neque pellentesque at. Phasellus sed augue sit amet mauris iaculis dictum. Nunc at nunc ut mi ultricies congue quis quis urna. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin sodales orci sapien, vel suscipit nisl euismod rhoncus. Vestibulum sed justo ac mauris dapibus tempus quis eget orci. Nullam nec tortor dolor. Pellentesque mollis purus eu eros fermentum fermentum. Praesent quis suscipit erat. In lacinia ultrices pellentesque. Aliquam erat volutpat. Aliquam et venenatis lacus, ac laoreet justo. 123 |

124 |

125 | Sed ac eros euismod, tincidunt arcu scelerisque, viverra neque. Phasellus et euismod mauris. Nunc id pellentesque ligula. Duis quis metus ornare, suscipit augue non, varius lectus. Proin mollis volutpat risus non imperdiet. Nam velit leo, facilisis ut porttitor vel, tincidunt quis eros. Aenean facilisis ultricies erat, sed blandit sem sagittis id. Duis egestas adipiscing nunc, faucibus condimentum nunc semper in. Vivamus at auctor metus. Nunc non mi dui. Duis molestie fringilla justo, ut placerat odio volutpat in. Praesent a augue at sapien blandit ultricies non eu erat. 126 |

127 |

128 | Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce egestas lacus a justo dapibus, vel dictum libero viverra. Maecenas ac lacus dolor. Donec dictum vulputate neque sed eleifend. Curabitur lacinia augue eget semper suscipit. Sed metus felis, elementum et justo a, vestibulum pretium augue. Phasellus lectus est, pulvinar non arcu vitae, dictum mattis tortor. Nunc commodo diam vel lectus auctor accumsan. Morbi vehicula pellentesque sem, sit amet facilisis diam sodales et. Phasellus ac mattis sem, sed elementum libero. Nulla facilisi. 129 |

130 |
131 | 132 |
133 |

Bibliography

134 | 135 |
136 |
137 | 138 |
139 |

Images

140 | 141 |
142 |
143 | 144 | 145 | 146 | 147 | 148 | 149 | 152 | 153 | -------------------------------------------------------------------------------- /public/jsprint.css: -------------------------------------------------------------------------------- 1 | body{ 2 | width: 200mm; 3 | margin: auto; 4 | } 5 | 6 | *{ 7 | -webkit-print-color-adjust:exact; 8 | } 9 | pre{ 10 | -webkit-print-color-adjust:economy; 11 | } 12 | 13 | /* Header */ 14 | .jsprint-page-header{ 15 | text-align: right; 16 | margin-top: 10px; 17 | } 18 | .jsprint-def-header{ display: none; } 19 | .jsprint-page-header{ 20 | postition: absolute; 21 | top: 0px; 22 | } 23 | 24 | /* Summary */ 25 | .jsprint-summary-entry{ border-bottom: #afafaf 1px dotted; } 26 | .jsprint-summary-H1{ font-size: 1.2em; font-weight: bold; } 27 | .jsprint-summary-H2{ font-size: 1.1em; padding-left: 10px; } 28 | .jsprint-summary-H3{ font-size: 1em; padding-left: 20px; } 29 | .jsprint-summary-H4{ font-size: 0.9em; padding-left: 30px; } 30 | .jsprint-summary-entry div{ width: 20px; float: right; } 31 | 32 | /* Page content */ 33 | 34 | .jsprint-page{ 35 | padding-left: 20px; 36 | padding-right: 25px; 37 | page-break-after: always; 38 | height: 290mm; 39 | position: relative; 40 | } 41 | 42 | .jsprint-summary{ 43 | padding-top: 20px; 44 | } 45 | 46 | .jsprint-page-footer{ 47 | position: absolute; 48 | bottom: 0px; 49 | right: 1px; 50 | } 51 | .jsprint-page-footer .jsprint-pagenbr{ 52 | width: 20px; 53 | padding-right: 10px; 54 | padding-bottom: 10px; 55 | } 56 | .jsprint-img-legend{ 57 | text-align: center; 58 | font-style: italic; 59 | } 60 | 61 | /* desert scheme ported from vim to google prettify */ 62 | pre.prettyprint { display: block; background-color: #333 } 63 | pre .nocode { background-color: none; color: #000 } 64 | pre .str { color: #ffa0a0 } /* string - pink */ 65 | pre .kwd { color: #f0e68c; font-weight: bold } 66 | pre .com { color: #87ceeb } /* comment - skyblue */ 67 | pre .typ { color: #98fb98 } /* type - lightgreen */ 68 | pre .lit { color: #cd5c5c } /* literal - darkred */ 69 | pre .pun { color: #fff } /* punctuation */ 70 | pre .pln { color: #fff } /* plaintext */ 71 | pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */ 72 | pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */ 73 | pre .atv { color: #ffa0a0 } /* attribute value - pink */ 74 | pre .dec { color: #98fb98 } /* decimal - lightgreen */ 75 | 76 | /* Specify class=linenums on a pre to get line numbering */ 77 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */ 78 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none } 79 | /* Alternate shading for lines */ 80 | li.L1,li.L3,li.L5,li.L7,li.L9 { } 81 | 82 | @media print { 83 | pre.prettyprint { background-color: none } 84 | pre .str, code .str { color: #060 } 85 | pre .kwd, code .kwd { color: #006; font-weight: bold } 86 | pre .com, code .com { color: #600; font-style: italic } 87 | pre .typ, code .typ { color: #404; font-weight: bold } 88 | pre .lit, code .lit { color: #044 } 89 | pre .pun, code .pun { color: #440 } 90 | pre .pln, code .pln { color: #000 } 91 | pre .tag, code .tag { color: #006; font-weight: bold } 92 | pre .atn, code .atn { color: #404 } 93 | pre .atv, code .atv { color: #060 } 94 | } 95 | 96 | 97 | /*****************************************************/ 98 | /* General customization */ 99 | /*****************************************************/ 100 | body{ 101 | font-family: arial; 102 | } 103 | h1{ 104 | color: #D5BB94; 105 | margin: 0px; 106 | margin-bottom: 10px; 107 | } 108 | h2{ 109 | padding-top: 20px; 110 | color: #F8BA1C; 111 | font-size: 20px; 112 | padding-left: 5px; 113 | margin: 0px; 114 | font-style: italic; 115 | margin-bottom: 10px; 116 | } 117 | h3{ 118 | color: #EABB7A; 119 | font-size: 16px; 120 | padding-left: 10px; 121 | margin: 0px; 122 | font-style: italic; 123 | } 124 | h4{ 125 | color: #EBCC9A; 126 | font-size: 14px; 127 | padding-left: 10px; 128 | margin: 0px; 129 | font-style: italic; 130 | } 131 | p{ 132 | font-size: 14px; 133 | text-align: justify; 134 | } 135 | 136 | ul{ 137 | list-style: none; 138 | padding: 0; 139 | margin: 0; 140 | } 141 | 142 | 143 | li{ 144 | padding-left: 1em; 145 | text-indent: -.7em; 146 | font-size: 14px; 147 | margin-bottom: 5px; 148 | } 149 | li:before{ 150 | color: #B09367; 151 | content: "• "; 152 | } 153 | 154 | a{ 155 | color: #7f7f7f; 156 | font-style: italic; 157 | text-decoration: none; 158 | } 159 | 160 | table{ 161 | border-spacing:0; 162 | border: #cfcfcf 1px solid; 163 | margin: auto; 164 | } 165 | 166 | table tr th{ 167 | background-color: #C3AD7A; 168 | color: #fefefe; 169 | font-size: 14px; 170 | text-align: left; 171 | 172 | } 173 | table tr td{ 174 | font-size: 12px; 175 | margin: 0px; 176 | color: #5f5f5f; 177 | padding: 2px 10px; 178 | } 179 | table tr:nth-child(even) {background: #CCC} 180 | 181 | img{ 182 | width: 95%; 183 | margin: 0 auto; 184 | display: block; 185 | border: #cfcfcf 1px solid; 186 | padding: 5px 5px; 187 | } 188 | 189 | pre{ 190 | background-color: #3f3f3f; 191 | color: #efefef; 192 | } 193 | 194 | 195 | 196 | 197 | /*****************************************************/ 198 | /* JSP Customization */ 199 | /*****************************************************/ 200 | 201 | /* Page border */ 202 | .jsprint-page{ border: #cecece 1px solid; } 203 | 204 | 205 | /* Page number color */ 206 | .jsprint-page-footer .jsprint-pagenbr{ color: #9f9f9f; } 207 | 208 | 209 | /* Summary color */ 210 | .jsprint-summary{ color: #9f9f9f; } 211 | 212 | 213 | /* Header */ 214 | .jsprint-page-header p{ 215 | text-align: right; 216 | color: #9f9f9f; 217 | border-bottom: #dfdfdf 1px solid; 218 | padding-bottom: 5px; 219 | } 220 | 221 | 222 | /* Image legend style */ 223 | .jsprint-img-legend{ 224 | color: #9f9f9f; 225 | font-size: 0.7em; 226 | } 227 | 228 | /*****************************************************/ 229 | /* JSP Personalization */ 230 | /*****************************************************/ 231 | 232 | p.note{ 233 | background-color: #cfcfcf; 234 | border: #9f9f9f 2px solid; 235 | padding: 5px; 236 | border-top: 0; 237 | border-bottom: 0; 238 | font-style: italic; 239 | color: #3f3f3f; 240 | } 241 | 242 | 243 | /*# sourceMappingURL=jsprint.css.map*/ -------------------------------------------------------------------------------- /public/jsprint.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["app/styles/jsprint.css","app/styles/prettify-desert.css","app/styles/theme.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"public/jsprint.css","sourcesContent":["body{\n width: 200mm;\n margin: auto;\n}\n\n*{\n -webkit-print-color-adjust:exact;\n}\npre{\n -webkit-print-color-adjust:economy;\n}\n\n/* Header */\n.jsprint-page-header{\n text-align: right;\n margin-top: 10px;\n}\n.jsprint-def-header{ display: none; }\n.jsprint-page-header{\n postition: absolute;\n top: 0px;\n}\n\n/* Summary */\n.jsprint-summary-entry{ border-bottom: #afafaf 1px dotted; }\n.jsprint-summary-H1{ font-size: 1.2em; font-weight: bold; }\n.jsprint-summary-H2{ font-size: 1.1em; padding-left: 10px; }\n.jsprint-summary-H3{ font-size: 1em; padding-left: 20px; }\n.jsprint-summary-H4{ font-size: 0.9em; padding-left: 30px; }\n.jsprint-summary-entry div{ width: 20px; float: right; }\n\n/* Page content */\n\n.jsprint-page{\n padding-left: 20px;\n padding-right: 25px;\n page-break-after: always;\n height: 290mm;\n position: relative;\n}\n\n.jsprint-summary{\n padding-top: 20px;\n}\n\n.jsprint-page-footer{\n position: absolute;\n bottom: 0px;\n right: 1px;\n}\n.jsprint-page-footer .jsprint-pagenbr{\n width: 20px;\n padding-right: 10px;\n padding-bottom: 10px;\n}\n.jsprint-img-legend{\n text-align: center;\n font-style: italic;\n}\n","/* desert scheme ported from vim to google prettify */\npre.prettyprint { display: block; background-color: #333 }\npre .nocode { background-color: none; color: #000 }\npre .str { color: #ffa0a0 } /* string - pink */\npre .kwd { color: #f0e68c; font-weight: bold }\npre .com { color: #87ceeb } /* comment - skyblue */\npre .typ { color: #98fb98 } /* type - lightgreen */\npre .lit { color: #cd5c5c } /* literal - darkred */\npre .pun { color: #fff } /* punctuation */\npre .pln { color: #fff } /* plaintext */\npre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */\npre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */\npre .atv { color: #ffa0a0 } /* attribute value - pink */\npre .dec { color: #98fb98 } /* decimal - lightgreen */\n\n/* Specify class=linenums on a pre to get line numbering */\nol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */\nli.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }\n/* Alternate shading for lines */\nli.L1,li.L3,li.L5,li.L7,li.L9 { }\n\n@media print {\n pre.prettyprint { background-color: none }\n pre .str, code .str { color: #060 }\n pre .kwd, code .kwd { color: #006; font-weight: bold }\n pre .com, code .com { color: #600; font-style: italic }\n pre .typ, code .typ { color: #404; font-weight: bold }\n pre .lit, code .lit { color: #044 }\n pre .pun, code .pun { color: #440 }\n pre .pln, code .pln { color: #000 }\n pre .tag, code .tag { color: #006; font-weight: bold }\n pre .atn, code .atn { color: #404 }\n pre .atv, code .atv { color: #060 }\n}\n\n","/*****************************************************/\n/* General customization */\n/*****************************************************/\nbody{\n font-family: arial;\n}\nh1{\n color: #D5BB94;\n margin: 0px;\n margin-bottom: 10px;\n}\nh2{\n padding-top: 20px;\n color: #F8BA1C;\n font-size: 20px;\n padding-left: 5px;\n margin: 0px;\n font-style: italic;\n margin-bottom: 10px;\n}\nh3{\n color: #EABB7A;\n font-size: 16px;\n padding-left: 10px;\n margin: 0px;\n font-style: italic;\n}\nh4{\n color: #EBCC9A;\n font-size: 14px;\n padding-left: 10px;\n margin: 0px;\n font-style: italic;\n}\np{\n font-size: 14px;\n text-align: justify;\n}\n\nul{\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n\nli{\n padding-left: 1em;\n text-indent: -.7em;\n font-size: 14px;\n margin-bottom: 5px;\n}\nli:before{\n color: #B09367;\n content: \"• \";\n}\n\na{\n color: #7f7f7f;\n font-style: italic;\n text-decoration: none;\n}\n\ntable{\n border-spacing:0;\n border: #cfcfcf 1px solid;\n margin: auto;\n}\n\ntable tr th{\n background-color: #C3AD7A;\n color: #fefefe;\n font-size: 14px;\n text-align: left;\n\n}\ntable tr td{\n font-size: 12px;\n margin: 0px;\n color: #5f5f5f;\n padding: 2px 10px;\n}\ntable tr:nth-child(even) {background: #CCC}\n\nimg{\n width: 95%;\n margin: 0 auto;\n display: block;\n border: #cfcfcf 1px solid;\n padding: 5px 5px;\n}\n\npre{\n background-color: #3f3f3f;\n color: #efefef;\n}\n\n\n\n\n/*****************************************************/\n/* JSP Customization */\n/*****************************************************/\n\n/* Page border */\n.jsprint-page{ border: #cecece 1px solid; }\n\n\n/* Page number color */\n.jsprint-page-footer .jsprint-pagenbr{ color: #9f9f9f; }\n\n\n/* Summary color */\n.jsprint-summary{ color: #9f9f9f; }\n\n\n/* Header */\n.jsprint-page-header p{\n text-align: right;\n color: #9f9f9f;\n border-bottom: #dfdfdf 1px solid;\n padding-bottom: 5px;\n}\n\n\n/* Image legend style */\n.jsprint-img-legend{\n color: #9f9f9f;\n font-size: 0.7em;\n}\n\n/*****************************************************/\n/* JSP Personalization */\n/*****************************************************/\n\np.note{\n background-color: #cfcfcf;\n border: #9f9f9f 2px solid;\n padding: 5px;\n border-top: 0;\n border-bottom: 0;\n font-style: italic;\n color: #3f3f3f;\n}\n"]} -------------------------------------------------------------------------------- /public/jsprint.js: -------------------------------------------------------------------------------- 1 | (function(/*! Brunch !*/) { 2 | 'use strict'; 3 | 4 | var globals = typeof window !== 'undefined' ? window : global; 5 | if (typeof globals.require === 'function') return; 6 | 7 | var modules = {}; 8 | var cache = {}; 9 | 10 | var has = function(object, name) { 11 | return ({}).hasOwnProperty.call(object, name); 12 | }; 13 | 14 | var expand = function(root, name) { 15 | var results = [], parts, part; 16 | if (/^\.\.?(\/|$)/.test(name)) { 17 | parts = [root, name].join('/').split('/'); 18 | } else { 19 | parts = name.split('/'); 20 | } 21 | for (var i = 0, length = parts.length; i < length; i++) { 22 | part = parts[i]; 23 | if (part === '..') { 24 | results.pop(); 25 | } else if (part !== '.' && part !== '') { 26 | results.push(part); 27 | } 28 | } 29 | return results.join('/'); 30 | }; 31 | 32 | var dirname = function(path) { 33 | return path.split('/').slice(0, -1).join('/'); 34 | }; 35 | 36 | var localRequire = function(path) { 37 | return function(name) { 38 | var dir = dirname(path); 39 | var absolute = expand(dir, name); 40 | return globals.require(absolute, path); 41 | }; 42 | }; 43 | 44 | var initModule = function(name, definition) { 45 | var module = {id: name, exports: {}}; 46 | cache[name] = module; 47 | definition(module.exports, localRequire(name), module); 48 | return module.exports; 49 | }; 50 | 51 | var require = function(name, loaderPath) { 52 | var path = expand(name, '.'); 53 | if (loaderPath == null) loaderPath = '/'; 54 | 55 | if (has(cache, path)) return cache[path].exports; 56 | if (has(modules, path)) return initModule(path, modules[path]); 57 | 58 | var dirIndex = expand(path, './index'); 59 | if (has(cache, dirIndex)) return cache[dirIndex].exports; 60 | if (has(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]); 61 | 62 | throw new Error('Cannot find module "' + name + '" from '+ '"' + loaderPath + '"'); 63 | }; 64 | 65 | var define = function(bundle, fn) { 66 | if (typeof bundle === 'object') { 67 | for (var key in bundle) { 68 | if (has(bundle, key)) { 69 | modules[key] = bundle[key]; 70 | } 71 | } 72 | } else { 73 | modules[bundle] = fn; 74 | } 75 | }; 76 | 77 | var list = function() { 78 | var result = []; 79 | for (var item in modules) { 80 | if (has(modules, item)) { 81 | result.push(item); 82 | } 83 | } 84 | return result; 85 | }; 86 | 87 | globals.require = require; 88 | globals.require.define = define; 89 | globals.require.register = define; 90 | globals.require.list = list; 91 | globals.require.brunch = true; 92 | })(); 93 | require.register("jsprint/app", function(exports, require, module) { 94 | var Jsprint, M, jsprint; 95 | 96 | M = { 97 | config: require('jsprint/config'), 98 | utils: require('jsprint/utils') 99 | }; 100 | 101 | Jsprint = (function() { 102 | var CONFIG; 103 | 104 | CONFIG = new M.config.Main(); 105 | 106 | function Jsprint() { 107 | if (typeof console.info === "function") { 108 | console.info("Jsprint version:", CONFIG.getVersion()); 109 | } 110 | this.init(); 111 | } 112 | 113 | Jsprint.prototype.init = function() { 114 | this.renderImgLegends(); 115 | this.renderHeader(); 116 | this.renderFooter(); 117 | this.renderLinkReferences(); 118 | return this.createSummary(); 119 | }; 120 | 121 | Jsprint.prototype.createSummary = function() { 122 | var JSP_TITLE2_NBR, JSP_TITLE3_NBR, JSP_TITLE4_NBR, JSP_TITLE_NBR, header, nbrtitle, pagenbr; 123 | nbrtitle = void 0; 124 | pagenbr = void 0; 125 | JSP_TITLE_NBR = 0; 126 | JSP_TITLE2_NBR = 0; 127 | JSP_TITLE3_NBR = 0; 128 | JSP_TITLE4_NBR = 0; 129 | pagenbr = 0; 130 | nbrtitle = 0; 131 | header = this._getHeader(); 132 | return $("." + CONFIG.getClass("page")).each(function(i, page) { 133 | pagenbr++; 134 | return $(page).find("." + CONFIG.getClass("title")).each(function(_, title) { 135 | var h_nbr, t, tag; 136 | h_nbr = void 0; 137 | t = void 0; 138 | tag = void 0; 139 | t = $(title).text(); 140 | tag = $(this)[0].tagName; 141 | h_nbr = ""; 142 | nbrtitle++; 143 | if (tag === "H1") { 144 | JSP_TITLE_NBR++; 145 | JSP_TITLE2_NBR = 0; 146 | h_nbr = JSP_TITLE_NBR; 147 | } 148 | if (tag === "H2") { 149 | JSP_TITLE2_NBR++; 150 | JSP_TITLE3_NBR = 0; 151 | h_nbr = JSP_TITLE_NBR + "." + JSP_TITLE2_NBR; 152 | } 153 | if (tag === "H3") { 154 | JSP_TITLE3_NBR++; 155 | JSP_TITLE4_NBR = 0; 156 | h_nbr = JSP_TITLE_NBR + "." + JSP_TITLE2_NBR + "." + JSP_TITLE3_NBR; 157 | } 158 | if (tag === "H4") { 159 | JSP_TITLE4_NBR++; 160 | h_nbr = JSP_TITLE_NBR + "." + JSP_TITLE2_NBR + "." + JSP_TITLE3_NBR + "." + JSP_TITLE4_NBR; 161 | } 162 | $(title).text(h_nbr + " " + t); 163 | if (nbrtitle % CONFIG.get("summary", "nbrtitle") === 0) { 164 | $("." + CONFIG.getClass("page-summary")).last().after("
"); 165 | $("." + CONFIG.getClass("page-summary")).last().prepend(header); 166 | } 167 | return $("." + CONFIG.getClass("summary")).last().append("
" + h_nbr + " " + t + "
" + pagenbr + "
"); 168 | }); 169 | }); 170 | }; 171 | 172 | Jsprint.prototype.renderLinkReferences = function() { 173 | return $("a").each(function(i) { 174 | var line, link, ref, show, text; 175 | i++; 176 | link = $(this).attr("href"); 177 | text = $(this).text(); 178 | ref = $(this).attr("ref"); 179 | show = text; 180 | if (ref !== void 0) { 181 | show = "" + ref + " (" + text + ")"; 182 | } 183 | $(this).append($("").text(" [" + i + "]")); 184 | line = $("
").append($("").attr("class", "index").text("[" + i + "]"), $("").attr("class", "text").text(" " + show + ": "), $("").attr("class", "link").append($("").attr("href", link).text(link))); 185 | return $("." + (CONFIG.getClass("bibliography"))).append(line); 186 | }); 187 | }; 188 | 189 | Jsprint.prototype.renderImgLegends = function() { 190 | var i; 191 | i = 0; 192 | return $("img").each(function() { 193 | var legendDOM, legendLineDOM, ref, title; 194 | title = $(this).attr("title"); 195 | ref = $(this).attr("ref"); 196 | if ((title != null) || (ref != null)) { 197 | i++; 198 | legendDOM = $("
").attr('class', CONFIG.getClass("img-legend")).html("" + title + " " + i + ""); 199 | $(this).after(legendDOM); 200 | legendLineDOM = $("
").html("[" + i + "] " + title + " (" + ref + ")"); 201 | return M.utils.appendToClass(CONFIG.getClass("imageography"), legendLineDOM); 202 | } 203 | }); 204 | }; 205 | 206 | Jsprint.prototype._getHeader = function() { 207 | var defHeader, headerContent; 208 | defHeader = $("." + (CONFIG.getClass('def-header'))).html() || ""; 209 | return headerContent = $("
").attr("class", CONFIG.getClass("header")).html(defHeader); 210 | }; 211 | 212 | Jsprint.prototype._getFooter = function(i) { 213 | var outof; 214 | outof = $("
").attr("class", CONFIG.getClass("footer-pagenbr")).text("" + (i + 1) + "/" + ($("." + (CONFIG.getClass("page"))).length)); 215 | return $("
").attr("class", CONFIG.getClass("footer")).append(outof); 216 | }; 217 | 218 | Jsprint.prototype.renderHeader = function() { 219 | var _this = this; 220 | return $("." + (CONFIG.getClass("page"))).each(function(i, page) { 221 | return $(page).prepend(_this._getHeader()); 222 | }); 223 | }; 224 | 225 | Jsprint.prototype.renderFooter = function() { 226 | var _this = this; 227 | return $("." + (CONFIG.getClass("page"))).each(function(i, page) { 228 | return $(page).append(_this._getFooter(i)); 229 | }); 230 | }; 231 | 232 | Jsprint.prototype.toString = function() { 233 | return "Version: JSPrint " + (CONFIG.getVersion()) + "\n CLASSES: " + (CONFIG.getClasses()); 234 | }; 235 | 236 | return Jsprint; 237 | 238 | })(); 239 | 240 | jsprint = new Jsprint(); 241 | 242 | console.log(jsprint.toString()); 243 | }); 244 | 245 | ;require.register("jsprint/config", function(exports, require, module) { 246 | var Main, exp; 247 | 248 | module.exports = exp = {}; 249 | 250 | exp.Main = Main = (function() { 251 | var CLASS, CONFIG, VERSION; 252 | 253 | VERSION = "1.2"; 254 | 255 | CLASS = { 256 | "title": "jsprint-title", 257 | "page": "jsprint-page", 258 | "header": "jsprint-page-header", 259 | "footer": "jsprint-page-footer", 260 | "summary": "jsprint-summary", 261 | "bibliography": "jsprint-bibliography", 262 | "imageography": "jsprint-imageography", 263 | "footer-pagenbr": "jsprint-pagenbr", 264 | "def-header": "jsprint-def-header", 265 | "page-summary": "jsprint-page-summary", 266 | "summary-entry": "jsprint-summary-entry", 267 | "img-legend": "jsprint-img-legend" 268 | }; 269 | 270 | CONFIG = { 271 | summary: { 272 | nbrtitle: 45 273 | } 274 | }; 275 | 276 | function Main() { 277 | null; 278 | } 279 | 280 | Main.prototype.getClass = function(className) { 281 | return CLASS[className]; 282 | }; 283 | 284 | Main.prototype.getClasses = function() { 285 | var k, v, _results; 286 | _results = []; 287 | for (k in CLASS) { 288 | v = CLASS[k]; 289 | _results.push([k]); 290 | } 291 | return _results; 292 | }; 293 | 294 | Main.prototype.getVersion = function() { 295 | return VERSION; 296 | }; 297 | 298 | Main.prototype.get = function(configName, option) { 299 | return CONFIG[configName][option]; 300 | }; 301 | 302 | return Main; 303 | 304 | })(); 305 | }); 306 | 307 | ;require.register("jsprint/utils", function(exports, require, module) { 308 | var appendToClass, exp; 309 | 310 | module.exports = exp = {}; 311 | 312 | exp.appendToClass = appendToClass = function(className, content) { 313 | return $("." + className).append(content); 314 | }; 315 | }); 316 | 317 | ; 318 | //# sourceMappingURL=jsprint.js.map -------------------------------------------------------------------------------- /public/jsprint.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["app/app.coffee","app/config.coffee","app/utils.coffee"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA,GAAI;CAAA,CACF,KAAQ;CADN,CAEF,KAAQ;CAFV;;AAKM,CALN;CAOE;;CAAA,EAAa,GAAb;;CAEa;;CACH,CAA0B,IAAlC,CAAO,GAA2B;KAAlC;CAAA,GACA;CAJF,EAEa;;CAFb,EAMM,CAAN,KAAM;CACJ;CAAA,GACA;CADA,GAEA;CAFA,GAGA;CACC,UAAD;CAXF,EAMM;;CANN,EAae,UAAf;CAqBE;CAAA,EAAW,CAAX;CAAA,EACU,CAAV,EADA,CACA;CADA,EAEgB,CAAhB;CAFA,EAGiB,CAAjB;CAHA,EAIiB,CAAjB;CAJA,EAKiB,CAAjB;CALA,EAMU,CAAV;CANA,EAOW,CAAX;CAPA,EAQS,CAAT,MAAS;CACT,CAA0C,CAAxC,CAAF,EAAc,EAAN,CAA+B,EAAvC;AACE;CACA,CAAsD,CAAzC,CAAb,CAAkD,CAAzB,CAAN,EAAgC,IAAnD;CACE;CAAA,EAAQ,EAAR;CAAA,EACI,GADJ,EACA;CADA,EAEA,GAFA,EAEA;CAFA,EAGI,KAAJ;CAHA,EAIA,CAAM,GAJN,CAIA;CAJA,EAKQ,EAAR;AACA,CANA,OAMA;CACA,EAAG,EAAO,GAAV;AACE;CAAA,EACiB,OAAjB;CADA,EAEQ,EAAR,QAFA;SARF;CAWA,EAAG,EAAO,GAAV;AACE;CAAA,EACiB,OAAjB;CADA,EAEQ,EAAR,QAAQ,CAFR;SAZF;CAeA,EAAG,EAAO,GAAV;AACE;CAAA,EACiB,OAAjB;CADA,EAEQ,EAAR,QAAQ;SAlBV;CAmBA,EAAG,EAAO,GAAV;AACE;CAAA,EACQ,EAAR,QAAQ;SArBV;CAAA,EAuBsB,CAAtB;CACA,CAAoC,CAAtB,CAAX,CAAgD,CAA/B,EAApB,CAAc;CACZ,EAAE,CAAF,EAAc,EAAN,CAIJ,CAJJ,IAAQ,EACQ;CADhB,EAKE,CAAF,EAAc,CAAd,CAAQ,EAAR,IAAQ;SA9BV;CA+BA,EAAE,CAAF,CACiB,CADH,CACG,CADT,MACS,CADjB;CAhCF,MAAkD;CAFpD,IAAsC;CA3CxC,EAae;;CAbf,EAkFsB,iBAAtB;CACE,QAAa,EAAb;CACE;AAAA;CAAA,EACO,CAAP;CADA,EAEO,CAAP;CAFA,EAGA,CAAO,EAAP;CAHA,EAIO,CAAP;CACA,EAA8B,EAAS,CAAvC;CAAA,CAAO,EAAP;OALA;CAAA,EAOuB,CADvB,IACE;CAPF,CAU6B,CADtB,CAAP,GACE,CADK,CACL;CAMF,EAAG,CAAH,EAAW,EAAN,KAAL,CAAK;CAjBP,IAAY;CAnFd,EAkFsB;;CAlFtB,EAsGkB,aAAlB;CACE;CAAA,EAAI,CAAJ;CACA,EAAc,CAAd,KAAc,EAAd;CACE;CAAA,EAAQ,EAAR,EAAQ;CAAR,EACA,CAAQ,EAAR;CACA,GAAG,EAAH,SAAG;AACD;CAAA,CAEiB,CADJ,EAEL,CADe,CADV,CAAb,IACiB;CAFjB,GAIA;CAJA,EAMgB,EACP,GADT;CAEC,CAAsD,GAAhD,CAAqB,EAAN,KAAtB,CAAsB,CAAtB;OAZU;CAAd,IAAc;CAxGhB,EAsGkB;;CAtGlB,EAsHY,OAAZ;CACE;CAAA,EAAY,CAAZ,EAAuB,EAAN,CAAjB,GAAiB;CACD,CACC,CADD,GACO,CADP,IAAhB;CAxHF,EAsHY;;CAtHZ,EA4HY,MAAC,CAAb;CACE;CAAA,CACiB,CADT,CAAR,EACuB,CADf,SACS;CAEjB,CACiB,EADjB,EACuB,CADvB;CAhIF,EA4HY;;CA5HZ,EAoIc,SAAd;CACE;CAAA,CAA0C,CAAvC,CAAH,EAAW,EAAN,CAAkC,EAAvC;CACE,IAAiB,EAAjB,GAAgB,GAAhB;CADF,IAAsC;CArIxC,EAoIc;;CApId,EAwIc,SAAd;CACE;CAAA,CAA0C,CAAvC,CAAH,EAAW,EAAN,CAAkC,EAAvC;CACE,IAAiB,CAAjB,IAAgB,GAAhB;CADF,IAAsC;CAzIxC,EAwIc;;CAxId,EA4IU,KAAV,CAAU;CACR,EAA0B,GAAM,IAAN,CAAlB;CA7IV,EA4IU;;CA5IV;;CAPF;;AAuJA,CAvJA,EAuJc,IAAd;;AACA,CAxJA,EAwJA,IAAO,CAAK;;;;ACxJZ;;AAAA,GAAiB,GAAX,CAAN;;AAEA,CAFA,EAEG,CAAH;CACE;;CAAA,EAAU,EAAV;;CAAA,CAEA,CACE,EADF;CACE,CAAkB,EAAlB;CAAA,CACkB,EAAlB,UADA;CAAA,CAEkB,EAAlB,iBAFA;CAAA,CAGkB,EAAlB,iBAHA;CAAA,CAIkB,EAAlB,aAJA;CAAA,CAKkB,EAAlB,kBALA;CAAA,CAMkB,EAAlB,kBANA;CAAA,CAOkB,EAAlB,aAPA;CAAA,CAQkB,EAAlB,gBARA;CAAA,CASkB,EAAlB,kBATA;CAAA,CAUkB,EAAlB,mBAVA;CAAA,CAWkB,EAAlB,gBAXA;CAHF;;CAAA,CAgBA,CACE,GADF;CACE,CACE,EADF;CACE,CAAU,IAAV;KADF;CAjBF;;CAoBa;CAAG;CApBhB,EAoBa;;CApBb,EAsBU,KAAV,CAAW;CAAoB,UAAN;CAtBzB,EAsBU;;CAtBV,EAwBY,OAAZ;CAAe;AAAA;UAAA;mBAAA;CAAA;CAAA;oBAAH;CAxBZ,EAwBY;;CAxBZ,EA0BY,OAAZ;CAAY,UAAG;CA1Bf,EA0BY;;CA1BZ,CA4BkB,CAAlB,GAAK,GAAC,CAAD;CAA+B,UAAP;CA5B7B,EA4BK;;CA5BL;;CAHF;;;;ACAA;;AAAA,GAAiB,GAAX,CAAN;;AAEA,CAFA,CAEgD,CAA7C,IAAiC,EAAC,IAArC;CACE,EAAG,GAAH;CADkC","file":"public/jsprint.js","sourcesContent":["M = {\n config: require 'jsprint/config'\n utils: require 'jsprint/utils'\n}\n\nclass Jsprint\n # Configuration for Jsprint\n CONFIG = new M.config.Main()\n\n constructor: () ->\n console.info? \"Jsprint version:\", CONFIG.getVersion()\n @init()\n\n init: ->\n @renderImgLegends()\n @renderHeader()\n @renderFooter()\n @renderLinkReferences()\n @createSummary()\n\n createSummary: ->\n # Generating tags\n\n # TODO: test new method\n # tags = []\n # tagsCounter = {}\n # for i in [1..10]\n # tags.push \"H#{i}\"\n # tagsCounter[\"H#{i}\"] ||= 0\n # tagsCounter[\"H#{i}\"]++\n #\n # console.log tags, tagsCounter\n # console.log tags.join(\" \")\n # $(\".\" + CONFIG.getClass(\"page\")).each((i, page) ->\n # console.log i, page\n # $(tags.join(\" \")).each( ->\n # console.log i\n # )\n # )\n\n # ----------------- Old\n nbrtitle = undefined\n pagenbr = undefined\n JSP_TITLE_NBR = 0\n JSP_TITLE2_NBR = 0\n JSP_TITLE3_NBR = 0\n JSP_TITLE4_NBR = 0\n pagenbr = 0\n nbrtitle = 0\n header = @_getHeader()\n $(\".\" + CONFIG.getClass(\"page\")).each (i, page) ->\n pagenbr++\n $(page).find(\".\" + CONFIG.getClass(\"title\")).each (_, title) ->\n h_nbr = undefined\n t = undefined\n tag = undefined\n t = $(title).text()\n tag = $(this)[0].tagName\n h_nbr = \"\"\n nbrtitle++\n if tag is \"H1\"\n JSP_TITLE_NBR++\n JSP_TITLE2_NBR = 0\n h_nbr = JSP_TITLE_NBR\n if tag is \"H2\"\n JSP_TITLE2_NBR++\n JSP_TITLE3_NBR = 0\n h_nbr = JSP_TITLE_NBR + \".\" + JSP_TITLE2_NBR\n if tag is \"H3\"\n JSP_TITLE3_NBR++\n JSP_TITLE4_NBR = 0\n h_nbr = JSP_TITLE_NBR + \".\" + JSP_TITLE2_NBR + \".\" + JSP_TITLE3_NBR\n if tag is \"H4\"\n JSP_TITLE4_NBR++\n h_nbr = JSP_TITLE_NBR + \".\" + JSP_TITLE2_NBR + \".\" +\n JSP_TITLE3_NBR + \".\" + JSP_TITLE4_NBR\n $(title).text h_nbr + \" \" + t\n if nbrtitle % CONFIG.get(\"summary\", \"nbrtitle\") is 0\n $(\".\" + CONFIG.getClass(\"page-summary\"))\n .last().after \"
\"\n $(\".\" + CONFIG.getClass(\"page-summary\")).last().prepend header\n $(\".\" + CONFIG.getClass(\"summary\"))\n .last().append \"
\" + h_nbr + \" \" + t + \"
\" + pagenbr + \"
\"\n\n renderLinkReferences: ->\n $(\"a\").each (i) ->\n i++\n link = $(this).attr(\"href\")\n text = $(this).text()\n ref = $(this).attr(\"ref\")\n show = text\n show = \"#{ref} (#{text})\" if ref isnt undefined\n $(this).append(\n $(\"\").text(\" [#{i}]\")\n )\n line = $(\"
\").append(\n $(\"\").attr(\"class\", \"index\").text(\"[#{i}]\")\n $(\"\").attr(\"class\", \"text\").text(\" #{show}: \")\n $(\"\").attr(\"class\", \"link\").append(\n $(\"\").attr(\"href\", link).text(link)\n )\n )\n $(\".#{CONFIG.getClass(\"bibliography\")}\").append(line)\n\n renderImgLegends: ->\n i = 0\n $(\"img\").each ->\n title = $(this).attr(\"title\")\n ref = $(this).attr(\"ref\")\n if title? || ref?\n i++\n legendDOM = $(\"
\")\n .attr('class', CONFIG.getClass(\"img-legend\"))\n .html(\"#{title} #{i}\")\n $(this).after(legendDOM)\n\n legendLineDOM = $(\"
\")\n .html(\"[#{i}] #{title} (#{ref})\")\n M.utils.appendToClass(CONFIG.getClass(\"imageography\"), legendLineDOM)\n\n _getHeader: ->\n defHeader = $(\".#{CONFIG.getClass('def-header')}\").html() or \"\"\n headerContent = $(\"
\")\n .attr(\"class\", CONFIG.getClass(\"header\"))\n .html(defHeader)\n\n _getFooter: (i) ->\n outof = $(\"
\")\n .attr(\"class\", CONFIG.getClass(\"footer-pagenbr\"))\n .text(\"#{i+1}/#{$(\".#{CONFIG.getClass(\"page\")}\").length}\")\n $(\"
\")\n .attr(\"class\", CONFIG.getClass(\"footer\"))\n .append(outof)\n\n renderHeader: ->\n $(\".#{CONFIG.getClass(\"page\")}\").each (i, page) =>\n $(page).prepend @_getHeader()\n\n renderFooter: ->\n $(\".#{CONFIG.getClass(\"page\")}\").each (i, page) =>\n $(page).append @_getFooter(i)\n\n toString: ->\n return \"Version: JSPrint #{CONFIG.getVersion()}\\n\n CLASSES: #{CONFIG.getClasses()}\"\n\njsprint = new Jsprint()\nconsole.log jsprint.toString()\n","module.exports = exp = {}\n\nexp.Main = class Main\n VERSION = \"1.2\"\n\n CLASS =\n \"title\": \"jsprint-title\"\n \"page\": \"jsprint-page\"\n \"header\": \"jsprint-page-header\"\n \"footer\": \"jsprint-page-footer\"\n \"summary\": \"jsprint-summary\"\n \"bibliography\": \"jsprint-bibliography\"\n \"imageography\": \"jsprint-imageography\"\n \"footer-pagenbr\": \"jsprint-pagenbr\"\n \"def-header\": \"jsprint-def-header\"\n \"page-summary\": \"jsprint-page-summary\"\n \"summary-entry\": \"jsprint-summary-entry\"\n \"img-legend\": \"jsprint-img-legend\"\n\n CONFIG =\n summary:\n nbrtitle: 45\n\n constructor: -> null\n\n getClass: (className) -> CLASS[className]\n\n getClasses: -> [k] for k, v of CLASS\n\n getVersion: -> VERSION\n\n get: (configName, option) -> CONFIG[configName][option]\n","module.exports = exp = {}\n\nexp.appendToClass = appendToClass = (className, content) ->\n $(\".#{className}\").append(content)\n"]} -------------------------------------------------------------------------------- /tools/htmlconverter/htmlconvert.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 |
13 |
14 | 15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 | 23 |
24 | 25 | 62 | 63 | -------------------------------------------------------------------------------- /tools/jsprint_old.js: -------------------------------------------------------------------------------- 1 | function YL_Doc(){ 2 | var _CONFIG = {} 3 | _CONFIG.class = { 4 | "title": "yld-title", 5 | "page": "yld-page", 6 | "def-header": "yld-def-header", 7 | "header": "yld-page-header", 8 | "footer": "yld-page-footer", 9 | "page-summary": "yld-page-summary", 10 | "summary": "yld-summary", 11 | "summary-entry": "yld-summary-entry", 12 | "img-legend": "yld-img-legend", 13 | "bibliography": "yld-bibliography", 14 | "imageography": "yld-imageography", 15 | "pagenbr": "yld-pagenbr" 16 | }; 17 | _CONFIG.settings = { 18 | "title-nbr": true, // Show or hide number aside the titles 19 | "page-nbr": true, // Show or hide page number 20 | "page-outof": true, 21 | "page-outof-symbole": "/", 22 | "auto-refresh": false, 23 | "auto-interval": 2000 24 | }; 25 | _CONFIG.counters = { 26 | "img": 0, 27 | "a": 0, 28 | }; 29 | _CONFIG.summary = { 30 | "nbrtitle" : 45 // Number of title per page 31 | }; 32 | 33 | this.init = function(){ 34 | imgLegends(); 35 | aRef(); 36 | headerFooter(); 37 | createSummary(); 38 | if(_CONFIG.settings["auto-refresh"]){ 39 | setInterval("location.reload(true)", _CONFIG.settings["auto-interval"]); 40 | } 41 | }; 42 | 43 | var imgLegends = function(){ 44 | // Iteration over all the images 45 | $("img").each(function(){ 46 | var title = $(this).attr("title"); 47 | var ref = $(this).attr("ref"); 48 | if( title ) { 49 | _CONFIG.counters["img"]++; 50 | $(this).after( "
"+title+" "+_CONFIG.counters["img"]+"
"); 51 | $("."+_CONFIG.class["imageography"]).append("
["+_CONFIG.counters["img"]+"] "+title+" ("+ref+")
"); 52 | } 53 | }); 54 | }; 55 | 56 | // Creating references for all links 57 | var aRef = function(){ 58 | $("a").each(function(){ 59 | _CONFIG.counters["a"]++; 60 | var link = $(this).attr("href"); 61 | var text = $(this).text(); 62 | var ref = $(this).attr("ref"); 63 | var show = text; 64 | if(ref !== undefined){ show = ref+"("+text+")"; } 65 | $(this).append(" ["+_CONFIG.counters["a"]+"]"); 66 | $("."+_CONFIG.class["bibliography"]).append("
"); 70 | }); 71 | }; 72 | 73 | var _getHeader = function(){ 74 | return "
"+ 75 | ($("."+_CONFIG.class["def-header"]).html()||"")+"
" 76 | } 77 | 78 | // Creating summary from titles 79 | var headerFooter = function(){ 80 | $("."+_CONFIG.class["page"]).each(function(i, page){ 81 | var pagenbr = i+1; 82 | 83 | // Adding the header 84 | $(page).prepend(_getHeader()); 85 | 86 | // Adding the footer 87 | $(page).append("
"); 88 | 89 | // Adding page number 90 | var outof = ""; 91 | if(_CONFIG.settings["page-outof"]){ 92 | outof = _CONFIG.settings["page-outof-symbole"]+$(".yld-page").length; 93 | } 94 | if(_CONFIG.settings["page-nbr"]){ 95 | $(page).find("."+_CONFIG.class["footer"]).append( 96 | "
"+pagenbr+outof+"
"); 97 | } 98 | }); 99 | }; 100 | 101 | var createSummary = function(){ 102 | var JSP_TITLE_NBR = 0; 103 | var JSP_TITLE2_NBR = 0; 104 | var JSP_TITLE3_NBR = 0; 105 | var JSP_TITLE4_NBR = 0; 106 | var pagenbr = 0; 107 | var nbrtitle = 0; 108 | $("."+_CONFIG.class["page"]).each(function(i, page){ 109 | pagenbr++; 110 | 111 | // Iteration over the title of the page 112 | $(page).find("."+_CONFIG.class["title"]).each(function(_, title){ 113 | var t = $(title).text(); 114 | var tag = $(this)[0].tagName; 115 | var h_nbr = ""; 116 | nbrtitle++; 117 | 118 | // Refresh number of title for summary 119 | if(tag === "H1"){ 120 | JSP_TITLE_NBR++; JSP_TITLE2_NBR = 0; 121 | h_nbr = JSP_TITLE_NBR; 122 | } 123 | if(tag === "H2"){ 124 | JSP_TITLE2_NBR++; JSP_TITLE3_NBR = 0; 125 | h_nbr = JSP_TITLE_NBR+"."+JSP_TITLE2_NBR; 126 | } 127 | if(tag === "H3"){ 128 | JSP_TITLE3_NBR++; JSP_TITLE4_NBR = 0; 129 | h_nbr = JSP_TITLE_NBR+"."+JSP_TITLE2_NBR+"."+JSP_TITLE3_NBR; 130 | } 131 | if(tag === "H4"){ 132 | JSP_TITLE4_NBR++; 133 | h_nbr = JSP_TITLE_NBR+"."+JSP_TITLE2_NBR+"."+JSP_TITLE3_NBR+"."+JSP_TITLE4_NBR; 134 | } 135 | 136 | // Automatically add number to title 137 | if(_CONFIG.settings["page-nbr"]){ 138 | $(title).text(h_nbr+" "+t); 139 | } 140 | 141 | if(nbrtitle%_CONFIG.summary["nbrtitle"] == 0){ 142 | $("."+_CONFIG.class["page-summary"]).last().after("
" ); 145 | $("."+_CONFIG.class["page-summary"]).last().prepend(_getHeader()); 146 | } 147 | 148 | // Adding the title to the summary 149 | $("."+_CONFIG.class["summary"]).last().append( 150 | "
"+h_nbr+" "+t+ 152 | "
"+pagenbr+"
" 153 | ); 154 | }); 155 | }); 156 | }; 157 | 158 | // TODO: this is not working yet 159 | var adaptPage = function(){ 160 | $("."+JSP_PAGE_CLASS).each(function(i, page){ 161 | var totalH = 0; 162 | var pages = [$(this)]; 163 | var page_elements = []; 164 | 165 | var tmp_content = []; 166 | $(this).children().each(function(){ 167 | var elH = $(this).outerHeight(); 168 | 169 | if( ( totalH + elH ) < JSP_PAGE_PIXEL ){ 170 | tmp_content.push( $(this) ); 171 | totalH += elH; 172 | } 173 | else{ 174 | page_elements.push( tmp_content ); 175 | tmp_content = [ $(this) ]; 176 | totalH = elH; 177 | var new_page = createPage("?"); 178 | pages[pages.length-1].after(new_page); 179 | pages.push(new_page); 180 | } 181 | }); 182 | page_elements.push( tmp_content ); 183 | 184 | // Adding previous elements 185 | for(var i=0; i=0;){var M=A[m],T=M.src.match(/^[^#?]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||"";M.parentNode.removeChild(M); 4 | break}}var S=!0,D=[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j=="autorun"?S=!/^[0fn]/i.test(w):j=="lang"?D.push(w):j=="skin"?N.push(w):j=="callback"&&K.push(w)});m=0;for(z=D.length;m122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f, 8 | a){return f[0]-a[0]||a[1]-f[1]});b=[];g=[];for(a=0;ak[0]&&(k[1]+1>k[0]&&c.push("-"),c.push(h(k[1])));c.push("]");return c.join("")}function e(f){for(var a=f.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],g=0,k=0;g=2&&f==="["?a[g]=b(o):f!=="\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I=5&&"lang-"===y.substring(0,5))&&!(u&&typeof u[1]==="string"))g=!1,y="src";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h, 13 | j);n(l+k+o,g,A(y,g),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c=0;)b[q.charAt(f)]=m;m=m[1];q=""+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\S\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/, 14 | r,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,r,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,r,"\"'"]);a.verbatimStrings&&h.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/, 15 | r,"#"]),h.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,r])):d.push(["com",/^#[^\n\r]*/,r,"#"]));a.cStyleComments&&(h.push(["com",/^\/\/[^\n\r]*/,r]),h.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?"":"\n\r")?".":"[\\S\\s]";h.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+ 16 | ("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+e+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+e+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&h.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&h.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),r]);d.push(["pln",/^\s+/,r," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");h.push(["lit",/^@[$_a-z][\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,r],["pln",/^[$_a-z][\w$@]*/i,r],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i, 17 | r,"0123456789"],["pln",/^\\[\S\s]?/,r],["pun",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}} 18 | function e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,l=a.ownerDocument,i=l.createElement("li");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn("cannot override language handler %s",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\s*=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=["break,continue,do,else,for,if,return,while"],O=[[G,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 22 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[O,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],K=[O,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], 23 | L=[K,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],O=[O,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],M=[G,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 24 | N=[G,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],R=[G,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],G=[G,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, 25 | S=/\S/,T=t({keywords:[J,L,O,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,["default-code"]);i(C([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", 26 | /^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);i(C([["pln",/^\s+/,r," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,r,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], 27 | ["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);i(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]);i(t({keywords:"null,true,false"}),["json"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}), 28 | ["cs"]);i(t({keywords:K,cStyleComments:!0}),["java"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);i(t({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);i(t({keywords:N, 29 | hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);i(t({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); 30 | i(C([],[["str",/^[\S\s]+/]]),["regex"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,e){var b=document.createElement("div");b.innerHTML="
"+a+"
";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML}, 31 | prettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p