commit ba4a78f9c15a32a1e5f31d82ff8b9083a7c9ce07 Author: Charles N Wyble Date: Mon Dec 9 15:06:09 2024 -0600 Squashed 'vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline/' content from commit e3ea039 git-subtree-dir: vendor/git.knownelement.com/reachableceo/MarkdownResume-Pipeline git-subtree-split: e3ea03999bd0220aea1b987a92b9003ce628038b diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45e65c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +build-output/client-submission/*.md +build-output/client-submission/*.pdf +build-output/client-submission/*.doc +build-output/job-board/*.md +build-output/job-board/*.pdf +build-output/job-board/*.doc +build-temp/*.yml +build-temp/*.md \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5ca516b --- /dev/null +++ b/LICENSE @@ -0,0 +1,235 @@ +GNU AFFERO GENERAL PUBLIC LICENSE +Version 3, 19 November 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + + Preamble + +The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. + +A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. + +The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. + +An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. + +The precise terms and conditions for copying, distribution and modification follow. + + TERMS AND CONDITIONS + +0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based on the Program. + +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. + +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. + +A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. + +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + MarkdownResume-Pipeline + Copyright (C) 2024 reachableceo + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. + +You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . diff --git a/README.md b/README.md new file mode 100644 index 0000000..9f49254 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# MarkdownResume-Pipeline + +A set of scripts and template files for managing a markdown/json resume. \ No newline at end of file diff --git a/Templates/CandidateInfoSheet/CandidateInfoSheet.md b/Templates/CandidateInfoSheet/CandidateInfoSheet.md new file mode 100644 index 0000000..47e9c58 --- /dev/null +++ b/Templates/CandidateInfoSheet/CandidateInfoSheet.md @@ -0,0 +1,110 @@ +# Charles N Wyble + +## Introduction + +Hello, + +I apologize for the form letter response. + +I receive a high volume of recruiter emails every day and I've found this letter to be the most efficient way to +handle the high volume of emails and reduce back and forth emails/texts/calls. + +If you have any questions/comments/concerns not covered by this document, please let me know via e-mail and I'm happy to address them! + +If you ask me something answered in this document, I will not respond and will not move forward with the opportunity, so please read it in detail! + +## Re: share my ID over email + +I WILL NOT share my (full or redacted) photo ID over email or any other electronic written +communication. If that is "required" then I have no interest in moving forward with this opportunity. + +I am happy to get on a teams/zoom/google meet etc call and show my ID. + +## Re: professional references + +I am happy to provide professional references once an interview with the end client/customer/hiring manager/team has been scheduled. I will NOT provide references up front. If that is "required" then I have no interest in moving forward with this opportunity. + +## Re: relocation + +if the role is not based in **Austin TX** or **Raleigh NC** I will need to re-locate + +| Question | Answer | +|-------------------------------------------|--------| +| Am I open to relocation? | Yes | +| Am I willing to re-locate at own expense? | No | +| Am I open to up to 100% travel | Yes | + +Please be aware that: + +- I will **only re-locate at the employer expense**. +- I will need **two weeks of time** to re-locate. +- The net amount of the re-location benefit **MUST be at least $5,000 USD** to fully compensate me for the time/effort to re-locate. +- The full re-location benefit **must be provided prior to the confirmed start date**. +- I **will NOT** accept a reimbursement based re-location package. +- I am happy to come onsite (at client expense (paid up front)) for training/orientation etc. + +\pagebreak + +## Rate Schedule (compensation expectations) + +For **fully remote** roles only: + +I am open to (at the absolute minimum): **\$50.00 per hour(w2)/\$75.00 per hour (1099/corp to corp)/ $100,000.00 annually (w2)**. + +I have a strong preference for roles that are : **\$65.00 per hour(w2)/\$85.00 per hour (1099/corp to corp)/ $130,000.00 annually (w2)**. + +For **on-site roles**: + +I am open to (at the absolute minimum): **\$75.00 per hour(w2)/\$95.00 per hour (1099/corp to corp)/ $150,000.00 annually (w2)**. + +In regards to compensation structure, I am open to: + +- w2 +- corp to corp (I have my own LLC) +- 1099 + +If you have a rate for any of the compensation options above, send them all. I will pick which one works best for my situation and the opportunity. + +If it's a different rate with/without benefits, send both. + +If the above is in alignment with this opportunity, please feel free to send me an RTR with the best rate you can offer. + +\pagebreak + +## Details needed for submission + +### My resume + +[Download Charles resume(pdf)](https://resume.reachableceo.com/job-board/CharlesNWyble-Resume.pdf) + +I am happy to discuss and make edits to the resume content specific to the opportunity if you feel +they are needed. + +### Candidate details + +Here are my complete candidate details for submission to the role. + +| Question | Answer | +|---------------------------------------|--------------------------------------------------------------------------| +| Full name | Charles Wyble | +| E-mail address | | +| Phone number | 818-280-7059 | +| Preferred form of contact | E-mail will get the fastest response | +| Work authorization | US Citizen | +| Are you employed presently? | No | +| Current location | Austin, Texas | +| Current timezone | CST | +| Timezones I can work in | PST/CST/EST | +| Availability to interview | Immediate | +| Availability to start | Immediate for remote/local, two weeks for relocation | +| Open to in-office/hybrid/remote | Yes | +| Any trips planned in next six months? | No | +| Highest Education | High School (no college/university) | +| Graduated Year | 2002 | +| Name of school | Osborne Christian School | +| Location of school | Los Angeles CA | +| Linkedin Profile | [Linkedin Profile](https://www.linkedin.com/in/charles-wyble-412007337/) | +| Github Profile | [Github Profile](https://www.github.com/ReachableCEO/) | +| Last project | Contract, ended October 2024 | +| DOB | 09/14 | +| Total IT/career experience | 22 years | diff --git a/Templates/CandidateInfoSheet/CandidateInfoSheet.yml b/Templates/CandidateInfoSheet/CandidateInfoSheet.yml new file mode 100644 index 0000000..2d72aa8 --- /dev/null +++ b/Templates/CandidateInfoSheet/CandidateInfoSheet.yml @@ -0,0 +1,14 @@ +title: "Charles N Wyble Candidate Details" +titlepage: true +titlepage-logo: "D:/tsys/@ReachableCEO/ReachableCEO.png" +toc: true +toc-own-page: true +date: \today +header-left: "\\hspace{1cm}" +header-center: "\\leftmark" +header-right: "Page \\thepage" +footer-left: "Charles N Wyble" +footer-center: "Tenacity. Velocity. Focus." +footer-right: "[Source code for this file](https://github.com/ReachableCEO/ReachableCEOResume/blob/main/ancillary-support-files/CharlesNWybleCandidateInfo.md)" +urlcolor: blue +page-background: "D:/tsys/@ReachableCEO/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background1.pdf" \ No newline at end of file diff --git a/Templates/ContactInfo/ContactInfo-ClientSubmit.md b/Templates/ContactInfo/ContactInfo-ClientSubmit.md new file mode 100644 index 0000000..0ea8fe7 --- /dev/null +++ b/Templates/ContactInfo/ContactInfo-ClientSubmit.md @@ -0,0 +1,4 @@ +{{CandidateName}} +===== + +{{CandidateOneLinerSummary}} diff --git a/Templates/ContactInfo/ContactInfo-JobBoard.md b/Templates/ContactInfo/ContactInfo-JobBoard.md new file mode 100644 index 0000000..853936b --- /dev/null +++ b/Templates/ContactInfo/ContactInfo-JobBoard.md @@ -0,0 +1,6 @@ +{{CandidateName}} +===== + +{{CandidateOneLinerSummary}} + +[ [Github Profile]({{CandidateGithub}}) ] . [ [Linkedin Profile]({{CandidateLinkedin}}) ] . [ {{CandidateEmail}} ] . [ {{CandidatePhone}} ] . [ {{CandidateLocation}} ] diff --git a/Templates/JobHistoryDetails/job1.md b/Templates/JobHistoryDetails/job1.md new file mode 100644 index 0000000..f622b8d --- /dev/null +++ b/Templates/JobHistoryDetails/job1.md @@ -0,0 +1,3 @@ +- Stuff +- Things +- Amazing project! \ No newline at end of file diff --git a/Templates/JobHistoryDetails/job2.md b/Templates/JobHistoryDetails/job2.md new file mode 100644 index 0000000..f622b8d --- /dev/null +++ b/Templates/JobHistoryDetails/job2.md @@ -0,0 +1,3 @@ +- Stuff +- Things +- Amazing project! \ No newline at end of file diff --git a/Templates/SkillsAndProjects/Projects.md b/Templates/SkillsAndProjects/Projects.md new file mode 100644 index 0000000..baa1cb6 --- /dev/null +++ b/Templates/SkillsAndProjects/Projects.md @@ -0,0 +1,2 @@ +- Cool project 1. +- cool project 2. diff --git a/Templates/SkillsAndProjects/Skills.csv b/Templates/SkillsAndProjects/Skills.csv new file mode 100644 index 0000000..c689f34 --- /dev/null +++ b/Templates/SkillsAndProjects/Skills.csv @@ -0,0 +1,2 @@ +skill1|1 years|skill,1,details,and,stuff +skill2|2 years|skill2,2,details,and,stuff,and,things \ No newline at end of file diff --git a/Templates/WorkHistory/WorkHistory.csv b/Templates/WorkHistory/WorkHistory.csv new file mode 100644 index 0000000..99bc7dd --- /dev/null +++ b/Templates/WorkHistory/WorkHistory.csv @@ -0,0 +1,2 @@ +job1,Title of job 1,January 1 1970 - January 6 1980 +job2,Title of Job 2,January 1 1970 - January 6 1980 \ No newline at end of file diff --git a/build-output/client-submission/ignore-this-dir b/build-output/client-submission/ignore-this-dir new file mode 100644 index 0000000..a916f39 --- /dev/null +++ b/build-output/client-submission/ignore-this-dir @@ -0,0 +1 @@ +This directory is used by the build process. Ignore it. \ No newline at end of file diff --git a/build-output/ignore-this-dir b/build-output/ignore-this-dir new file mode 100644 index 0000000..e62add6 --- /dev/null +++ b/build-output/ignore-this-dir @@ -0,0 +1 @@ +Working directory for the pipeline. Don't use. \ No newline at end of file diff --git a/build-output/job-board/ignore-this-dir b/build-output/job-board/ignore-this-dir new file mode 100644 index 0000000..a916f39 --- /dev/null +++ b/build-output/job-board/ignore-this-dir @@ -0,0 +1 @@ +This directory is used by the build process. Ignore it. \ No newline at end of file diff --git a/build-temp/ignore-this-dir b/build-temp/ignore-this-dir new file mode 100644 index 0000000..e62add6 --- /dev/null +++ b/build-temp/ignore-this-dir @@ -0,0 +1 @@ +Working directory for the pipeline. Don't use. \ No newline at end of file diff --git a/build/BuildTemplate-ClientSubmission.yml b/build/BuildTemplate-ClientSubmission.yml new file mode 100644 index 0000000..901b4f4 --- /dev/null +++ b/build/BuildTemplate-ClientSubmission.yml @@ -0,0 +1,7 @@ +title: "{{CandidateName}} Resume" +header-left: "\\hspace{1cm}" +header-center: "\\leftmark" +header-right: "Page \\thepage" +footer-left: "{{CandidateName}}" +urlcolor: {{URLCOLOR}} +page-background: "{{PAGEBACKGROUND}}" \ No newline at end of file diff --git a/build/BuildTemplate-JobBoard.yml b/build/BuildTemplate-JobBoard.yml new file mode 100644 index 0000000..af26032 --- /dev/null +++ b/build/BuildTemplate-JobBoard.yml @@ -0,0 +1,12 @@ +title: "{{CandidateName}} Resume" +titlepage: true +titlepage-logo: "{{CandidateLogo}}" +date: \today +header-left: "\\hspace{1cm}" +header-center: "\\leftmark" +header-right: "Page \\thepage" +footer-left: "{{CandidateName}}" +footer-center: "{{CandidateTagline}}" +footer-right: "[Source code for this resume]({{ResumeSourceCode}})" +urlcolor: {{URLCOLOR}} +page-background: "{{PAGEBACKGROUND}}" \ No newline at end of file diff --git a/build/build.sh b/build/build.sh new file mode 100644 index 0000000..8da6cc2 --- /dev/null +++ b/build/build.sh @@ -0,0 +1,189 @@ +#!/usr/bin/env bash + +export CandidateName="First Middle Last" +export CandidatePhone="1 123 456 7890" +export CandidateLocation="Place 1/Place 2" +export CandidateEmail="candidate@domain.com" +export CandidateOneLineSummary="Super awesome and stuff." +export CandidateLinkedin="linkedin.com" +export CandidateGithub="github.com" +export CandidateLogo="" +export CandidateTagline="Your.Tagline.Here." +export ResumeSourceCode="https://git.knownelement.com/reachableceo/MarkdownResume-Pipeline" +export URLCOLOR="blue" +export PAGEBACKGROUND="../vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background3.pdf" + +#################################################### +#DO NOT CHANGE ANYTHING BELOW THIS LINE +#################################################### + +# shellcheck disable=SC1091 +#source "$(dirname "${BASH_SOURCE[0]}")/bash3boilerplate.sh" + +############################################################ +# Setup globals +############################################################ + +readonly MO_PATH="bash ../vendor/git.knownelement.com/ExternalVendorCode/mo/mo" +readonly BUILD_OUTPUT_DIR="../build-output" +readonly BUILD_TEMP_DIR="../build-temp" +readonly BUILDYAML_JOBBOARD="$BUILD_TEMP_DIR/JobBoard.yml" +readonly BUILDYAML_CLIENTSUBMISSION="$BUILD_TEMP_DIR/ClientSubmission.yml" + +echo "Cleaning up from previous runs..." + +JobBoardMarkdownOutputFile="$BUILD_OUTPUT_DIR/job-board/Resume.md" +JobBoardPDFOutputFile="$BUILD_OUTPUT_DIR/job-board/Resume.pdf" +JobBoardMSWordOutputFile="$BUILD_OUTPUT_DIR/job-board/Resume.doc" + +ClientSubmissionMarkdownOutputFile="$BUILD_OUTPUT_DIR/client-submission/Resume.md" +ClientSubmissionPDFOutputFile="$BUILD_OUTPUT_DIR/client-submission//Resume.pdf" +ClientSubmissionMSWordOutputFile="$BUILD_OUTPUT_DIR/client-submission/Resume.doc" + +rm $BUILDYAML_JOBBOARD +rm $JobBoardMarkdownOutputFile +rm $JobBoardPDFOutputFile +rm $JobBoardMSWordOutputFile + +rm $BUILDYAML_CLIENTSUBMISSION +rm $ClientSubmissionMarkdownOutputFile +rm $ClientSubmissionPDFOutputFile +rm $ClientSubmissionMSWordOutputFile + +# Expand variables into rendered YAML files. These will be used by pandoc to create the output artifacts + +$MO_PATH ./BuildTemplate-JobBoard.yml > $BUILDYAML_JOBBOARD +$MO_PATH ./BuildTemplate-ClientSubmission.yml > $BUILDYAML_CLIENTSUBMISSION + +echo "Combining markdown files into single input file for pandoc..." + +# Create contact info md file +$MO_PATH ../Templates/ContactInfo/ContactInfo-JobBoard.md > $BUILD_TEMP_DIR/ContactInfo-JobBoard.md +$MO_PATH ../Templates/ContactInfo/ContactInfo-ClientSubmit.md > $BUILD_TEMP_DIR/ContactInfo-ClientSubmit.md + +#Pull in contact info +cat $BUILD_TEMP_DIR/ContactInfo-JobBoard.md >> $JobBoardMarkdownOutputFile +echo " " >> $JobBoardMarkdownOutputFile + +cat $BUILD_TEMP_DIR/ContactInfo-ClientSubmit.md >> $ClientSubmissionMarkdownOutputFile +echo " " >> $ClientSubmissionMarkdownOutputFile + +echo "## Career Highlights" >> $JobBoardMarkdownOutputFile +echo "## Career Highlights" >> $ClientSubmissionMarkdownOutputFile + +cat ../Templates/SkillsAndProjects/Projects.md >> $JobBoardMarkdownOutputFile +echo "\pagebreak" >> $JobBoardMarkdownOutputFile + +cat ../Templates/SkillsAndProjects/Projects.md >> $ClientSubmissionMarkdownOutputFile +echo "\pagebreak" >> $ClientSubmissionMarkdownOutputFile + +echo " " >> $JobBoardMarkdownOutputFile +echo "## Employment History" >> $JobBoardMarkdownOutputFile +echo " " >> $JobBoardMarkdownOutputFile + +echo " " >> $ClientSubmissionMarkdownOutputFile +echo "## Employment History" >> $ClientSubmissionMarkdownOutputFile +echo " " >> $ClientSubmissionMarkdownOutputFile + +#And here we do some magic... +#Pull in : + +# employer +# title +# start/end dates of employment +# long form position summary data from each position + +IFS=$'\n\t' +for position in \ +$(cat ../Templates/WorkHistory/WorkHistory.csv); do + +COMPANY="$(echo $position|awk -F ',' '{print $1}')" +TITLE="$(echo $position|awk -F ',' '{print $2}')" +DATEOFEMPLOY="$(echo $position|awk -F ',' '{print $3}')" + +echo " " >> "$JobBoardMarkdownOutputFile" +echo "**$COMPANY | $TITLE | $DATEOFEMPLOY**" >> $JobBoardMarkdownOutputFile +echo " " >> "$JobBoardMarkdownOutputFile" + +echo "**$COMPANY | $TITLE | $DATEOFEMPLOY**" >> $ClientSubmissionMarkdownOutputFile +echo " " >> "$ClientSubmissionMarkdownOutputFile" + +echo " " >> "$JobBoardMarkdownOutputFile" +cat ../Templates/JobHistoryDetails/$COMPANY.md >> "$JobBoardMarkdownOutputFile" +echo " " >> "$JobBoardMarkdownOutputFile" + +cat ../Templates/JobHistoryDetails/$COMPANY.md >> "$ClientSubmissionMarkdownOutputFile" +echo " " >> "$ClientSubmissionMarkdownOutputFile" +done + +#Pull in my skills and generate a beautiful table. + +echo "\pagebreak" >> $JobBoardMarkdownOutputFile +echo " " >> "$JobBoardMarkdownOutputFile" +echo "## Skills" >> "$JobBoardMarkdownOutputFile" +echo " " >> "$JobBoardMarkdownOutputFile" + +echo "\pagebreak" >> $ClientSubmissionMarkdownOutputFile +echo " " >> "$ClientSubmissionMarkdownOutputFile" +echo "## Skills" >> "$ClientSubmissionMarkdownOutputFile" +echo " " >> "$ClientSubmissionMarkdownOutputFile" + +#Table heading +echo "|Skill|Experience|Skill Details|" >> $JobBoardMarkdownOutputFile +echo "|---|---|---|" >> $JobBoardMarkdownOutputFile + +echo "|Skill|Experience|Skill Details|" >> $ClientSubmissionMarkdownOutputFile +echo "|---|---|---|" >> $ClientSubmissionMarkdownOutputFile + +#Table rows +IFS=$'\n\t' +for skill in \ +$(cat ../Templates/SkillsAndProjects/Skills.csv); do +SKILL_NAME="$(echo $skill|awk -F '|' '{print $1}')" +SKILL_YEARS="$(echo $skill|awk -F '|' '{print $2}')" +SKILL_DETAIL="$(echo $skill|awk -F '|' '{print $3}')" +echo "|**$SKILL_NAME**|$SKILL_YEARS|$SKILL_DETAIL|" >> $JobBoardMarkdownOutputFile +echo "|**$SKILL_NAME**|$SKILL_YEARS|$SKILL_DETAIL|" >> $ClientSubmissionMarkdownOutputFile + +done +unset IFS + +echo "Generating PDF output for job board version..." + +pandoc \ +"$JobBoardMarkdownOutputFile" \ +--template eisvogel \ +--metadata-file="../build-temp/JobBoard.yml" \ +--from markdown \ +--to=pdf \ +--output $JobBoardPDFOutputFile + +echo "Generating MSWord output for job board version..." + +pandoc \ +"$JobBoardMarkdownOutputFile" \ +--metadata-file="../build-temp/JobBoard.yml" \ +--from markdown \ +--to=docx \ +--reference-doc=resume-docx-reference.docx \ +--output $JobBoardMSWordOutputFile + +echo "Generating PDF output for client submission version..." + +pandoc \ +"$ClientSubmissionMarkdownOutputFile" \ +--template eisvogel \ +--metadata-file="../build-temp/ClientSubmission.yml" \ +--from markdown \ +--to=pdf \ +--output $ClientSubmissionPDFOutputFile + +echo "Generating MSWord output for client submission version..." + +pandoc \ +"$ClientSubmissionMarkdownOutputFile" \ +--metadata-file="../build-temp/ClientSubmission.yml" \ +--from markdown \ +--to=docx \ +--reference-doc=resume-docx-reference.docx \ +--output $ClientSubmissionMSWordOutputFile \ No newline at end of file diff --git a/build/resume-docx-reference.docx b/build/resume-docx-reference.docx new file mode 100644 index 0000000..f631233 Binary files /dev/null and b/build/resume-docx-reference.docx differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/PULL_REQUEST_TEMPLATE.md b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..57a9617 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thanks for contributing to b3bp! As part of your PR, have you: + +- [ ] Added an item in [CHANGELOG.md](https://github.com/kvz/bash3boilerplate/blob/HEAD/CHANGELOG.md) with attribution? +- [ ] Added your name to the [README.md](https://github.com/kvz/bash3boilerplate/blob/HEAD/README.md#authors) +- [ ] Linted your code? (`make test` should do the trick) + +If so, great! Feel free to replace this message with a description of your work and hit submit! diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/dependabot.yml b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/dependabot.yml new file mode 100644 index 0000000..2d2b2b8 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/dependabot.yml @@ -0,0 +1,5 @@ +groups: + production-dependencies: + dependency-type: 'production' + development-dependencies: + dependency-type: 'development' diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/workflows/ci.yml b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/workflows/ci.yml new file mode 100644 index 0000000..a660a17 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: b3bp CI +on: + push: + branches: + - main + pull_request: + types: + - opened + - synchronize +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + - uses: actions/setup-node@v1 + with: + node-version: 18.x + - name: Install + run: | + corepack yarn + - name: Lint + env: + SHELLCHECK_SEVERITY: warning + run: | + corepack yarn lint + - name: Test + run: | + corepack yarn test diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.gitignore b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.gitignore new file mode 100644 index 0000000..2213a68 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.gitignore @@ -0,0 +1,5 @@ +.yarn +assets/build +env.sh +node_modules +npm-debug.log diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.shellcheckrc b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.shellcheckrc new file mode 100644 index 0000000..2ebe56a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.shellcheckrc @@ -0,0 +1,3 @@ +external-sources=true +shell=bash +color=always diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.vscode/bash3boilerplate.code-workspace b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.vscode/bash3boilerplate.code-workspace new file mode 100644 index 0000000..64bfb87 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.vscode/bash3boilerplate.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": ".." + } + ], + "settings": {} +} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.yarnrc.yml b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.yarnrc.yml new file mode 100644 index 0000000..3186f3f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/CHANGELOG.md b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/CHANGELOG.md new file mode 100644 index 0000000..12afb68 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/CHANGELOG.md @@ -0,0 +1,175 @@ +# Changelog + +Here's is a combined todo/done list. You can see what todos are planned for the upcoming release, as well as ideas that may/may not make into a release in `Ideas`. + +## Ideas + +Unplanned. + +- [ ] Better style guide checking (#84) + +## main + +Released: TBA. +[Diff](https://github.com/kvz/bash3boilerplate/compare/2.7.2...main). + +- [ ] + +## 2.7.2 + +Released: 2023-08-29 +[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.1...2.7.2). + +- [x] Upgrade and cleanup node dependencies +- [x] Remove lanyon-based website in favor of simple redirect to github for bash3boilerplate.sh +- [x] Make tests pass again +- [x] Make linting and style checking separate actions +- [x] Add feature to edit/update comments in ini file (#132, @rfuehrer) +- [x] Upgrade to `lanyon@0.1.16` +- [x] Capture correct error_code in err_report (#124, @eval) +- [x] Enhanced ini file handling: create new file, create new sections, handle default section, read key from given section (@rfuehrer) + +## v2.4.2 + +Released: 2019-11-07. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.1...v2.4.2). + +- [x] Upgrade to `lanyon@0.1.16` +- [x] Capture correct error_code in err_report (#124, @eval) +- [x] Enhanced ini file handling: create new file, create new sections, handle default section, read key from given section (@rfuehrer) + +## v2.4.1 + +Released: 2019-11-07. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.3.0...v2.4.1). + +- [x] Upgrade to `lanyon@0.1.7` +- [x] Allow counting how many times an argument is used (@genesiscloud) +- [x] Fix typos in megamount (thanks @gsaponaro) +- [x] Enable color in screen or tmux (#92, @gmasse) +- [x] Change `egrep` to `grep -E` in test and lib scripts to comply with ShellCheck (#92, @gmasse) +- [x] Fix typo in FAQ (#92, @gmasse) +- [x] Fix Travis CI failure on src/templater.sh (@gmasse) +- [x] Add magic variable which contains full command invocation +- [x] More contrasted alert and emergency colors (#111 @gmeral) +- [x] Add support for repeatable arguments (@genesiscloud) +- [x] Fix remaining warnings with shellcheck v0.7.0 (#107, @genesiscloud) + +## v2.4.0 + +Released: 2016-12-21. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.3.0...v2.4.0). + +- [x] Upgrade to `lanyon@0.0.143` + +## v2.3.0 + +Released: 2016-12-21. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.2.0...v2.3.0). + +- [x] Add magic variable `__i_am_main_script` to distinguish if b3bp is being sourced or called directly (#45, @zbeekman) +- [x] Add style checks for tab characters and trailing whitespace (@zbeekman) +- [x] Add backtracing to help localize errors (#44, @zbeekman) +- [x] Additional FAQ entries (#47, suggested by @gdevenyi, implemented by @zbeekman) +- [x] Ensure that shifting over `--` doesn't throw an errexit error (#21, @zbeekman) +- [x] Add Pull Request template (#83) + +## v2.2.0 + +Released: 2016-12-21. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.1.0...v2.2.0). + +- [x] README and FAQ improvements (#66, @mstreuhofer) +- [x] Add support for sourcing b3bp (#61, @mstreuhofer) +- [x] Upgrade all Node.js dependencies for development (#78) +- [x] Switch to http://lanyon.io for static site building, add a new logo +- [x] Cleanup environment variables (#58, @mstreuhofer) +- [x] Support multi-line logs (#57, @mstreuhofer) +- [x] Run shellcheck as part of the acceptance test (#79, @mstreuhofer) +- [x] Brace all variables, used `[[` instead of `[` (#33, #76, @mstreuhofer) +- [x] Add automatic usage validation for required args (#22, #65, @mstreuhofer) +- [x] Remove all usage of eval (@mstreuhofer) +- [x] Get rid of awk, sed & egrep usage (#71, @mstreuhofer) +- [x] Fix auto-color-off code (#69, #70, @mstreuhofer) +- [x] Use shellcheck to find and fix unclean code (#68, #80, @mstreuhofer) +- [x] Allow for multiline opt description in `__usage` (#7, @mstreuhofer) +- [x] Allow `__usage` and `__helptext` to be defined before sourcing `main.sh` thus makeing b3bp behave like a library (@mstreuhofer) +- [x] Add the same License text to each script header (@mstreuhofer) + +## v2.1.0 + +Released: 2016-11-08. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.0.0...v2.1.0). + +- [x] Cleanup b3bp variables (adds prefixes across the board) (thanks @mstreuhofer) +- [x] Add multi-line logging support (thanks @mstreuhofer) +- [x] Mangle long-option names to allow dashes (thanks @zbeekman) +- [x] Remove OS detection altogether (#38, thx @zbeekman) +- [x] Offer the main template for download as http://bash3boilerplate.sh/main.sh +- [x] Better OS detection (#38, thx @moviuro) +- [x] Improve README copy (#34, thx galaktos) +- [x] Fix unquoted variable access within (#34 thx galaktos) +- [x] For delete-key-friendliness, bundle the commandline definition block along with its parser +- [x] Less verbose header comments +- [x] For delete-key-friendliness, don't crash on undeclared help vars +- [x] Introduce `errtrace`, which is on by default (BREAKING) +- [x] Add a configurable `helptext` that is left alone by the parses and allows you to have a richer help +- [x] Add a simple documentation website +- [x] Add best practice of using `__double_underscore_prefixed_vars` to indicate global variables that are solely controlled inside your script +- [x] Make license more permissive by not requiring distribution of the LICENSE file if the copyright & attribution comments are left intact +- [x] Respect `--no-color` by setting the `NO_COLOR` flag in `main.sh` (#25, thx @gdevenyi) +- [x] Split out changelog into separate file +- [x] Added a [FAQ](./FAQ.md) (#15, #14, thanks @rouson) +- [x] Fix Travis OSX testing (before, it would silently pass failures) (#10) +- [x] Enable dashes in long, GNU style options, as well as numbers (thanks @zbeekman) + +## v2.0.0 + +Released: 2016-02-17. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.2.1...v2.0.0). + +- [x] Add tests for `templater` and follow Library export best practices +- [x] Add tests for `ini_val` and follow Library export best practices +- [x] Add tests for `parse_url` and follow Library export best practices +- [x] Add tests for `megamount` and follow Library export best practices +- [x] Remove `bump` from `src` (BREAKING) +- [x] Remove `semver` from `src` (BREAKING) + +## v1.2.1 + +Released: 2016-02-17. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.2.0...v1.2.1). + +- [x] Add Travis CI automated testing for OSX (thanks @zbeekman) + +## v1.2.0 + +Released: 2016-02-16. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.1.0...v1.2.0). + +- [x] Allow disabling colors via `NO_COLOR` environment variable +- [x] Enable `errexit`, `nounset` and `pipefail` options at the top of the script already +- [x] More refined colors (thanks @arathai) +- [x] Add a changelog to the README +- [x] Add `__os` magic var (limited to discovering OSX and defaulting to Linux for now) +- [x] Add `__base` magic var (`main`, if the source script is `main.sh`) +- [x] Enable long, GNU style options (thanks @zbeekman) +- [x] Add Travis CI automated testing for Linux + +## v1.1.0 + +Released: 2015-06-29. +[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.0.3...v1.1.0). + +- [x] Add `ALLOW_REMAINDERS` configuration to templater +- [x] Fix typo: 'debugmdoe' to 'debugmode' (thanks @jokajak) +- [x] Use `${BASH_SOURCE[0]}` for `__file` instead of `${0}` + +## v1.0.3 + +Released: 2014-11-02. +[Diff](https://github.com/kvz/bash3boilerplate/compare/5db569125319a89b9561b434db84e4d91faefb63...v1.0.3). + +- [x] Add `ini_val`, `megamount`, `parse_url` +- [x] Add re-usable libraries in `./src` +- [x] Use npm as an additional distribution channel diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/FAQ.md b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/FAQ.md new file mode 100644 index 0000000..fb38dc2 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/FAQ.md @@ -0,0 +1,171 @@ +[This document is formatted with GitHub-Flavored Markdown. ]: # +[For better viewing, including hyperlinks, read it online at ]: # +[https://github.com/kvz/bash3boilerplate/blob/HEAD/FAQ.md ]: # + +## Contents + +- [What is a CLI](#what-is-a-cli)? +- [How do I incorporate BASH3 Boilerplate into my own project](#how-do-i-incorporate-bash3-boilerplate-into-my-own-project)? +- [How do I add a command-line flag](#how-do-i-add-a-command-line-flag)? +- [How do I access the value of a command-line argument](#how-do-i-access-the-value-of-a-command-line-argument)? +- [What is a magic variable](#what-is-a-magic-variable)? +- [How do I submit an issue report](#how-do-i-submit-an-issue-report)? +- [How can I contribute to this project](#how-can-i-contribute-to-this-project)? +- [Why are you typing BASH in all caps](#why-are-you-typing-bash-in-all-caps)? +- [You are saying you are portable, but why won't b3bp code run in dash / busybox / posh / ksh / mksh / zsh](#you-are-saying-you-are-portable-but-why-wont-b3bp-code-run-in-dash--busybox--posh--ksh--mksh--zsh)? +- [How do I do Operating System detection](#how-do-i-do-operating-system-detection)? +- [How do I access a potentially unset (environment) variable](#how-do-i-access-a-potentially-unset-environment-variable)? +- [How can I detect or trap CTRL-C and other signals](#how-can-i-detect-or-trap-ctrl-c-and-other-signals)? +- [How can I get the PID of my running script](how-can-i-get-the-pid-of-my-running-script)? + + + +# Frequently Asked Questions + +## What is a CLI? + +A "CLI" is a [command-line interface](https://en.wikipedia.org/wiki/Command-line_interface). + +## How do I incorporate BASH3 Boilerplate into my own project? + +You can incorporate BASH3 Boilerplate into your project in one of two ways: + +1. Copy the desired portions of [`main.sh`](http://bash3boilerplate.sh/main.sh) into your own script. +1. Download [`main.sh`](http://bash3boilerplate.sh/main.sh) and start pressing the delete-key to remove unwanted things + +Once the `main.sh` has been tailor-made for your project, you can either append your own script in the same file, or source it in the following ways: + +1. Copy [`main.sh`](http://bash3boilerplate.sh/main.sh) into the same directory as your script and then edit and embed it into your script using Bash's `source` include feature, e.g.: + +```bash +#!/usr/bin/env bash +source main.sh +``` + +1. Source [`main.sh`](http://bash3boilerplate.sh/main.sh) in your script or at the command line: + +```bash +#!/usr/bin/env bash +source main.sh +``` + +## How do I add a command-line flag? + +1. Copy the line from the `main.sh` [read block](https://github.com/kvz/bash3boilerplate/blob/v2.1.0/main.sh#L109-L115) that most resembles the desired behavior and paste the line into the same block. +1. Edit the single-character (e.g., `-d`) and, if present, the multi-character (e.g., `--debug`) versions of the flag in the copied line. +1. Omit the `[arg]` text in the copied line, if the desired flag takes no arguments. +1. Omit or edit the text after `Default=` to set or not set default values, respectively. +1. Omit the `Required.` text, if the flag is optional. + +## How do I access the value of a command-line argument? + +To find out the value of an argument, append the corresponding single-character flag to the text `$arg_`. For example, if the [read block] +contains the line + +```bash + -t --temp [arg] Location of tempfile. Default="/tmp/bar" +``` + +then you can evaluate the corresponding argument and assign it to a variable as follows: + +```bash +__temp_file_name="${arg_t}" +``` + +## What is a magic variable? + +The [magic variables](https://github.com/kvz/bash3boilerplate/blob/v2.1.0/main.sh#L26-L28) in `main.sh` are special in that they have a different value, depending on your environment. You can use `${__file}` to get a reference to your current script, and `${__dir}` to get a reference to the directory it lives in. This is not to be confused with the location of the calling script that might be sourcing the `${__file}`, which is accessible via `${0}`, or the current directory of the administrator running the script, accessible via `$(pwd)`. + +## How do I submit an issue report? + +Please visit our [Issues](https://github.com/kvz/bash3boilerplate/issues) page. + +## How can I contribute to this project? + +Please fork this repository. After that, create a branch containing your suggested changes and submit a pull request based on the main branch +of . We are always more than happy to accept your contributions! + +## Why are you typing BASH in all caps? + +As an acronym, Bash stands for Bourne-again shell, and is usually written with one uppercase. +This project's name, however, is "BASH3 Boilerplate". It is a reference to +"[HTML5 Boilerplate](https://html5boilerplate.com/)", which was founded to serve a similar purpose, +only for crafting webpages. +Somewhat inconsistent – but true to Unix ancestry – the abbreviation for our project is "b3bp". + +## You are saying you are portable, but why won't b3bp code run in dash / busybox / posh / ksh / mksh / zsh? + +When we say _portable_, we mean across Bash versions. Bash is widespread and most systems +offer at least version 3 of it. Make sure you have that available and b3bp will work for you. + +We run automated tests to make sure that it will. Here is some proof for the following platforms: + +- [Linux](https://travis-ci.org/kvz/bash3boilerplate/jobs/109804166#L91-L94) `GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)` +- [OSX](https://travis-ci.org/kvz/bash3boilerplate/jobs/109804167#L2453-L2455) `GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)` + +This portability, however, does not mean that we try to be compatible with +KornShell, Zsh, posh, yash, dash, or other shells. We allow syntax that would explode if +you pasted it in anything but Bash 3 and up. + +## How do I do Operating System detection? + +We used to offer a magic `__os` variable, but we quickly [discovered](https://github.com/kvz/bash3boilerplate/issues/38) that it would be hard +to create a satisfactory abstraction that is not only correct, but also covers enough use-cases, +while still having a relatively small footprint in `main.sh`. + +For simple OS detection, we recommend using the `${OSTYPE}` variable available in Bash as +is demoed in [this stackoverflow post](http://stackoverflow.com/a/8597411/151666): + +```bash +if [[ "${OSTYPE}" = "linux-gnu" ]]; then + echo "GNU Linux" +elif [[ "${OSTYPE}" = "darwin"* ]]; then + echo "Mac OSX" +elif [[ "${OSTYPE}" = "cygwin" ]]; then + echo "POSIX compatibility layer and Linux environment emulation for Windows" +elif [[ "${OSTYPE}" = "msys" ]]; then + echo "Lightweight shell and GNU utilities compiled for Windows (part of MinGW)" +elif [[ "${OSTYPE}" = "win32" ]]; then + echo "I'm not sure this can happen." +elif [[ "${OSTYPE}" = "freebsd"* ]]; then + echo "..." +else + echo "Unknown." +fi +``` + +## How do I access a potentially unset (environment) variable? + +The set -o nounset line in `main.sh` causes error termination when an unset environment variables is detected as unbound. There are multiple ways to avoid this. + +Some code to illustrate: + +```bash +# method 1 +echo ${NAME1:-Damian} # echos Damian, $NAME1 is still unset +# method 2 +echo ${NAME2:=Damian} # echos Damian, $NAME2 is set to Damian +# method 3 +NAME3=${NAME3:-Damian}; echo ${NAME3} # echos Damian, $NAME3 is set to Damian +``` + +This subject is briefly touched on as well in the [Safety and Portability section under point 5](README.md#safety-and-portability). b3bp currently uses [method 1](https://github.com/kvz/bash3boilerplate/blob/v2.1.0/main.sh#L252) when we want to access a variable that could be undeclared, and [method 3](https://github.com/kvz/bash3boilerplate/blob/v2.1.0/main.sh#L31) when we also want to set a default to an undeclared variable, because we feel it is more readable than method 2. We feel `:=` is easily overlooked, and not very beginner friendly. Method 3 seems more explicit in that regard in our humble opinion. + +## How can I detect or trap Ctrl-C and other signals? + +You can trap [Unix signals](https://en.wikipedia.org/wiki/Unix_signal) like [Ctrl-C](https://en.wikipedia.org/wiki/Control-C) with code similar to: + +```bash +# trap ctrl-c and call ctrl_c() +trap ctrl_c INT + +function ctrl_c() { + echo "** Trapped CTRL-C" +} +``` + +See http://mywiki.wooledge.org/SignalTrap for a list of signals, examples, and an in depth discussion. + +## How can I get the PID of my running script? + +The PID of a running script is contained in the `${$}` variable. This is _not_ the pid of any subshells. With Bash 4 you can get the PID of your subshell with `${BASHPID}`. For a comprehensive list of Bash built in variables see, e.g., http://www.tldp.org/LDP/abs/html/internalvariables.html diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/LICENSE b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/LICENSE new file mode 100644 index 0000000..a9fd3b8 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Kevin van Zonneveld and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/Makefile b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/Makefile new file mode 100644 index 0000000..7a2a446 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/Makefile @@ -0,0 +1,59 @@ +# Licensed under MIT. +# Copyright (2016) by Kevin van Zonneveld https://twitter.com/kvz +# +# https://www.npmjs.com/package/fakefile +# +# Please do not edit this file directly, but propose changed upstream instead: +# https://github.com/kvz/fakefile/blob/main/Makefile +# +# This Makefile offers convience shortcuts into any Node.js project that utilizes npm scripts. +# It functions as a wrapper around the actual listed in `package.json` +# So instead of typing: +# +# $ npm script build:assets +# +# you could also type: +# +# $ make build-assets +# +# Notice that colons (:) are replaced by dashes for Makefile compatibility. +# +# The benefits of this wrapper are: +# +# - You get to keep the the scripts package.json, which is more portable +# (Makefiles & Windows are harder to mix) +# - Offer a polite way into the project for developers coming from different +# languages (npm scripts is obviously very Node centric) +# - Profit from better autocomplete (make ) than npm currently offers. +# OSX users will have to install bash-completion +# (http://davidalger.com/development/bash-completion-on-os-x-with-brew/) + +ifeq ($(shell test -e ./yarn.lock && echo -n yes),yes) + RUNNER=yarn + INSTALLER=yarn install +else + RUNNER=npm run + INSTALLER=npm install +endif + +define npm_script_targets +TARGETS := $(shell \ + node -e 'for (var k in require("./package.json").scripts) {console.log(k.replace(/:/g, "-"));}' + | grep -v -E "^install$$" +) +$$(TARGETS): + $(RUNNER) $(shell \ + node -e 'for (var k in require("./package.json").scripts) {console.log(k.replace(/:/g, "-"), k);}' + | grep -E "^$(MAKECMDGOALS)\s" + | head -n1 + | awk '{print $$2}' + ) + +.PHONY: $$(TARGETS) +endef + +$(eval $(call npm_script_targets)) + +# These npm run scripts are available, without needing to be mentioned in `package.json` +install: + $(INSTALLER) diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/README.md b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/README.md new file mode 100644 index 0000000..bd96bac --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/README.md @@ -0,0 +1,175 @@ +[This document is formatted with GitHub-Flavored Markdown. ]: # +[For better viewing, including hyperlinks, read it online at ]: # +[https://github.com/kvz/bash3boilerplate/blob/HEAD/README.md]: # + +- [Overview](#overview) +- [Goals](#goals) +- [Features](#features) +- [Installation](#installation) +- [Changelog](#changelog) +- [Frequently Asked Questions](#frequently-asked-questions) +- [Best Practices](#best-practices) +- [Who uses b3bp](#who-uses-b3bp) +- [Authors](#authors) +- [License](#license) + +## Overview + + + +When hacking up Bash scripts, there are often things such as logging or command-line argument parsing that: + +- You need every time +- Come with a number of pitfalls you want to avoid +- Keep you from your actual work + +Here's an attempt to bundle those things in a generalized way so that +they are reusable as-is in most scripts. + +We call it "BASH3 Boilerplate" or b3bp for short. + +## Goals + +Delete-Key-**Friendly**. Instead of introducing packages, includes, compilers, etc., we propose using [`main.sh`](https://bash3boilerplate.sh/main.sh) as a base and removing the parts you don't need. +While this may feel a bit archaic at first, it is exactly the strength of Bash scripts that we should want to embrace. + +**Portable**. We are targeting Bash 3 (OSX still ships +with 3, for instance). If you are going to ask people to install +Bash 4 first, you might as well pick a more advanced language as a +dependency. + +## Features + +- Conventions that will make sure that all your scripts follow the same, battle-tested structure +- Safe by default (break on error, pipefail, etc.) +- Configuration by environment variables +- Simple command-line argument parsing that requires no external dependencies. Definitions are parsed from help info, ensuring there will be no duplication +- Helpful magic variables like `__file` and `__dir` +- Logging that supports colors and is compatible with [Syslog Severity levels](https://en.wikipedia.org/wiki/Syslog#Severity_levels), as well as the [twelve-factor](https://12factor.net/) guidelines + +## Installation + +There are three different ways to install b3bp: + +### Option 1: Download the main template + +Use curl or wget to download the source and save it as your script. Then you can start deleting the unwanted bits, and adding your own logic. + +```bash +wget https://bash3boilerplate.sh/main.sh +vim main.sh +``` + +### Option 2: Clone the entire project + +Besides `main.sh`, this will also get you the entire b3bp repository. This includes a few extra functions that we keep in the `./src` directory. + +```bash +git clone git@github.com:kvz/bash3boilerplate.git +``` + +### Option 3: Require via npm + +As of `v1.0.3`, b3bp can also be installed as a Node module, meaning you can define it as a dependency in `package.json` via: + +```bash +npm init +npm install --save --save-exact bash3boilerplate +``` + +Even though this option introduces a Node.js dependency, it does allow for easy version pinning and distribution in environments that already have this prerequisite. This is, however, entirely optional and nothing prevents you from ignoring this possibility. + +## Changelog + +Please see the [CHANGELOG.md](./CHANGELOG.md) file. + +## Frequently Asked Questions + +Please see the [FAQ.md](./FAQ.md) file. + +## Best practices + +As of `v1.0.3`, b3bp offers some nice re-usable libraries in `./src`. In order to make the snippets in `./src` more useful, we recommend the following guidelines. + +### Function packaging + +It is nice to have a Bash package that can not only be used in the terminal, but also invoked as a command line function. In order to achieve this, the exporting of your functionality _should_ follow this pattern: + +```bash +if [[ "${BASH_SOURCE[0]}" = "${0}" ]]; then + my_script "${@}" + exit $? +fi +export -f my_script +``` + +This allows a user to `source` your script or invoke it as a script. + +```bash +# Running as a script +$ ./my_script.sh some args --blah +# Sourcing the script +$ source my_script.sh +$ my_script some more args --blah +``` + +(taken from the [bpkg](https://raw.githubusercontent.com/bpkg/bpkg/HEAD/README.md) project) + +### Scoping + +1. In functions, use `local` before every variable declaration. +1. Use `UPPERCASE_VARS` to indicate environment variables that can be controlled outside your script. +1. Use `__double_underscore_prefixed_vars` to indicate global variables that are solely controlled inside your script, with the exception of arguments that are already prefixed with `arg_`, as well as functions, over which b3bp poses no restrictions. + +### Coding style + +1. Use two spaces for tabs, do not use tab characters. +1. Do not introduce whitespace at the end of lines or on blank lines as they obfuscate version control diffs. +1. Use long options (`logger --priority` vs `logger -p`). If you are on the CLI, abbreviations make sense for efficiency. Nevertheless, when you are writing reusable scripts, a few extra keystrokes will pay off in readability and avoid ventures into man pages in the future, either by you or your collaborators. Similarly, we prefer `set -o nounset` over `set -u`. +1. Use a single equal sign when checking `if [[ "${NAME}" = "Kevin" ]]`; double or triple signs are not needed. +1. Use the new bash builtin test operator (`[[ ... ]]`) rather than the old single square bracket test operator or explicit call to `test`. + +### Safety and Portability + +1. Use `{}` to enclose your variables. Otherwise, Bash will try to access the `$ENVIRONMENT_app` variable in `/srv/$ENVIRONMENT_app`, whereas you probably intended `/srv/${ENVIRONMENT}_app`. Since it is easy to miss cases like this, we recommend that you make enclosing a habit. +1. Use `set`, rather than relying on a shebang like `#!/usr/bin/env bash -e`, since that is neutralized when someone runs your script as `bash yourscript.sh`. +1. Use `#!/usr/bin/env bash`, as it is more portable than `#!/bin/bash`. +1. Use `${BASH_SOURCE[0]}` if you refer to current file, even if it is sourced by a parent script. In other cases, use `${0}`. +1. Use `:-` if you want to test variables that could be undeclared. For instance, with `if [[ "${NAME:-}" = "Kevin" ]]`, `$NAME` will evaluate to `Kevin` if the variable is empty. The variable itself will remain unchanged. The syntax to assign a default value is `${NAME:=Kevin}`. + +## Who uses b3bp? + +- [Transloadit](https://transloadit.com) +- [OpenCoarrays](https://www.opencoarrays.org) +- [Sourcery Institute](https://www.sourceryinstitute.org) +- [Computational Brain Anatomy Laboratory](https://cobralab.ca/) +- [Genesis Cloud](https://genesiscloud.com/) + +We are looking for endorsements! Are you also using b3bp? [Let us know](https://github.com/kvz/bash3boilerplate/issues/new?title=I%20use%20b3bp) and get listed. + +## Authors + +- [Kevin van Zonneveld](https://kvz.io) +- [Izaak Beekman](https://izaakbeekman.com/) +- [Manuel Streuhofer](https://github.com/mstreuhofer) +- [Alexander Rathai](mailto:Alexander.Rathai@gmail.com) +- [Dr. Damian Rouson](https://www.sourceryinstitute.org/) (documentation, feedback) +- [@jokajak](https://github.com/jokajak) (documentation) +- [Gabriel A. Devenyi](https://staticwave.ca/) (feedback) +- [@bravo-kernel](https://github.com/bravo-kernel) (feedback) +- [@skanga](https://github.com/skanga) (feedback) +- [galaktos](https://www.reddit.com/user/galaktos) (feedback) +- [@moviuro](https://github.com/moviuro) (feedback) +- [Giovanni Saponaro](https://github.com/gsaponaro) (feedback) +- [Germain Masse](https://github.com/gmasse) +- [A. G. Madi](https://github.com/warpengineer) +- [Lukas Stockner](mailto:oss@genesiscloud.com) +- [Gert Goet](https://github.com/eval) +- [@rfuehrer](https://github.com/rfuehrer) + +## License + +Copyright (c) 2013 Kevin van Zonneveld and [contributors](https://github.com/kvz/bash3boilerplate#authors). +Licensed under [MIT](https://raw.githubusercontent.com/kvz/bash3boilerplate/HEAD/LICENSE). +You are not obligated to bundle the LICENSE file with your b3bp projects as long +as you leave these references intact in the header comments of your source files. diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/docs/CNAME b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/docs/CNAME new file mode 100644 index 0000000..6aa6526 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/docs/CNAME @@ -0,0 +1 @@ +bash3boilerplate.sh \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/docs/index.html b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/docs/index.html new file mode 100644 index 0000000..8ad180c --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/docs/index.html @@ -0,0 +1,15 @@ + + + + + + Redirecting... + + + If you are not redirected, + click here. + + diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/example.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/example.sh new file mode 100755 index 0000000..009afaf --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/example.sh @@ -0,0 +1,147 @@ +#!/usr/bin/env bash +# This file: +# +# - Demos BASH3 Boilerplate (change this for your script) +# +# Usage: +# +# LOG_LEVEL=7 ./example.sh -f /tmp/x -d (change this for your script) +# +# Based on a template by BASH3 Boilerplate v2.3.0 +# http://bash3boilerplate.sh/#authors +# +# The MIT License (MIT) +# Copyright (c) 2013 Kevin van Zonneveld and contributors +# You are not obligated to bundle the LICENSE file with your b3bp projects as long +# as you leave these references intact in the header comments of your source files. + + +### BASH3 Boilerplate (b3bp) Header +############################################################################## + +# Commandline options. This defines the usage page, and is used to parse cli +# opts & defaults from. The parsing is unforgiving so be precise in your syntax +# - A short option must be preset for every long option; but every short option +# need not have a long option +# - `--` is respected as the separator between options and arguments +# - We do not bash-expand defaults, so setting '~/app' as a default will not resolve to ${HOME}. +# you can use bash variables to work around this (so use ${HOME} instead) + +# shellcheck disable=SC2034 +read -r -d '' __usage <<-'EOF' || true # exits non-zero when EOF encountered + -f --file [arg] Filename to process. Required. + -t --temp [arg] Location of tempfile. Default="/tmp/bar" + -v Enable verbose mode, print script as it is executed + -d --debug Enables debug mode + -h --help This page + -n --no-color Disable color output + -1 --one Do just one thing + -i --input [arg] File to process. Can be repeated. + -x Specify a flag. Can be repeated. +EOF + +# shellcheck disable=SC2034 +read -r -d '' __helptext <<-'EOF' || true # exits non-zero when EOF encountered + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. +EOF + +# shellcheck source=main.sh +source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/main.sh" + + +### Signal trapping and backtracing +############################################################################## + +function __b3bp_cleanup_before_exit () { + info "Cleaning up. Done" +} +trap __b3bp_cleanup_before_exit EXIT + +# requires `set -o errtrace` +__b3bp_err_report() { + local error_code=${?} + # shellcheck disable=SC2154 + error "Error in ${__file} in function ${1} on line ${2}" + exit ${error_code} +} +# Uncomment the following line for always providing an error backtrace +# trap '__b3bp_err_report "${FUNCNAME:-.}" ${LINENO}' ERR + + +### Command-line argument switches (like -d for debugmode, -h for showing helppage) +############################################################################## + +# debug mode +if [[ "${arg_d:?}" = "1" ]]; then + set -o xtrace + PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' + LOG_LEVEL="7" + # Enable error backtracing + trap '__b3bp_err_report "${FUNCNAME:-.}" ${LINENO}' ERR +fi + +# verbose mode +if [[ "${arg_v:?}" = "1" ]]; then + set -o verbose +fi + +# no color mode +if [[ "${arg_n:?}" = "1" ]]; then + NO_COLOR="true" +fi + +# help mode +if [[ "${arg_h:?}" = "1" ]]; then + # Help exists with code 1 + help "Help using ${0}" +fi + + +### Validation. Error out if the things required for your script are not present +############################################################################## + +[[ "${arg_f:-}" ]] || help "Setting a filename with -f or --file is required" +[[ "${LOG_LEVEL:-}" ]] || emergency "Cannot continue without LOG_LEVEL. " + + +### Runtime +############################################################################## + +# shellcheck disable=SC2154 +info "__i_am_main_script: ${__i_am_main_script}" +# shellcheck disable=SC2154 +info "__file: ${__file}" +# shellcheck disable=SC2154 +info "__dir: ${__dir}" +# shellcheck disable=SC2154 +info "__base: ${__base}" +info "OSTYPE: ${OSTYPE}" + +info "arg_f: ${arg_f}" +info "arg_d: ${arg_d}" +info "arg_v: ${arg_v}" +info "arg_h: ${arg_h}" +if [[ -n "${arg_i:-}" ]]; then + info "arg_i: ${#arg_i[@]}" + for input_file in "${arg_i[@]}"; do + info " - ${input_file}" + done +else + info "arg_i: 0" +fi +# shellcheck disable=SC2015 +[[ -n "${arg_x:-}" ]] && info "arg_x: ${#arg_x[@]}" || info "arg_x: 0" + +info "$(echo -e "multiple lines example - line #1\\nmultiple lines example - line #2\\nimagine logging the output of 'ls -al /path/'")" + +# All of these go to STDERR, so you can use STDOUT for piping machine readable information to other software +debug "Info useful to developers for debugging the application, not useful during operations." +info "Normal operational messages - may be harvested for reporting, measuring throughput, etc. - no action required." +notice "Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential problems - no immediate action required." +warning "Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time." +error "Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time." +critical "Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection." +alert "Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection." +emergency "A \"panic\" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call." diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/main.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/main.sh new file mode 100755 index 0000000..4fb4dfd --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/main.sh @@ -0,0 +1,453 @@ +#!/usr/bin/env bash +# This file: +# +# - Demos BASH3 Boilerplate (change this for your script) +# +# Usage: +# +# LOG_LEVEL=7 ./main.sh -f /tmp/x -d (change this for your script) +# +# Based on a template by BASH3 Boilerplate vv2.7.2 +# http://bash3boilerplate.sh/#authors +# +# The MIT License (MIT) +# Copyright (c) 2013 Kevin van Zonneveld and contributors +# You are not obligated to bundle the LICENSE file with your b3bp projects as long +# as you leave these references intact in the header comments of your source files. + +# Exit on error. Append "|| true" if you expect an error. +set -o errexit +# Exit on error inside any functions or subshells. +set -o errtrace +# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR +set -o nounset +# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip` +set -o pipefail +# Turn on traces, useful while debugging but commented out by default +# set -o xtrace + +if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + __i_am_main_script="0" # false + + if [[ "${__usage+x}" ]]; then + if [[ "${BASH_SOURCE[1]}" = "${0}" ]]; then + __i_am_main_script="1" # true + fi + + __b3bp_external_usage="true" + __b3bp_tmp_source_idx=1 + fi +else + __i_am_main_script="1" # true + [[ "${__usage+x}" ]] && unset -v __usage + [[ "${__helptext+x}" ]] && unset -v __helptext +fi + +# Set magic variables for current file, directory, os, etc. +__dir="$(cd "$(dirname "${BASH_SOURCE[${__b3bp_tmp_source_idx:-0}]}")" && pwd)" +__file="${__dir}/$(basename "${BASH_SOURCE[${__b3bp_tmp_source_idx:-0}]}")" +__base="$(basename "${__file}" .sh)" +# shellcheck disable=SC2034,SC2015 +__invocation="$(printf %q "${__file}")$( (($#)) && printf ' %q' "$@" || true)" + +# Define the environment variables (and their defaults) that this script depends on +LOG_LEVEL="${LOG_LEVEL:-6}" # 7 = debug -> 0 = emergency +NO_COLOR="${NO_COLOR:-}" # true = disable color. otherwise autodetected + + +### Functions +############################################################################## + +function __b3bp_log () { + local log_level="${1}" + shift + + # shellcheck disable=SC2034 + local color_debug="\\x1b[35m" + # shellcheck disable=SC2034 + local color_info="\\x1b[32m" + # shellcheck disable=SC2034 + local color_notice="\\x1b[34m" + # shellcheck disable=SC2034 + local color_warning="\\x1b[33m" + # shellcheck disable=SC2034 + local color_error="\\x1b[31m" + # shellcheck disable=SC2034 + local color_critical="\\x1b[1;31m" + # shellcheck disable=SC2034 + local color_alert="\\x1b[1;37;41m" + # shellcheck disable=SC2034 + local color_emergency="\\x1b[1;4;5;37;41m" + + local colorvar="color_${log_level}" + + local color="${!colorvar:-${color_error}}" + local color_reset="\\x1b[0m" + + if [[ "${NO_COLOR:-}" = "true" ]] || { [[ "${TERM:-}" != "xterm"* ]] && [[ "${TERM:-}" != "screen"* ]]; } || [[ ! -t 2 ]]; then + if [[ "${NO_COLOR:-}" != "false" ]]; then + # Don't use colors on pipes or non-recognized terminals + color=""; color_reset="" + fi + fi + + # all remaining arguments are to be printed + local log_line="" + + while IFS=$'\n' read -r log_line; do + echo -e "$(date -u +"%Y-%m-%d %H:%M:%S UTC") ${color}$(printf "[%9s]" "${log_level}")${color_reset} ${log_line}" 1>&2 + done <<< "${@:-}" +} + +function emergency () { __b3bp_log emergency "${@}"; exit 1; } +function alert () { [[ "${LOG_LEVEL:-0}" -ge 1 ]] && __b3bp_log alert "${@}"; true; } +function critical () { [[ "${LOG_LEVEL:-0}" -ge 2 ]] && __b3bp_log critical "${@}"; true; } +function error () { [[ "${LOG_LEVEL:-0}" -ge 3 ]] && __b3bp_log error "${@}"; true; } +function warning () { [[ "${LOG_LEVEL:-0}" -ge 4 ]] && __b3bp_log warning "${@}"; true; } +function notice () { [[ "${LOG_LEVEL:-0}" -ge 5 ]] && __b3bp_log notice "${@}"; true; } +function info () { [[ "${LOG_LEVEL:-0}" -ge 6 ]] && __b3bp_log info "${@}"; true; } +function debug () { [[ "${LOG_LEVEL:-0}" -ge 7 ]] && __b3bp_log debug "${@}"; true; } + +function help () { + echo "" 1>&2 + echo " ${*}" 1>&2 + echo "" 1>&2 + echo " ${__usage:-No usage available}" 1>&2 + echo "" 1>&2 + + if [[ "${__helptext:-}" ]]; then + echo " ${__helptext}" 1>&2 + echo "" 1>&2 + fi + + exit 1 +} + + +### Parse commandline options +############################################################################## + +# Commandline options. This defines the usage page, and is used to parse cli +# opts & defaults from. The parsing is unforgiving so be precise in your syntax +# - A short option must be preset for every long option; but every short option +# need not have a long option +# - `--` is respected as the separator between options and arguments +# - We do not bash-expand defaults, so setting '~/app' as a default will not resolve to ${HOME}. +# you can use bash variables to work around this (so use ${HOME} instead) + +# shellcheck disable=SC2015 +[[ "${__usage+x}" ]] || read -r -d '' __usage <<-'EOF' || true # exits non-zero when EOF encountered + -f --file [arg] Filename to process. Required. + -t --temp [arg] Location of tempfile. Default="/tmp/bar" + -v Enable verbose mode, print script as it is executed + -d --debug Enables debug mode + -h --help This page + -n --no-color Disable color output + -1 --one Do just one thing + -i --input [arg] File to process. Can be repeated. + -x Specify a flag. Can be repeated. +EOF + +# shellcheck disable=SC2015 +[[ "${__helptext+x}" ]] || read -r -d '' __helptext <<-'EOF' || true # exits non-zero when EOF encountered + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. +EOF + +# Translate usage string -> getopts arguments, and set $arg_ defaults +while read -r __b3bp_tmp_line; do + if [[ "${__b3bp_tmp_line}" =~ ^- ]]; then + # fetch single character version of option string + __b3bp_tmp_opt="${__b3bp_tmp_line%% *}" + __b3bp_tmp_opt="${__b3bp_tmp_opt:1}" + + # fetch long version if present + __b3bp_tmp_long_opt="" + + if [[ "${__b3bp_tmp_line}" = *"--"* ]]; then + __b3bp_tmp_long_opt="${__b3bp_tmp_line#*--}" + __b3bp_tmp_long_opt="${__b3bp_tmp_long_opt%% *}" + fi + + # map opt long name to+from opt short name + printf -v "__b3bp_tmp_opt_long2short_${__b3bp_tmp_long_opt//-/_}" '%s' "${__b3bp_tmp_opt}" + printf -v "__b3bp_tmp_opt_short2long_${__b3bp_tmp_opt}" '%s' "${__b3bp_tmp_long_opt//-/_}" + + # check if option takes an argument + if [[ "${__b3bp_tmp_line}" =~ \[.*\] ]]; then + __b3bp_tmp_opt="${__b3bp_tmp_opt}:" # add : if opt has arg + __b3bp_tmp_init="" # it has an arg. init with "" + printf -v "__b3bp_tmp_has_arg_${__b3bp_tmp_opt:0:1}" '%s' "1" + elif [[ "${__b3bp_tmp_line}" =~ \{.*\} ]]; then + __b3bp_tmp_opt="${__b3bp_tmp_opt}:" # add : if opt has arg + __b3bp_tmp_init="" # it has an arg. init with "" + # remember that this option requires an argument + printf -v "__b3bp_tmp_has_arg_${__b3bp_tmp_opt:0:1}" '%s' "2" + else + __b3bp_tmp_init="0" # it's a flag. init with 0 + printf -v "__b3bp_tmp_has_arg_${__b3bp_tmp_opt:0:1}" '%s' "0" + fi + __b3bp_tmp_opts="${__b3bp_tmp_opts:-}${__b3bp_tmp_opt}" + + if [[ "${__b3bp_tmp_line}" =~ ^Can\ be\ repeated\. ]] || [[ "${__b3bp_tmp_line}" =~ \.\ *Can\ be\ repeated\. ]]; then + # remember that this option can be repeated + printf -v "__b3bp_tmp_is_array_${__b3bp_tmp_opt:0:1}" '%s' "1" + else + printf -v "__b3bp_tmp_is_array_${__b3bp_tmp_opt:0:1}" '%s' "0" + fi + fi + + [[ "${__b3bp_tmp_opt:-}" ]] || continue + + if [[ "${__b3bp_tmp_line}" =~ ^Default= ]] || [[ "${__b3bp_tmp_line}" =~ \.\ *Default= ]]; then + # ignore default value if option does not have an argument + __b3bp_tmp_varname="__b3bp_tmp_has_arg_${__b3bp_tmp_opt:0:1}" + if [[ "${!__b3bp_tmp_varname}" != "0" ]]; then + # take default + __b3bp_tmp_init="${__b3bp_tmp_line##*Default=}" + # strip double quotes from default argument + __b3bp_tmp_re='^"(.*)"$' + if [[ "${__b3bp_tmp_init}" =~ ${__b3bp_tmp_re} ]]; then + __b3bp_tmp_init="${BASH_REMATCH[1]}" + else + # strip single quotes from default argument + __b3bp_tmp_re="^'(.*)'$" + if [[ "${__b3bp_tmp_init}" =~ ${__b3bp_tmp_re} ]]; then + __b3bp_tmp_init="${BASH_REMATCH[1]}" + fi + fi + fi + fi + + if [[ "${__b3bp_tmp_line}" =~ ^Required\. ]] || [[ "${__b3bp_tmp_line}" =~ \.\ *Required\. ]]; then + # remember that this option requires an argument + printf -v "__b3bp_tmp_has_arg_${__b3bp_tmp_opt:0:1}" '%s' "2" + fi + + # Init var with value unless it is an array / a repeatable + __b3bp_tmp_varname="__b3bp_tmp_is_array_${__b3bp_tmp_opt:0:1}" + [[ "${!__b3bp_tmp_varname}" = "0" ]] && printf -v "arg_${__b3bp_tmp_opt:0:1}" '%s' "${__b3bp_tmp_init}" +done <<< "${__usage:-}" + +# run getopts only if options were specified in __usage +if [[ "${__b3bp_tmp_opts:-}" ]]; then + # Allow long options like --this + __b3bp_tmp_opts="${__b3bp_tmp_opts}-:" + + # Reset in case getopts has been used previously in the shell. + OPTIND=1 + + # start parsing command line + set +o nounset # unexpected arguments will cause unbound variables + # to be dereferenced + # Overwrite $arg_ defaults with the actual CLI options + while getopts "${__b3bp_tmp_opts}" __b3bp_tmp_opt; do + [[ "${__b3bp_tmp_opt}" = "?" ]] && help "Invalid use of script: ${*} " + + if [[ "${__b3bp_tmp_opt}" = "-" ]]; then + # OPTARG is long-option-name or long-option=value + if [[ "${OPTARG}" =~ .*=.* ]]; then + # --key=value format + __b3bp_tmp_long_opt=${OPTARG/=*/} + # Set opt to the short option corresponding to the long option + __b3bp_tmp_varname="__b3bp_tmp_opt_long2short_${__b3bp_tmp_long_opt//-/_}" + printf -v "__b3bp_tmp_opt" '%s' "${!__b3bp_tmp_varname}" + OPTARG=${OPTARG#*=} + else + # --key value format + # Map long name to short version of option + __b3bp_tmp_varname="__b3bp_tmp_opt_long2short_${OPTARG//-/_}" + printf -v "__b3bp_tmp_opt" '%s' "${!__b3bp_tmp_varname}" + # Only assign OPTARG if option takes an argument + __b3bp_tmp_varname="__b3bp_tmp_has_arg_${__b3bp_tmp_opt}" + __b3bp_tmp_varvalue="${!__b3bp_tmp_varname}" + [[ "${__b3bp_tmp_varvalue}" != "0" ]] && __b3bp_tmp_varvalue="1" + printf -v "OPTARG" '%s' "${@:OPTIND:${__b3bp_tmp_varvalue}}" + # shift over the argument if argument is expected + ((OPTIND+=__b3bp_tmp_varvalue)) + fi + # we have set opt/OPTARG to the short value and the argument as OPTARG if it exists + fi + + __b3bp_tmp_value="${OPTARG}" + + __b3bp_tmp_varname="__b3bp_tmp_is_array_${__b3bp_tmp_opt:0:1}" + if [[ "${!__b3bp_tmp_varname}" != "0" ]]; then + # repeatables + # shellcheck disable=SC2016 + if [[ -z "${OPTARG}" ]]; then + # repeatable flags, they increcemnt + __b3bp_tmp_varname="arg_${__b3bp_tmp_opt:0:1}" + debug "cli arg ${__b3bp_tmp_varname} = (${__b3bp_tmp_default}) -> ${!__b3bp_tmp_varname}" + # shellcheck disable=SC2004 + __b3bp_tmp_value=$((${!__b3bp_tmp_varname} + 1)) + printf -v "${__b3bp_tmp_varname}" '%s' "${__b3bp_tmp_value}" + else + # repeatable args, they get appended to an array + __b3bp_tmp_varname="arg_${__b3bp_tmp_opt:0:1}[@]" + debug "cli arg ${__b3bp_tmp_varname} append ${__b3bp_tmp_value}" + declare -a "${__b3bp_tmp_varname}"='("${!__b3bp_tmp_varname}" "${__b3bp_tmp_value}")' + fi + else + # non-repeatables + __b3bp_tmp_varname="arg_${__b3bp_tmp_opt:0:1}" + __b3bp_tmp_default="${!__b3bp_tmp_varname}" + + if [[ -z "${OPTARG}" ]]; then + __b3bp_tmp_value=$((__b3bp_tmp_default + 1)) + fi + + printf -v "${__b3bp_tmp_varname}" '%s' "${__b3bp_tmp_value}" + + debug "cli arg ${__b3bp_tmp_varname} = (${__b3bp_tmp_default}) -> ${!__b3bp_tmp_varname}" + fi + done + set -o nounset # no more unbound variable references expected + + shift $((OPTIND-1)) + + if [[ "${1:-}" = "--" ]] ; then + shift + fi +fi + + +### Automatic validation of required option arguments +############################################################################## + +for __b3bp_tmp_varname in ${!__b3bp_tmp_has_arg_*}; do + # validate only options which required an argument + [[ "${!__b3bp_tmp_varname}" = "2" ]] || continue + + __b3bp_tmp_opt_short="${__b3bp_tmp_varname##*_}" + __b3bp_tmp_varname="arg_${__b3bp_tmp_opt_short}" + [[ "${!__b3bp_tmp_varname}" ]] && continue + + __b3bp_tmp_varname="__b3bp_tmp_opt_short2long_${__b3bp_tmp_opt_short}" + printf -v "__b3bp_tmp_opt_long" '%s' "${!__b3bp_tmp_varname}" + [[ "${__b3bp_tmp_opt_long:-}" ]] && __b3bp_tmp_opt_long=" (--${__b3bp_tmp_opt_long//_/-})" + + help "Option -${__b3bp_tmp_opt_short}${__b3bp_tmp_opt_long:-} requires an argument" +done + + +### Cleanup Environment variables +############################################################################## + +for __tmp_varname in ${!__b3bp_tmp_*}; do + unset -v "${__tmp_varname}" +done + +unset -v __tmp_varname + + +### Externally supplied __usage. Nothing else to do here +############################################################################## + +if [[ "${__b3bp_external_usage:-}" = "true" ]]; then + unset -v __b3bp_external_usage + return +fi + + +### Signal trapping and backtracing +############################################################################## + +function __b3bp_cleanup_before_exit () { + info "Cleaning up. Done" +} +trap __b3bp_cleanup_before_exit EXIT + +# requires `set -o errtrace` +__b3bp_err_report() { + local error_code=${?} + error "Error in ${__file} in function ${1} on line ${2}" + exit ${error_code} +} +# Uncomment the following line for always providing an error backtrace +# trap '__b3bp_err_report "${FUNCNAME:-.}" ${LINENO}' ERR + + +### Command-line argument switches (like -d for debugmode, -h for showing helppage) +############################################################################## + +# debug mode +if [[ "${arg_d:?}" = "1" ]]; then + set -o xtrace + PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' + LOG_LEVEL="7" + # Enable error backtracing + trap '__b3bp_err_report "${FUNCNAME:-.}" ${LINENO}' ERR +fi + +# verbose mode +if [[ "${arg_v:?}" = "1" ]]; then + set -o verbose +fi + +# no color mode +if [[ "${arg_n:?}" = "1" ]]; then + NO_COLOR="true" +fi + +# help mode +if [[ "${arg_h:?}" = "1" ]]; then + # Help exists with code 1 + help "Help using ${0}" +fi + + +### Validation. Error out if the things required for your script are not present +############################################################################## + +[[ "${arg_f:-}" ]] || help "Setting a filename with -f or --file is required" +[[ "${LOG_LEVEL:-}" ]] || emergency "Cannot continue without LOG_LEVEL. " + + +### Runtime +############################################################################## + +info "__i_am_main_script: ${__i_am_main_script}" +info "__file: ${__file}" +info "__dir: ${__dir}" +info "__base: ${__base}" +info "OSTYPE: ${OSTYPE}" + +info "arg_f: ${arg_f}" +info "arg_d: ${arg_d}" +info "arg_v: ${arg_v}" +info "arg_h: ${arg_h}" + +# shellcheck disable=SC2015 +if [[ -n "${arg_i:-}" ]] && declare -p arg_i 2> /dev/null | grep -q '^declare \-a'; then + info "arg_i:" + for input_file in "${arg_i[@]}"; do + info " - ${input_file}" + done +elif [[ -n "${arg_i:-}" ]]; then + info "arg_i: ${arg_i}" +else + info "arg_i: 0" +fi + +# shellcheck disable=SC2015 +if [[ -n "${arg_x:-}" ]] && declare -p arg_x 2> /dev/null | grep -q '^declare \-a'; then + info "arg_x: ${#arg_x[@]}" +elif [[ -n "${arg_x:-}" ]]; then + info "arg_x: ${arg_x}" +else + info "arg_x: 0" +fi + +info "$(echo -e "multiple lines example - line #1\\nmultiple lines example - line #2\\nimagine logging the output of 'ls -al /path/'")" + +# All of these go to STDERR, so you can use STDOUT for piping machine readable information to other software +debug "Info useful to developers for debugging the application, not useful during operations." +info "Normal operational messages - may be harvested for reporting, measuring throughput, etc. - no action required." +notice "Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential problems - no immediate action required." +warning "Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time." +error "Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time." +critical "Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection." +alert "Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection." +emergency "A \"panic\" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call." diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/package.json b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/package.json new file mode 100644 index 0000000..4583945 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/package.json @@ -0,0 +1,29 @@ +{ + "name": "bash3boilerplate", + "description": "Copypastable templates to write better bash scripts", + "version": "2.7.2", + "packageManager": "yarn@3.6.0+sha224.19e47520fa56c6146388fdeb438d9dcf6630c3f277a2e1180995c3bb", + "engines": { + "node": ">= 18", + "yarn": "3.6.0" + }, + "scripts": { + "lint:shellcheck": "shellcheck --severity=${SHELLCHECK_SEVERITY:-info} $(find . -name '*.sh' -maxdepth 2)", + "lint:style": "test/style.pl $(find . -name '*.sh' -maxdepth 2)", + "lint": "npm-run-all -l 'lint:**'", + "release:major": "env SEMANTIC=major yarn release", + "release:minor": "env SEMANTIC=minor yarn release", + "release:patch": "env SEMANTIC=patch yarn release", + "release": "npm version ${SEMANTIC:-patch} -m \"Release %s\" && yarn version:replace && git commit main.sh src/*.sh -m 'Update version' && git push && git push --tags -f && npm publish", + "test:debug:main:repeated": "env LOG_LEVEL=7 test/acceptance.sh main-repeated", + "test:update": "env SAVE_FIXTURES=true yarn test", + "test": "test/acceptance.sh", + "version:current": "node -e 'console.log(require(\"./package.json\").version)'", + "version:replace": "replace 'v\\d+\\.\\d+\\.\\d+' \"v$(npm run --silent version:current)\" main.sh src/*.sh" + }, + "devDependencies": { + "fakefile": "1.1.0", + "npm-run-all": "4.1.5", + "replace": "1.2.2" + } +} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/ini_val.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/ini_val.sh new file mode 100755 index 0000000..d811510 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/ini_val.sh @@ -0,0 +1,113 @@ +#!/usr/bin/env bash +# BASH3 Boilerplate: ini_val +# +# This file: +# +# - Can read and write .ini files using pure bash +# +# Limitations: +# +# - All keys inside a section of the .ini file must be unique +# - Optional comment parameter for the creation of new entries +# +# Usage as a function: +# +# source ini_val.sh +# ini_val data.ini connection.host 127.0.0.1 "Host name or IP address" +# +# Usage as a command: +# +# ini_val.sh data.ini connection.host 127.0.0.1 "Host name or IP address" +# +# Based on a template by BASH3 Boilerplate vv2.7.2 +# http://bash3boilerplate.sh/#authors +# +# The MIT License (MIT) +# Copyright (c) 2013 Kevin van Zonneveld and contributors +# You are not obligated to bundle the LICENSE file with your b3bp projects as long +# as you leave these references intact in the header comments of your source files. + +function ini_val() { + local file="${1:-}" + local sectionkey="${2:-}" + local val="${3:-}" + local comment="${4:-}" + local delim="=" + local comment_delim=";" + local section="" + local key="" + local current="" + # add default section + local section_default="default" + + if [[ ! -f "${file}" ]]; then + # touch file if not exists + touch "${file}" + fi + + # Split on . for section. However, section is optional + IFS='.' read -r section key <<< "${sectionkey}" + if [[ ! "${key}" ]]; then + key="${section}" + # default section if not given + section="${section_default}" + fi + + # get current value (if exists) + current=$(sed -En "/^\[/{h;d;};G;s/^${key}([[:blank:]]*)${delim}(.*)\n\[${section}\]$/\2/p" "${file}"|awk '{$1=$1};1') + # get current comment (if exists) + current_comment=$(sed -En "/^\[${section}\]/,/^\[.*\]/ s|^(${comment_delim}\[${key}\])(.*)|\2|p" "${file}"|awk '{$1=$1};1') + + if ! grep -q "\[${section}\]" "${file}"; then + # create section if not exists (empty line to seperate new section for better readability) + echo >> "${file}" + echo "[${section}]" >> "${file}" + fi + + if [[ ! "${val}" ]]; then + # get a value + echo "${current}" + else + # set a value + if [[ ! "${section}" ]]; then + # if no section is given, propagate the default section + section=${section_default} + fi + + if [[ ! "${comment}" ]]; then + # if no comment given, keep old comment + comment="${current_comment}" + fi + # maintenance area + # a) remove comment if new given / respect section + sed -i.bak "/^\[${section}\]/,/^\[.*\]/ s|^\(${comment_delim}\[${key}\] \).*$||" "${file}" + # b) remove old key / respect section + sed -i.bak "/^\[${section}\]/,/^\[.*\]/ s|^\(${key}=\).*$||" "${file}" + # c) remove all empty lines in ini file + sed -i.bak '/^[[:space:]]*$/d' "${file}" + # d) insert line break before every section for better readability + sed -i.bak $'s/^\\[/\\\n\\[/g' "${file}" + + # add to section + if [[ ! "${comment}" ]]; then + # add new key/value _without_ comment + RET="/\\[${section}\\]/a\\ +${key}${delim}${val}" + else + # add new key/value _with_ preceeding comment + RET="/\\[${section}\\]/a\\ +${comment_delim}[${key}] ${comment}\\ +${key}${delim}${val}" + fi + sed -i.bak -e "${RET}" "${file}" + # this .bak dance is done for BSD/GNU portability: http://stackoverflow.com/a/22084103/151666 + rm -f "${file}.bak" + fi +} + +if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + export -f ini_val +else + ini_val "${@}" + exit ${?} +fi diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/megamount.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/megamount.sh new file mode 100644 index 0000000..148ff1c --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/megamount.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash +# BASH3 Boilerplate: megamount +# +# This file: +# +# - Takes a URL (smb, nfs, afs) and tries to mount it at a given target directory +# - Forcefully unmounts any active mount at the target directory first +# - Displays the mount's contents for verification +# +# Depends on: +# +# - ./parse_url.sh +# +# Usage as a function: +# +# source megamount.sh +# megamount smb://janedoe:abc123@192.168.0.1/documents /mnt/documents +# +# Usage as a command: +# +# megamount.sh smb://janedoe:abc123@192.168.0.1/documents /mnt/documents +# +# Based on a template by BASH3 Boilerplate vv2.7.2 +# http://bash3boilerplate.sh/#authors +# +# The MIT License (MIT) +# Copyright (c) 2013 Kevin van Zonneveld and contributors +# You are not obligated to bundle the LICENSE file with your b3bp projects as long +# as you leave these references intact in the header comments of your source files. + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# shellcheck source=src/parse_url.sh +source "${__dir}/parse_url.sh" + +function megamount () { + local url="${1}" + local target="${2}" + + local proto + local user + local pass + local host + local port + local path + + proto=$(parse_url "${url}" "proto") + user=$(parse_url "${url}" "user") + pass=$(parse_url "${url}" "pass") + host=$(parse_url "${url}" "host") + port=$(parse_url "${url}" "port") + path=$(parse_url "${url}" "path") + + (umount -lf "${target}" || umount -f "${target}") > /dev/null 2>&1 || true + mkdir -p "${target}" + if [[ "${proto}" = "smb://" ]]; then + mount -t cifs --verbose -o "username=${user},password=${pass},hard" "//${host}/${path}" "${target}" + elif [[ "${proto}" = "afp://" ]]; then + # start syslog-ng + # afpfsd || echo "Unable to run afpfsd. Does /dev/log exist?" && exit 1 + mount_afp "${url}" "${target}" + elif [[ "${proto}" = "nfs://" ]]; then + mount -t nfs --verbose -o "vers=3,nolock,soft,intr,rsize=32768,wsize=32768" "${host}:/${path}" "${target}" + else + echo "ERR: Unknown protocol: '${proto}'" + exit 1 + fi + + # chmod 777 "${target}" + ls -al "${target}/" +} + +if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + export -f megamount +else + megamount "${@}" + exit ${?} +fi diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/parse_url.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/parse_url.sh new file mode 100644 index 0000000..d9d2704 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/parse_url.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +# BASH3 Boilerplate: parse_url +# +# This file: +# +# - Takes a URL and parses protocol, user, pass, host, port, path. +# +# Based on: +# +# - http://stackoverflow.com/a/6174447/151666 +# +# Usage as a function: +# +# source parse_url.sh +# parse_url 'http://johndoe:abc123@example.com:8080/index.html' pass +# +# Usage as a command: +# +# parse_url.sh 'http://johndoe:abc123@example.com:8080/index.html' +# +# Based on a template by BASH3 Boilerplate vv2.7.2 +# http://bash3boilerplate.sh/#authors +# +# The MIT License (MIT) +# Copyright (c) 2013 Kevin van Zonneveld and contributors +# You are not obligated to bundle the LICENSE file with your b3bp projects as long +# as you leave these references intact in the header comments of your source files. + +function parse_url() { + local parse="${1}" + local need="${2:-}" + + local proto + local url + local userpass + local user + local pass + local hostport + local host + local port + local path + + proto="$(echo "${parse}" | grep :// | sed -e's,^\(.*://\).*,\1,g')" + url="${parse/${proto}/}" + userpass="$(echo "${url}" | grep @ | cut -d@ -f1)" + user="$(echo "${userpass}" | grep : | cut -d: -f1)" + pass="$(echo "${userpass}" | grep : | cut -d: -f2)" + hostport="$(echo "${url/${userpass}@/}" | cut -d/ -f1)" + host="$(echo "${hostport}" | grep : | cut -d: -f1)" + port="$(echo "${hostport}" | grep : | cut -d: -f2)" + path="$(echo "${url}" | grep / | cut -d/ -f2-)" + + [[ ! "${user}" ]] && user="${userpass}" + [[ ! "${host}" ]] && host="${hostport}" + if [[ ! "${port}" ]]; then + [[ "${proto}" = "http://" ]] && port="80" + [[ "${proto}" = "https://" ]] && port="443" + [[ "${proto}" = "mysql://" ]] && port="3306" + [[ "${proto}" = "redis://" ]] && port="6379" + fi + + if [[ "${need}" ]]; then + echo "${!need}" + else + echo "" + echo " Use second argument to return just 1 variable." + echo " parse_url() demo: " + echo "" + echo " proto: ${proto}" + echo " user: ${user}" + echo " pass: ${pass}" + echo " host: ${host}" + echo " port: ${port}" + echo " path: ${path}" + echo "" + fi +} + +if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + export -f parse_url +else + parse_url "${@}" + exit ${?} +fi diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/templater.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/templater.sh new file mode 100755 index 0000000..679048f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/src/templater.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# BASH3 Boilerplate: templater +# +# This file: +# +# - takes a source (template) & destination (config) filepath argument +# - then replaces placeholders with variables found in the environment +# +# Usage as a function: +# +# source templater.sh +# export NAME=kevin +# templater input.cfg output.cfg +# +# Usage as a command: +# +# ALLOW_REMAINDERS=1 templater.sh input.cfg output.cfg +# +# Based on a template by BASH3 Boilerplate vv2.7.2 +# http://bash3boilerplate.sh/#authors +# +# The MIT License (MIT) +# Copyright (c) 2013 Kevin van Zonneveld and contributors +# You are not obligated to bundle the LICENSE file with your b3bp projects as long +# as you leave these references intact in the header comments of your source files. + +function templater() { + ALLOW_REMAINDERS="${ALLOW_REMAINDERS:-0}" + + templateSrc="${1:-}" + templateDst="${2:-}" + + if [[ ! -f "${templateSrc}" ]]; then + echo "ERROR: Template source '${templateSrc}' needs to exist" + exit 1 + fi + if [[ ! "${templateDst}" ]]; then + echo "ERROR: Template destination '${templateDst}' needs to be specified" + exit 1 + fi + + if [[ "$(command -v perl)" ]]; then + perl -p -e 's/\$\{(\w+)\}/(exists $ENV{$1} ? $ENV{$1} : "\${$1}")/eg' < "${templateSrc}" > "${templateDst}" + else + cp -f "${templateSrc}" "${templateDst}" + + for var in $(env |awk -F= '{print $1}' |grep -E '^(_[A-Z0-9_]+|[A-Z0-9][A-Z0-9_]*)$'); do + sed -i.bak -e "s#\${${var}}#${!var//#/\\#/}#g" "${templateDst}" + # this .bak dance is done for BSD/GNU portability: http://stackoverflow.com/a/22084103/151666 + rm -f "${templateDst}.bak" + done + fi + + # cat "${templateDst}" + + # shellcheck disable=SC2016 + if grep '${' "${templateDst}" && [[ "${ALLOW_REMAINDERS}" = "0" ]]; then + echo "ERROR: Unable to replace the above template vars" + exit 1 + fi +} + +if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then + export -f templater +else + templater "${@}" + exit ${?} +fi diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/acceptance.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/acceptance.sh new file mode 100755 index 0000000..392d675 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/acceptance.sh @@ -0,0 +1,232 @@ +#!/usr/bin/env bash +# This file: +# +# - Executes one (or all) test scenarios +# - Replaces dynamic things like hostnames, IPs, dates, etc +# - Optionally saves the results as fixtures, that later runs will be compared against +# +# Usage: +# +# ./deploy.sh +# +# Based on a template by BASH3 Boilerplate v2.0.0 +# http://bash3boilerplate.sh/#authors +# +# The MIT License (MIT) +# Copyright (c) 2013 Kevin van Zonneveld and contributors +# You are not obligated to bundle the LICENSE file with your b3bp projects as long +# as you leave these references intact in the header comments of your source files. + +# Exit on error. Append || true if you expect an error. +set -o errexit +# Exit on error inside any functions or subshells. +set -o errtrace +# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR +set -o nounset +# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip` +set -o pipefail +# Turn on traces, useful while debugging but commented out by default +# set -o xtrace + +# Set magic variables for current file, directory, os, etc. +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__file="${__dir}/$(basename "${BASH_SOURCE[0]}")" +__base="$(basename "${__file}" .sh)" +__root="$(cd "$(dirname "${__dir}")" && pwd)" + +__sysTmpDir="${TMPDIR:-/tmp}" +__sysTmpDir="${__sysTmpDir%/}" # <-- remove trailing slash on macosx +__accptstTmpDir=$(mktemp -d "${__sysTmpDir}/${__base}.XXXXXX") + +function cleanup_before_exit () { rm -r "${__accptstTmpDir:?}"; } +trap cleanup_before_exit EXIT + +cmdSed="sed" +cmdTimeout="timeout" + +if [[ "${OSTYPE}" = "darwin"* ]]; then + cmdSed="gsed" + cmdTimeout="gtimeout" +fi + +if [[ ! "$(command -v ${cmdSed})" ]]; then + echo "Please install ${cmdSed}" + exit 1 +fi + +if [[ ! "$(command -v ${cmdTimeout})" ]]; then + echo "Please install ${cmdTimeout}" + exit 1 +fi + +__node="$(command -v node)" +__arch="amd64" + +# explicitly setting NO_COLOR to false will make b3bp ignore TERM +# not being "xterm*" or "screen*" and STDERR not being connected to a terminal +# it's the opposite of NO_COLOR="true" - it forces color, no matter what +export NO_COLOR="false" + +# Running prepare before other scenarios is important on Travis, +# so that stdio can diverge - and we can enforce stricter +# stdio comparison on all other tests. +while IFS=$'\n' read -r scenario; do + scenario="$(dirname "${scenario}")" + scenario="${scenario##${__dir}/scenario/}" + + [[ "${scenario}" = "prepare" ]] && continue + [[ "${1:-}" ]] && [[ "${scenario}" != "${1}" ]] && continue + + echo "==> Scenario: ${scenario}" + pushd "${__dir}/scenario/${scenario}" > /dev/null + + # Run scenario + (${cmdTimeout} --kill-after=6m 5m bash ./run.sh \ + > "${__accptstTmpDir}/${scenario}.stdio" 2>&1; \ + echo "${?}" > "${__accptstTmpDir}/${scenario}.exitcode" \ + ) || true + + # Clear out environmental specifics + for typ in stdio exitcode; do + curFile="${__accptstTmpDir}/${scenario}.${typ}" + "${cmdSed}" -i \ + -e "s@${__node}@{node}@g" "${curFile}" \ + -e "s@${__root}@{root}@g" "${curFile}" \ + -e "s@${__sysTmpDir}@{tmpdir}@g" "${curFile}" \ + -e "s@/tmp@{tmpdir}@g" "${curFile}" \ + -e "s@${HOME:-/home/travis}@{home}@g" "${curFile}" \ + -e "s@${USER:-travis}@{user}@g" "${curFile}" \ + -e "s@travis@{user}@g" "${curFile}" \ + -e "s@kvz@{user}@g" "${curFile}" \ + -e "s@{root}/node_modules/\\.bin/node@{node}@g" "${curFile}" \ + -e "s@{home}/build/{user}/fre{node}@{node}@g" "${curFile}" \ + -e "s@${HOSTNAME}@{hostname}@g" "${curFile}" \ + -e "s@${__arch}@{arch}@g" "${curFile}" \ + -e "s@${OSTYPE}@{OSTYPE}@g" "${curFile}" \ + -e "s@OSX@{os}@g" "${curFile}" \ + -e "s@Linux@{os}@g" "${curFile}" \ + || false + + if grep -q 'ACCPTST:STDIO_REPLACE_IPS' "${curFile}"; then + "${cmdSed}" -i \ + -r 's@[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}@{ip}@g' \ + "${curFile}" + + # IPs vary in length. Ansible uses padding. {ip} does not vary in length + # so kill the padding after it for consistent output + "${cmdSed}" -i \ + -r 's@\{ip\}\s+@{ip} @g' \ + "${curFile}" + fi + if grep -q 'ACCPTST:STDIO_REPLACE_UUIDS' "${curFile}"; then + "${cmdSed}" -i \ + -r 's@[0-9a-f\-]{32,40}@{uuid}@g' \ + "${curFile}" + fi + if grep -q 'ACCPTST:STDIO_REPLACE_BIGINTS' "${curFile}"; then + # Such as: 3811298194 + "${cmdSed}" -i \ + -r 's@[0-9]{7,64}@{bigint}@g' \ + "${curFile}" + fi + if grep -q 'ACCPTST:STDIO_REPLACE_DATETIMES' "${curFile}"; then + # Such as: 2016-02-10 15:38:44.420094 + "${cmdSed}" -i \ + -r 's@[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}@{datetime}@g' \ + "${curFile}" + fi + if grep -q 'ACCPTST:STDIO_REPLACE_LONGTIMES' "${curFile}"; then + # Such as: 2016-02-10 15:38:44.420094 + "${cmdSed}" -i \ + -r 's@[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{6}@{longtime}@g' \ + "${curFile}" + fi + if grep -q 'ACCPTST:STDIO_REPLACE_DURATIONS' "${curFile}"; then + # Such as: 0:00:00.001991 + "${cmdSed}" -i \ + -r 's@[0-9]{1,2}:[0-9]{2}:[0-9]{2}.[0-9]{6}@{duration}@g' \ + "${curFile}" + fi + if grep -q 'ACCPTST:STDIO_REPLACE_REMOTE_EXEC' "${curFile}"; then + grep -Ev 'remote-exec\): [ a-zA-Z]' "${curFile}" > "${__sysTmpDir}/accptst-filtered.txt" + mv "${__sysTmpDir}/accptst-filtered.txt" "${curFile}" + fi + done + + # Save these as new fixtures? + if [[ "${SAVE_FIXTURES:-}" = "true" ]]; then + for typ in stdio exitcode; do + curFile="${__accptstTmpDir}/${scenario}.${typ}" + cp -f \ + "${curFile}" \ + "${__dir}/fixture/${scenario}.${typ}" + done + fi + + # Compare + for typ in stdio exitcode; do + curFile="${__accptstTmpDir}/${scenario}.${typ}" + + echo -n " comparing ${typ}.. " + + if [[ "${typ}" = "stdio" ]]; then + if grep -q 'ACCPTST:STDIO_SKIP_COMPARE' "${curFile}"; then + echo "skip" + continue + fi + fi + + if ! diff --strip-trailing-cr "${__dir}/fixture/${scenario}.${typ}" "${curFile}"; then + echo -e "\\n\\n==> MISMATCH OF: ${scenario}.${typ} ---^" + echo -e "\\n\\n==> EXPECTED STDIO: " + cat "${__dir}/fixture/${scenario}.stdio" || true + echo -e "\\n\\n==> ACTUAL STDIO: " + cat "${__accptstTmpDir}/${scenario}.stdio" || true + exit 1 + fi + + echo "✓" + done + + popd > /dev/null +done <<< "$(find "${__dir}/scenario" -type f -iname 'run.sh')" + +[[ "${1:-}" ]] && exit 0 + +# Ensure correct syntax with all available bashes + +# shellcheck disable=SC2230 +# "command -v" is not a substitute for "which -a" +while IFS=$'\n' read -r bash; do + if [[ "${bash:-}" = "" ]]; then + continue + fi + # shellcheck disable=SC2016 + echo "==> ${bash} -n $(${bash} -c 'echo "(${BASH_VERSION})"')" + pushd "${__root}" > /dev/null + + failed="false" + + while IFS=$'\n' read -r file; do + [[ "${file}" =~ ^\./node_modules/ ]] && continue + + echo -n " ${file}.. " + + if ! "${bash}" -n "${file}" 2>> "${__accptstTmpDir}/${bash//\//.}.err"; then + echo "✗" + failed="true" + continue + fi + + echo "✓" + done <<< "$(find . -type f -iname '*.sh')" + + popd > /dev/null + + if [[ "${failed}" = "true" ]]; then + cat "${__accptstTmpDir}/${bash//\//.}.err" + exit 1 + fi +done <<< "$(which -a bash 2>/dev/null)" + +exit 0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/.empty b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/.empty new file mode 100644 index 0000000..e69de29 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/double-source.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/double-source.exitcode new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/double-source.exitcode @@ -0,0 +1 @@ +1 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/double-source.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/double-source.stdio new file mode 100644 index 0000000..007a82b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/double-source.stdio @@ -0,0 +1,25 @@ +ACCPTST:STDIO_REPLACE_DATETIMES +{datetime} UTC [ debug] cli arg arg_f = () -> {tmpdir}/x +{datetime} UTC [ info] __i_am_main_script: 0 +{datetime} UTC [ info] __file: {root}/example.sh +{datetime} UTC [ info] __dir: {root} +{datetime} UTC [ info] __base: example +{datetime} UTC [ info] OSTYPE: {OSTYPE} +{datetime} UTC [ info] arg_f: {tmpdir}/x +{datetime} UTC [ info] arg_d: 0 +{datetime} UTC [ info] arg_v: 0 +{datetime} UTC [ info] arg_h: 0 +{datetime} UTC [ info] arg_i: 0 +{datetime} UTC [ info] arg_x: 0 +{datetime} UTC [ info] multiple lines example - line #1 +{datetime} UTC [ info] multiple lines example - line #2 +{datetime} UTC [ info] imagine logging the output of 'ls -al /path/' +{datetime} UTC [ debug] Info useful to developers for debugging the application, not useful during operations. +{datetime} UTC [ info] Normal operational messages - may be harvested for reporting, measuring throughput, etc. - no action required. +{datetime} UTC [ notice] Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential problems - no immediate action required. +{datetime} UTC [ warning] Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time. +{datetime} UTC [ error] Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time. +{datetime} UTC [ critical] Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection. +{datetime} UTC [ alert] Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection. +{datetime} UTC [emergency] A "panic" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call. +{datetime} UTC [ info] Cleaning up. Done diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/ini_val.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/ini_val.exitcode new file mode 100644 index 0000000..573541a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/ini_val.exitcode @@ -0,0 +1 @@ +0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/ini_val.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/ini_val.stdio new file mode 100644 index 0000000..28b4c44 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/ini_val.stdio @@ -0,0 +1,42 @@ +--> command: Read 3 values +exists +127.0.0.1 +nginx, nodejs + +--> command: Replace three values in-place and show result + +[default] +orphan=no more + +[connection] +host=192.168.0.1 + +[software] +packages=vim + +[comment] +;[command] got this new comment +command=works like a chame +;[new_command] last addition will be moved downwards again after next command +new_command=commented too +--> function: Read 3 values +exists +127.0.0.1 +nginx, nodejs + +--> function: Replace three values in-place and show result + +[default] +orphan=no more + +[connection] +host=192.168.0.1 + +[software] +packages=vim + +[comment] +;[command] got this new comment +command=works like a chame +;[new_command] last addition will be moved downwards again after next command +new_command=commented too diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-debug.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-debug.exitcode new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-debug.exitcode @@ -0,0 +1 @@ +1 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-debug.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-debug.stdio new file mode 100644 index 0000000..0f83fa5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-debug.stdio @@ -0,0 +1,25 @@ +ACCPTST:STDIO_REPLACE_DATETIMES +{datetime} UTC [ debug] cli arg arg_f = () -> {tmpdir}/x +{datetime} UTC [ info] __i_am_main_script: 1 +{datetime} UTC [ info] __file: {root}/main.sh +{datetime} UTC [ info] __dir: {root} +{datetime} UTC [ info] __base: main +{datetime} UTC [ info] OSTYPE: {OSTYPE} +{datetime} UTC [ info] arg_f: {tmpdir}/x +{datetime} UTC [ info] arg_d: 0 +{datetime} UTC [ info] arg_v: 0 +{datetime} UTC [ info] arg_h: 0 +{datetime} UTC [ info] arg_i: 0 +{datetime} UTC [ info] arg_x: 0 +{datetime} UTC [ info] multiple lines example - line #1 +{datetime} UTC [ info] multiple lines example - line #2 +{datetime} UTC [ info] imagine logging the output of 'ls -al /path/' +{datetime} UTC [ debug] Info useful to developers for debugging the application, not useful during operations. +{datetime} UTC [ info] Normal operational messages - may be harvested for reporting, measuring throughput, etc. - no action required. +{datetime} UTC [ notice] Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential problems - no immediate action required. +{datetime} UTC [ warning] Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time. +{datetime} UTC [ error] Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time. +{datetime} UTC [ critical] Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection. +{datetime} UTC [ alert] Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection. +{datetime} UTC [emergency] A "panic" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call. +{datetime} UTC [ info] Cleaning up. Done diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-help.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-help.exitcode new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-help.exitcode @@ -0,0 +1 @@ +1 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-help.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-help.stdio new file mode 100644 index 0000000..b8437bd --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-help.stdio @@ -0,0 +1,19 @@ +ACCPTST:STDIO_REPLACE_DATETIMES + + Help using {root}/main.sh + + -f --file [arg] Filename to process. Required. + -t --temp [arg] Location of tempfile. Default="{tmpdir}/bar" + -v Enable verbose mode, print script as it is executed + -d --debug Enables debug mode + -h --help This page + -n --no-color Disable color output + -1 --one Do just one thing + -i --input [arg] File to process. Can be repeated. + -x Specify a flag. Can be repeated. + + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. + +{datetime} UTC [ info] Cleaning up. Done diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-longopt.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-longopt.exitcode new file mode 100644 index 0000000..573541a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-longopt.exitcode @@ -0,0 +1 @@ +0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-longopt.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-longopt.stdio new file mode 100644 index 0000000..690d0a6 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-longopt.stdio @@ -0,0 +1,4 @@ +ACCPTST:STDIO_REPLACE_DATETIMES +{datetime} UTC [ info] arg_f: {tmpdir}/x +{datetime} UTC [ info] arg_f: {tmpdir}/x +{datetime} UTC [ info] arg_f: {tmpdir}/x diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-nocolor.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-nocolor.exitcode new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-nocolor.exitcode @@ -0,0 +1 @@ +1 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-nocolor.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-nocolor.stdio new file mode 100644 index 0000000..5200e7f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-nocolor.stdio @@ -0,0 +1,25 @@ +ACCPTST:STDIO_REPLACE_DATETIMES +{datetime} UTC [ debug] cli arg arg_f = () -> {tmpdir}/x +{datetime} UTC [ info] __i_am_main_script: 1 +{datetime} UTC [ info] __file: {root}/main.sh +{datetime} UTC [ info] __dir: {root} +{datetime} UTC [ info] __base: main +{datetime} UTC [ info] OSTYPE: {OSTYPE} +{datetime} UTC [ info] arg_f: {tmpdir}/x +{datetime} UTC [ info] arg_d: 0 +{datetime} UTC [ info] arg_v: 0 +{datetime} UTC [ info] arg_h: 0 +{datetime} UTC [ info] arg_i: 0 +{datetime} UTC [ info] arg_x: 0 +{datetime} UTC [ info] multiple lines example - line #1 +{datetime} UTC [ info] multiple lines example - line #2 +{datetime} UTC [ info] imagine logging the output of 'ls -al /path/' +{datetime} UTC [ debug] Info useful to developers for debugging the application, not useful during operations. +{datetime} UTC [ info] Normal operational messages - may be harvested for reporting, measuring throughput, etc. - no action required. +{datetime} UTC [ notice] Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential problems - no immediate action required. +{datetime} UTC [ warning] Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time. +{datetime} UTC [ error] Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time. +{datetime} UTC [ critical] Should be corrected immediately, but indicates failure in a primary system, an example is a loss of a backup ISP connection. +{datetime} UTC [ alert] Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection. +{datetime} UTC [emergency] A "panic" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call. +{datetime} UTC [ info] Cleaning up. Done diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-repeated.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-repeated.exitcode new file mode 100644 index 0000000..573541a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-repeated.exitcode @@ -0,0 +1 @@ +0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-repeated.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-repeated.stdio new file mode 100644 index 0000000..5d27ec1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-repeated.stdio @@ -0,0 +1,9 @@ +ACCPTST:STDIO_REPLACE_DATETIMES +{datetime} UTC [ info] arg_i: +{datetime} UTC [ info] - simple_input +{datetime} UTC [ info] - input_in_quotes +{datetime} UTC [ info] - input with spaces +{datetime} UTC [ info] - input with "quotes" +{datetime} UTC [ info] - last_input +{datetime} UTC [ info] arg_x: 3 +{datetime} UTC [ info] arg_x: 4 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-defaults.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-defaults.exitcode new file mode 100644 index 0000000..573541a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-defaults.exitcode @@ -0,0 +1 @@ +0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-defaults.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-defaults.stdio new file mode 100644 index 0000000..2b93b13 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-defaults.stdio @@ -0,0 +1,7 @@ +ACCPTST:STDIO_REPLACE_DATETIMES +{datetime} UTC [ info] arg_1: 0 +{datetime} UTC [ info] arg_2: 0 +{datetime} UTC [ info] arg_3: 'THREE' +{datetime} UTC [ info] arg_4: "FOUR" +{datetime} UTC [ info] arg_5: OOOPS +{datetime} UTC [ info] arg_6: diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-validation.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-validation.exitcode new file mode 100644 index 0000000..573541a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-validation.exitcode @@ -0,0 +1 @@ +0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-validation.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-validation.stdio new file mode 100644 index 0000000..e3968cb --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/main-usage-validation.stdio @@ -0,0 +1,169 @@ +ACCPTST:STDIO_REPLACE_DATETIMES +# complain about -3 + + Option -3 (--three) requires an argument + + -0 --zero Do nothing. + -1 --one Do one thing. Required. + More description. + -2 --two Do two things. + More. Required. Description. + -3 --three [arg] Do three things. + Required. + -4 --four {arg} Do four things. + -5 --five {arg} Do five things. Required. Maybe. + -6 --six [arg] Do six things. Not Required. + Required, it is not. + -7 --seven [arg] Required. Or bust. + -8 --eight [arg] Do eight things. + More.Required.Description. + -a [arg] Do A. Required. + Default="do-a" + -b {arg} Do B.Default="do-b" + -c [arg] Required. Default="do-c" + -d {arg} Default="do-d" + + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. + +# complain about -4 + + Option -4 (--four) requires an argument + + -0 --zero Do nothing. + -1 --one Do one thing. Required. + More description. + -2 --two Do two things. + More. Required. Description. + -3 --three [arg] Do three things. + Required. + -4 --four {arg} Do four things. + -5 --five {arg} Do five things. Required. Maybe. + -6 --six [arg] Do six things. Not Required. + Required, it is not. + -7 --seven [arg] Required. Or bust. + -8 --eight [arg] Do eight things. + More.Required.Description. + -a [arg] Do A. Required. + Default="do-a" + -b {arg} Do B.Default="do-b" + -c [arg] Required. Default="do-c" + -d {arg} Default="do-d" + + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. + +# complain about -5 + + Option -5 (--five) requires an argument + + -0 --zero Do nothing. + -1 --one Do one thing. Required. + More description. + -2 --two Do two things. + More. Required. Description. + -3 --three [arg] Do three things. + Required. + -4 --four {arg} Do four things. + -5 --five {arg} Do five things. Required. Maybe. + -6 --six [arg] Do six things. Not Required. + Required, it is not. + -7 --seven [arg] Required. Or bust. + -8 --eight [arg] Do eight things. + More.Required.Description. + -a [arg] Do A. Required. + Default="do-a" + -b {arg} Do B.Default="do-b" + -c [arg] Required. Default="do-c" + -d {arg} Default="do-d" + + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. + +# complain about -8 (because -7 syntax is not supported) + + Option -8 (--eight) requires an argument + + -0 --zero Do nothing. + -1 --one Do one thing. Required. + More description. + -2 --two Do two things. + More. Required. Description. + -3 --three [arg] Do three things. + Required. + -4 --four {arg} Do four things. + -5 --five {arg} Do five things. Required. Maybe. + -6 --six [arg] Do six things. Not Required. + Required, it is not. + -7 --seven [arg] Required. Or bust. + -8 --eight [arg] Do eight things. + More.Required.Description. + -a [arg] Do A. Required. + Default="do-a" + -b {arg} Do B.Default="do-b" + -c [arg] Required. Default="do-c" + -d {arg} Default="do-d" + + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. + +# complain about -d (because -d syntax is not supported) + + Option -d requires an argument + + -0 --zero Do nothing. + -1 --one Do one thing. Required. + More description. + -2 --two Do two things. + More. Required. Description. + -3 --three [arg] Do three things. + Required. + -4 --four {arg} Do four things. + -5 --five {arg} Do five things. Required. Maybe. + -6 --six [arg] Do six things. Not Required. + Required, it is not. + -7 --seven [arg] Required. Or bust. + -8 --eight [arg] Do eight things. + More.Required.Description. + -a [arg] Do A. Required. + Default="do-a" + -b {arg} Do B.Default="do-b" + -c [arg] Required. Default="do-c" + -d {arg} Default="do-d" + + This is Bash3 Boilerplate's help text. Feel free to add any description of your + program or elaborate more on command-line arguments. This section is not + parsed and will be added as-is to the help. + +# complain about nothing +{datetime} UTC [ info] arg_0: 0 +{datetime} UTC [ info] arg_1: 0 +{datetime} UTC [ info] arg_2: 0 +{datetime} UTC [ info] arg_3: arg3 +{datetime} UTC [ info] arg_4: arg4 +{datetime} UTC [ info] arg_5: arg5 +{datetime} UTC [ info] arg_6: +{datetime} UTC [ info] arg_7: +{datetime} UTC [ info] arg_8: arg8 +{datetime} UTC [ info] arg_a: do-a +{datetime} UTC [ info] arg_b: do-b +{datetime} UTC [ info] arg_c: do-c +{datetime} UTC [ info] arg_d: argd +# test for issue #108 +{datetime} UTC [ info] arg_0: 1 +{datetime} UTC [ info] arg_1: 0 +{datetime} UTC [ info] arg_2: 0 +{datetime} UTC [ info] arg_3: arg3 +{datetime} UTC [ info] arg_4: value +{datetime} UTC [ info] arg_5: arg5 +{datetime} UTC [ info] arg_6: +{datetime} UTC [ info] arg_7: +{datetime} UTC [ info] arg_8: arg8 +{datetime} UTC [ info] arg_a: do-a +{datetime} UTC [ info] arg_b: do-b +{datetime} UTC [ info] arg_c: do-c +{datetime} UTC [ info] arg_d: argd diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/megamount.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/megamount.exitcode new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/megamount.exitcode @@ -0,0 +1 @@ +1 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/megamount.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/megamount.stdio new file mode 100644 index 0000000..5859c6a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/megamount.stdio @@ -0,0 +1,2 @@ +ERR: Unknown protocol: 'foobarfs://' +ERR: Unknown protocol: 'foobarfs://' diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/parse_url.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/parse_url.exitcode new file mode 100644 index 0000000..573541a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/parse_url.exitcode @@ -0,0 +1 @@ +0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/parse_url.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/parse_url.stdio new file mode 100644 index 0000000..00e30b1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/parse_url.stdio @@ -0,0 +1,24 @@ +abc123 + + Use second argument to return just 1 variable. + parse_url() demo: + + proto: http:// + user: johndoe + pass: abc123 + host: example.com + port: 8080 + path: index.html + +abc123 + + Use second argument to return just 1 variable. + parse_url() demo: + + proto: http:// + user: johndoe + pass: abc123 + host: example.com + port: 8080 + path: index.html + diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/templater.exitcode b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/templater.exitcode new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/templater.exitcode @@ -0,0 +1 @@ +1 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/templater.stdio b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/templater.stdio new file mode 100644 index 0000000..3a63574 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/fixture/templater.stdio @@ -0,0 +1,14 @@ +-- +[connection] +host = 127.0.0.1 +-- +[connection] +host = 127.0.0.1 +-- +port = ${I_DONT_EXIST} +[connection] +host = 127.0.0.1 +port = ${I_DONT_EXIST} +-- +port = ${I_DONT_EXIST} +ERROR: Unable to replace the above template vars diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/double-source/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/double-source/run.sh new file mode 100644 index 0000000..29d5ccb --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/double-source/run.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +export LOG_LEVEL=7 + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +# shellcheck source=example.sh +source "${__root}/example.sh" -f /tmp/x diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/ini_val/data.ini b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/ini_val/data.ini new file mode 100644 index 0000000..450248d --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/ini_val/data.ini @@ -0,0 +1,8 @@ +[default] +orphan=exists + +[connection] +host=127.0.0.1 + +[software] +packages=nginx, nodejs diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/ini_val/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/ini_val/run.sh new file mode 100755 index 0000000..efc4941 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/ini_val/run.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +# Set magic variables for current FILE & DIR +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +# echo "ACCPTST:STDIO_REPLACE_DATETIMES" + + +# Use as standalone: +cp -f data.ini dummy.ini +echo "--> command: Read 3 values" +bash "${__root}/src/ini_val.sh" ./dummy.ini orphan +bash "${__root}/src/ini_val.sh" ./dummy.ini connection.host +bash "${__root}/src/ini_val.sh" ./dummy.ini software.packages +bash "${__root}/src/ini_val.sh" ./dummy.ini comment.command + +echo "--> command: Replace three values in-place and show result" +bash "${__root}/src/ini_val.sh" ./dummy.ini orphan "no more" +bash "${__root}/src/ini_val.sh" ./dummy.ini connection.host "192.168.0.1" +bash "${__root}/src/ini_val.sh" ./dummy.ini software.packages "vim" + +bash "${__root}/src/ini_val.sh" ./dummy.ini comment.command "commented" "this key is commented" +bash "${__root}/src/ini_val.sh" ./dummy.ini comment.new_command "commented too" "last addition will be moved downwards again after next command" +bash "${__root}/src/ini_val.sh" ./dummy.ini comment.command "works like a chame" "got this new comment" +cat dummy.ini +rm -f dummy.ini + +# Use as include: +cp -f data.ini dummy.ini + +# shellcheck source=main.sh +source "${__root}/src/ini_val.sh" + +echo "--> function: Read 3 values" +ini_val ./dummy.ini orphan +ini_val ./dummy.ini connection.host +ini_val ./dummy.ini software.packages +ini_val ./dummy.ini comment.command + +echo "--> function: Replace three values in-place and show result" +ini_val ./dummy.ini orphan "no more" +ini_val ./dummy.ini connection.host "192.168.0.1" +ini_val ./dummy.ini software.packages "vim" + +ini_val ./dummy.ini comment.command "commented" "this key is commited" +ini_val ./dummy.ini comment.new_command "commented too" "last addition will be moved downwards again after next command" +ini_val ./dummy.ini comment.command "works like a chame" "got this new comment" +cat dummy.ini +rm -f dummy.ini diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-debug/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-debug/run.sh new file mode 100644 index 0000000..a7407e4 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-debug/run.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +env LOG_LEVEL=7 bash "${__root}/main.sh" -f /tmp/x diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-help/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-help/run.sh new file mode 100755 index 0000000..b600c25 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-help/run.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +bash "${__root}/main.sh" -f /tmp/x -h diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-longopt/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-longopt/run.sh new file mode 100644 index 0000000..3d2cc77 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-longopt/run.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# set -o pipefail +# set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +( + env LOG_LEVEL=6 bash "${__root}/main.sh" --file /tmp/x; + env LOG_LEVEL=6 bash "${__root}/main.sh" --file=/tmp/x; + env LOG_LEVEL=6 bash "${__root}/main.sh" -f /tmp/x +) 2>&1 |grep arg_f diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-nocolor/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-nocolor/run.sh new file mode 100644 index 0000000..a7971bf --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-nocolor/run.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +env LOG_LEVEL=7 NO_COLOR=true bash "${__root}/main.sh" -f /tmp/x diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-repeated/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-repeated/run.sh new file mode 100644 index 0000000..b72b7c1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-repeated/run.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# set -o pipefail +# set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +( + env LOG_LEVEL="${LOG_LEVEL:-6}" bash "${__root}/main.sh" -f dummy -i simple_input -i "input_in_quotes" -i "input with spaces" -i "input with \"quotes\"" -i last_input +) 2>&1 |grep arg_i -A 5 + +( + env LOG_LEVEL="${LOG_LEVEL:-6}" bash "${__root}/main.sh" -x -f dummy -x -x + env LOG_LEVEL="${LOG_LEVEL:-6}" bash "${__root}/main.sh" -f dummy -xxxx +) 2>&1 |grep arg_x diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-usage-defaults/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-usage-defaults/run.sh new file mode 100755 index 0000000..d0c7703 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-usage-defaults/run.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +read -r -d '' __usage <<-'EOF' || true # exits non-zero when EOF encountered + -1 --one Do one thing. Default="ONE" + More description. + -2 --two Do two things. + More description. Default="TWO" + -3 --three [arg] Do three things. Default="'THREE'" + More description. + -4 --four [arg] Do four things. + More description. Default='"FOUR"' + -5 --five [arg] Do five things. Default="FIVE" + More description. Default='OOOPS' + -6 --six [arg] Do six things. + More description. +EOF + +export __usage + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +# shellcheck source=main.sh +source "${__root}/main.sh" + +for argument in ${!arg_*}; do info "${argument}: ${!argument}"; done diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-usage-validation/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-usage-validation/run.sh new file mode 100755 index 0000000..60fa066 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/main-usage-validation/run.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# shellcheck source=main.sh + +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +read -r -d '' __usage <<-'EOF' || true # exits non-zero when EOF encountered + -0 --zero Do nothing. + -1 --one Do one thing. Required. + More description. + -2 --two Do two things. + More. Required. Description. + -3 --three [arg] Do three things. + Required. + -4 --four {arg} Do four things. + -5 --five {arg} Do five things. Required. Maybe. + -6 --six [arg] Do six things. Not Required. + Required, it is not. + -7 --seven [arg] Required. Or bust. + -8 --eight [arg] Do eight things. + More.Required.Description. + -a [arg] Do A. Required. + Default="do-a" + -b {arg} Do B.Default="do-b" + -c [arg] Required. Default="do-c" + -d {arg} Default="do-d" +EOF + +export __usage +export NO_COLOR="true" + +echo "ACCPTST:STDIO_REPLACE_DATETIMES" + +echo "# complain about -3" +(source "${__root}/main.sh") || true + +echo "# complain about -4" +(source "${__root}/main.sh" -3 arg3) || true + +echo "# complain about -5" +(source "${__root}/main.sh" -3 arg3 -4 arg4) || true + +echo "# complain about -8 (because -7 syntax is not supported)" +(source "${__root}/main.sh" -3 arg3 -4 arg4 -5 arg5) || true + +echo "# complain about -d (because -d syntax is not supported)" +(source "${__root}/main.sh" -3 arg3 -4 arg4 -5 arg5 -8 arg8) || true + +echo "# complain about nothing" +( + source "${__root}/main.sh" -3 arg3 -4 arg4 -5 arg5 -8 arg8 -d argd + for argument in ${!arg_*}; do info "${argument}: ${!argument}"; done +) + +echo "# test for issue #108" +( + source "${__root}/main.sh" -3 arg3 -5 arg5 -8 arg8 -d argd --four value --zero + for argument in ${!arg_*}; do info "${argument}: ${!argument}"; done +) diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/megamount/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/megamount/run.sh new file mode 100644 index 0000000..517cff5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/megamount/run.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +__sysTmpDir="${TMPDIR:-/tmp}" +__sysTmpDir="${__sysTmpDir%/}" # <-- remove trailing slash on macosx + +# Currently I only know how to test a failing condition here since +# it's too invasive to create actual mounts to play with on a system + +bash "${__root}/src/megamount.sh" 'foobarfs://janedoe:abc123@192.168.0.1/documents' "${__sysTmpDir}/mnt/documents" || true + +# shellcheck source=src/megamount.sh +source "${__root}/src/megamount.sh" + +megamount 'foobarfs://janedoe:abc123@192.168.0.1/documents' "${__sysTmpDir}/mnt/documents" diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/parse_url/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/parse_url/run.sh new file mode 100644 index 0000000..47a18aa --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/parse_url/run.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +bash "${__root}/src/parse_url.sh" 'http://johndoe:abc123@example.com:8080/index.html' pass +bash "${__root}/src/parse_url.sh" 'http://johndoe:abc123@example.com:8080/index.html' + +# shellcheck source=src/parse_url.sh +source "${__root}/src/parse_url.sh" + +parse_url 'http://johndoe:abc123@example.com:8080/index.html' pass +parse_url 'http://johndoe:abc123@example.com:8080/index.html' diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/app.template.cfg b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/app.template.cfg new file mode 100644 index 0000000..dc3f85f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/app.template.cfg @@ -0,0 +1,2 @@ +[connection] +host = ${TARGET_HOST} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/break.template.cfg b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/break.template.cfg new file mode 100644 index 0000000..e265cba --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/break.template.cfg @@ -0,0 +1,3 @@ +[connection] +host = ${TARGET_HOST} +port = ${I_DONT_EXIST} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/run.sh b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/run.sh new file mode 100644 index 0000000..da0abbf --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/scenario/templater/run.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -o pipefail +set -o errexit +set -o nounset +# set -o xtrace + +__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +__file="${__dir}/$(basename "${BASH_SOURCE[0]}")" +__base="$(basename "${__file}" .sh)" + +__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)" + +__templaterTmpFile=$(mktemp "${TMPDIR:-/tmp}/${__base}.XXXXXX") +function cleanup_before_exit () { rm "${__templaterTmpFile:?}"; } +trap cleanup_before_exit EXIT + +echo "--" +env TARGET_HOST="127.0.0.1" bash "${__root}/src/templater.sh" ./app.template.cfg "${__templaterTmpFile}" +cat "${__templaterTmpFile}" + +echo "--" +export TARGET_HOST="127.0.0.1" + +# shellcheck source=src/templater.sh +source "${__root}/src/templater.sh" + +templater ./app.template.cfg "${__templaterTmpFile}" +cat "${__templaterTmpFile}" + +echo "--" +env ALLOW_REMAINDERS="1" TARGET_HOST="127.0.0.1" bash "${__root}/src/templater.sh" ./break.template.cfg "${__templaterTmpFile}" +cat "${__templaterTmpFile}" + +echo "--" +env TARGET_HOST="127.0.0.1" bash "${__root}/src/templater.sh" ./break.template.cfg "${__templaterTmpFile}" +cat "${__templaterTmpFile}" diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/style.pl b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/style.pl new file mode 100755 index 0000000..9dffcb5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/test/style.pl @@ -0,0 +1,45 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +die "usage: $0 \n" if (not @ARGV); + +my $rc = 0; +my $file = shift; + +open(my $fh, '<', $file) or die "Cannot open \`$file' for read: $!\n"; +while (<$fh>) { + next if (/^\s*#/); + + my $errors = 0; + + # remove everything between single quotes + # this will remove too much in case of: echo "var='$var'" + # and thus miss an opportunity to complain later on + # also it mangles the input line irreversible + s/'[^']+'/'___'/g; + + # highlight unbraced variables-- + # unless properly backslash'ed + $errors += s/((?:^|[^\\]))(((\\\\)+)?\$\w)/$1\033[31m$2\033[0m/g; + + # highlight single square brackets + $errors += s/((?:^|\s+))\[([^\[].+[^\]])\](\s*(;|&&|\|\|))/$1\033[31m\[\033[0m$2\033[31m\]\033[0m$3/g; + + # highlight double equal sign + $errors += s/(\[\[.*)(==)(.*\]\])/$1\033[31m$2\033[0m$3/g; + + # highlight tabs mixed with whitespace at beginning of lines + $errors += s/^( *)(\t+ *)/\033[31m\[$2\]\033[0m/; + + # highlight trailing whitespace + $errors += s/([ \t]+)$/\033[31m\[$1\]\033[0m/; + + next if (not $errors); + print "${file}[$.]: $_"; + $rc = 1; +} +close($fh); + +exit $rc; diff --git a/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/yarn.lock b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/yarn.lock new file mode 100644 index 0000000..eef5da4 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/bash3boilerplate/yarn.lock @@ -0,0 +1,1372 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 + +"ansi-regex@npm:^5.0.1": + version: 5.0.1 + resolution: "ansi-regex@npm:5.0.1" + checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b + languageName: node + linkType: hard + +"ansi-styles@npm:^3.2.1": + version: 3.2.1 + resolution: "ansi-styles@npm:3.2.1" + dependencies: + color-convert: ^1.9.0 + checksum: d85ade01c10e5dd77b6c89f34ed7531da5830d2cb5882c645f330079975b716438cd7ebb81d0d6e6b4f9c577f19ae41ab55f07f19786b02f9dfd9e0377395665 + languageName: node + linkType: hard + +"ansi-styles@npm:^4.0.0": + version: 4.3.0 + resolution: "ansi-styles@npm:4.3.0" + dependencies: + color-convert: ^2.0.1 + checksum: 513b44c3b2105dd14cc42a19271e80f386466c4be574bccf60b627432f9198571ebf4ab1e4c3ba17347658f4ee1711c163d574248c0c1cdc2d5917a0ad582ec4 + languageName: node + linkType: hard + +"array-buffer-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "array-buffer-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + is-array-buffer: ^3.0.1 + checksum: 044e101ce150f4804ad19c51d6c4d4cfa505c5b2577bd179256e4aa3f3f6a0a5e9874c78cd428ee566ac574c8a04d7ce21af9fe52e844abfdccb82b33035a7c3 + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.1": + version: 1.0.1 + resolution: "arraybuffer.prototype.slice@npm:1.0.1" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.2 + define-properties: ^1.2.0 + get-intrinsic: ^1.2.1 + is-array-buffer: ^3.0.2 + is-shared-array-buffer: ^1.0.2 + checksum: e3e9b2a3e988ebfeddce4c7e8f69df730c9e48cb04b0d40ff0874ce3d86b3d1339dd520ffde5e39c02610bc172ecfbd4bc93324b1cabd9554c44a56b131ce0ce + languageName: node + linkType: hard + +"available-typed-arrays@npm:^1.0.5": + version: 1.0.5 + resolution: "available-typed-arrays@npm:1.0.5" + checksum: 20eb47b3cefd7db027b9bbb993c658abd36d4edd3fe1060e83699a03ee275b0c9b216cc076ff3f2db29073225fb70e7613987af14269ac1fe2a19803ccc97f1a + languageName: node + linkType: hard + +"balanced-match@npm:^1.0.0": + version: 1.0.2 + resolution: "balanced-match@npm:1.0.2" + checksum: 9706c088a283058a8a99e0bf91b0a2f75497f185980d9ffa8b304de1d9e58ebda7c72c07ebf01dadedaac5b2907b2c6f566f660d62bd336c3468e960403b9d65 + languageName: node + linkType: hard + +"bash3boilerplate@workspace:.": + version: 0.0.0-use.local + resolution: "bash3boilerplate@workspace:." + dependencies: + fakefile: 1.1.0 + npm-run-all: 4.1.5 + replace: 1.2.2 + languageName: unknown + linkType: soft + +"brace-expansion@npm:^1.1.7": + version: 1.1.11 + resolution: "brace-expansion@npm:1.1.11" + dependencies: + balanced-match: ^1.0.0 + concat-map: 0.0.1 + checksum: faf34a7bb0c3fcf4b59c7808bc5d2a96a40988addf2e7e09dfbb67a2251800e0d14cd2bfc1aa79174f2f5095c54ff27f46fb1289fe2d77dac755b5eb3434cc07 + languageName: node + linkType: hard + +"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": + version: 1.0.2 + resolution: "call-bind@npm:1.0.2" + dependencies: + function-bind: ^1.1.1 + get-intrinsic: ^1.0.2 + checksum: f8e31de9d19988a4b80f3e704788c4a2d6b6f3d17cfec4f57dc29ced450c53a49270dc66bf0fbd693329ee948dd33e6c90a329519aef17474a4d961e8d6426b0 + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0": + version: 5.3.1 + resolution: "camelcase@npm:5.3.1" + checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b + languageName: node + linkType: hard + +"chalk@npm:2.4.2, chalk@npm:^2.4.1": + version: 2.4.2 + resolution: "chalk@npm:2.4.2" + dependencies: + ansi-styles: ^3.2.1 + escape-string-regexp: ^1.0.5 + supports-color: ^5.3.0 + checksum: ec3661d38fe77f681200f878edbd9448821924e0f93a9cefc0e26a33b145f1027a2084bf19967160d11e1f03bfe4eaffcabf5493b89098b2782c3fe0b03d80c2 + languageName: node + linkType: hard + +"cliui@npm:^6.0.0": + version: 6.0.0 + resolution: "cliui@npm:6.0.0" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^6.2.0 + checksum: 4fcfd26d292c9f00238117f39fc797608292ae36bac2168cfee4c85923817d0607fe21b3329a8621e01aedf512c99b7eaa60e363a671ffd378df6649fb48ae42 + languageName: node + linkType: hard + +"color-convert@npm:^1.9.0": + version: 1.9.3 + resolution: "color-convert@npm:1.9.3" + dependencies: + color-name: 1.1.3 + checksum: fd7a64a17cde98fb923b1dd05c5f2e6f7aefda1b60d67e8d449f9328b4e53b228a428fd38bfeaeb2db2ff6b6503a776a996150b80cdf224062af08a5c8a3a203 + languageName: node + linkType: hard + +"color-convert@npm:^2.0.1": + version: 2.0.1 + resolution: "color-convert@npm:2.0.1" + dependencies: + color-name: ~1.1.4 + checksum: 79e6bdb9fd479a205c71d89574fccfb22bd9053bd98c6c4d870d65c132e5e904e6034978e55b43d69fcaa7433af2016ee203ce76eeba9cfa554b373e7f7db336 + languageName: node + linkType: hard + +"color-name@npm:1.1.3": + version: 1.1.3 + resolution: "color-name@npm:1.1.3" + checksum: 09c5d3e33d2105850153b14466501f2bfb30324a2f76568a408763a3b7433b0e50e5b4ab1947868e65cb101bb7cb75029553f2c333b6d4b8138a73fcc133d69d + languageName: node + linkType: hard + +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 + languageName: node + linkType: hard + +"concat-map@npm:0.0.1": + version: 0.0.1 + resolution: "concat-map@npm:0.0.1" + checksum: 902a9f5d8967a3e2faf138d5cb784b9979bad2e6db5357c5b21c568df4ebe62bcb15108af1b2253744844eb964fc023fbd9afbbbb6ddd0bcc204c6fb5b7bf3af + languageName: node + linkType: hard + +"cross-spawn@npm:^6.0.5": + version: 6.0.6 + resolution: "cross-spawn@npm:6.0.6" + dependencies: + nice-try: ^1.0.4 + path-key: ^2.0.1 + semver: ^5.5.0 + shebang-command: ^1.2.0 + which: ^1.2.9 + checksum: a6e2e5b04a0e0f806c1df45f92cd079b65f95fbe5a7650ee1ab60318c33a6c156a8a2f8b6898f57764f7363ec599a0625e9855dfa78d52d2d73dbd32eb11c25e + languageName: node + linkType: hard + +"decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + +"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": + version: 1.2.0 + resolution: "define-properties@npm:1.2.0" + dependencies: + has-property-descriptors: ^1.0.0 + object-keys: ^1.1.1 + checksum: e60aee6a19b102df4e2b1f301816804e81ab48bb91f00d0d935f269bf4b3f79c88b39e4f89eaa132890d23267335fd1140dfcd8d5ccd61031a0a2c41a54e33a6 + languageName: node + linkType: hard + +"emoji-regex@npm:^8.0.0": + version: 8.0.0 + resolution: "emoji-regex@npm:8.0.0" + checksum: d4c5c39d5a9868b5fa152f00cada8a936868fd3367f33f71be515ecee4c803132d11b31a6222b2571b1e5f7e13890156a94880345594d0ce7e3c9895f560f192 + languageName: node + linkType: hard + +"error-ex@npm:^1.3.1": + version: 1.3.2 + resolution: "error-ex@npm:1.3.2" + dependencies: + is-arrayish: ^0.2.1 + checksum: c1c2b8b65f9c91b0f9d75f0debaa7ec5b35c266c2cac5de412c1a6de86d4cbae04ae44e510378cb14d032d0645a36925d0186f8bb7367bcc629db256b743a001 + languageName: node + linkType: hard + +"es-abstract@npm:^1.20.4, es-abstract@npm:^1.22.1": + version: 1.22.1 + resolution: "es-abstract@npm:1.22.1" + dependencies: + array-buffer-byte-length: ^1.0.0 + arraybuffer.prototype.slice: ^1.0.1 + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + es-set-tostringtag: ^2.0.1 + es-to-primitive: ^1.2.1 + function.prototype.name: ^1.1.5 + get-intrinsic: ^1.2.1 + get-symbol-description: ^1.0.0 + globalthis: ^1.0.3 + gopd: ^1.0.1 + has: ^1.0.3 + has-property-descriptors: ^1.0.0 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + internal-slot: ^1.0.5 + is-array-buffer: ^3.0.2 + is-callable: ^1.2.7 + is-negative-zero: ^2.0.2 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + is-string: ^1.0.7 + is-typed-array: ^1.1.10 + is-weakref: ^1.0.2 + object-inspect: ^1.12.3 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.0 + safe-array-concat: ^1.0.0 + safe-regex-test: ^1.0.0 + string.prototype.trim: ^1.2.7 + string.prototype.trimend: ^1.0.6 + string.prototype.trimstart: ^1.0.6 + typed-array-buffer: ^1.0.0 + typed-array-byte-length: ^1.0.0 + typed-array-byte-offset: ^1.0.0 + typed-array-length: ^1.0.4 + unbox-primitive: ^1.0.2 + which-typed-array: ^1.1.10 + checksum: 614e2c1c3717cb8d30b6128ef12ea110e06fd7d75ad77091ca1c5dbfb00da130e62e4bbbbbdda190eada098a22b27fe0f99ae5a1171dac2c8663b1e8be8a3a9b + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.1": + version: 2.0.1 + resolution: "es-set-tostringtag@npm:2.0.1" + dependencies: + get-intrinsic: ^1.1.3 + has: ^1.0.3 + has-tostringtag: ^1.0.0 + checksum: ec416a12948cefb4b2a5932e62093a7cf36ddc3efd58d6c58ca7ae7064475ace556434b869b0bbeb0c365f1032a8ccd577211101234b69837ad83ad204fff884 + languageName: node + linkType: hard + +"es-to-primitive@npm:^1.2.1": + version: 1.2.1 + resolution: "es-to-primitive@npm:1.2.1" + dependencies: + is-callable: ^1.1.4 + is-date-object: ^1.0.1 + is-symbol: ^1.0.2 + checksum: 4ead6671a2c1402619bdd77f3503991232ca15e17e46222b0a41a5d81aebc8740a77822f5b3c965008e631153e9ef0580540007744521e72de8e33599fca2eed + languageName: node + linkType: hard + +"escape-string-regexp@npm:^1.0.5": + version: 1.0.5 + resolution: "escape-string-regexp@npm:1.0.5" + checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410 + languageName: node + linkType: hard + +"fakefile@npm:1.1.0": + version: 1.1.0 + resolution: "fakefile@npm:1.1.0" + dependencies: + fs-extra: 0.26.5 + checksum: eaa56f2d101807bd02e2e6dc11c8790b7e9f51344d52a40fa6e49300e720cd80233c20d9098146cb3e1452cafd16efcabe97f58527ebb4c73b6c32561a8c3902 + languageName: node + linkType: hard + +"find-up@npm:^4.1.0": + version: 4.1.0 + resolution: "find-up@npm:4.1.0" + dependencies: + locate-path: ^5.0.0 + path-exists: ^4.0.0 + checksum: 4c172680e8f8c1f78839486e14a43ef82e9decd0e74145f40707cc42e7420506d5ec92d9a11c22bd2c48fb0c384ea05dd30e10dd152fefeec6f2f75282a8b844 + languageName: node + linkType: hard + +"for-each@npm:^0.3.3": + version: 0.3.3 + resolution: "for-each@npm:0.3.3" + dependencies: + is-callable: ^1.1.3 + checksum: 6c48ff2bc63362319c65e2edca4a8e1e3483a2fabc72fbe7feaf8c73db94fc7861bd53bc02c8a66a0c1dd709da6b04eec42e0abdd6b40ce47305ae92a25e5d28 + languageName: node + linkType: hard + +"fs-extra@npm:0.26.5": + version: 0.26.5 + resolution: "fs-extra@npm:0.26.5" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^2.1.0 + klaw: ^1.0.0 + path-is-absolute: ^1.0.0 + rimraf: ^2.2.8 + checksum: c421033be5e30e5f45e39ed885eda933c3e9a318e86dae657254455281f58a24df467bfaf3d248c564c02cd4e147670862f6a6e28b46c5e90d2232783026b592 + languageName: node + linkType: hard + +"fs.realpath@npm:^1.0.0": + version: 1.0.0 + resolution: "fs.realpath@npm:1.0.0" + checksum: 99ddea01a7e75aa276c250a04eedeffe5662bce66c65c07164ad6264f9de18fb21be9433ead460e54cff20e31721c811f4fb5d70591799df5f85dce6d6746fd0 + languageName: node + linkType: hard + +"function-bind@npm:^1.1.1": + version: 1.1.1 + resolution: "function-bind@npm:1.1.1" + checksum: b32fbaebb3f8ec4969f033073b43f5c8befbb58f1a79e12f1d7490358150359ebd92f49e72ff0144f65f2c48ea2a605bff2d07965f548f6474fd8efd95bf361a + languageName: node + linkType: hard + +"function.prototype.name@npm:^1.1.5": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + es-abstract: ^1.22.1 + functions-have-names: ^1.2.3 + checksum: 7a3f9bd98adab09a07f6e1f03da03d3f7c26abbdeaeee15223f6c04a9fb5674792bdf5e689dac19b97ac71de6aad2027ba3048a9b883aa1b3173eed6ab07f479 + languageName: node + linkType: hard + +"functions-have-names@npm:^1.2.3": + version: 1.2.3 + resolution: "functions-have-names@npm:1.2.3" + checksum: c3f1f5ba20f4e962efb71344ce0a40722163e85bee2101ce25f88214e78182d2d2476aa85ef37950c579eb6cf6ee811c17b3101bb84004bb75655f3e33f3fdb5 + languageName: node + linkType: hard + +"get-caller-file@npm:^2.0.1": + version: 2.0.5 + resolution: "get-caller-file@npm:2.0.5" + checksum: b9769a836d2a98c3ee734a88ba712e62703f1df31b94b784762c433c27a386dd6029ff55c2a920c392e33657d80191edbf18c61487e198844844516f843496b9 + languageName: node + linkType: hard + +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1": + version: 1.2.1 + resolution: "get-intrinsic@npm:1.2.1" + dependencies: + function-bind: ^1.1.1 + has: ^1.0.3 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + checksum: 5b61d88552c24b0cf6fa2d1b3bc5459d7306f699de060d76442cce49a4721f52b8c560a33ab392cf5575b7810277d54ded9d4d39a1ea61855619ebc005aa7e5f + languageName: node + linkType: hard + +"get-symbol-description@npm:^1.0.0": + version: 1.0.0 + resolution: "get-symbol-description@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 + languageName: node + linkType: hard + +"glob@npm:^7.1.3": + version: 7.2.3 + resolution: "glob@npm:7.2.3" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.1.1 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 29452e97b38fa704dabb1d1045350fb2467cf0277e155aa9ff7077e90ad81d1ea9d53d3ee63bd37c05b09a065e90f16aec4a65f5b8de401d1dac40bc5605d133 + languageName: node + linkType: hard + +"globalthis@npm:^1.0.3": + version: 1.0.3 + resolution: "globalthis@npm:1.0.3" + dependencies: + define-properties: ^1.1.3 + checksum: fbd7d760dc464c886d0196166d92e5ffb4c84d0730846d6621a39fbbc068aeeb9c8d1421ad330e94b7bca4bb4ea092f5f21f3d36077812af5d098b4dc006c998 + languageName: node + linkType: hard + +"gopd@npm:^1.0.1": + version: 1.0.1 + resolution: "gopd@npm:1.0.1" + dependencies: + get-intrinsic: ^1.1.3 + checksum: a5ccfb8806e0917a94e0b3de2af2ea4979c1da920bc381667c260e00e7cafdbe844e2cb9c5bcfef4e5412e8bf73bab837285bc35c7ba73aaaf0134d4583393a6 + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": + version: 1.0.2 + resolution: "has-bigints@npm:1.0.2" + checksum: 390e31e7be7e5c6fe68b81babb73dfc35d413604d7ee5f56da101417027a4b4ce6a27e46eff97ad040c835b5d228676eae99a9b5c3bc0e23c8e81a49241ff45b + languageName: node + linkType: hard + +"has-flag@npm:^3.0.0": + version: 3.0.0 + resolution: "has-flag@npm:3.0.0" + checksum: 4a15638b454bf086c8148979aae044dd6e39d63904cd452d970374fa6a87623423da485dfb814e7be882e05c096a7ccf1ebd48e7e7501d0208d8384ff4dea73b + languageName: node + linkType: hard + +"has-property-descriptors@npm:^1.0.0": + version: 1.0.0 + resolution: "has-property-descriptors@npm:1.0.0" + dependencies: + get-intrinsic: ^1.1.1 + checksum: a6d3f0a266d0294d972e354782e872e2fe1b6495b321e6ef678c9b7a06a40408a6891817350c62e752adced73a94ac903c54734fee05bf65b1905ee1368194bb + languageName: node + linkType: hard + +"has-proto@npm:^1.0.1": + version: 1.0.1 + resolution: "has-proto@npm:1.0.1" + checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e + languageName: node + linkType: hard + +"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": + version: 1.0.3 + resolution: "has-symbols@npm:1.0.3" + checksum: a054c40c631c0d5741a8285010a0777ea0c068f99ed43e5d6eb12972da223f8af553a455132fdb0801bdcfa0e0f443c0c03a68d8555aa529b3144b446c3f2410 + languageName: node + linkType: hard + +"has-tostringtag@npm:^1.0.0": + version: 1.0.0 + resolution: "has-tostringtag@npm:1.0.0" + dependencies: + has-symbols: ^1.0.2 + checksum: cc12eb28cb6ae22369ebaad3a8ab0799ed61270991be88f208d508076a1e99abe4198c965935ce85ea90b60c94ddda73693b0920b58e7ead048b4a391b502c1c + languageName: node + linkType: hard + +"has@npm:^1.0.3": + version: 1.0.3 + resolution: "has@npm:1.0.3" + dependencies: + function-bind: ^1.1.1 + checksum: b9ad53d53be4af90ce5d1c38331e712522417d017d5ef1ebd0507e07c2fbad8686fffb8e12ddecd4c39ca9b9b47431afbb975b8abf7f3c3b82c98e9aad052792 + languageName: node + linkType: hard + +"hosted-git-info@npm:^2.1.4": + version: 2.8.9 + resolution: "hosted-git-info@npm:2.8.9" + checksum: c955394bdab888a1e9bb10eb33029e0f7ce5a2ac7b3f158099dc8c486c99e73809dca609f5694b223920ca2174db33d32b12f9a2a47141dc59607c29da5a62dd + languageName: node + linkType: hard + +"inflight@npm:^1.0.4": + version: 1.0.6 + resolution: "inflight@npm:1.0.6" + dependencies: + once: ^1.3.0 + wrappy: 1 + checksum: f4f76aa072ce19fae87ce1ef7d221e709afb59d445e05d47fba710e85470923a75de35bfae47da6de1b18afc3ce83d70facf44cfb0aff89f0a3f45c0a0244dfd + languageName: node + linkType: hard + +"inherits@npm:2": + version: 2.0.4 + resolution: "inherits@npm:2.0.4" + checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1 + languageName: node + linkType: hard + +"internal-slot@npm:^1.0.5": + version: 1.0.5 + resolution: "internal-slot@npm:1.0.5" + dependencies: + get-intrinsic: ^1.2.0 + has: ^1.0.3 + side-channel: ^1.0.4 + checksum: 97e84046bf9e7574d0956bd98d7162313ce7057883b6db6c5c7b5e5f05688864b0978ba07610c726d15d66544ffe4b1050107d93f8a39ebc59b15d8b429b497a + languageName: node + linkType: hard + +"is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": + version: 3.0.2 + resolution: "is-array-buffer@npm:3.0.2" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + is-typed-array: ^1.1.10 + checksum: dcac9dda66ff17df9cabdc58214172bf41082f956eab30bb0d86bc0fab1e44b690fc8e1f855cf2481245caf4e8a5a006a982a71ddccec84032ed41f9d8da8c14 + languageName: node + linkType: hard + +"is-arrayish@npm:^0.2.1": + version: 0.2.1 + resolution: "is-arrayish@npm:0.2.1" + checksum: eef4417e3c10e60e2c810b6084942b3ead455af16c4509959a27e490e7aee87cfb3f38e01bbde92220b528a0ee1a18d52b787e1458ee86174d8c7f0e58cd488f + languageName: node + linkType: hard + +"is-bigint@npm:^1.0.1": + version: 1.0.4 + resolution: "is-bigint@npm:1.0.4" + dependencies: + has-bigints: ^1.0.1 + checksum: c56edfe09b1154f8668e53ebe8252b6f185ee852a50f9b41e8d921cb2bed425652049fbe438723f6cb48a63ca1aa051e948e7e401e093477c99c84eba244f666 + languageName: node + linkType: hard + +"is-boolean-object@npm:^1.1.0": + version: 1.1.2 + resolution: "is-boolean-object@npm:1.1.2" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: c03b23dbaacadc18940defb12c1c0e3aaece7553ef58b162a0f6bba0c2a7e1551b59f365b91e00d2dbac0522392d576ef322628cb1d036a0fe51eb466db67222 + languageName: node + linkType: hard + +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 61fd57d03b0d984e2ed3720fb1c7a897827ea174bd44402878e059542ea8c4aeedee0ea0985998aa5cc2736b2fa6e271c08587addb5b3959ac52cf665173d1ac + languageName: node + linkType: hard + +"is-core-module@npm:^2.13.0": + version: 2.13.0 + resolution: "is-core-module@npm:2.13.0" + dependencies: + has: ^1.0.3 + checksum: 053ab101fb390bfeb2333360fd131387bed54e476b26860dc7f5a700bbf34a0ec4454f7c8c4d43e8a0030957e4b3db6e16d35e1890ea6fb654c833095e040355 + languageName: node + linkType: hard + +"is-date-object@npm:^1.0.1": + version: 1.0.5 + resolution: "is-date-object@npm:1.0.5" + dependencies: + has-tostringtag: ^1.0.0 + checksum: baa9077cdf15eb7b58c79398604ca57379b2fc4cf9aa7a9b9e295278648f628c9b201400c01c5e0f7afae56507d741185730307cbe7cad3b9f90a77e5ee342fc + languageName: node + linkType: hard + +"is-fullwidth-code-point@npm:^3.0.0": + version: 3.0.0 + resolution: "is-fullwidth-code-point@npm:3.0.0" + checksum: 44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 + languageName: node + linkType: hard + +"is-negative-zero@npm:^2.0.2": + version: 2.0.2 + resolution: "is-negative-zero@npm:2.0.2" + checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a + languageName: node + linkType: hard + +"is-number-object@npm:^1.0.4": + version: 1.0.7 + resolution: "is-number-object@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d1e8d01bb0a7134c74649c4e62da0c6118a0bfc6771ea3c560914d52a627873e6920dd0fd0ebc0e12ad2ff4687eac4c308f7e80320b973b2c8a2c8f97a7524f7 + languageName: node + linkType: hard + +"is-regex@npm:^1.1.4": + version: 1.1.4 + resolution: "is-regex@npm:1.1.4" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 362399b33535bc8f386d96c45c9feb04cf7f8b41c182f54174c1a45c9abbbe5e31290bbad09a458583ff6bf3b2048672cdb1881b13289569a7c548370856a652 + languageName: node + linkType: hard + +"is-shared-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "is-shared-array-buffer@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 9508929cf14fdc1afc9d61d723c6e8d34f5e117f0bffda4d97e7a5d88c3a8681f633a74f8e3ad1fe92d5113f9b921dc5ca44356492079612f9a247efbce7032a + languageName: node + linkType: hard + +"is-string@npm:^1.0.5, is-string@npm:^1.0.7": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: 323b3d04622f78d45077cf89aab783b2f49d24dc641aa89b5ad1a72114cfeff2585efc8c12ef42466dff32bde93d839ad321b26884cf75e5a7892a938b089989 + languageName: node + linkType: hard + +"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": + version: 1.0.4 + resolution: "is-symbol@npm:1.0.4" + dependencies: + has-symbols: ^1.0.2 + checksum: 92805812ef590738d9de49d677cd17dfd486794773fb6fa0032d16452af46e9b91bb43ffe82c983570f015b37136f4b53b28b8523bfb10b0ece7a66c31a54510 + languageName: node + linkType: hard + +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.9": + version: 1.1.12 + resolution: "is-typed-array@npm:1.1.12" + dependencies: + which-typed-array: ^1.1.11 + checksum: 4c89c4a3be07186caddadf92197b17fda663a9d259ea0d44a85f171558270d36059d1c386d34a12cba22dfade5aba497ce22778e866adc9406098c8fc4771796 + languageName: node + linkType: hard + +"is-weakref@npm:^1.0.2": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 95bd9a57cdcb58c63b1c401c60a474b0f45b94719c30f548c891860f051bc2231575c290a6b420c6bc6e7ed99459d424c652bd5bf9a1d5259505dc35b4bf83de + languageName: node + linkType: hard + +"isarray@npm:^2.0.5": + version: 2.0.5 + resolution: "isarray@npm:2.0.5" + checksum: bd5bbe4104438c4196ba58a54650116007fa0262eccef13a4c55b2e09a5b36b59f1e75b9fcc49883dd9d4953892e6fc007eef9e9155648ceea036e184b0f930a + languageName: node + linkType: hard + +"isexe@npm:^2.0.0": + version: 2.0.0 + resolution: "isexe@npm:2.0.0" + checksum: 26bf6c5480dda5161c820c5b5c751ae1e766c587b1f951ea3fcfc973bafb7831ae5b54a31a69bd670220e42e99ec154475025a468eae58ea262f813fdc8d1c62 + languageName: node + linkType: hard + +"json-parse-better-errors@npm:^1.0.1": + version: 1.0.2 + resolution: "json-parse-better-errors@npm:1.0.2" + checksum: ff2b5ba2a70e88fd97a3cb28c1840144c5ce8fae9cbeeddba15afa333a5c407cf0e42300cd0a2885dbb055227fe68d405070faad941beeffbfde9cf3b2c78c5d + languageName: node + linkType: hard + +"jsonfile@npm:^2.1.0": + version: 2.4.0 + resolution: "jsonfile@npm:2.4.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: f5064aabbc9e35530dc471d8b203ae1f40dbe949ddde4391c6f6a6d310619a15f0efdae5587df594d1d70c555193aaeee9d2ed4aec9ffd5767bd5e4e62d49c3d + languageName: node + linkType: hard + +"klaw@npm:^1.0.0": + version: 1.3.1 + resolution: "klaw@npm:1.3.1" + dependencies: + graceful-fs: ^4.1.9 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 8f69e4797c26e7c3f2426bfa85f38a3da3c2cb1b4c6bd850d2377aed440d41ce9d806f2885c2e2e224372c56af4b1d43b8a499adecf9a05e7373dc6b8b7c52e4 + languageName: node + linkType: hard + +"load-json-file@npm:^4.0.0": + version: 4.0.0 + resolution: "load-json-file@npm:4.0.0" + dependencies: + graceful-fs: ^4.1.2 + parse-json: ^4.0.0 + pify: ^3.0.0 + strip-bom: ^3.0.0 + checksum: 8f5d6d93ba64a9620445ee9bde4d98b1eac32cf6c8c2d20d44abfa41a6945e7969456ab5f1ca2fb06ee32e206c9769a20eec7002fe290de462e8c884b6b8b356 + languageName: node + linkType: hard + +"locate-path@npm:^5.0.0": + version: 5.0.0 + resolution: "locate-path@npm:5.0.0" + dependencies: + p-locate: ^4.1.0 + checksum: 83e51725e67517287d73e1ded92b28602e3ae5580b301fe54bfb76c0c723e3f285b19252e375712316774cf52006cb236aed5704692c32db0d5d089b69696e30 + languageName: node + linkType: hard + +"memorystream@npm:^0.3.1": + version: 0.3.1 + resolution: "memorystream@npm:0.3.1" + checksum: f18b42440d24d09516d01466c06adf797df7873f0d40aa7db02e5fb9ed83074e5e65412d0720901d7069363465f82dc4f8bcb44f0cde271567a61426ce6ca2e9 + languageName: node + linkType: hard + +"minimatch@npm:3.0.5": + version: 3.0.5 + resolution: "minimatch@npm:3.0.5" + dependencies: + brace-expansion: ^1.1.7 + checksum: a3b84b426eafca947741b864502cee02860c4e7b145de11ad98775cfcf3066fef422583bc0ffce0952ddf4750c1ccf4220b1556430d4ce10139f66247d87d69e + languageName: node + linkType: hard + +"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": + version: 3.1.2 + resolution: "minimatch@npm:3.1.2" + dependencies: + brace-expansion: ^1.1.7 + checksum: c154e566406683e7bcb746e000b84d74465b3a832c45d59912b9b55cd50dee66e5c4b1e5566dba26154040e51672f9aa450a9aef0c97cfc7336b78b7afb9540a + languageName: node + linkType: hard + +"nice-try@npm:^1.0.4": + version: 1.0.5 + resolution: "nice-try@npm:1.0.5" + checksum: 0b4af3b5bb5d86c289f7a026303d192a7eb4417231fe47245c460baeabae7277bcd8fd9c728fb6bd62c30b3e15cd6620373e2cf33353b095d8b403d3e8a15aff + languageName: node + linkType: hard + +"normalize-package-data@npm:^2.3.2": + version: 2.5.0 + resolution: "normalize-package-data@npm:2.5.0" + dependencies: + hosted-git-info: ^2.1.4 + resolve: ^1.10.0 + semver: 2 || 3 || 4 || 5 + validate-npm-package-license: ^3.0.1 + checksum: 7999112efc35a6259bc22db460540cae06564aa65d0271e3bdfa86876d08b0e578b7b5b0028ee61b23f1cae9fc0e7847e4edc0948d3068a39a2a82853efc8499 + languageName: node + linkType: hard + +"npm-run-all@npm:4.1.5": + version: 4.1.5 + resolution: "npm-run-all@npm:4.1.5" + dependencies: + ansi-styles: ^3.2.1 + chalk: ^2.4.1 + cross-spawn: ^6.0.5 + memorystream: ^0.3.1 + minimatch: ^3.0.4 + pidtree: ^0.3.0 + read-pkg: ^3.0.0 + shell-quote: ^1.6.1 + string.prototype.padend: ^3.0.0 + bin: + npm-run-all: bin/npm-run-all/index.js + run-p: bin/run-p/index.js + run-s: bin/run-s/index.js + checksum: 373b72c6a36564da13c1642c1fd9bb4dcc756bce7a3648f883772f02661095319820834ff813762d2fee403e9b40c1cd27c8685807c107440f10eb19c006d4a0 + languageName: node + linkType: hard + +"object-inspect@npm:^1.12.3, object-inspect@npm:^1.9.0": + version: 1.12.3 + resolution: "object-inspect@npm:1.12.3" + checksum: dabfd824d97a5f407e6d5d24810d888859f6be394d8b733a77442b277e0808860555176719c5905e765e3743a7cada6b8b0a3b85e5331c530fd418cc8ae991db + languageName: node + linkType: hard + +"object-keys@npm:^1.1.1": + version: 1.1.1 + resolution: "object-keys@npm:1.1.1" + checksum: b363c5e7644b1e1b04aa507e88dcb8e3a2f52b6ffd0ea801e4c7a62d5aa559affe21c55a07fd4b1fd55fc03a33c610d73426664b20032405d7b92a1414c34d6a + languageName: node + linkType: hard + +"object.assign@npm:^4.1.4": + version: 4.1.4 + resolution: "object.assign@npm:4.1.4" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + has-symbols: ^1.0.3 + object-keys: ^1.1.1 + checksum: 76cab513a5999acbfe0ff355f15a6a125e71805fcf53de4e9d4e082e1989bdb81d1e329291e1e4e0ae7719f0e4ef80e88fb2d367ae60500d79d25a6224ac8864 + languageName: node + linkType: hard + +"once@npm:^1.3.0": + version: 1.4.0 + resolution: "once@npm:1.4.0" + dependencies: + wrappy: 1 + checksum: cd0a88501333edd640d95f0d2700fbde6bff20b3d4d9bdc521bdd31af0656b5706570d6c6afe532045a20bb8dc0849f8332d6f2a416e0ba6d3d3b98806c7db68 + languageName: node + linkType: hard + +"p-limit@npm:^2.2.0": + version: 2.3.0 + resolution: "p-limit@npm:2.3.0" + dependencies: + p-try: ^2.0.0 + checksum: 84ff17f1a38126c3314e91ecfe56aecbf36430940e2873dadaa773ffe072dc23b7af8e46d4b6485d302a11673fe94c6b67ca2cfbb60c989848b02100d0594ac1 + languageName: node + linkType: hard + +"p-locate@npm:^4.1.0": + version: 4.1.0 + resolution: "p-locate@npm:4.1.0" + dependencies: + p-limit: ^2.2.0 + checksum: 513bd14a455f5da4ebfcb819ef706c54adb09097703de6aeaa5d26fe5ea16df92b48d1ac45e01e3944ce1e6aa2a66f7f8894742b8c9d6e276e16cd2049a2b870 + languageName: node + linkType: hard + +"p-try@npm:^2.0.0": + version: 2.2.0 + resolution: "p-try@npm:2.2.0" + checksum: f8a8e9a7693659383f06aec604ad5ead237c7a261c18048a6e1b5b85a5f8a067e469aa24f5bc009b991ea3b058a87f5065ef4176793a200d4917349881216cae + languageName: node + linkType: hard + +"parse-json@npm:^4.0.0": + version: 4.0.0 + resolution: "parse-json@npm:4.0.0" + dependencies: + error-ex: ^1.3.1 + json-parse-better-errors: ^1.0.1 + checksum: 0fe227d410a61090c247e34fa210552b834613c006c2c64d9a05cfe9e89cf8b4246d1246b1a99524b53b313e9ac024438d0680f67e33eaed7e6f38db64cfe7b5 + languageName: node + linkType: hard + +"path-exists@npm:^4.0.0": + version: 4.0.0 + resolution: "path-exists@npm:4.0.0" + checksum: 505807199dfb7c50737b057dd8d351b82c033029ab94cb10a657609e00c1bc53b951cfdbccab8de04c5584d5eff31128ce6afd3db79281874a5ef2adbba55ed1 + languageName: node + linkType: hard + +"path-is-absolute@npm:^1.0.0": + version: 1.0.1 + resolution: "path-is-absolute@npm:1.0.1" + checksum: 060840f92cf8effa293bcc1bea81281bd7d363731d214cbe5c227df207c34cd727430f70c6037b5159c8a870b9157cba65e775446b0ab06fd5ecc7e54615a3b8 + languageName: node + linkType: hard + +"path-key@npm:^2.0.1": + version: 2.0.1 + resolution: "path-key@npm:2.0.1" + checksum: f7ab0ad42fe3fb8c7f11d0c4f849871e28fbd8e1add65c370e422512fc5887097b9cf34d09c1747d45c942a8c1e26468d6356e2df3f740bf177ab8ca7301ebfd + languageName: node + linkType: hard + +"path-parse@npm:^1.0.7": + version: 1.0.7 + resolution: "path-parse@npm:1.0.7" + checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a + languageName: node + linkType: hard + +"path-type@npm:^3.0.0": + version: 3.0.0 + resolution: "path-type@npm:3.0.0" + dependencies: + pify: ^3.0.0 + checksum: 735b35e256bad181f38fa021033b1c33cfbe62ead42bb2222b56c210e42938eecb272ae1949f3b6db4ac39597a61b44edd8384623ec4d79bfdc9a9c0f12537a6 + languageName: node + linkType: hard + +"pidtree@npm:^0.3.0": + version: 0.3.1 + resolution: "pidtree@npm:0.3.1" + bin: + pidtree: bin/pidtree.js + checksum: eb49025099f1af89a4696f7673351421f13420f3397b963c901fe23a1c9c2ff50f4750321970d4472c0ffbb065e4a6c3c27f75e226cc62284b19e21d32ce7012 + languageName: node + linkType: hard + +"pify@npm:^3.0.0": + version: 3.0.0 + resolution: "pify@npm:3.0.0" + checksum: 6cdcbc3567d5c412450c53261a3f10991665d660961e06605decf4544a61a97a54fefe70a68d5c37080ff9d6f4cf51444c90198d1ba9f9309a6c0d6e9f5c4fde + languageName: node + linkType: hard + +"read-pkg@npm:^3.0.0": + version: 3.0.0 + resolution: "read-pkg@npm:3.0.0" + dependencies: + load-json-file: ^4.0.0 + normalize-package-data: ^2.3.2 + path-type: ^3.0.0 + checksum: 398903ebae6c7e9965419a1062924436cc0b6f516c42c4679a90290d2f87448ed8f977e7aa2dbba4aa1ac09248628c43e493ac25b2bc76640e946035200e34c6 + languageName: node + linkType: hard + +"regexp.prototype.flags@npm:^1.5.0": + version: 1.5.0 + resolution: "regexp.prototype.flags@npm:1.5.0" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.2.0 + functions-have-names: ^1.2.3 + checksum: c541687cdbdfff1b9a07f6e44879f82c66bbf07665f9a7544c5fd16acdb3ec8d1436caab01662d2fbcad403f3499d49ab0b77fbc7ef29ef961d98cc4bc9755b4 + languageName: node + linkType: hard + +"replace@npm:1.2.2": + version: 1.2.2 + resolution: "replace@npm:1.2.2" + dependencies: + chalk: 2.4.2 + minimatch: 3.0.5 + yargs: ^15.3.1 + bin: + replace: bin/replace.js + search: bin/search.js + checksum: 1d69f43937a5fdf9dea278e78d6f3b51c1889ba5135bd201918bbda6330684adf8276e8e90e1c021034420dd4df239e51c23ca40752cb9bc6180c153d6d46a37 + languageName: node + linkType: hard + +"require-directory@npm:^2.1.1": + version: 2.1.1 + resolution: "require-directory@npm:2.1.1" + checksum: fb47e70bf0001fdeabdc0429d431863e9475e7e43ea5f94ad86503d918423c1543361cc5166d713eaa7029dd7a3d34775af04764bebff99ef413111a5af18c80 + languageName: node + linkType: hard + +"require-main-filename@npm:^2.0.0": + version: 2.0.0 + resolution: "require-main-filename@npm:2.0.0" + checksum: e9e294695fea08b076457e9ddff854e81bffbe248ed34c1eec348b7abbd22a0d02e8d75506559e2265e96978f3c4720bd77a6dad84755de8162b357eb6c778c7 + languageName: node + linkType: hard + +"resolve@npm:^1.10.0": + version: 1.22.4 + resolution: "resolve@npm:1.22.4" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: 23f25174c2736ce24c6d918910e0d1f89b6b38fefa07a995dff864acd7863d59a7f049e691f93b4b2ee29696303390d921552b6d1b841ed4a8101f517e1d0124 + languageName: node + linkType: hard + +"resolve@patch:resolve@^1.10.0#~builtin": + version: 1.22.4 + resolution: "resolve@patch:resolve@npm%3A1.22.4#~builtin::version=1.22.4&hash=c3c19d" + dependencies: + is-core-module: ^2.13.0 + path-parse: ^1.0.7 + supports-preserve-symlinks-flag: ^1.0.0 + bin: + resolve: bin/resolve + checksum: c45f2545fdc4d21883861b032789e20aa67a2f2692f68da320cc84d5724cd02f2923766c5354b3210897e88f1a7b3d6d2c7c22faeead8eed7078e4c783a444bc + languageName: node + linkType: hard + +"rimraf@npm:^2.2.8": + version: 2.7.1 + resolution: "rimraf@npm:2.7.1" + dependencies: + glob: ^7.1.3 + bin: + rimraf: ./bin.js + checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd + languageName: node + linkType: hard + +"safe-array-concat@npm:^1.0.0": + version: 1.0.0 + resolution: "safe-array-concat@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.0 + has-symbols: ^1.0.3 + isarray: ^2.0.5 + checksum: f43cb98fe3b566327d0c09284de2b15fb85ae964a89495c1b1a5d50c7c8ed484190f4e5e71aacc167e16231940079b326f2c0807aea633d47cc7322f40a6b57f + languageName: node + linkType: hard + +"safe-regex-test@npm:^1.0.0": + version: 1.0.0 + resolution: "safe-regex-test@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + is-regex: ^1.1.4 + checksum: bc566d8beb8b43c01b94e67de3f070fd2781685e835959bbbaaec91cc53381145ca91f69bd837ce6ec244817afa0a5e974fc4e40a2957f0aca68ac3add1ddd34 + languageName: node + linkType: hard + +"semver@npm:2 || 3 || 4 || 5": + version: 5.3.0 + resolution: "semver@npm:5.3.0" + bin: + semver: ./bin/semver + checksum: 2717b14299c76a4b35aec0aafebca22a3644da2942d2a4095f26e36d77a9bbe17a9a3a5199795f83edd26323d5c22024a2d9d373a038dec4e023156fa166d314 + languageName: node + linkType: hard + +"semver@npm:^5.5.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 + languageName: node + linkType: hard + +"set-blocking@npm:^2.0.0": + version: 2.0.0 + resolution: "set-blocking@npm:2.0.0" + checksum: 6e65a05f7cf7ebdf8b7c75b101e18c0b7e3dff4940d480efed8aad3a36a4005140b660fa1d804cb8bce911cac290441dc728084a30504d3516ac2ff7ad607b02 + languageName: node + linkType: hard + +"shebang-command@npm:^1.2.0": + version: 1.2.0 + resolution: "shebang-command@npm:1.2.0" + dependencies: + shebang-regex: ^1.0.0 + checksum: 9eed1750301e622961ba5d588af2212505e96770ec376a37ab678f965795e995ade7ed44910f5d3d3cb5e10165a1847f52d3348c64e146b8be922f7707958908 + languageName: node + linkType: hard + +"shebang-regex@npm:^1.0.0": + version: 1.0.0 + resolution: "shebang-regex@npm:1.0.0" + checksum: 404c5a752cd40f94591dfd9346da40a735a05139dac890ffc229afba610854d8799aaa52f87f7e0c94c5007f2c6af55bdcaeb584b56691926c5eaf41dc8f1372 + languageName: node + linkType: hard + +"shell-quote@npm:^1.6.1": + version: 1.8.1 + resolution: "shell-quote@npm:1.8.1" + checksum: 5f01201f4ef504d4c6a9d0d283fa17075f6770bfbe4c5850b074974c68062f37929ca61700d95ad2ac8822e14e8c4b990ca0e6e9272e64befd74ce5e19f0736b + languageName: node + linkType: hard + +"side-channel@npm:^1.0.4": + version: 1.0.4 + resolution: "side-channel@npm:1.0.4" + dependencies: + call-bind: ^1.0.0 + get-intrinsic: ^1.0.2 + object-inspect: ^1.9.0 + checksum: 351e41b947079c10bd0858364f32bb3a7379514c399edb64ab3dce683933483fc63fb5e4efe0a15a2e8a7e3c436b6a91736ddb8d8c6591b0460a24bb4a1ee245 + languageName: node + linkType: hard + +"spdx-correct@npm:^3.0.0": + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" + dependencies: + spdx-expression-parse: ^3.0.0 + spdx-license-ids: ^3.0.0 + checksum: e9ae98d22f69c88e7aff5b8778dc01c361ef635580e82d29e5c60a6533cc8f4d820803e67d7432581af0cc4fb49973125076ee3b90df191d153e223c004193b2 + languageName: node + linkType: hard + +"spdx-exceptions@npm:^2.1.0": + version: 2.3.0 + resolution: "spdx-exceptions@npm:2.3.0" + checksum: cb69a26fa3b46305637123cd37c85f75610e8c477b6476fa7354eb67c08128d159f1d36715f19be6f9daf4b680337deb8c65acdcae7f2608ba51931540687ac0 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^3.0.0": + version: 3.0.1 + resolution: "spdx-expression-parse@npm:3.0.1" + dependencies: + spdx-exceptions: ^2.1.0 + spdx-license-ids: ^3.0.0 + checksum: a1c6e104a2cbada7a593eaa9f430bd5e148ef5290d4c0409899855ce8b1c39652bcc88a725259491a82601159d6dc790bedefc9016c7472f7de8de7361f8ccde + languageName: node + linkType: hard + +"spdx-license-ids@npm:^3.0.0": + version: 3.0.13 + resolution: "spdx-license-ids@npm:3.0.13" + checksum: 3469d85c65f3245a279fa11afc250c3dca96e9e847f2f79d57f466940c5bb8495da08a542646086d499b7f24a74b8d0b42f3fc0f95d50ff99af1f599f6360ad7 + languageName: node + linkType: hard + +"string-width@npm:^4.1.0, string-width@npm:^4.2.0": + version: 4.2.3 + resolution: "string-width@npm:4.2.3" + dependencies: + emoji-regex: ^8.0.0 + is-fullwidth-code-point: ^3.0.0 + strip-ansi: ^6.0.1 + checksum: e52c10dc3fbfcd6c3a15f159f54a90024241d0f149cf8aed2982a2d801d2e64df0bf1dc351cf8e95c3319323f9f220c16e740b06faecd53e2462df1d2b5443fb + languageName: node + linkType: hard + +"string.prototype.padend@npm:^3.0.0": + version: 3.1.4 + resolution: "string.prototype.padend@npm:3.1.4" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + checksum: 76e07238fe31dc12177428f0436b7ed6985f6a7ba97470fd53e4f0a6d9860bfee127d81957f3073cc879b434233df143825d140581e1340278053ad993c92f6c + languageName: node + linkType: hard + +"string.prototype.trim@npm:^1.2.7": + version: 1.2.7 + resolution: "string.prototype.trim@npm:1.2.7" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + checksum: 05b7b2d6af63648e70e44c4a8d10d8cc457536df78b55b9d6230918bde75c5987f6b8604438c4c8652eb55e4fc9725d2912789eb4ec457d6995f3495af190c09 + languageName: node + linkType: hard + +"string.prototype.trimend@npm:^1.0.6": + version: 1.0.6 + resolution: "string.prototype.trimend@npm:1.0.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + checksum: 0fdc34645a639bd35179b5a08227a353b88dc089adf438f46be8a7c197fc3f22f8514c1c9be4629b3cd29c281582730a8cbbad6466c60f76b5f99cf2addb132e + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.6": + version: 1.0.6 + resolution: "string.prototype.trimstart@npm:1.0.6" + dependencies: + call-bind: ^1.0.2 + define-properties: ^1.1.4 + es-abstract: ^1.20.4 + checksum: 89080feef416621e6ef1279588994305477a7a91648d9436490d56010a1f7adc39167cddac7ce0b9884b8cdbef086987c4dcb2960209f2af8bac0d23ceff4f41 + languageName: node + linkType: hard + +"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" + dependencies: + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c + languageName: node + linkType: hard + +"strip-bom@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-bom@npm:3.0.0" + checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b + languageName: node + linkType: hard + +"supports-color@npm:^5.3.0": + version: 5.5.0 + resolution: "supports-color@npm:5.5.0" + dependencies: + has-flag: ^3.0.0 + checksum: 95f6f4ba5afdf92f495b5a912d4abee8dcba766ae719b975c56c084f5004845f6f5a5f7769f52d53f40e21952a6d87411bafe34af4a01e65f9926002e38e1dac + languageName: node + linkType: hard + +"supports-preserve-symlinks-flag@npm:^1.0.0": + version: 1.0.0 + resolution: "supports-preserve-symlinks-flag@npm:1.0.0" + checksum: 53b1e247e68e05db7b3808b99b892bd36fb096e6fba213a06da7fab22045e97597db425c724f2bbd6c99a3c295e1e73f3e4de78592289f38431049e1277ca0ae + languageName: node + linkType: hard + +"typed-array-buffer@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-buffer@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.2.1 + is-typed-array: ^1.1.10 + checksum: 3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-length@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "typed-array-byte-offset@npm:1.0.0" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + has-proto: ^1.0.1 + is-typed-array: ^1.1.10 + checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.4": + version: 1.0.4 + resolution: "typed-array-length@npm:1.0.4" + dependencies: + call-bind: ^1.0.2 + for-each: ^0.3.3 + is-typed-array: ^1.1.9 + checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 + languageName: node + linkType: hard + +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + has-bigints: ^1.0.2 + has-symbols: ^1.0.3 + which-boxed-primitive: ^1.0.2 + checksum: b7a1cf5862b5e4b5deb091672ffa579aa274f648410009c81cca63fed3b62b610c4f3b773f912ce545bb4e31edc3138975b5bc777fc6e4817dca51affb6380e9 + languageName: node + linkType: hard + +"validate-npm-package-license@npm:^3.0.1": + version: 3.0.4 + resolution: "validate-npm-package-license@npm:3.0.4" + dependencies: + spdx-correct: ^3.0.0 + spdx-expression-parse: ^3.0.0 + checksum: 35703ac889d419cf2aceef63daeadbe4e77227c39ab6287eeb6c1b36a746b364f50ba22e88591f5d017bc54685d8137bc2d328d0a896e4d3fd22093c0f32a9ad + languageName: node + linkType: hard + +"which-boxed-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "which-boxed-primitive@npm:1.0.2" + dependencies: + is-bigint: ^1.0.1 + is-boolean-object: ^1.1.0 + is-number-object: ^1.0.4 + is-string: ^1.0.5 + is-symbol: ^1.0.3 + checksum: 53ce774c7379071729533922adcca47220228405e1895f26673bbd71bdf7fb09bee38c1d6399395927c6289476b5ae0629863427fd151491b71c4b6cb04f3a5e + languageName: node + linkType: hard + +"which-module@npm:^2.0.0": + version: 2.0.1 + resolution: "which-module@npm:2.0.1" + checksum: 1967b7ce17a2485544a4fdd9063599f0f773959cca24176dbe8f405e55472d748b7c549cd7920ff6abb8f1ab7db0b0f1b36de1a21c57a8ff741f4f1e792c52be + languageName: node + linkType: hard + +"which-typed-array@npm:^1.1.10, which-typed-array@npm:^1.1.11": + version: 1.1.11 + resolution: "which-typed-array@npm:1.1.11" + dependencies: + available-typed-arrays: ^1.0.5 + call-bind: ^1.0.2 + for-each: ^0.3.3 + gopd: ^1.0.1 + has-tostringtag: ^1.0.0 + checksum: 711ffc8ef891ca6597b19539075ec3e08bb9b4c2ca1f78887e3c07a977ab91ac1421940505a197758fb5939aa9524976d0a5bbcac34d07ed6faa75cedbb17206 + languageName: node + linkType: hard + +"which@npm:^1.2.9": + version: 1.3.1 + resolution: "which@npm:1.3.1" + dependencies: + isexe: ^2.0.0 + bin: + which: ./bin/which + checksum: f2e185c6242244b8426c9df1510e86629192d93c1a986a7d2a591f2c24869e7ffd03d6dac07ca863b2e4c06f59a4cc9916c585b72ee9fa1aa609d0124df15e04 + languageName: node + linkType: hard + +"wrap-ansi@npm:^6.2.0": + version: 6.2.0 + resolution: "wrap-ansi@npm:6.2.0" + dependencies: + ansi-styles: ^4.0.0 + string-width: ^4.1.0 + strip-ansi: ^6.0.0 + checksum: 6cd96a410161ff617b63581a08376f0cb9162375adeb7956e10c8cd397821f7eb2a6de24eb22a0b28401300bf228c86e50617cd568209b5f6775b93c97d2fe3a + languageName: node + linkType: hard + +"wrappy@npm:1": + version: 1.0.2 + resolution: "wrappy@npm:1.0.2" + checksum: 159da4805f7e84a3d003d8841557196034155008f817172d4e986bd591f74aa82aa7db55929a54222309e01079a65a92a9e6414da5a6aa4b01ee44a511ac3ee5 + languageName: node + linkType: hard + +"y18n@npm:^4.0.0": + version: 4.0.3 + resolution: "y18n@npm:4.0.3" + checksum: 014dfcd9b5f4105c3bb397c1c8c6429a9df004aa560964fb36732bfb999bfe83d45ae40aeda5b55d21b1ee53d8291580a32a756a443e064317953f08025b1aa4 + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.2": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + +"yargs@npm:^15.3.1": + version: 15.4.1 + resolution: "yargs@npm:15.4.1" + dependencies: + cliui: ^6.0.0 + decamelize: ^1.2.0 + find-up: ^4.1.0 + get-caller-file: ^2.0.1 + require-directory: ^2.1.1 + require-main-filename: ^2.0.0 + set-blocking: ^2.0.0 + string-width: ^4.2.0 + which-module: ^2.0.0 + y18n: ^4.0.0 + yargs-parser: ^18.1.2 + checksum: 40b974f508d8aed28598087720e086ecd32a5fd3e945e95ea4457da04ee9bdb8bdd17fd91acff36dc5b7f0595a735929c514c40c402416bbb87c03f6fb782373 + languageName: node + linkType: hard diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/.eslintrc.yaml b/vendor/git.knownelement.com/ExternalVendorCode/mo/.eslintrc.yaml new file mode 100644 index 0000000..6ee5d88 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/.eslintrc.yaml @@ -0,0 +1,168 @@ +parserOptions: + ecmaVersion: latest + sourceType: module +env: + es6: true + jasmine: true + node: true +extends: eslint:recommended +rules: + accessor-pairs: error + array-bracket-spacing: + - error + - never + array-callback-return: error + block-spacing: + - error + - never + brace-style: error + comma-dangle: error + comma-spacing: error + comma-style: error + complexity: + - error + - 10 + computed-property-spacing: error + consistent-return: error + consistent-this: error + constructor-super: error + curly: error + default-case: error + dot-notation: error + eol-last: error + eqeqeq: error + generator-star-spacing: error + global-require: off + guard-for-in: error + jsx-quotes: error + key-spacing: error + keyword-spacing: error + linebreak-style: error + lines-around-comment: + - error + - + allowBlockStart: true + allowObjectStart: true + allowArrayStart: true + max-statements-per-line: error + new-cap: error + new-parens: error + no-array-constructor: error + no-bitwise: error + no-caller: error + no-case-declarations: error + no-catch-shadow: error + no-class-assign: error + no-cond-assign: error + no-confusing-arrow: error + no-console: off + no-const-assign: error + no-constant-condition: error + no-continue: error + no-delete-var: error + no-dupe-args: error + no-dupe-class-members: error + no-dupe-keys: error + no-duplicate-case: error + no-duplicate-imports: error + no-empty: off + no-empty-character-class: error + no-empty-pattern: error + no-eq-null: error + no-eval: error + no-extend-native: error + no-extra-bind: error + no-extra-boolean-cast: error + no-extra-label: error + no-extra-semi: error + no-fallthrough: error + no-func-assign: error + no-implied-eval: error + no-inner-declarations: error + no-invalid-this: error + no-invalid-regexp: error + no-irregular-whitespace: error + no-iterator: error + no-label-var: error + no-labels: error + no-lone-blocks: error + no-lonely-if: error + no-loop-func: error + no-mixed-spaces-and-tabs: error + no-multi-spaces: error + no-multi-str: error + no-multiple-empty-lines: + - error + - + max: 2 + no-native-reassign: error + no-negated-condition: error + no-nested-ternary: error + no-new: error + no-new-func: error + no-new-object: error + no-new-symbol: error + no-new-wrappers: error + no-obj-calls: error + no-octal: error + no-octal-escape: error + no-path-concat: error + no-plusplus: error + no-proto: error + no-redeclare: error + no-regex-spaces: error + no-restricted-globals: error + no-return-assign: error + no-script-url: error + no-self-assign: error + no-self-compare: error + no-sequences: error + no-shadow: error + no-shadow-restricted-names: error + no-spaced-func: error + no-sparse-arrays: error + no-this-before-super: error + no-throw-literal: error + no-trailing-spaces: error + no-undef: error + no-undef-init: error + no-unexpected-multiline: error + no-unmodified-loop-condition: error + no-unneeded-ternary: error + no-unreachable: error + no-unsafe-finally: error + no-unused-expressions: error + no-unused-labels: error + no-unused-vars: error + no-useless-call: error + no-useless-computed-key: error + no-useless-concat: error + no-useless-constructor: error + no-useless-escape: error + no-void: error + no-warning-comments: warn + no-whitespace-before-property: error + no-with: error + operator-assignment: error + padded-blocks: + - error + - never + prefer-const: error + quote-props: + - error + - as-needed + radix: error + require-yield: error + semi: error + semi-spacing: error + space-before-blocks: error + space-in-parens: error + space-infix-ops: + - error + - + int32Hint: false + space-unary-ops: error + spaced-comment: error + use-isnan: error + valid-typeof: error + yield-star-spacing: error diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/.github/workflows/ci.yaml b/vendor/git.knownelement.com/ExternalVendorCode/mo/.github/workflows/ci.yaml new file mode 100644 index 0000000..ef4e8fb --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/.github/workflows/ci.yaml @@ -0,0 +1,13 @@ +name: CI +on: [push] +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v1 + - name: Run tests + run: ./run-tests + - name: Run against spec + run: ./run-spec diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/.github/workflows/release.yaml b/vendor/git.knownelement.com/ExternalVendorCode/mo/.github/workflows/release.yaml new file mode 100644 index 0000000..118f5d3 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/.github/workflows/release.yaml @@ -0,0 +1,45 @@ +name: docker push +on: [push] +jobs: + push_to_registry: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Docker meta + if: startsWith(github.ref, 'refs/tags/') + id: docker_meta + uses: crazy-max/ghaction-docker-meta@v1 + with: + images: ghcr.io/${{ github.repository }} + tag-match: v(.*) + - name: Set up QEMU + if: startsWith(github.ref, 'refs/tags/') + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + - name: Cache Docker layers + if: startsWith(github.ref, 'refs/tags/') + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Login to GitHub Container Registry + if: startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + builder: ${{ steps.buildx.outputs.name }} + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.docker_meta.outputs.tags }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + push: true \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/.gitignore b/vendor/git.knownelement.com/ExternalVendorCode/mo/.gitignore new file mode 100644 index 0000000..1900b08 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/.gitignore @@ -0,0 +1,9 @@ +*.swp +diagnostic.partial +diagnostic.test +tests/*.diff +spec/ +spec-runner/ +node_modules/ +package.json +package-lock.json diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/API.md b/vendor/git.knownelement.com/ExternalVendorCode/mo/API.md new file mode 100644 index 0000000..b63865e --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/API.md @@ -0,0 +1,616 @@ +API / Function Documentation +============================ + +This documentation is generated automatically from the source of [mo] thanks to [tomdoc.sh]. + + +`mo()` +------ + +Public: Template parser function. Writes templates to stdout. + +* $0 - Name of the mo file, used for getting the help message. +* $@ - Filenames to parse. + +Returns nothing. + + +`mo::debug()` +------------- + +Internal: Show a debug message + +* $1 - The debug message to show + +Returns nothing. + + +`mo::debugShowState()` +---------------------- + +Internal: Show a debug message and internal state information + +No arguments + +Returns nothing. + + +`mo::error()` +------------- + +Internal: Show an error message and exit + +* $1 - The error message to show +* $2 - Error code + +Returns nothing. Exits the program. + + +`mo::errorNear()` +----------------- + +Internal: Show an error message with a snippet of context and exit + +* $1 - The error message to show +* $2 - The starting point +* $3 - Error code + +Returns nothing. Exits the program. + + +`mo::usage()` +------------- + +Internal: Displays the usage for mo. Pulls this from the file that contained the `mo` function. Can only work when the right filename comes is the one argument, and that only happens when `mo` is called with `$0` set to this file. + +* $1 - Filename that has the help message + +Returns nothing. + + +`mo::content()` +--------------- + +Internal: Fetches the content to parse into MO_UNPARSED. Can be a list of partials for files or the content from stdin. + +* $1 - Destination variable name +* $2-@ - File names (optional), read from stdin otherwise + +Returns nothing. + + +`mo::contentFile()` +------------------- + +Internal: Read a file into MO_UNPARSED. + +* $1 - Destination variable name. +* $2 - Filename to load - if empty, defaults to /dev/stdin + +Returns nothing. + + +`mo::indirect()` +---------------- + +Internal: Send a variable up to the parent of the caller of this function. + +* $1 - Variable name +* $2 - Value + +Examples + + callFunc () { + local "$1" && mo::indirect "$1" "the value" + } + callFunc dest + echo "$dest" # writes "the value" + +Returns nothing. + + +`mo::indirectArray()` +--------------------- + +Internal: Send an array as a variable up to caller of a function + +* $1 - Variable name +* $2-@ - Array elements + +Examples + + callFunc () { + local myArray=(one two three) + local "$1" && mo::indirectArray "$1" "${myArray[@]}" + } + callFunc dest + echo "${dest[@]}" # writes "one two three" + +Returns nothing. + + +`mo::trimUnparsed()` +-------------------- + +Internal: Trim leading characters from MO_UNPARSED + +Returns nothing. + + +`mo::chomp()` +------------- + +Internal: Remove whitespace and content after whitespace + +* $1 - Name of the destination variable +* $2 - The string to chomp + +Returns nothing. + + +`mo::parse()` +------------- + +Public: Parses text, interpolates mustache tags. Utilizes the current value of MO_OPEN_DELIMITER, MO_CLOSE_DELIMITER, and MO_STANDALONE_CONTENT. Those three variables shouldn't be changed by user-defined functions. + +* $1 - Destination variable name - where to store the finished content +* $2 - Content to parse +* $3 - Preserve standalone status/content - truthy if not empty. When set to a value, that becomes the standalone content value + +Returns nothing. + + +`mo::parseInternal()` +--------------------- + +Internal: Parse MO_UNPARSED, writing content to MO_PARSED. Interpolates mustache tags. + +No arguments + +Returns nothing. + + +`mo::parseBlock()` +------------------ + +Internal: Handle parsing a block + +* $1 - Invert condition ("true" or "false") + +Returns nothing + + +`mo::parseBlockFunction()` +-------------------------- + +Internal: Handle parsing a block whose first argument is a function + +* $1 - Invert condition ("true" or "false") +* $2-@ - The parsed tokens from inside the block tags + +Returns nothing + + +`mo::parseBlockArray()` +----------------------- + +Internal: Handle parsing a block whose first argument is an array + +* $1 - Invert condition ("true" or "false") +* $2-@ - The parsed tokens from inside the block tags + +Returns nothing + + +`mo::parseBlockValue()` +----------------------- + +Internal: Handle parsing a block whose first argument is a value + +* $1 - Invert condition ("true" or "false") +* $2-@ - The parsed tokens from inside the block tags + +Returns nothing + + +`mo::parsePartial()` +-------------------- + +Internal: Handle parsing a partial + +No arguments. + +Indentation will be applied to the entire partial's contents before parsing. This indentation is based on the whitespace that ends the previously parsed content. + +Returns nothing + + +`mo::parseComment()` +-------------------- + +Internal: Handle parsing a comment + +No arguments. + +Returns nothing + + +`mo::parseDelimiter()` +---------------------- + +Internal: Handle parsing the change of delimiters + +No arguments. + +Returns nothing + + +`mo::parseValue()` +------------------ + +Internal: Handle parsing value or function call + +No arguments. + +Returns nothing + + +`mo::isFunction()` +------------------ + +Internal: Determine if the given name is a defined function. + +* $1 - Function name to check + +Be extremely careful. Even if strict mode is enabled, it is not honored in newer versions of Bash. Any errors that crop up here will not be caught automatically. + +Examples + + moo () { + echo "This is a function" + } + if mo::isFunction moo; then + echo "moo is a defined function" + fi + +Returns 0 if the name is a function, 1 otherwise. + + +`mo::isArray()` +--------------- + +Internal: Determine if a given environment variable exists and if it is an array. + +* $1 - Name of environment variable + +Be extremely careful. Even if strict mode is enabled, it is not honored in newer versions of Bash. Any errors that crop up here will not be caught automatically. + +Examples + + var=(abc) + if moIsArray var; then + echo "This is an array" + echo "Make sure you don't accidentally use \$var" + fi + +Returns 0 if the name is not empty, 1 otherwise. + + +`mo::isArrayIndexValid()` +------------------------- + +Internal: Determine if an array index exists. + +* $1 - Variable name to check +* $2 - The index to check + +Has to check if the variable is an array and if the index is valid for that type of array. + +Returns true (0) if everything was ok, 1 if there's any condition that fails. + + +`mo::isVarSet()` +---------------- + +Internal: Determine if a variable is assigned, even if it is assigned an empty value. + +* $1 - Variable name to check. + +Can not use logic like this in case invalid variable names are passed. [[ "${!1-a}" == "${!1-b}" ]] + +Returns true (0) if the variable is set, 1 if the variable is unset. + + +`mo::isTruthy()` +---------------- + +Internal: Determine if a value is considered truthy. + +* $1 - The value to test +* $2 - Invert the value, either "true" or "false" + +Returns true (0) if truthy, 1 otherwise. + + +`mo::evaluate()` +---------------- + +Internal: Convert token list to values + +* $1 - Destination variable name +* $2-@ - Tokens to convert + +Sample call: + + mo::evaluate dest NAME username VALUE abc123 PAREN 2 + +Returns nothing. + + +`mo::evaluateListOfSingles()` +----------------------------- + +Internal: Convert an argument list to individual values. + +* $1 - Destination variable name +* $2-@ - A list of argument types and argument name/value. + +This assumes each value is separate from the rest. In contrast, mo::evaluate will pass all arguments to a function if the first value is a function. + +Sample call: + + mo::evaluateListOfSingles dest NAME username VALUE abc123 + +Returns nothing. + + +`mo::evaluateSingle()` +---------------------- + +Internal: Evaluate a single argument + +* $1 - Name of variable for result +* $2 - Type of argument, either NAME or VALUE +* $3 - Argument + +Returns nothing + + +`mo::evaluateKey()` +------------------- + +Internal: Return the value for @key based on current's name + +* $1 - Name of variable for result + +Returns nothing + + +`mo::evaluateVariable()` +------------------------ + +Internal: Handle a variable name + +* $1 - Destination variable name +* $2 - Variable name + +Returns nothing. + + +`mo::findVariableName()` +------------------------ + +Internal: Find the name of a variable to use + +* $1 - Destination variable name, receives an array +* $2 - Variable name from the template + +The array contains the following values + * [0] - Variable name + * [1] - Array index, or empty string + +Example variables a="a" + b="b" + c=("c.0" "c.1") + d=([b]="d.b" [d]="d.d") + +Given these inputs (function input, current value), produce these outputs a c => a + a c.0 => a + b d => d.b + b d.d => d.b + a d => d.a + a d.d => d.a + c.0 d => c.0 + d.b d => d.b + '' c => c + '' c.0 => c.0 + Returns nothing. + + +`mo::join()` +------------ + +Internal: Join / implode an array + +* $1 - Variable name to receive the joined content +* $2 - Joiner +* $3-@ - Elements to join + +Returns nothing. + + +`mo::evaluateFunction()` +------------------------ + +Internal: Call a function. + +* $1 - Variable for output +* $2 - Content to pass +* $3 - Function to call +* $4-@ - Additional arguments as list of type, value/name + +Returns nothing. + + +`mo::standaloneCheck()` +----------------------- + +Internal: Check if a tag appears to have only whitespace before it and after it on a line. There must be a new line before and there must be a newline after or the end of a string + +No arguments. + +Returns 0 if this is a standalone tag, 1 otherwise. + + +`mo::standaloneProcess()` +------------------------- + +Internal: Process content before and after a tag. Remove prior whitespace up to the previous newline. Remove following whitespace up to and including the next newline. + +No arguments. + +Returns nothing. + + +`mo::indentLines()` +------------------- + +Internal: Apply indentation before any line that has content in MO_UNPARSED. + +* $1 - Destination variable name. +* $2 - The indentation string. +* $3 - The content that needs the indentation string prepended on each line. + +Returns nothing. + + +`mo::escape()` +-------------- + +Internal: Escape a value + +* $1 - Destination variable name +* $2 - Value to escape + +Returns nothing + + +`mo::getContentUntilClose()` +---------------------------- + +Internal: Get the content up to the end of the block by minimally parsing and balancing blocks. Returns the content before the end tag to the caller and removes the content + the end tag from MO_UNPARSED. This can change the delimiters, adjusting MO_OPEN_DELIMITER and MO_CLOSE_DELIMITER. + +* $1 - Destination variable name +* $2 - Token string to match for a closing tag + +Returns nothing. + + +`mo::tokensToString()` +---------------------- + +Internal: Convert a list of tokens to a string + +* $1 - Destination variable for the string +* $2-$@ - Token list + +Returns nothing. + + +`mo::getContentTrim()` +---------------------- + +Internal: Trims content from MO_UNPARSED, returns trimmed content. + +* $1 - Destination variable + +Returns nothing. + + +`mo::getContentComment()` +------------------------- + +Get the content up to and including a close tag + +* $1 - Destination variable + +Returns nothing. + + +`mo::getContentDelimiter()` +--------------------------- + +Get the content up to and including a close tag. First two non-whitespace tokens become the new open and close tag. + +* $1 - Destination variable + +Returns nothing. + + +`mo::getContentWithinTag()` +--------------------------- + +Get the content up to and including a close tag. First two non-whitespace tokens become the new open and close tag. + +* $1 - Destination variable, an array +* $2 - Terminator string + +The array contents: [0] The raw content within the tag + [1] The parsed tokens as a single string + +Returns nothing. + + +`mo::tokenizeTagContents()` +--------------------------- + +Internal: Parse MO_UNPARSED and retrieve the content within the tag delimiters. Converts everything into an array of string values. + +* $1 - Destination variable for the array of contents. +* $2 - Stop processing when this content is found. + +The list of tokens are in RPN form. The first item in the resulting array is the number of actual tokens (after combining command tokens) in the list. + +Given: a 'bc' "de\"\n" (f {g 'h'}) Result: ([0]=4 [1]=NAME [2]=a [3]=VALUE [4]=bc [5]=VALUE [6]=$'de\"\n' [7]=NAME [8]=f [9]=NAME [10]=g [11]=VALUE [12]=h [13]=BRACE [14]=2 [15]=PAREN [16]=2 + +Returns nothing + + +`mo::tokenizeTagContentsName()` +------------------------------- + +Internal: Get the contents of a variable name. + +* $1 - Destination variable name for the token list (array of strings) + +Returns nothing + + +`mo::tokenizeTagContentsDoubleQuote()` +-------------------------------------- + +Internal: Get the contents of a tag in double quotes. Parses the backslash sequences. + +* $1 - Destination variable name for the token list (array of strings) + +Returns nothing. + + +`mo::tokenizeTagContentsSingleQuote()` +-------------------------------------- + +Internal: Get the contents of a tag in single quotes. Only gets the raw value. + +* $1 - Destination variable name for the token list (array of strings) + +Returns nothing. + + +`MO_ORIGINAL_COMMAND` +--------------------- + +Save the original command's path for usage later + + +[mo]: ./mo +[tomdoc.sh]: https://github.com/tests-always-included/tomdoc.sh diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/Dockerfile b/vendor/git.knownelement.com/ExternalVendorCode/mo/Dockerfile new file mode 100644 index 0000000..663495e --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine + +RUN apk add --no-cache bash +ADD mo /usr/local/bin/mo +RUN chmod +x /usr/local/bin/mo + +ENTRYPOINT /usr/local/bin/mo diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/LICENSE.md b/vendor/git.knownelement.com/ExternalVendorCode/mo/LICENSE.md new file mode 100644 index 0000000..93622a5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/LICENSE.md @@ -0,0 +1,7 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. + +The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by contributors", in the same place and form as other third-party acknowledgments. Alternately, this acknowledgment may appear in the software itself, in the same form and location as other such third-party acknowledgments. diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/README.md b/vendor/git.knownelement.com/ExternalVendorCode/mo/README.md new file mode 100644 index 0000000..7f6af1c --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/README.md @@ -0,0 +1,340 @@ +Mo - Mustache Templates in Bash +=============================== + +[Mustache] templates are simple, logic-less templates. Because of their simplicity, they are able to be ported to many languages. The syntax is quite simple. + + Hello, {{NAME}}. + + I hope your {{TIME_PERIOD}} was fun. + +The above file is [`demo/fun-trip.mo`](demo/fun-trip.mo). Let's try using this template some data from bash's environment. Go to your checked out copy of the project and run a command like this: + + NAME=Tyler TIME_PERIOD=weekend ./mo demo/fun-trip.mo + +Your result? + + Hello, Tyler. + + I hope your weekend was fun. + +This bash version supports conditionals, functions (both as filters and as values), as well as indexed arrays (for iteration). You are able to leverage these additional features by adding more information into the environment. It is easiest to do this when you source `mo`. See the [demo scripts](demo/) for further examples. + + +Requirements +------------ + +* Bash 3.x (the aim is to make it work on Macs) +* The "coreutils" package (`basename` and `cat`) +* ... that's it. Why? Because bash **can**! + +If you intend to develop this and run the official specs, you also need node.js. + + +Installation +------------ + +There are a few ways you can install this tool. How you install it depends on how you want to use it. + + +### Globally; For Everyone + +You can install this file in `/usr/local/bin/` or `/usr/bin/` by simply downloading it, changing the permissions, then moving it to the right location. Double check that your system's PATH includes the destination folder, otherwise users may have a hard time starting the command. + + # Download + curl -sSL https://raw.githubusercontent.com/tests-always-included/mo/master/mo -o mo + + # Make executable + chmod +x mo + + # Move to the right folder + sudo mv mo /usr/local/bin/ + + # Test + echo "works" | mo + + +### Locally; For Yourself + +This is very similar to installing it globally but it does not require root privileges. It is very important that your PATH includes the destination folder otherwise it won't work. Some local folders that are typically used are `~/bin/` and `~/.local/bin/`. + + # Download + curl -sSL https://raw.githubusercontent.com/tests-always-included/mo/master/mo -o mo + + # Make executable + chmod +x mo + + # Ensure destination folder exists + mkdir -p ~/.local/bin/ + + # Move to the right folder + mv mo ~/.local/bin/ + + # Test + echo "works" | mo + + +### As A Library; For A Tool + +Bash scripts can source `mo` to include the functionality in their own routines. This usage typically would have `mo` saved to a `lib/` folder in an application and your other scripts would use `. lib/mo` to bring it into your project. + + # Download + curl -sSL https://raw.githubusercontent.com/tests-always-included/mo/master/mo -o mo + + # Move into your project folder + mv mo ~/projects/amazing-things/lib/ + +To allow it to work this way, you either should source the file (`. "lib/mo"`) or make it executable (`chmod +x lib/mo`) and run it from your scripts. + + +How to Use +---------- + +If you only plan using strings and numbers, nothing could be simpler. In your shell script you can choose to export the variables. The below script is [`demo/using-strings`](demo/using-strings). + + #!/usr/bin/env bash + cd "$(dirname "$0")" # Go to the script's directory + export TEST="This is a test" + echo "Your message: {{TEST}}" | ../mo + +The result? "Your message: This is a test". + +Using arrays adds a slight level of complexity. *You must source `mo`.* Look at [`demo/using-arrays`](demo/using-arrays). + + #!/usr/bin/env bash + cd "$(dirname "$0")" # Go to the script's directory + export ARRAY=( one two "three three three" four five ) + . ../mo # This loads the "mo" function + cat << EOF | mo + Here are the items in the array: + {{#ARRAY}} + * {{.}} + {{/ARRAY}} + EOF + +The result? You get a list of the five elements in the array. It is vital that you source `mo` and run the function when you want arrays to work because you can not execute a command and have arrays passed to that command's environment. Instead, we first source the file to load the function and then run the function directly. + +There are more scripts available in the [demos directory](demo/) that could help illustrate how you would use this program. + +There are additional features that the program supports. Try using `mo --help` to see what is available. + +Please note that this command is written in Bash and pulls data from either the environment or (when using `--source`) from a text file that will be sourced and loaded into the environment, which means you will need to have Bash-style variables defined. Please see the examples in `demo/` for different ways you can use `mo`. + + +Enhancements +------------ + +In addition to many of the features built-in to Mustache, `mo` includes a number of unique features that make it a bit more powerful. + +### Loop @key + +`mo` implements Handlebar's `@key` references for outputting the key inside of a loop: + +Env: +```bash +myarr=( foo bar ) + +# Bash v4+ +declare -A myassoc +myassoc[hello]="mo" +myassoc[world]="is great" +``` + +Template: +```handlebars +{{#myarr}} + - {{@key}} {{.}} +{{/myarr}} + +{{#myassoc}} + * {{@key}} {{.}} +{{/myassoc}} +``` + +Output: +```markdown + - 0 foo + - 1 bar + + * hello mo + * world is great +``` + + +### Helpers / Function Arguments + +Function Arguments are not a part of the official Mustache implementation, and are more often associated with Handlebar's Helper functionality. + +`mo` allows for passing strings to functions. + +```handlebars +{{myfunc foo bar}} +``` + +For security reasons, these arguments are not immediately available to function calls without a flag. + +#### with `--allow-function-arguments` + +```bash +myfunc() { + # Outputs "foo, bar" + echo "$1, $2"; +} +``` + +#### Using `$MO_FUNCTION_ARGS` + +```bash +myfunc() { + # Outputs "foo, bar" + echo "${MO_FUNCTION_ARGS[0]}, ${MO_FUNCTION_ARGS[1]}"; +} +``` + +### Triple Mustache, Parenthesis, and Quotes + +Normally, triple mustache syntax, such as `{{{var}}}` will avoid HTML escaping of the variable. Because HTML escaping is not supported in `mo`, this is now used differently. Anything within braces will be looked up and the values will be concatenated together and the result will be treated as a value. Anything in parenthesis will be looked up, concatenated, and treated as a name. Also, anything in single quotes is passed as a value; double quoted things first are unescaped and then passed as a value. + +``` +# Example input +var=abc +user=admin +admin=Administrator +u=user +abc=([0]=zero [1]=one [2]=two) +``` + +| Mustache syntax | Resulting output | Notes | +|-----------------|------------------|-------| +| `{{var}}` | `abc` | Normal behavior | +| `{{var us}}` | `abcus` | Concatenation | +| `{{'var'}}` | `var` | Passing as a value | +| `{{"a\tb"}}` | `a b` | There was an escaped tab in the value | +| `{{u}}` | `user` | Normal behavior | +| `{{{u}}}` | `user` | Look up "$u", treat as the value `{{'user'}}` | +| `{{(u)}}` | `admin` | Look up "$u", treat as the name `{{user}}` | +| `{{var user}}` | `abcuser` | Concatenation | +| `{{(var '.1')}}` | `one` | Look up "$var", treat as "abc", then concatenate ".1" and look up `{{abc.1}}` | + +In double-quoted strings, the following escape sequences are defined. + +* `\"` - Quote +* `\b` - Bell +* `\e` - Escape (note that Bash typically uses $'\E' for the same thing) +* `\f` - Form feed +* `\n` - Newline +* `\r` - Carriage return +* `\t` - Tab +* `\v` - Vertical tab +* Anything else will skip the `\` and place the next character. However, this implementation is allowed to change in the future if a different escape character mapping becomes commonplace. + + +Environment Variables and Functions +----------------------------------- + +There are several functions and variables used to process templates. `mo` reserves variables that start with `MO_` for variables exposing data or configuration, functions starting with `mo::`, and local variables starting with `mo[A-Z]`. You are welcome to use internal functions, though only ones that are marked as "Public" should not change their interface. Scripts may also read any of the variables. + +Functions are all executed in a subshell, with another subshell for lambdas. Thus, your lambda can't affect the parsing of a template. There's more information about lambdas when talking about tests that fail. + +* `MO_ALLOW_FUNCTION_ARGUMENTS` - When set to a non-empty value, this allows functions referenced in templates to receive additional options and arguments. +* `MO_CLOSE_DELIMITER` - The string used when closing a tag. Defaults to "}}". Used internally. +* `MO_CLOSE_DELIMITER_DEFAULT` - The default value of `MO_CLOSE_DELIMITER`. Used when resetting the close delimiter, such as when parsing a partial. +* `MO_CURRENT` - Variable name to use for ".". +* `MO_DEBUG` - When set to a non-empty value, additional debug information is written to stderr. +* `MO_FUNCTION_ARGS` - Arguments passed to the function. +* `MO_FAIL_ON_FILE` - If a filename from the command-line is missing or a partial does not exist, abort with an error. +* `MO_FAIL_ON_FUNCTION` - If a function returns a non-zero status code, abort with an error. +* `MO_FAIL_ON_UNSET` - When set to a non-empty value, expansion of an unset env variable will be aborted with an error. +* `MO_FALSE_IS_EMPTY` - When set to a non-empty value, the string "false" will be treated as an empty value for the purposes of conditionals. +* `MO_OPEN_DELIMITER` - The string used when opening a tag. Defaults to "{{". Used internally. +* `MO_OPEN_DELIMITER_DEFAULT` - The default value of MO_OPEN_DELIMITER. Used when resetting the open delimiter, such as when parsing a partial. +* `MO_ORIGINAL_COMMAND` - Used to find the `mo` program in order to generate a help message. +* `MO_PARSED` - Content that has made it through the template engine. +* `MO_STANDALONE_CONTENT` - The unparsed content that preceeded the current tag. When a standalone tag is encountered, this is checked to see if it only contains whitespace. If this and the whitespace condition after a tag is met, then this will be reset to $'\n'. +* `MO_UNPARSED` - Template content yet to make it through the parser. + + +Concessions +----------- + +I admit that implementing everything in bash just doesn't make a lot of sense. For example, the following things just don't work because they don't really mesh with the "bash way". + +Pull requests to solve the following issues would be helpful. + + +### Mustache Syntax + +* Dotted names are supported but only for associative arrays (Bash 4). See [`demo/associative-arrays`](demo/associative-arrays) for an example. +* There's no "top level" object, so `echo '{{.}}' | ./mo` does not do anything useful. In other languages you can say the data for the template is a string and in `mo` the data is always the environment. Luckily this type of usage is rare and `{{.}}` works great when iterating over an array. +* [Parents](https://mustache.github.io/mustache.5.html#Parents), where a template can override chunks of a partial, are not supported. +* HTML encoding is not built into `mo`. `{{{var}}}`, `{{&var}}` and `{{var}}` all do the same thing. `echo '{{TEST}}' | TEST='' mo` will give you "``" instead of "`>b<`". + + +### General Scripting Issues + +* Using binary files as templates is simply not allowed. +* Bash does not support anything more complex than strings/numbers inside of associative arrays. I'm not able to add objects nor nested arrays to bash - it's just a shell after all! +* You must make sure the data is in the environment when `mo` runs. The easiest way to do that is to source `mo` in your shell script after setting up lots of other environment variables / functions. + + +Developing +---------- + +Check out the code and hack away. Please add tests to show off bugs before fixing them. New functionality should also be covered by a test. + +First, make sure you install Node.js. After that, run `npm run install-tests` to get the dependencies and the repository of YAML tests. Run `npm run test` to run the JavaScript tests. There's over 100 of them, which is great. Not all of them will pass, but that's discussed later. + +When submitting patches, make sure to run them past [ShellCheck] and ensure no problems are found. Also please use Bash 3 syntax if you are manipulating arrays. + + +### Porting and Backporting + +In case of problems, setting MO_DEBUG to a non-empty value will give you LOTS of output. + + MO_DEBUG=1 ./mo my-template + + +### Failed Specs + +It is acceptable for some of the official spec tests to fail. The spec runner has specific exclusions and overrides to test similar functionality that avoid the following issues. + + * Using `{{.}}` outside of a loop - In order to access any variable, you must use its name. In a loop, `{{.}}` will refer to the current value, but outside the loop you are unable to use this dot notation because there is no current value. + * Deeply nested data - Bash doesn't support complex data structure. Basically, just strings and arrays of strings. + * Interpolation; Multiple Calls: This fails because lambdas execute in a subshell so their output can be captured. If you want state to be preserved, you will need to write it outside of the current environment and load it again later. + * HTML Escaping - Since bash is not often executed in a web server context, it makes no sense to have the output escaped as HTML. Performing shell escaping of variables may be an option in the future if there's a demand. + * Lambdas - Function results are *not* automatically interpreted again. If you want to parse the results as Mustache content, use `mo::parse`. When they use `mo::parse`, it will use the current delimiters. + + For lambdas, these examples may help. + + ```bash + # Retrieve content into a variable. + content=$(cat) + + # Retrieve all content and do not trim newlines at the end. + content=$(cat; echo -n '.') + content=${content%.} + + # Parse content using the current delimiters + mo::parse results "This is my content. Hello, {{username}}" + echo -n "$results" + + # Parse content using the default delimiters + MO_OPEN_DELIMITER=$MO_OPEN_DELIMITER_DEFAULT + MO_CLOSE_DELIMITER=$MO_CLOSE_DELIMITER_DEFAULT + mo::parse results "This is my content. Hello, {{username}}" + echo -n "$results" + ``` + + +### Future Enhancements + +There's a few places in the code marked with `TODO` to signify areas that could use improvement. Care to help? Keep in mind that this uses bash exclusively, so it might not look the prettiest. + + +License +------- + +This program is licensed under an MIT license with an additional non-advertising clause. See [LICENSE.md](LICENSE.md) for the full text. + + +[Mustache]: https://mustache.github.io/ +[ShellCheck]: https://github.com/koalaman/shellcheck diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/associative-arrays b/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/associative-arrays new file mode 100755 index 0000000..f0d8950 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/associative-arrays @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +cd "$(dirname "$0")" # Go to the script's directory + +declare -A DATA +export DATA=([one]=111 [two]=222) +. ../mo + +cat < partial}} + +And here's the same partial with a 4-space indent: + + {{> partial}} + +:-) +EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/partial b/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/partial new file mode 100644 index 0000000..367d1bb --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/partial @@ -0,0 +1 @@ +{{data}} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/sourcing b/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/sourcing new file mode 100755 index 0000000..c5fe201 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/demo/sourcing @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +# This sources a simple script with the env. variables needed for the template. + +cd "$(dirname "$0")" # Go to the script's directory + +cat <&2 + exit 1 + fi + ;; + + -o=* | --open=*) + if [[ "$arg" == --open=* ]]; then + MO_OPEN_DELIMITER_DEFAULT="${arg#--open=}" + else + MO_OPEN_DELIMITER_DEFAULT="${arg#-o=}" + fi + ;; + + -c=* | --close=*) + if [[ "$arg" == --close=* ]]; then + MO_CLOSE_DELIMITER_DEFAULT="${arg#--close=}" + else + MO_CLOSE_DELIMITER_DEFAULT="${arg#-c=}" + fi + ;; + + -d | --debug) + MO_DEBUG=true + ;; + + --) + #: Set a flag indicating we've encountered double hyphens + moDoubleHyphens=true + ;; + + -*) + mo::error "Unknown option: $arg (See --help for options)" + ;; + + *) + #: Every arg that is not a flag or a option should be a file + moFiles=(${moFiles[@]+"${moFiles[@]}"} "$arg") + ;; + esac + fi + done + fi + + mo::debug "Debug enabled" + MO_OPEN_DELIMITER="$MO_OPEN_DELIMITER_DEFAULT" + MO_CLOSE_DELIMITER="$MO_CLOSE_DELIMITER_DEFAULT" + mo::content moContent ${moFiles[@]+"${moFiles[@]}"} || return 1 + mo::parse moParsed "$moContent" + echo -n "$moParsed" +) + + +# Internal: Show a debug message +# +# $1 - The debug message to show +# +# Returns nothing. +mo::debug() { + if [[ -n "${MO_DEBUG:-}" ]]; then + echo "DEBUG ${FUNCNAME[1]:-?} - $1" >&2 + fi +} + + +# Internal: Show a debug message and internal state information +# +# No arguments +# +# Returns nothing. +mo::debugShowState() { + if [[ -z "${MO_DEBUG:-}" ]]; then + return + fi + + local moState moTemp moIndex moDots + + mo::escape moTemp "$MO_OPEN_DELIMITER" + moState="open: $moTemp" + mo::escape moTemp "$MO_CLOSE_DELIMITER" + moState="$moState close: $moTemp" + mo::escape moTemp "$MO_STANDALONE_CONTENT" + moState="$moState standalone: $moTemp" + mo::escape moTemp "$MO_CURRENT" + moState="$moState current: $moTemp" + moIndex=$((${#MO_PARSED} - 20)) + moDots=... + + if [[ "$moIndex" -lt 0 ]]; then + moIndex=0 + moDots= + fi + + mo::escape moTemp "${MO_PARSED:$moIndex}" + moState="$moState parsed: $moDots$moTemp" + + moDots=... + + if [[ "${#MO_UNPARSED}" -le 20 ]]; then + moDots= + fi + + mo::escape moTemp "${MO_UNPARSED:0:20}$moDots" + moState="$moState unparsed: $moTemp" + + echo "DEBUG ${FUNCNAME[1]:-?} - $moState" >&2 +} + +# Internal: Show an error message and exit +# +# $1 - The error message to show +# $2 - Error code +# +# Returns nothing. Exits the program. +mo::error() { + echo "ERROR: $1" >&2 + exit "${2:-1}" +} + + +# Internal: Show an error message with a snippet of context and exit +# +# $1 - The error message to show +# $2 - The starting point +# $3 - Error code +# +# Returns nothing. Exits the program. +mo::errorNear() { + local moEscaped + + mo::escape moEscaped "${2:0:40}" + echo "ERROR: $1" >&2 + echo "ERROR STARTS NEAR: $moEscaped" + exit "${3:-1}" +} + + +# Internal: Displays the usage for mo. Pulls this from the file that +# contained the `mo` function. Can only work when the right filename +# comes is the one argument, and that only happens when `mo` is called +# with `$0` set to this file. +# +# $1 - Filename that has the help message +# +# Returns nothing. +mo::usage() { + while read -r line; do + if [[ "${line:0:2}" == "#/" ]]; then + echo "${line:3}" + fi + done < "$MO_ORIGINAL_COMMAND" + echo "" + echo "MO_VERSION=$MO_VERSION" +} + + +# Internal: Fetches the content to parse into MO_UNPARSED. Can be a list of +# partials for files or the content from stdin. +# +# $1 - Destination variable name +# $2-@ - File names (optional), read from stdin otherwise +# +# Returns nothing. +mo::content() { + local moTarget moContent moFilename + + moTarget=$1 + shift + moContent="" + + if [[ "${#@}" -gt 0 ]]; then + for moFilename in "$@"; do + mo::debug "Using template to load content from file: $moFilename" + #: This is so relative paths work from inside template files + moContent="$moContent$MO_OPEN_DELIMITER>$moFilename$MO_CLOSE_DELIMITER" + done + else + mo::debug "Will read content from stdin" + mo::contentFile moContent || return 1 + fi + + local "$moTarget" && mo::indirect "$moTarget" "$moContent" +} + + +# Internal: Read a file into MO_UNPARSED. +# +# $1 - Destination variable name. +# $2 - Filename to load - if empty, defaults to /dev/stdin +# +# Returns nothing. +mo::contentFile() { + local moFile moResult moContent + + #: The subshell removes any trailing newlines. We forcibly add + #: a dot to the content to preserve all newlines. Reading from + #: stdin with a `read` loop does not work as expected, so `cat` + #: needs to stay. + moFile=${2:-/dev/stdin} + + if [[ -e "$moFile" ]]; then + mo::debug "Loading content: $moFile" + moContent=$( + set +Ee + cat -- "$moFile" + moResult=$? + echo -n '.' + exit "$moResult" + ) || return 1 + moContent=${moContent%.} #: Remove last dot + elif [[ -n "${MO_FAIL_ON_FILE-}" ]]; then + mo::error "No such file: $moFile" + else + mo::debug "File does not exist: $moFile" + moContent="" + fi + + local "$1" && mo::indirect "$1" "$moContent" +} + + +# Internal: Send a variable up to the parent of the caller of this function. +# +# $1 - Variable name +# $2 - Value +# +# Examples +# +# callFunc () { +# local "$1" && mo::indirect "$1" "the value" +# } +# callFunc dest +# echo "$dest" # writes "the value" +# +# Returns nothing. +mo::indirect() { + unset -v "$1" + printf -v "$1" '%s' "$2" +} + + +# Internal: Send an array as a variable up to caller of a function +# +# $1 - Variable name +# $2-@ - Array elements +# +# Examples +# +# callFunc () { +# local myArray=(one two three) +# local "$1" && mo::indirectArray "$1" "${myArray[@]}" +# } +# callFunc dest +# echo "${dest[@]}" # writes "one two three" +# +# Returns nothing. +mo::indirectArray() { + unset -v "$1" + + #: IFS must be set to a string containing space or unset in order for + #: the array slicing to work regardless of the current IFS setting on + #: bash 3. This is detailed further at + #: https://github.com/fidian/gg-core/pull/7 + eval "$(printf "IFS= %s=(\"\${@:2}\") IFS=%q" "$1" "$IFS")" +} + + +# Internal: Trim leading characters from MO_UNPARSED +# +# Returns nothing. +mo::trimUnparsed() { + local moI moC + + moI=0 + moC=${MO_UNPARSED:0:1} + + while [[ "$moC" == " " || "$moC" == $'\r' || "$moC" == $'\n' || "$moC" == $'\t' ]]; do + moI=$((moI + 1)) + moC=${MO_UNPARSED:$moI:1} + done + + if [[ "$moI" != 0 ]]; then + MO_UNPARSED=${MO_UNPARSED:$moI} + fi +} + + +# Internal: Remove whitespace and content after whitespace +# +# $1 - Name of the destination variable +# $2 - The string to chomp +# +# Returns nothing. +mo::chomp() { + local moTemp moR moN moT + + moR=$'\r' + moN=$'\n' + moT=$'\t' + moTemp=${2%% *} + moTemp=${moTemp%%"$moR"*} + moTemp=${moTemp%%"$moN"*} + moTemp=${moTemp%%"$moT"*} + + local "$1" && mo::indirect "$1" "$moTemp" +} + + +# Public: Parses text, interpolates mustache tags. Utilizes the current value +# of MO_OPEN_DELIMITER, MO_CLOSE_DELIMITER, and MO_STANDALONE_CONTENT. Those +# three variables shouldn't be changed by user-defined functions. +# +# $1 - Destination variable name - where to store the finished content +# $2 - Content to parse +# $3 - Preserve standalone status/content - truthy if not empty. When set to a +# value, that becomes the standalone content value +# +# Returns nothing. +mo::parse() { + local moOldParsed moOldStandaloneContent moOldUnparsed moResult + + #: The standalone content is a trick to make the standalone tag detection + #: possible. When it's set to content with a newline and if the tag supports + #: it, the standalone content check happens. This check ensures only + #: whitespace is after the last newline up to the tag, and only whitespace + #: is after the tag up to the next newline. If that is the case, remove + #: whitespace and the trailing newline. By setting this to $'\n', we're + #: saying we are at the beginning of content. + mo::debug "Starting parse of ${#2} bytes" + moOldParsed=${MO_PARSED:-} + moOldUnparsed=${MO_UNPARSED:-} + MO_PARSED="" + MO_UNPARSED="$2" + + if [[ -z "${3:-}" ]]; then + moOldStandaloneContent=${MO_STANDALONE_CONTENT:-} + MO_STANDALONE_CONTENT=$'\n' + else + MO_STANDALONE_CONTENT=$3 + fi + + MO_CURRENT=${MO_CURRENT:-} + mo::parseInternal + moResult="$MO_PARSED$MO_UNPARSED" + MO_PARSED=$moOldParsed + MO_UNPARSED=$moOldUnparsed + + if [[ -z "${3:-}" ]]; then + MO_STANDALONE_CONTENT=$moOldStandaloneContent + fi + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Internal: Parse MO_UNPARSED, writing content to MO_PARSED. Interpolates +# mustache tags. +# +# No arguments +# +# Returns nothing. +mo::parseInternal() { + local moChunk + + mo::debug "Starting parse" + + while [[ -n "$MO_UNPARSED" ]]; do + mo::debugShowState + moChunk=${MO_UNPARSED%%"$MO_OPEN_DELIMITER"*} + MO_PARSED="$MO_PARSED$moChunk" + MO_STANDALONE_CONTENT="$MO_STANDALONE_CONTENT$moChunk" + MO_UNPARSED=${MO_UNPARSED:${#moChunk}} + + if [[ -n "$MO_UNPARSED" ]]; then + MO_UNPARSED=${MO_UNPARSED:${#MO_OPEN_DELIMITER}} + mo::trimUnparsed + + case "$MO_UNPARSED" in + '#'*) + #: Loop, if/then, or pass content through function + mo::parseBlock false + ;; + + '^'*) + #: Display section if named thing does not exist + mo::parseBlock true + ;; + + '>'*) + #: Load partial - get name of file relative to cwd + mo::parsePartial + ;; + + '/'*) + #: Closing tag + mo::errorNear "Unbalanced close tag" "$MO_UNPARSED" + ;; + + '!'*) + #: Comment - ignore the tag content entirely + mo::parseComment + ;; + + '='*) + #: Change delimiters + #: Any two non-whitespace sequences separated by whitespace. + mo::parseDelimiter + ;; + + '&'*) + #: Unescaped - mo doesn't escape/unescape + MO_UNPARSED=${MO_UNPARSED#&} + mo::trimUnparsed + mo::parseValue + ;; + + *) + #: Normal environment variable, string, subexpression, + #: current value, key, or function call + mo::parseValue + ;; + esac + fi + done +} + + +# Internal: Handle parsing a block +# +# $1 - Invert condition ("true" or "false") +# +# Returns nothing +mo::parseBlock() { + local moInvertBlock moTokens moTokensString + + moInvertBlock=$1 + MO_UNPARSED=${MO_UNPARSED:1} + mo::tokenizeTagContents moTokens "$MO_CLOSE_DELIMITER" + MO_UNPARSED=${MO_UNPARSED#"$MO_CLOSE_DELIMITER"} + mo::tokensToString moTokensString "${moTokens[@]:1}" + mo::debug "Parsing block: $moTokensString" + + if mo::standaloneCheck; then + mo::standaloneProcess + fi + + if [[ "${moTokens[1]}" == "NAME" ]] && mo::isFunction "${moTokens[2]}"; then + mo::parseBlockFunction "$moInvertBlock" "$moTokensString" "${moTokens[@]:1}" + elif [[ "${moTokens[1]}" == "NAME" ]] && mo::isArray "${moTokens[2]}"; then + mo::parseBlockArray "$moInvertBlock" "$moTokensString" "${moTokens[@]:1}" + else + mo::parseBlockValue "$moInvertBlock" "$moTokensString" "${moTokens[@]:1}" + fi +} + + +# Internal: Handle parsing a block whose first argument is a function +# +# $1 - Invert condition ("true" or "false") +# $2-@ - The parsed tokens from inside the block tags +# +# Returns nothing +mo::parseBlockFunction() { + local moTarget moInvertBlock moTokens moTemp moUnparsed moTokensString + + moInvertBlock=$1 + moTokensString=$2 + shift 2 + moTokens=(${@+"$@"}) + mo::debug "Parsing block function: $moTokensString" + mo::getContentUntilClose moTemp "$moTokensString" + #: Pass unparsed content to the function. + #: Keep the updated delimiters if they changed. + + if [[ "$moInvertBlock" != "true" ]]; then + mo::evaluateFunction moResult "$moTemp" "${moTokens[@]:1}" + MO_PARSED="$MO_PARSED$moResult" + fi + + mo::debug "Done parsing block function: $moTokensString" +} + + +# Internal: Handle parsing a block whose first argument is an array +# +# $1 - Invert condition ("true" or "false") +# $2-@ - The parsed tokens from inside the block tags +# +# Returns nothing +mo::parseBlockArray() { + local moInvertBlock moTokens moResult moArrayName moArrayIndexes moArrayIndex moTemp moUnparsed moOpenDelimiterBefore moCloseDelimiterBefore moOpenDelimiterAfter moCloseDelimiterAfter moParsed moTokensString moCurrent + + moInvertBlock=$1 + moTokensString=$2 + shift 2 + moTokens=(${@+"$@"}) + mo::debug "Parsing block array: $moTokensString" + moOpenDelimiterBefore=$MO_OPEN_DELIMITER + moCloseDelimiterBefore=$MO_CLOSE_DELIMITER + mo::getContentUntilClose moTemp "$moTokensString" + moOpenDelimiterAfter=$MO_OPEN_DELIMITER + moCloseDelimiterAfter=$MO_CLOSE_DELIMITER + moArrayName=${moTokens[1]} + eval "moArrayIndexes=(\"\${!${moArrayName}[@]}\")" + + if [[ "${#moArrayIndexes[@]}" -lt 1 ]]; then + #: No elements + if [[ "$moInvertBlock" == "true" ]]; then + #: Restore the delimiter before parsing + MO_OPEN_DELIMITER=$moOpenDelimiterBefore + MO_CLOSE_DELIMITER=$moCloseDelimiterBefore + moCurrent=$MO_CURRENT + MO_CURRENT=$moArrayName + mo::parse moParsed "$moTemp" "blockArrayInvert$MO_STANDALONE_CONTENT" + MO_CURRENT=$moCurrent + MO_PARSED="$MO_PARSED$moParsed" + fi + else + if [[ "$moInvertBlock" != "true" ]]; then + #: Process for each element in the array + moUnparsed=$MO_UNPARSED + + for moArrayIndex in "${moArrayIndexes[@]}"; do + #: Restore the delimiter before parsing + MO_OPEN_DELIMITER=$moOpenDelimiterBefore + MO_CLOSE_DELIMITER=$moCloseDelimiterBefore + moCurrent=$MO_CURRENT + MO_CURRENT=$moArrayName.$moArrayIndex + mo::debug "Iterate over array using element: $MO_CURRENT" + mo::parse moParsed "$moTemp" "blockArray$MO_STANDALONE_CONTENT" + MO_CURRENT=$moCurrent + MO_PARSED="$MO_PARSED$moParsed" + done + + MO_UNPARSED=$moUnparsed + fi + fi + + MO_OPEN_DELIMITER=$moOpenDelimiterAfter + MO_CLOSE_DELIMITER=$moCloseDelimiterAfter + mo::debug "Done parsing block array: $moTokensString" +} + + +# Internal: Handle parsing a block whose first argument is a value +# +# $1 - Invert condition ("true" or "false") +# $2-@ - The parsed tokens from inside the block tags +# +# Returns nothing +mo::parseBlockValue() { + local moInvertBlock moTokens moResult moUnparsed moOpenDelimiterBefore moOpenDelimiterAfter moCloseDelimiterBefore moCloseDelimiterAfter moParsed moTemp moTokensString moCurrent + + moInvertBlock=$1 + moTokensString=$2 + shift 2 + moTokens=(${@+"$@"}) + mo::debug "Parsing block value: $moTokensString" + moOpenDelimiterBefore=$MO_OPEN_DELIMITER + moCloseDelimiterBefore=$MO_CLOSE_DELIMITER + mo::getContentUntilClose moTemp "$moTokensString" + moOpenDelimiterAfter=$MO_OPEN_DELIMITER + moCloseDelimiterAfter=$MO_CLOSE_DELIMITER + + #: Variable, value, or list of mixed things + mo::evaluateListOfSingles moResult "${moTokens[@]}" + + if mo::isTruthy "$moResult" "$moInvertBlock"; then + mo::debug "Block is truthy: $moResult" + #: Restore the delimiter before parsing + MO_OPEN_DELIMITER=$moOpenDelimiterBefore + MO_CLOSE_DELIMITER=$moCloseDelimiterBefore + moCurrent=$MO_CURRENT + MO_CURRENT=${moTokens[1]} + mo::parse moParsed "$moTemp" "blockValue$MO_STANDALONE_CONTENT" + MO_PARSED="$MO_PARSED$moParsed" + MO_CURRENT=$moCurrent + fi + + MO_OPEN_DELIMITER=$moOpenDelimiterAfter + MO_CLOSE_DELIMITER=$moCloseDelimiterAfter + mo::debug "Done parsing block value: $moTokensString" +} + + +# Internal: Handle parsing a partial +# +# No arguments. +# +# Indentation will be applied to the entire partial's contents before parsing. +# This indentation is based on the whitespace that ends the previously parsed +# content. +# +# Returns nothing +mo::parsePartial() { + local moFilename moResult moIndentation moN moR moTemp moT + + MO_UNPARSED=${MO_UNPARSED:1} + mo::trimUnparsed + mo::chomp moFilename "${MO_UNPARSED%%"$MO_CLOSE_DELIMITER"*}" + MO_UNPARSED="${MO_UNPARSED#*"$MO_CLOSE_DELIMITER"}" + moIndentation="" + + if mo::standaloneCheck; then + moN=$'\n' + moR=$'\r' + moT=$'\t' + moIndentation="$moN${MO_PARSED//"$moR"/"$moN"}" + moIndentation=${moIndentation##*"$moN"} + moTemp=${moIndentation// } + moTemp=${moTemp//"$moT"} + + if [[ -n "$moTemp" ]]; then + moIndentation= + fi + + mo::debug "Adding indentation to partial: '$moIndentation'" + mo::standaloneProcess + fi + + mo::debug "Parsing partial: $moFilename" + + #: Execute in subshell to preserve current cwd and environment + moResult=$( + #: It would be nice to remove `dirname` and use a function instead, + #: but that is difficult when only given filenames. + cd "$(dirname -- "$moFilename")" || exit 1 + echo "$( + local moPartialContent moPartialParsed + + if ! mo::contentFile moPartialContent "${moFilename##*/}"; then + exit 1 + fi + + #: Reset delimiters before parsing + mo::indentLines moPartialContent "$moIndentation" "$moPartialContent" + MO_OPEN_DELIMITER="$MO_OPEN_DELIMITER_DEFAULT" + MO_CLOSE_DELIMITER="$MO_CLOSE_DELIMITER_DEFAULT" + mo::parse moPartialParsed "$moPartialContent" + + #: Fix bash handling of subshells and keep trailing whitespace. + echo -n "$moPartialParsed." + )" || exit 1 + ) || exit 1 + + if [[ -z "$moResult" ]]; then + mo::debug "Error detected when trying to read the file" + exit 1 + fi + + MO_PARSED="$MO_PARSED${moResult%.}" +} + + +# Internal: Handle parsing a comment +# +# No arguments. +# +# Returns nothing +mo::parseComment() { + local moContent moContent + + MO_UNPARSED=${MO_UNPARSED#*"$MO_CLOSE_DELIMITER"} + mo::debug "Parsing comment" + + if mo::standaloneCheck; then + mo::standaloneProcess + fi +} + + +# Internal: Handle parsing the change of delimiters +# +# No arguments. +# +# Returns nothing +mo::parseDelimiter() { + local moContent moOpen moClose + + MO_UNPARSED=${MO_UNPARSED:1} + mo::trimUnparsed + mo::chomp moOpen "$MO_UNPARSED" + MO_UNPARSED=${MO_UNPARSED:${#moOpen}} + mo::trimUnparsed + mo::chomp moClose "${MO_UNPARSED%%="$MO_CLOSE_DELIMITER"*}" + MO_UNPARSED=${MO_UNPARSED#*="$MO_CLOSE_DELIMITER"} + mo::debug "Parsing delimiters: $moOpen $moClose" + + if mo::standaloneCheck; then + mo::standaloneProcess + fi + + MO_OPEN_DELIMITER="$moOpen" + MO_CLOSE_DELIMITER="$moClose" +} + + +# Internal: Handle parsing value or function call +# +# No arguments. +# +# Returns nothing +mo::parseValue() { + local moUnparsedOriginal moTokens + + moUnparsedOriginal=$MO_UNPARSED + mo::tokenizeTagContents moTokens "$MO_CLOSE_DELIMITER" + mo::evaluate moResult "${moTokens[@]:1}" + MO_PARSED="$MO_PARSED$moResult" + + if [[ "${MO_UNPARSED:0:${#MO_CLOSE_DELIMITER}}" != "$MO_CLOSE_DELIMITER" ]]; then + mo::errorNear "Did not find closing tag" "$moUnparsedOriginal" + fi + + if mo::standaloneCheck; then + mo::standaloneProcess + fi + + MO_UNPARSED=${MO_UNPARSED:${#MO_CLOSE_DELIMITER}} +} + + +# Internal: Determine if the given name is a defined function. +# +# $1 - Function name to check +# +# Be extremely careful. Even if strict mode is enabled, it is not honored +# in newer versions of Bash. Any errors that crop up here will not be +# caught automatically. +# +# Examples +# +# moo () { +# echo "This is a function" +# } +# if mo::isFunction moo; then +# echo "moo is a defined function" +# fi +# +# Returns 0 if the name is a function, 1 otherwise. +mo::isFunction() { + local moFunctionName + + for moFunctionName in "${MO_FUNCTION_CACHE_HIT[@]}"; do + if [[ "$moFunctionName" == "$1" ]]; then + return 0 + fi + done + + for moFunctionName in "${MO_FUNCTION_CACHE_MISS[@]}"; do + if [[ "$moFunctionName" == "$1" ]]; then + return 1 + fi + done + + if declare -F "$1" &> /dev/null; then + MO_FUNCTION_CACHE_HIT=( ${MO_FUNCTION_CACHE_HIT[@]+"${MO_FUNCTION_CACHE_HIT[@]}"} "$1" ) + + return 0 + fi + + MO_FUNCTION_CACHE_MISS=( ${MO_FUNCTION_CACHE_MISS[@]+"${MO_FUNCTION_CACHE_MISS[@]}"} "$1" ) + + return 1 +} + + +# Internal: Determine if a given environment variable exists and if it is +# an array. +# +# $1 - Name of environment variable +# +# Be extremely careful. Even if strict mode is enabled, it is not honored +# in newer versions of Bash. Any errors that crop up here will not be +# caught automatically. +# +# Examples +# +# var=(abc) +# if moIsArray var; then +# echo "This is an array" +# echo "Make sure you don't accidentally use \$var" +# fi +# +# Returns 0 if the name is not empty, 1 otherwise. +mo::isArray() { + #: Namespace this variable so we don't conflict with what we're testing. + local moTestResult + + moTestResult=$(declare -p "$1" 2>/dev/null) || return 1 + [[ "${moTestResult:0:10}" == "declare -a" ]] && return 0 + [[ "${moTestResult:0:10}" == "declare -A" ]] && return 0 + + return 1 +} + + +# Internal: Determine if an array index exists. +# +# $1 - Variable name to check +# $2 - The index to check +# +# Has to check if the variable is an array and if the index is valid for that +# type of array. +# +# Returns true (0) if everything was ok, 1 if there's any condition that fails. +mo::isArrayIndexValid() { + local moDeclare moTest + + moDeclare=$(declare -p "$1") + moTest="" + + if [[ "${moDeclare:0:10}" == "declare -a" ]]; then + #: Numerically indexed array - must check if the index looks like a + #: number because using a string to index a numerically indexed array + #: will appear like it worked. + if [[ "$2" == "0" ]] || [[ "$2" =~ ^[1-9][0-9]*$ ]]; then + #: Index looks like a number + eval "moTest=\"\${$1[$2]+ok}\"" + fi + elif [[ "${moDeclare:0:10}" == "declare -A" ]]; then + #: Associative array + eval "moTest=\"\${$1[$2]+ok}\"" + fi + + if [[ -n "$moTest" ]]; then + return 0; + fi + + return 1 +} + + +# Internal: Determine if a variable is assigned, even if it is assigned an empty +# value. +# +# $1 - Variable name to check. +# +# Can not use logic like this in case invalid variable names are passed. +# [[ "${!1-a}" == "${!1-b}" ]] +# +# Using logic like this gives false positives. +# [[ -v "$a" ]] +# +# Declaring a variable is not the same as assigning the variable. +# export x +# declare -p x # Output: declare -x x +# export y="" +# declare -p y # Output: declare -x y="" +# unset z +# declare -p z # Error code 1 and output: bash: declare: z: not found +# +# Returns true (0) if the variable is set, 1 if the variable is unset. +mo::isVarSet() { + if declare -p "$1" &> /dev/null && [[ -v "$1" ]]; then + return 0 + fi + + return 1 +} + + +# Internal: Determine if a value is considered truthy. +# +# $1 - The value to test +# $2 - Invert the value, either "true" or "false" +# +# Returns true (0) if truthy, 1 otherwise. +mo::isTruthy() { + local moTruthy + + moTruthy=true + + if [[ -z "${1-}" ]]; then + moTruthy=false + elif [[ -n "${MO_FALSE_IS_EMPTY-}" ]] && [[ "${1-}" == "false" ]]; then + moTruthy=false + fi + + #: XOR the results + #: moTruthy inverse desiredResult + #: true false true + #: true true false + #: false false false + #: false true true + if [[ "$moTruthy" == "$2" ]]; then + mo::debug "Value is falsy, test result: $moTruthy inverse: $2" + return 1 + fi + + mo::debug "Value is truthy, test result: $moTruthy inverse: $2" + return 0 +} + + +# Internal: Convert token list to values +# +# $1 - Destination variable name +# $2-@ - Tokens to convert +# +# Sample call: +# +# mo::evaluate dest NAME username VALUE abc123 PAREN 2 +# +# Returns nothing. +mo::evaluate() { + local moTarget moStack moValue moType moIndex moCombined moResult + + moTarget=$1 + shift + + #: Phase 1 - remove all command tokens (PAREN, BRACE) + moStack=() + + while [[ $# -gt 0 ]]; do + case "$1" in + PAREN|BRACE) + moType=$1 + moValue=$2 + mo::debug "Combining $moValue tokens" + moIndex=$((${#moStack[@]} - (2 * moValue))) + mo::evaluateListOfSingles moCombined "${moStack[@]:$moIndex}" + + if [[ "$moType" == "PAREN" ]]; then + moStack=("${moStack[@]:0:$moIndex}" NAME "$moCombined") + else + moStack=("${moStack[@]:0:$moIndex}" VALUE "$moCombined") + fi + ;; + + *) + moStack=(${moStack[@]+"${moStack[@]}"} "$1" "$2") + ;; + esac + + shift 2 + done + + #: Phase 2 - check if this is a function or if we should just concatenate values + if [[ "${moStack[0]:-}" == "NAME" ]] && mo::isFunction "${moStack[1]}"; then + #: Special case - if the first argument is a function, then the rest are + #: passed to the function. + mo::debug "Evaluating function: ${moStack[1]}" + mo::evaluateFunction moResult "" "${moStack[@]:1}" + else + #: Concatenate + mo::debug "Concatenating ${#moStack[@]} stack items" + mo::evaluateListOfSingles moResult ${moStack[@]+"${moStack[@]}"} + fi + + local "$moTarget" && mo::indirect "$moTarget" "$moResult" +} + + +# Internal: Convert an argument list to individual values. +# +# $1 - Destination variable name +# $2-@ - A list of argument types and argument name/value. +# +# This assumes each value is separate from the rest. In contrast, mo::evaluate +# will pass all arguments to a function if the first value is a function. +# +# Sample call: +# +# mo::evaluateListOfSingles dest NAME username VALUE abc123 +# +# Returns nothing. +mo::evaluateListOfSingles() { + local moResult moTarget moTemp + + moTarget=$1 + shift + moResult="" + + while [[ $# -gt 1 ]]; do + mo::evaluateSingle moTemp "$1" "$2" + moResult="$moResult$moTemp" + shift 2 + done + + mo::debug "Evaluated list of singles: $moResult" + + local "$moTarget" && mo::indirect "$moTarget" "$moResult" +} + + +# Internal: Evaluate a single argument +# +# $1 - Name of variable for result +# $2 - Type of argument, either NAME or VALUE +# $3 - Argument +# +# Returns nothing +mo::evaluateSingle() { + local moResult moType moArg + + moType=$2 + moArg=$3 + mo::debug "Evaluating $moType: $moArg ($MO_CURRENT)" + + if [[ "$moType" == "VALUE" ]]; then + moResult=$moArg + elif [[ "$moArg" == "." ]]; then + mo::evaluateVariable moResult "" + elif [[ "$moArg" == "@key" ]]; then + mo::evaluateKey moResult + elif mo::isFunction "$moArg"; then + mo::evaluateFunction moResult "" "$moArg" + else + mo::evaluateVariable moResult "$moArg" + fi + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Internal: Return the value for @key based on current's name +# +# $1 - Name of variable for result +# +# Returns nothing +mo::evaluateKey() { + local moResult + + if [[ "$MO_CURRENT" == *.* ]]; then + moResult="${MO_CURRENT#*.}" + else + moResult="${MO_CURRENT}" + fi + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Internal: Handle a variable name +# +# $1 - Destination variable name +# $2 - Variable name +# +# Returns nothing. +mo::evaluateVariable() { + local moResult moArg moNameParts + + moArg=$2 + moResult="" + mo::findVariableName moNameParts "$moArg" + mo::debug "Evaluate variable ($moArg, $MO_CURRENT): ${moNameParts[*]}" + + if [[ -z "${moNameParts[1]}" ]]; then + if mo::isArray "${moNameParts[0]}"; then + eval mo::join moResult "," "\${${moNameParts[0]}[@]}" + else + if mo::isVarSet "${moNameParts[0]}"; then + moResult=${moNameParts[0]} + moResult="${!moResult}" + elif [[ -n "${MO_FAIL_ON_UNSET-}" ]]; then + mo::error "Environment variable not set: ${moNameParts[0]}" + fi + fi + else + if mo::isArray "${moNameParts[0]}"; then + eval "set +u;moResult=\"\${${moNameParts[0]}[${moNameParts[1]%%.*}]}\"" + else + mo::error "Unable to index a scalar as an array: $moArg" + fi + fi + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Internal: Find the name of a variable to use +# +# $1 - Destination variable name, receives an array +# $2 - Variable name from the template +# +# The array contains the following values +# [0] - Variable name +# [1] - Array index, or empty string +# +# Example variables +# a="a" +# b="b" +# c=("c.0" "c.1") +# d=([b]="d.b" [d]="d.d") +# +# Given these inputs (function input, current value), produce these outputs +# a c => a +# a c.0 => a +# b d => d.b +# b d.d => d.b +# a d => d.a +# a d.d => d.a +# c.0 d => c.0 +# d.b d => d.b +# '' c => c +# '' c.0 => c.0 +# Returns nothing. +mo::findVariableName() { + local moVar moNameParts moResultBase moResultIndex moCurrent + + moVar=$2 + moResultBase=$moVar + moResultIndex="" + + if [[ -z "$moVar" ]]; then + moResultBase=${MO_CURRENT%%.*} + + if [[ "$MO_CURRENT" == *.* ]]; then + moResultIndex=${MO_CURRENT#*.} + fi + elif [[ "$moVar" == *.* ]]; then + mo::debug "Find variable name; name has dot: $moVar" + moResultBase=${moVar%%.*} + moResultIndex=${moVar#*.} + elif [[ -n "$MO_CURRENT" ]]; then + moCurrent=${MO_CURRENT%%.*} + mo::debug "Find variable name; look in array: $moCurrent" + + if mo::isArrayIndexValid "$moCurrent" "$moVar"; then + moResultBase=$moCurrent + moResultIndex=$moVar + fi + fi + + local "$1" && mo::indirectArray "$1" "$moResultBase" "$moResultIndex" +} + + +# Internal: Join / implode an array +# +# $1 - Variable name to receive the joined content +# $2 - Joiner +# $3-@ - Elements to join +# +# Returns nothing. +mo::join() { + local joiner part result target + + target=$1 + joiner=$2 + result=$3 + shift 3 + + for part in "$@"; do + result="$result$joiner$part" + done + + local "$target" && mo::indirect "$target" "$result" +} + + +# Internal: Call a function. +# +# $1 - Variable for output +# $2 - Content to pass +# $3 - Function to call +# $4-@ - Additional arguments as list of type, value/name +# +# Returns nothing. +mo::evaluateFunction() { + local moArgs moContent moFunctionResult moTarget moFunction moTemp moFunctionCall + + moTarget=$1 + moContent=$2 + moFunction=$3 + shift 3 + moArgs=() + + while [[ $# -gt 1 ]]; do + mo::evaluateSingle moTemp "$1" "$2" + moArgs=(${moArgs[@]+"${moArgs[@]}"} "$moTemp") + shift 2 + done + + mo::escape moFunctionCall "$moFunction" + + if [[ -n "${MO_ALLOW_FUNCTION_ARGUMENTS-}" ]]; then + mo::debug "Function arguments are allowed" + + if [[ ${#moArgs[@]} -gt 0 ]]; then + for moTemp in "${moArgs[@]}"; do + mo::escape moTemp "$moTemp" + moFunctionCall="$moFunctionCall $moTemp" + done + fi + fi + + mo::debug "Calling function: $moFunctionCall" + + #: Call the function in a subshell for safety. Employ the trick to preserve + #: whitespace at the end of the output. + moContent=$( + export MO_FUNCTION_ARGS=(${moArgs[@]+"${moArgs[@]}"}) + echo -n "$moContent" | eval "$moFunctionCall ; moFunctionResult=\$? ; echo -n '.' ; exit \"\$moFunctionResult\"" + ) || { + moFunctionResult=$? + if [[ -n "${MO_FAIL_ON_FUNCTION-}" && "$moFunctionResult" != 0 ]]; then + mo::error "Function failed with status code $moFunctionResult: $moFunctionCall" "$moFunctionResult" + fi + } + + local "$moTarget" && mo::indirect "$moTarget" "${moContent%.}" +} + + +# Internal: Check if a tag appears to have only whitespace before it and after +# it on a line. There must be a new line before and there must be a newline +# after or the end of a string +# +# No arguments. +# +# Returns 0 if this is a standalone tag, 1 otherwise. +mo::standaloneCheck() { + local moContent moN moR moT + + moN=$'\n' + moR=$'\r' + moT=$'\t' + + #: Check the content before + moContent=${MO_STANDALONE_CONTENT//"$moR"/"$moN"} + + #: By default, signal to the next check that this one failed + MO_STANDALONE_CONTENT="" + + if [[ "$moContent" != *"$moN"* ]]; then + mo::debug "Not a standalone tag - no newline before" + + return 1 + fi + + moContent=${moContent##*"$moN"} + moContent=${moContent//"$moT"/} + moContent=${moContent// /} + + if [[ -n "$moContent" ]]; then + mo::debug "Not a standalone tag - non-whitespace detected before tag" + + return 1 + fi + + #: Check the content after + moContent=${MO_UNPARSED//"$moR"/"$moN"} + moContent=${moContent%%"$moN"*} + moContent=${moContent//"$moT"/} + moContent=${moContent// /} + + if [[ -n "$moContent" ]]; then + mo::debug "Not a standalone tag - non-whitespace detected after tag" + + return 1 + fi + + #: Signal to the next check that this tag removed content + MO_STANDALONE_CONTENT=$'\n' + + return 0 +} + + +# Internal: Process content before and after a tag. Remove prior whitespace up +# to the previous newline. Remove following whitespace up to and including the +# next newline. +# +# No arguments. +# +# Returns nothing. +mo::standaloneProcess() { + local moI moTemp + + mo::debug "Standalone tag - processing content before and after tag" + moI=$((${#MO_PARSED} - 1)) + mo::debug "zero done ${#MO_PARSED}" + mo::escape moTemp "$MO_PARSED" + mo::debug "$moTemp" + + while [[ "${MO_PARSED:$moI:1}" == " " || "${MO_PARSED:$moI:1}" == $'\t' ]]; do + moI=$((moI - 1)) + done + + if [[ $((moI + 1)) != "${#MO_PARSED}" ]]; then + MO_PARSED="${MO_PARSED:0:${moI}+1}" + fi + + moI=0 + + while [[ "${MO_UNPARSED:${moI}:1}" == " " || "${MO_UNPARSED:${moI}:1}" == $'\t' ]]; do + moI=$((moI + 1)) + done + + if [[ "${MO_UNPARSED:${moI}:1}" == $'\r' ]]; then + moI=$((moI + 1)) + fi + + if [[ "${MO_UNPARSED:${moI}:1}" == $'\n' ]]; then + moI=$((moI + 1)) + fi + + if [[ "$moI" != 0 ]]; then + MO_UNPARSED=${MO_UNPARSED:${moI}} + fi +} + + +# Internal: Apply indentation before any line that has content in MO_UNPARSED. +# +# $1 - Destination variable name. +# $2 - The indentation string. +# $3 - The content that needs the indentation string prepended on each line. +# +# Returns nothing. +mo::indentLines() { + local moContent moIndentation moResult moN moR moChunk + + moIndentation=$2 + moContent=$3 + + if [[ -z "$moIndentation" ]]; then + mo::debug "Not applying indentation, empty indentation" + + local "$1" && mo::indirect "$1" "$moContent" + return + fi + + if [[ -z "$moContent" ]]; then + mo::debug "Not applying indentation, empty contents" + + local "$1" && mo::indirect "$1" "$moContent" + return + fi + + moResult= + moN=$'\n' + moR=$'\r' + + mo::debug "Applying indentation: '${moIndentation}'" + + while [[ -n "$moContent" ]]; do + moChunk=${moContent%%"$moN"*} + moChunk=${moChunk%%"$moR"*} + moContent=${moContent:${#moChunk}} + + if [[ -n "$moChunk" ]]; then + moResult="$moResult$moIndentation$moChunk" + fi + + moResult="$moResult${moContent:0:1}" + moContent=${moContent:1} + done + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Internal: Escape a value +# +# $1 - Destination variable name +# $2 - Value to escape +# +# Returns nothing +mo::escape() { + local moResult + + moResult=$2 + moResult=$(declare -p moResult) + moResult=${moResult#*=} + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Internal: Get the content up to the end of the block by minimally parsing and +# balancing blocks. Returns the content before the end tag to the caller and +# removes the content + the end tag from MO_UNPARSED. This can change the +# delimiters, adjusting MO_OPEN_DELIMITER and MO_CLOSE_DELIMITER. +# +# $1 - Destination variable name +# $2 - Token string to match for a closing tag +# +# Returns nothing. +mo::getContentUntilClose() { + local moChunk moResult moTemp moTokensString moTokens moTarget moTagStack moResultTemp + + moTarget=$1 + moTagStack=("$2") + mo::debug "Get content until close tag: ${moTagStack[0]}" + moResult="" + + while [[ -n "$MO_UNPARSED" ]] && [[ "${#moTagStack[@]}" -gt 0 ]]; do + moChunk=${MO_UNPARSED%%"$MO_OPEN_DELIMITER"*} + moResult="$moResult$moChunk" + MO_UNPARSED=${MO_UNPARSED:${#moChunk}} + + if [[ -n "$MO_UNPARSED" ]]; then + moResultTemp="$MO_OPEN_DELIMITER" + MO_UNPARSED=${MO_UNPARSED:${#MO_OPEN_DELIMITER}} + mo::getContentTrim moTemp + moResultTemp="$moResultTemp$moTemp" + mo::debug "First character within tag: ${MO_UNPARSED:0:1}" + + case "$MO_UNPARSED" in + '#'*) + #: Increase block + moResultTemp="$moResultTemp${MO_UNPARSED:0:1}" + MO_UNPARSED=${MO_UNPARSED:1} + mo::getContentTrim moTemp + mo::getContentWithinTag moTemp "$MO_CLOSE_DELIMITER" + moResultTemp="$moResultTemp${moTemp[0]}" + moTagStack=("${moTemp[1]}" "${moTagStack[@]}") + ;; + + '^'*) + #: Increase block + moResultTemp="$moResultTemp${MO_UNPARSED:0:1}" + MO_UNPARSED=${MO_UNPARSED:1} + mo::getContentTrim moTemp + mo::getContentWithinTag moTemp "$MO_CLOSE_DELIMITER" + moResultTemp="$moResultTemp${moTemp[0]}" + moTagStack=("${moTemp[1]}" "${moTagStack[@]}") + ;; + + '>'*) + #: Partial - ignore + moResultTemp="$moResultTemp${MO_UNPARSED:0:1}" + MO_UNPARSED=${MO_UNPARSED:1} + mo::getContentTrim moTemp + mo::getContentWithinTag moTemp "$MO_CLOSE_DELIMITER" + moResultTemp="$moResultTemp${moTemp[0]}" + ;; + + '/'*) + #: Decrease block + moResultTemp="$moResultTemp${MO_UNPARSED:0:1}" + MO_UNPARSED=${MO_UNPARSED:1} + mo::getContentTrim moTemp + mo::getContentWithinTag moTemp "$MO_CLOSE_DELIMITER" + + if [[ "${moTagStack[0]}" == "${moTemp[1]}" ]]; then + moResultTemp="$moResultTemp${moTemp[0]}" + moTagStack=("${moTagStack[@]:1}") + + if [[ "${#moTagStack[@]}" -eq 0 ]]; then + #: Erase all portions of the close tag + moResultTemp="" + fi + else + mo::errorNear "Unbalanced closing tag, expected: ${moTagStack[0]}" "${moTemp[0]}${MO_UNPARSED}" + fi + ;; + + '!'*) + #: Comment - ignore + mo::getContentComment moTemp + moResultTemp="$moResultTemp$moTemp" + ;; + + '='*) + #: Change delimiters + mo::getContentDelimiter moTemp + moResultTemp="$moResultTemp$moTemp" + ;; + + '&'*) + #: Unescaped - bypass one then ignore + moResultTemp="$moResultTemp${MO_UNPARSED:0:1}" + MO_UNPARSED=${MO_UNPARSED:1} + mo::getContentTrim moTemp + moResultTemp="$moResultTemp$moTemp" + mo::getContentWithinTag moTemp "$MO_CLOSE_DELIMITER" + moResultTemp="$moResultTemp${moTemp[0]}" + ;; + + *) + #: Normal variable - ignore + mo::getContentWithinTag moTemp "$MO_CLOSE_DELIMITER" + moResultTemp="$moResultTemp${moTemp[0]}" + ;; + esac + + moResult="$moResult$moResultTemp" + fi + done + + MO_STANDALONE_CONTENT="$MO_STANDALONE_CONTENT$moResult" + + if mo::standaloneCheck; then + moResultTemp=$MO_PARSED + MO_PARSED=$moResult + mo::standaloneProcess + moResult=$MO_PARSED + MO_PARSED=$moResultTemp + fi + + local "$moTarget" && mo::indirect "$moTarget" "$moResult" +} + + +# Internal: Convert a list of tokens to a string +# +# $1 - Destination variable for the string +# $2-$@ - Token list +# +# Returns nothing. +mo::tokensToString() { + local moTarget moString moTokens + + moTarget=$1 + shift 1 + moTokens=("$@") + moString=$(declare -p moTokens) + moString=${moString#*=} + + local "$moTarget" && mo::indirect "$moTarget" "$moString" +} + + +# Internal: Trims content from MO_UNPARSED, returns trimmed content. +# +# $1 - Destination variable +# +# Returns nothing. +mo::getContentTrim() { + local moChar moResult + + moChar=${MO_UNPARSED:0:1} + moResult="" + + while [[ "$moChar" == " " ]] || [[ "$moChar" == $'\r' ]] || [[ "$moChar" == $'\t' ]] || [[ "$moChar" == $'\n' ]]; do + moResult="$moResult$moChar" + MO_UNPARSED=${MO_UNPARSED:1} + moChar=${MO_UNPARSED:0:1} + done + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Get the content up to and including a close tag +# +# $1 - Destination variable +# +# Returns nothing. +mo::getContentComment() { + local moResult + + mo::debug "Getting content for comment" + moResult=${MO_UNPARSED%%"$MO_CLOSE_DELIMITER"*} + MO_UNPARSED=${MO_UNPARSED:${#moResult}} + + if [[ "$MO_UNPARSED" == "$MO_CLOSE_DELIMITER"* ]]; then + moResult="$moResult$MO_CLOSE_DELIMITER" + MO_UNPARSED=${MO_UNPARSED#"$MO_CLOSE_DELIMITER"} + fi + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Get the content up to and including a close tag. First two non-whitespace +# tokens become the new open and close tag. +# +# $1 - Destination variable +# +# Returns nothing. +mo::getContentDelimiter() { + local moResult moTemp moOpen moClose + + mo::debug "Getting content for delimiter" + moResult="" + mo::getContentTrim moTemp + moResult="$moResult$moTemp" + mo::chomp moOpen "$MO_UNPARSED" + MO_UNPARSED="${MO_UNPARSED:${#moOpen}}" + moResult="$moResult$moOpen" + mo::getContentTrim moTemp + moResult="$moResult$moTemp" + mo::chomp moClose "${MO_UNPARSED%%="$MO_CLOSE_DELIMITER"*}" + MO_UNPARSED="${MO_UNPARSED:${#moClose}}" + moResult="$moResult$moClose" + mo::getContentTrim moTemp + moResult="$moResult$moTemp" + MO_OPEN_DELIMITER="$moOpen" + MO_CLOSE_DELIMITER="$moClose" + + local "$1" && mo::indirect "$1" "$moResult" +} + + +# Get the content up to and including a close tag. First two non-whitespace +# tokens become the new open and close tag. +# +# $1 - Destination variable, an array +# $2 - Terminator string +# +# The array contents: +# [0] The raw content within the tag +# [1] The parsed tokens as a single string +# +# Returns nothing. +mo::getContentWithinTag() { + local moUnparsed moTokens + + moUnparsed=${MO_UNPARSED} + mo::tokenizeTagContents moTokens "$MO_CLOSE_DELIMITER" + MO_UNPARSED=${MO_UNPARSED#"$MO_CLOSE_DELIMITER"} + mo::tokensToString moTokensString "${moTokens[@]:1}" + moParsed=${moUnparsed:0:$((${#moUnparsed} - ${#MO_UNPARSED}))} + + local "$1" && mo::indirectArray "$1" "$moParsed" "$moTokensString" +} + + +# Internal: Parse MO_UNPARSED and retrieve the content within the tag +# delimiters. Converts everything into an array of string values. +# +# $1 - Destination variable for the array of contents. +# $2 - Stop processing when this content is found. +# +# The list of tokens are in RPN form. The first item in the resulting array is +# the number of actual tokens (after combining command tokens) in the list. +# +# Given: a 'bc' "de\"\n" (f {g 'h'}) +# Result: ([0]=4 [1]=NAME [2]=a [3]=VALUE [4]=bc [5]=VALUE [6]=$'de\"\n' +# [7]=NAME [8]=f [9]=NAME [10]=g [11]=VALUE [12]=h +# [13]=BRACE [14]=2 [15]=PAREN [16]=2 +# +# Returns nothing +mo::tokenizeTagContents() { + local moResult moTerminator moTemp moUnparsedOriginal moTokenCount + + moTerminator=$2 + moResult=() + moUnparsedOriginal=$MO_UNPARSED + moTokenCount=0 + mo::debug "Tokenizing tag contents until terminator: $moTerminator" + + while true; do + mo::trimUnparsed + + case "$MO_UNPARSED" in + "") + mo::errorNear "Did not find matching terminator: $moTerminator" "$moUnparsedOriginal" + ;; + + "$moTerminator"*) + mo::debug "Found terminator" + local "$1" && mo::indirectArray "$1" "$moTokenCount" ${moResult[@]+"${moResult[@]}"} + return + ;; + + '('*) + #: Do not tokenize the open paren - treat this as RPL + MO_UNPARSED=${MO_UNPARSED:1} + mo::tokenizeTagContents moTemp ')' + moResult=(${moResult[@]+"${moResult[@]}"} "${moTemp[@]:1}" PAREN "${moTemp[0]}") + MO_UNPARSED=${MO_UNPARSED:1} + ;; + + '{'*) + #: Do not tokenize the open brace - treat this as RPL + MO_UNPARSED=${MO_UNPARSED:1} + mo::tokenizeTagContents moTemp '}' + moResult=(${moResult[@]+"${moResult[@]}"} "${moTemp[@]:1}" BRACE "${moTemp[0]}") + MO_UNPARSED=${MO_UNPARSED:1} + ;; + + ')'* | '}'*) + mo::errorNear "Unbalanced closing parenthesis or brace" "$MO_UNPARSED" + ;; + + "'"*) + mo::tokenizeTagContentsSingleQuote moTemp + moResult=(${moResult[@]+"${moResult[@]}"} "${moTemp[@]}") + ;; + + '"'*) + mo::tokenizeTagContentsDoubleQuote moTemp + moResult=(${moResult[@]+"${moResult[@]}"} "${moTemp[@]}") + ;; + + *) + mo::tokenizeTagContentsName moTemp + moResult=(${moResult[@]+"${moResult[@]}"} "${moTemp[@]}") + ;; + esac + + mo::debug "Got chunk: ${moTemp[0]} ${moTemp[1]}" + moTokenCount=$((moTokenCount + 1)) + done +} + + +# Internal: Get the contents of a variable name. +# +# $1 - Destination variable name for the token list (array of strings) +# +# Returns nothing +mo::tokenizeTagContentsName() { + local moTemp + + mo::chomp moTemp "${MO_UNPARSED%%"$MO_CLOSE_DELIMITER"*}" + moTemp=${moTemp%%(*} + moTemp=${moTemp%%)*} + moTemp=${moTemp%%\{*} + moTemp=${moTemp%%\}*} + MO_UNPARSED=${MO_UNPARSED:${#moTemp}} + mo::trimUnparsed + mo::debug "Parsed default token: $moTemp" + + local "$1" && mo::indirectArray "$1" "NAME" "$moTemp" +} + + +# Internal: Get the contents of a tag in double quotes. Parses the backslash +# sequences. +# +# $1 - Destination variable name for the token list (array of strings) +# +# Returns nothing. +mo::tokenizeTagContentsDoubleQuote() { + local moResult moUnparsedOriginal + + moUnparsedOriginal=$MO_UNPARSED + MO_UNPARSED=${MO_UNPARSED:1} + moResult= + mo::debug "Getting double quoted tag contents" + + while true; do + if [[ -z "$MO_UNPARSED" ]]; then + mo::errorNear "Unbalanced double quote" "$moUnparsedOriginal" + fi + + case "$MO_UNPARSED" in + '"'*) + MO_UNPARSED=${MO_UNPARSED:1} + local "$1" && mo::indirectArray "$1" "VALUE" "$moResult" + return + ;; + + \\b*) + moResult="$moResult"$'\b' + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + \\e*) + #: Note, \e is ESC, but in Bash $'\E' is ESC. + moResult="$moResult"$'\E' + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + \\f*) + moResult="$moResult"$'\f' + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + \\n*) + moResult="$moResult"$'\n' + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + \\r*) + moResult="$moResult"$'\r' + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + \\t*) + moResult="$moResult"$'\t' + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + \\v*) + moResult="$moResult"$'\v' + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + \\*) + moResult="$moResult${MO_UNPARSED:1:1}" + MO_UNPARSED=${MO_UNPARSED:2} + ;; + + *) + moResult="$moResult${MO_UNPARSED:0:1}" + MO_UNPARSED=${MO_UNPARSED:1} + ;; + esac + done +} + + +# Internal: Get the contents of a tag in single quotes. Only gets the raw +# value. +# +# $1 - Destination variable name for the token list (array of strings) +# +# Returns nothing. +mo::tokenizeTagContentsSingleQuote() { + local moResult moUnparsedOriginal + + moUnparsedOriginal=$MO_UNPARSED + MO_UNPARSED=${MO_UNPARSED:1} + moResult= + mo::debug "Getting single quoted tag contents" + + while true; do + if [[ -z "$MO_UNPARSED" ]]; then + mo::errorNear "Unbalanced single quote" "$moUnparsedOriginal" + fi + + case "$MO_UNPARSED" in + "'"*) + MO_UNPARSED=${MO_UNPARSED:1} + local "$1" && mo::indirectArray "$1" VALUE "$moResult" + return + ;; + + *) + moResult="$moResult${MO_UNPARSED:0:1}" + MO_UNPARSED=${MO_UNPARSED:1} + ;; + esac + done +} + + +# Save the original command's path for usage later +MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}" +MO_VERSION="3.0.7" + +# If sourced, load all functions. +# If executed, perform the actions as expected. +if [[ "$0" == "${BASH_SOURCE[0]}" ]] || [[ -z "${BASH_SOURCE[0]}" ]]; then + mo "$@" +fi diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/run-spec b/vendor/git.knownelement.com/ExternalVendorCode/mo/run-spec new file mode 100755 index 0000000..132f057 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/run-spec @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# Install or update the specs +if [[ ! -d spec ]]; then + git clone https://github.com/mustache/spec.git spec +else + ( + cd spec + git pull + ) +fi + +if [[ "$BASH_VERSION" == 3.* ]]; then + echo "WARNING! Specs assume you are using a version of Bash with associative arrays!" +fi + +# Actually run the specs +node run-spec.js spec/specs/*.json + +if [[ "$BASH_VERSION" == 3.* ]]; then + echo "Some tests may have failed because they assume Bash supports associative arays" +fi diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/run-spec.js b/vendor/git.knownelement.com/ExternalVendorCode/mo/run-spec.js new file mode 100644 index 0000000..786a6ec --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/run-spec.js @@ -0,0 +1,512 @@ +#!/usr/bin/env node + +const exec = require("child_process").exec; +const fsPromises = require("fs").promises; + +// Skip or override portions of tests. The goal is to still have as much +// coverage as possible, but skip things that Bash does not support. +// +// To skip a test, define a "skip" property and explain why the test is +// skipped. +// +// To override any test property, just define that property. It replaces the +// original property, not augmenting it. +const testOverrides = { + "Comments -> Variable Name Collision": { + // Can't use variables with exclamation points easily + data: { + comment: 4 + } + }, + "Interpolation -> Dotted Names - Arbitrary Depth": { + skip: "Not able to use more than one level of depth" + }, + "Interpolation -> Dotted Names - Broken Chain Resolution": { + data: { + a: { + b: "wrong" + }, + name: "Jim" + }, + template: '"{{a.name}}" == ""' + }, + "Interpolation -> Dotted Names - Initial Resolution": { + data: { + a: { + name: "Phil" + }, + name: "Wrong" + }, + template: "\"{{#a}}{{name}}{{/a}}\" == \"Phil\"" + }, + "Interpolation -> Implicit Iterators - Ampersand": { + skip: "HTML escaping is not supported" + }, + "Interpolation -> Implicit Iterators - Basic Interpolation": { + skip: "Can not use {{.}} outside of a loop. Need to use a variable name." + }, + "Interpolation -> Implicit Iterators - Basic Integer Interpolation": { + skip: "Can not use {{.}} outside of a loop. Need to use a variable name." + }, + "Interpolation -> Implicit Iterators - Triple Mustache": { + skip: "Can not use {{.}} outside of a loop. Need to use a variable name." + }, + "Interpolation -> HTML Escaping": { + skip: "HTML escaping is not supported" + }, + "Interpolation -> Implicit Iterators - HTML Escaping": { + skip: "HTML escaping is not supported" + }, + "Inverted -> Dotted Names - Falsey": { + data: { + a: { + b: "" + } + }, + template: '"{{^a.b}}Not Here{{/a.b}}" == "Not Here"' + }, + "Inverted -> Dotted Names - Truthy": { + data: { + a: { + b: "1" + } + }, + template: '"{{^a.b}}Not Here{{/a.b}}" == ""' + }, + "Lambdas -> Escaping": { + skip: "HTML escaping is not supported" + }, + "Lambdas -> Interpolation - Alternate Delimiters": { + skip: "There is no difference between a lamba used as a value and a lambda used as a block. Both will parse using the current delimiters." + }, + "Lambdas -> Inverted Section": { + // This one passed mostly by accident. Correcting so the test still + // tests what is was designed to illustrate. + data: { + static: "static", + lambda: { + __tag__: 'code', + bash: 'false' + } + } + }, + "Lambdas -> Interpolation": { + data: { + lambda: { + __tag__: 'code', + bash: 'echo -n "world"' + } + } + }, + "Lambdas -> Interpolation - Expansion": { + data: { + lambda: { + __tag__: 'code', + bash: 'mo::parse result "{{planet}}"; echo -n "$result"' + }, + planet: 'world' + } + }, + "Lambdas -> Interpolation - Multiple Calls": { + skip: "Calls are not cached, but they run in isolated environments, so saving a global variable does not work." + }, + "Lambdas -> Section": { + data: { + lambda: { + __tag__: 'code', + bash: 'if [[ "$(cat)" == "{{x}}" ]]; then echo -n yes; else echo -n no; fi' + }, + x: "Error!" + } + }, + "Lambdas -> Section - Alternate Delimiters": { + data: { + lambda: { + __tag__: 'code', + bash: 'local content=$(cat); mo::parse content "$content{{planet}} => |planet|$content"; echo -n "$content"' + }, + planet: 'Earth' + } + }, + "Lambdas -> Section - Expansion": { + data: { + lambda: { + __tag__: 'code', + bash: 'local content=$(cat); mo::parse content "$content{{planet}}$content"; echo -n "$content"' + }, + planet: "Earth" + } + }, + "Lambdas -> Section - Multiple Calls": { + data: { + lambda: { + __tag__: 'code', + bash: 'echo -n "__$(cat)__"' + } + } + }, + "Partials -> Recursion": { + skip: "Complex objects are not supported and context is reset to the global level, so the recursion will loop forever" + }, + "Sections -> Deeply Nested Contexts": { + skip: "Nested objects are not supported" + }, + "Sections -> Dotted Names - Broken Chains": { + // Complex objects are not supported + template: `"{{#a.b}}Here{{/a.b}}" == ""` + }, + "Sections -> Dotted Names - Falsey": { + // Complex objects are not supported + data: { a: { b: false } }, + template: `"{{#a.b}}Here{{/a.b}}" == ""` + }, + "Sections -> Dotted Names - Truthy": { + // Complex objects are not supported + data: { a: { b: true } }, + template: `"{{#a.b}}Here{{/a.b}}" == "Here"` + }, + "Sections -> Implicit Iterator - Array": { + skip: "Nested arrays are not supported" + }, + "Sections -> List": { + // Arrays of objects are not supported + data: { list: [1, 2, 3] }, + template: `"{{#list}}{{.}}{{/list}}"` + }, + "Sections -> List Context": { + skip: "Deeply nested objects are not supported" + }, + "Sections -> List Contexts": { + skip: "Deeply nested objects are not supported" + } +}; + +function specFileToName(file) { + return file + .replace(/.*\//, "") + .replace(".json", "") + .replace("~", "") + .replace(/(^|-)[a-z]/g, function (match) { + return match.toUpperCase(); + }); +} + +function processArraySequentially(array, callback) { + function processCopy() { + if (arrayCopy.length) { + const item = arrayCopy.shift(); + return Promise.resolve(item) + .then(callback) + .then((singleResult) => { + result.push(singleResult); + + return processCopy(); + }); + } else { + return Promise.resolve(result); + } + } + + const result = []; + const arrayCopy = array.slice(); + + return processCopy(); +} + +function debug(...args) { + if (process.env.DEBUG) { + console.debug(...args); + } +} + +function makeShellString(value) { + if (typeof value === "boolean") { + return value ? '"true"' : '""'; + } + + if (typeof value === "string") { + // Newlines are tricky + return value + .split(/\n/) + .map(function (chunk) { + return JSON.stringify(chunk); + }) + .join('"\n"'); + } + + if (typeof value === "number") { + return value; + } + + return "ERR_CONVERTING"; +} + +function addToEnvironmentArray(name, value) { + const result = ["("]; + value.forEach(function (subValue) { + result.push(makeShellString(subValue)); + }); + result.push(")"); + + return name + "=" + result.join(" "); +} + +function addToEnvironmentObjectConvertedToAssociativeArray(name, value) { + const values = []; + + for (const [k, v] of Object.entries(value)) { + if (typeof v === "object") { + if (v) { + // An object - abort + return `# ${name}.${k} is an object that can not be converted to an associative array`; + } + + // null + values.push(`[${k}]=`); + } else { + values.push(`[${k}]=${makeShellString(v)}`); + } + } + + return `declare -A ${name}\n${name}=(${values.join(" ")})`; +} + +function addToEnvironmentObject(name, value) { + if (!value) { + // null + return `#${name} is null`; + } + + if (value.__tag__ === "code") { + return `${name}() { ${value.bash || 'echo "NO BASH VERSION OF CODE"'}; }`; + } + + return addToEnvironmentObjectConvertedToAssociativeArray(name, value); +} + +function addToEnvironment(name, value) { + if (Array.isArray(value)) { + return addToEnvironmentArray(name, value); + } + + if (typeof value === "object") { + return addToEnvironmentObject(name, value); + } + + return `${name}=${makeShellString(value)}`; +} + +function buildScript(test) { + const script = ["#!/usr/bin/env bash"]; + Object.keys(test.data).forEach(function (name) { + script.push(addToEnvironment(name, test.data[name])); + }); + script.push(". ./mo"); + script.push("mo spec-runner/spec-template"); + script.push(""); + + return script.join("\n"); +} + +function writePartials(test) { + return processArraySequentially( + Object.keys(test.partials), + (partialName) => { + debug("Writing partial:", partialName); + + return fsPromises.writeFile( + "spec-runner/" + partialName, + test.partials[partialName] + ); + } + ); +} + +function setupEnvironment(test) { + return cleanup() + .then(() => fsPromises.mkdir("spec-runner/")) + .then(() => + fsPromises.writeFile("spec-runner/spec-script", test.script) + ) + .then(() => + fsPromises.writeFile("spec-runner/spec-template", test.template) + ) + .then(() => writePartials(test)); +} + +function executeScript(test) { + return new Promise((resolve) => { + exec( + "bash spec-runner/spec-script 2>&1", + { + timeout: 2000 + }, + (err, stdout) => { + if (err) { + test.scriptError = err.toString(); + } + + test.output = stdout; + resolve(); + } + ); + }); +} + +function cleanup() { + return fsPromises.rm("spec-runner/", { force: true, recursive: true }); +} + +function detectFailure(test) { + if (test.scriptError) { + return true; + } + + if (test.output !== test.expected) { + return true; + } + + return false; +} + +function showFailureDetails(test) { + console.log(`FAILURE: ${test.fullName}`); + console.log(""); + console.log(test.desc); + console.log(""); + console.log(JSON.stringify(test, null, 4)); +} + +function applyTestOverrides(test) { + const overrides = testOverrides[test.fullName]; + const originals = {}; + + if (!overrides) { + return; + } + + for (const [key, value] of Object.entries(overrides)) { + originals[key] = test[key]; + test[key] = value; + } + + test.overridesApplied = true; + test.valuesBeforeOverride = originals; +} + +function runTest(testSet, test) { + test.partials = test.partials || {}; + test.fullName = `${testSet.name} -> ${test.name}`; + applyTestOverrides(test); + test.script = buildScript(test); + + if (test.skip) { + debug("Skipping test:", test.fullName, `(${test.skip})`); + + return Promise.resolve(); + } + + debug("Running test:", test.fullName); + + return setupEnvironment(test) + .then(() => executeScript(test)) + .then(cleanup) + .then(() => { + test.isFailure = detectFailure(test); + + if (test.isFailure) { + showFailureDetails(test); + } else { + debug('Test pass:', test.fullName); + } + }); +} + +function processSpecFile(filename) { + debug("Read spec file:", filename); + + return fsPromises.readFile(filename, "utf8").then((fileContents) => { + const testSet = JSON.parse(fileContents); + testSet.name = specFileToName(filename); + + return processArraySequentially(testSet.tests, (test) => + runTest(testSet, test) + ).then(() => { + testSet.pass = 0; + testSet.fail = 0; + testSet.skip = 0; + testSet.passOverride = 0; + + for (const test of testSet.tests) { + if (test.isFailure) { + testSet.fail += 1; + } else if (test.skip) { + testSet.skip += 1; + } else { + testSet.pass += 1; + + if (test.overridesApplied) { + testSet.passOverride += 1; + } + } + } + console.log( + `### ${testSet.name} Results = ${testSet.pass} passed (with ${testSet.passOverride} overridden), ${testSet.fail} failed, ${testSet.skip} skipped` + ); + + return testSet; + }); + }); +} + +// 0 = node, 1 = script, 2 = file +if (process.argv.length < 3) { + console.log("Specify one or more JSON spec files on the command line"); + process.exit(); +} + +processArraySequentially(process.argv.slice(2), processSpecFile).then( + (result) => { + console.log("========================================="); + console.log(""); + console.log("Failed Test Summary"); + console.log(""); + let pass = 0, + fail = 0, + skip = 0, + total = 0, + passOverride = 0; + + for (const testSet of result) { + pass += testSet.pass; + fail += testSet.fail; + skip += testSet.skip; + total += testSet.tests.length; + passOverride += testSet.passOverride; + + console.log( + `* ${testSet.name}: ${testSet.tests.length} total, ${testSet.pass} pass (with ${passOverride} overridden), ${testSet.fail} fail, ${testSet.skip} skip` + ); + + for (const test of testSet.tests) { + if (test.isFailure) { + console.log(` * Failure: ${test.name}`); + } + } + } + + console.log(""); + console.log( + `Final result: ${total} total, ${pass} pass (with ${passOverride} overridden), ${fail} fail, ${skip} skip` + ); + + if (fail) { + process.exit(1); + } + }, + (err) => { + console.error(err); + console.error("FAILURE RUNNING SCRIPT"); + console.error("Testing artifacts are left in script-runner/ folder"); + } +); diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/run-tests b/vendor/git.knownelement.com/ExternalVendorCode/mo/run-tests new file mode 100755 index 0000000..774d649 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/run-tests @@ -0,0 +1,162 @@ +#!/usr/bin/env bash +# +# Run one or more tests. +# +# Command-line usage to run all tests. +# +# ./run-tests +# +# To run only one test, run "tests/test-name". +# +# Usage within a test as a template. Source run-tests to get functions, export +# any necessary variables, then call runTest. +# +# #!/usr/bin/env bash +# cd "${0%/*}" || exit 1 +# . ../run-tests +# +# export template="This is a template" +# export expected="This is a template" +# runTest +# +# When used within the test, you control various aspects with environment +# variables or functions. +# +# - The content passed into mo is either the variable "$template" or the output +# of the function called template. +# - The expected result is either "$expected" or the function called expected. +# - The expected return code is "$returnCode" and defaults to 0. +# - The arguments to pass to mo is the array "${arguments[@]}" and defaults to (). +# +# When $MO_DEBUG is set to a non-empty value, the test does not run, but mo is +# simply executed directly. This allows for calling mo in the same manner as +# the test but does not buffer output nor expect the output to match the +# expected. +# +# When $MO_DEBUG_TEST is set to a non-empty value, the expected and actual +# results are shown using "declare -p" to provide an easier time seeing the +# differences, especially with whitespace. + +testCase() { + echo "Input: $1" + echo "Expected: $2" +} + +indirect() { + unset -v "$1" + printf -v "$1" '%s' "$2" +} + +getValue() { + local name temp len hardSpace + + name=$2 + hardSpace=" " + + if declare -f "$name" &> /dev/null; then + temp=$("$name"; echo -n "$hardSpace") + len=$((${#temp} - 1)) + + if [[ "${temp:$len}" == "$hardSpace" ]]; then + temp=${temp:0:$len} + fi + else + temp=${!name} + fi + + local "$1" && indirect "$1" "$temp" +} + +runTest() ( + local testTemplate testExpected testActual hardSpace len testReturnCode testFail + + hardSpace=" " + . ../mo + + getValue testTemplate template + getValue testExpected expected + + if [[ -n "${MO_DEBUG:-}" ]]; then + echo -n "$testTemplate" | mo ${arguments[@]+"${arguments[@]}"} 2>&1 + + return $? + fi + + testActual=$(echo -n "$testTemplate" | mo ${arguments[@]+"${arguments[@]}"} 2>&1; echo -n "$hardSpace$?") + testReturnCode=${testActual##*$hardSpace} + testActual=${testActual%$hardSpace*} + testFail=false + + if [[ "$testActual" != "$testExpected" ]]; then + echo "Failure" + echo "Expected:" + echo "$testExpected" + echo "Actual:" + echo "$testActual" + + if [[ -n "${MO_DEBUG_TEST-}" ]]; then + declare -p testExpected + # Align the two declare outputs + echo -n " " + declare -p testActual + fi + + testFail=true + fi + + if [[ "$testReturnCode" != "$returnCode" ]]; then + echo "Expected return code $returnCode, but got $testReturnCode" + testFail=true + fi + + if [[ "$testFail" == "true" ]]; then + return 1 + fi + + return 0 +) + +runTestFile() ( + local file=$1 + + echo "Test: $file" + "$file" +) + +runTests() ( + PASS=0 + FAIL=0 + + if [[ $# -gt 0 ]]; then + for TEST in "$@"; do + runTestFile "$TEST" && PASS=$((PASS + 1)) || FAIL=$((FAIL + 1)) + done + else + cd "${0%/*}" + for TEST in tests/*; do + if [[ -f "$TEST" ]]; then + runTestFile "$TEST" && PASS=$((PASS + 1)) || FAIL=$((FAIL + 1)) + fi + done + fi + + echo "" + echo "Pass: $PASS" + echo "Fail: $FAIL" + + if [[ $FAIL -gt 0 ]]; then + exit 1 + fi +) + +# Clear test related variables +template="Template not defined" +expected="Expected not defined" +returnCode=0 +arguments=() + +# If sourced, load functions. +# If executed, perform the actions as expected. +if [[ "$0" == "${BASH_SOURCE[0]}" ]] || [[ -z "${BASH_SOURCE[0]}" ]]; then + runTests ${@+"${@}"} +fi diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/ampersand b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/ampersand new file mode 100755 index 0000000..ff8914f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/ampersand @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export thing="Works" +export template="{{&thing}}" +export expected="Works" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/array b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/array new file mode 100755 index 0000000..6ca5a2b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/array @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export repo=( "resque" "hub" "rip" ) +template() { + cat <{{@key}} - {{.}} +{{/repo}} +EOF +} +expected() { + cat <0 - resque + 1 - hub + 2 - rip +EOF +} + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/assoc-array b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/assoc-array new file mode 100755 index 0000000..338ef0b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/assoc-array @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +declare -A repo +# The order of the array elements can be shuffled depending on the version of +# Bash. Keeping this to a minimal set and alphabetized seems to help. +repo[hub]="Hub" +repo[rip]="Rip" +export repo +template() { + cat <{{@key}} - {{.}} +{{/repo}} +EOF +} +expected() { + cat <hub - Hub + rip - Rip +EOF +} + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment new file mode 100755 index 0000000..7a8708d --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export template="Wor{{!comment}}ks" +export expected="Works" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment-newline b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment-newline new file mode 100755 index 0000000..0c1fea8 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment-newline @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +template() { + cat <Today{{! ignore me +and this can +run through multiple +lines}}. +EOF +} +export expected=$'

Today.

\n' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment-with-spaces b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment-with-spaces new file mode 100755 index 0000000..c8f8d5b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/comment-with-spaces @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export template="Wor{{! comment }}ks" +export expected="Works" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/concatenated-variables b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/concatenated-variables new file mode 100755 index 0000000..0bd06aa --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/concatenated-variables @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export thing="Wor" +export thing2="ks" +export template="{{thing thing2}}" +export expected="Works" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/delimiters b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/delimiters new file mode 100755 index 0000000..a041811 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/delimiters @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export thing="Works" +export template="{{=| |=}}|thing|" +export expected="Works" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/double-hyphen b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/double-hyphen new file mode 100755 index 0000000..3fc8d48 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/double-hyphen @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export arguments=(--fail-on-file -- --help) +export returnCode=1 +export template="" +export expected=$'ERROR: No such file: --help\n' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/double-quote b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/double-quote new file mode 100755 index 0000000..526ac6a --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/double-quote @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export template='{{"Works"}}' +export expected="Works" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fail-not-set b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fail-not-set new file mode 100755 index 0000000..3104367 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fail-not-set @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +unset __NO_SUCH_VAR +export POPULATED="words" +export EMPTY="" +export arguments=(--fail-not-set) +export returnCode=1 + +template() { + cat < +> diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/multi-line-partial.partial b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/multi-line-partial.partial new file mode 100644 index 0000000..da32746 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/multi-line-partial.partial @@ -0,0 +1 @@ +{{multilineData}} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/partial.partial b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/partial.partial new file mode 100644 index 0000000..e25759d --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/partial.partial @@ -0,0 +1 @@ +{{.}} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source-multiple-1.vars b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source-multiple-1.vars new file mode 100644 index 0000000..433ea91 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source-multiple-1.vars @@ -0,0 +1,2 @@ +export A=from1 +export B=from1 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source-multiple-2.vars b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source-multiple-2.vars new file mode 100644 index 0000000..55b5263 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source-multiple-2.vars @@ -0,0 +1,2 @@ +export B=from2 +export C=from2 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source.vars b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source.vars new file mode 100644 index 0000000..fad535f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/source.vars @@ -0,0 +1,5 @@ +export VAR=value +export ARR=(1 2 3) +declare -A ASSOC_ARR +# Can not export associative arrays, otherwise they turn into indexed arrays +ASSOC_ARR=([a]=AAA [b]=BBB) diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/standalone-indentation.partial b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/standalone-indentation.partial new file mode 100644 index 0000000..96d7a30 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/fixtures/standalone-indentation.partial @@ -0,0 +1,3 @@ +| +{{content}} +| diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function new file mode 100755 index 0000000..967a128 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export name=Willy +wrapped() { + # Wrapping 'cat' in a subshell eats the trailing whitespace + # The echo adds a newline, which is preserved. + echo "$(cat)" +} +template() { + cat < {{name}} is awesome.\n... this is the last line.\n' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function-alternate-delimiters b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function-alternate-delimiters new file mode 100755 index 0000000..a4fa6a8 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function-alternate-delimiters @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export planet=Earth +lambda() { + local content + + content=$(cat) + mo::parse content "$content{{planet}} => |planet|$content" + echo -n "$content" +} +export template="{{= | | =}}<|#lambda|-|/lambda|>" +export expected="<-{{planet}} => Earth->" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function-args b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function-args new file mode 100755 index 0000000..a7958d6 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/function-args @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export name=Willy +MO_ALLOW_FUNCTION_ARGUMENTS=true + +pipeTo() { + cat | "$1" +} + +testArgs() { + printf "%d" "$#" + + # Display all arguments + printf " %q" ${@+"$@"} +} +template() { + cat < Willy is awesome.\n... this is the last line.\n' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/globals-in-loop b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/globals-in-loop new file mode 100755 index 0000000..538d5f1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/globals-in-loop @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export STR=abc +export DATA=(111 222) +template() { + cat < fixtures/indented-partials.partial}} + + {{> fixtures/indented-partials.partial}} + +Without spacing + {{> fixtures/indented-partials.partial}} + {{> fixtures/indented-partials.partial}} + +With text + {{> fixtures/indented-partials.partial}} + text + {{> fixtures/indented-partials.partial}} + +In a conditional +{{#thisIsTrue}} + {{> fixtures/indented-partials.partial}} +{{/thisIsTrue}} +EOF +} +expected() { + cat < fixtures/inline-indentation}} +EOF +} +expected() { + cat < +> + +EOF +} + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/internal-whitespace b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/internal-whitespace new file mode 100755 index 0000000..8228215 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/internal-whitespace @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export boolean=true +export template=$' | {{#boolean}} {{! Important Whitespace }}\n {{/boolean}} | \n' +export expected=$' | \n | \n' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/invalid-option b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/invalid-option new file mode 100755 index 0000000..8817896 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/invalid-option @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export person="" +export template="" +export returnCode=1 +export arguments=(--something) +export expected=$'ERROR: Unknown option: --something (See --help for options)\n' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/inverted b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/inverted new file mode 100755 index 0000000..f706a04 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/inverted @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export repo=() +template() { + cat <{{.}} +{{/repo}} +{{^repo}} + No repos :( +{{/repo}} +EOF +} +export expected=$' No repos :(\n' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/issue-75 b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/issue-75 new file mode 100755 index 0000000..6816dfd --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/issue-75 @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export uv +export template='{{^uv}}OK{{/uv}}{{#uv}}FAIL{{/uv}}' +export expected='OK' + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/list-contexts b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/list-contexts new file mode 100755 index 0000000..9025d9b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/list-contexts @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export a=foo +export b=wrong +declare -A sec +sec=([b]="bar") +export sec +declare -A c +c=([d]="baz") +export c +export template="{{#sec}}{{a}} {{b}} {{c.d}}{{/sec}}" +export expected="foo bar baz" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/miss b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/miss new file mode 100755 index 0000000..900f070 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/miss @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export name="Chris" +export company="GitHub" +template() { + cat <GitHub. +* .GitHub. +EOF +} + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/multi-line-partial b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/multi-line-partial new file mode 100755 index 0000000..0922f69 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/multi-line-partial @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export multilineData=$'line 1\nline 2' +template() { + cat < fixtures/multi-line-partial.partial}} + +Indented: + + {{> fixtures/multi-line-partial.partial}} +EOF +} +expected() { + cat <Names +{{#names}} + {{> fixtures/partial.partial}} +{{/names}} +EOF +} +expected() { + cat <Names + Tyler + Abc +EOF +} + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/partial-bad-file b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/partial-bad-file new file mode 100755 index 0000000..94906fa --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/partial-bad-file @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +# This file intentionally does not exist +export template="{{>fixtures/partial-bad-file.partial}}" +export expected="" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/partial-missing b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/partial-missing new file mode 100755 index 0000000..6ca5b7b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/partial-missing @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export returnCode=1 +export arguments=(--fail-on-file) +export person="" +template() { + cat < fixtures/partial-missing.partial}} +EOF +} +expected() { + cat <' +template() { + cat <<'EOF' +\ + {{>fixtures/standalone-indentation.partial}} +/ +EOF +} +expected() { + cat <<'EOF' +\ + | + < +-> + | +/ +EOF +} + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/triple-brace b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/triple-brace new file mode 100755 index 0000000..1eb3616 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/triple-brace @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export thing="Works" +export template="{{{thing}}}" +export expected="Works" + +runTest diff --git a/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/typical b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/typical new file mode 100755 index 0000000..2274852 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/mo/tests/typical @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +cd "${0%/*}" || exit 1 +. ../run-tests + +export NAME="Chris" +export VALUE=10000 +export TAXED_VALUE=6000 +export IN_CA=true +template() { + cat <> $GITHUB_PATH + sudo chown -hR $(whoami) "$TEXLIVE_DIR" + - name: Initialization for tlmgr + run: | + sudo apt-get update -qq && sudo apt-get install xzdec -y + tlmgr init-usertree + - name: Setup fonts and image convertion tool + run: sudo apt-get update -qq && sudo apt-get install fonts-noto-cjk poppler-utils -y + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + - name: Install python filters + run: | + python -m pip install --upgrade pip + pip install pandoc-latex-environment + - name: Install LaTeX packages + run: | + tlmgr install adjustbox background bidi csquotes footmisc footnotebackref fvextra mdframed pagecolor sourcecodepro sourcesanspro titling ulem upquote xurl hardwrap catchfile + # trial and error + tlmgr install letltxmacro zref everypage framed collectbox + # packages needed for the template + tlmgr install xecjk filehook unicode-math ucharcat pagecolor babel-german ly1 mweights sourcecodepro sourcesanspro mdframed needspace fvextra footmisc footnotebackref background + # packages only needed for some examples (that include packages via header-includes) + tlmgr install awesomebox fontawesome5 + # packages only needed for some examples (example boxes-with-pandoc-latex-environment-and-tcolorbox) + tlmgr install tcolorbox pgf etoolbox environ trimspaces + - name: Build examples + run: cd examples && bash build-examples.sh && cd .. + - name: Add generated example files + uses: actions/upload-artifact@v4 + with: + name: build-files + path: | + examples/*/document.pdf + examples/*/preview.png + - name: Commit files + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git commit -m "Add generated example files" -a + - name: Push changes + uses: ad-m/github-push-action@master + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/.gitignore b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/.gitignore new file mode 100644 index 0000000..4292209 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/.gitignore @@ -0,0 +1,358 @@ + +# contains all sorts of unfinished changes +private/ + +# build folder +dist/ + +.idea + +# contains unit tests (incomplete at the moment, so don't include them) +test/ +test/.idea/ +test/eisvogel-tests.iml + + +# Created by https://www.gitignore.io/api/linux,macos,latex,windows +# Edit at https://www.gitignore.io/?templates=linux,macos,latex,windows + +### LaTeX ### +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Comment the next line if you want to keep your tikz graphics files +*.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices +*.xyc + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# KBibTeX +*~[0-9]* + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +### LaTeX Patch ### +# glossaries +*.glstex + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.gitignore.io/api/linux,macos,latex,windows diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/.texlife.profile b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/.texlife.profile new file mode 100644 index 0000000..315722d --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/.texlife.profile @@ -0,0 +1,15 @@ +selected_scheme scheme-basic +instopt_adjustpath 1 +collection-basic 1 +collection-bibtexextra 0 +collection-fontsextra 0 +collection-fontsrecommended 1 +collection-langchinese 0 +collection-latex 1 +collection-latexextra 0 +collection-latexrecommended 1 +collection-mathscience 0 +collection-xetex 1 +tlpdbopt_autobackup 0 +tlpdbopt_install_docfiles 0 +tlpdbopt_install_srcfiles 0 \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/CHANGELOG.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/CHANGELOG.md new file mode 100644 index 0000000..781d12f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/CHANGELOG.md @@ -0,0 +1,202 @@ +# Changelog + +All notable changes to this project are documented in this file. On the [releases page](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/) you can see all released versions of the Eisvogel template and download the [latest version](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest). + +## [2.5.0] - 2024-10-03 + +- Merge changes from the pandoc default LaTeX template from version 3.4 ([7e8aafa](https://github.com/jgm/pandoc-templates/commit/7e8aafa049700a849b41c53cf1afeb17324040c7)). + +## [2.4.2] - 2023-11-25 + +- Merge changes from the pandoc default LaTeX template from version 3.1.9 ([f7d8b62](https://github.com/jgm/pandoc-templates/commit/f7d8b629330074a4400d1f2795b101d14491c968)). +- Merge changes from the pandoc default LaTeX template from version 3.1.8 ([2d42e04](https://github.com/jgm/pandoc-templates/commit/2d42e04cbd65dd36c4469156b00f636e7f31623e)) (#364, David Mehren). +- Add fix for `table-use-row-colors` which previously stopped working (#301, Chris Fenner). + +## [2.4.1] - 2023-09-06 + +- Merge changes from the pandoc default LaTeX template from version 3.1.7 (as of 2023-08-31, [8a5b381](https://github.com/jgm/pandoc-templates/blob/8a5b381c156c974b485197208c6dc86fce94b5c3/default.latex)). + +## [2.4.0] - 2023-04-17 + +- Merge changes from the pandoc default LaTeX template (as of 2023-03-29, [a5159c2](https://github.com/jgm/pandoc/blob/a5159c2c505cd9a87856877b3287aa0b88e4e0ba/data/templates/default.latex)). +- Fix placement of float figures (tables, images, etc.). Float figures should now appear + exactly where they are included. The option `float-placement-figure` is also restored. +- Remove Travis CI build +- Fix wrong font sizes on the title page. The problem went away on its own, likely because + of an updated LaTeX package. + +## [2.3.0] - 2023-03-13 + +The Eisvogel template is now available in the Docker image [pandoc/extra](https://hub.docker.com/r/pandoc/extra)! +For more Information refer to the [documentation in the Readme](https://github.com/Wandmalfarbe/pandoc-latex-template#docker-image) or +the [documentation on docker hub](https://hub.docker.com/r/pandoc/extra). + +- Merge changes from the pandoc default LaTeX template (as of 2023-03-10, [9b04036](https://github.com/jgm/pandoc/blob/9b04036f6b0745c6ce0cb027683e94b648da3a9c/data/templates/default.latex)). + - Add `CJKsansfont` and `CJKmonofont` for XeLaTeX. `CJKsansfont` and `CJKmonofont` will be set + for XeLaTeX only if `CJKmainfont` is also provided (#328, Yudong Jin). +- Add documentation in the README on how to use the `pandoc/extra` docker image (#319, damien clochard). +- Fix wrong literate of characters `è` and `È` in listings. The character `è` was wrongly + converted to `é` and `È` to `É` (#324, damien clochard). + +## [2.2.0] - 2023-01-22 + +- Merge changes from the pandoc default LaTeX template (as of 2023-01-13, [909ced5](https://github.com/jgm/pandoc/blob/909ced5153e2c7cefd5018c39f83231824940fb8/data/templates/default.latex)). + - This change adds support for pandoc 3. + +## [2.1.0] - 2022-12-04 + +- Merge changes from the pandoc default LaTeX template (as of 2022-11-19, [144bf90ab9](https://github.com/jgm/pandoc/blob/144bf90ab92b517dd721baf80f121f86187ccd61/data/templates/default.latex)). +- Restructure the examples. Any example folder now contains at least the following files: + - `document.md`: the Markdown document to convert to a PDF + - `document.pdf`: the resulting PDF document + - `build.sh`: a shell script to convert the document `document.md` with pandoc. This script might call pandoc with additional arguments (e.g. filters or template variables). + - `preview.png`: a PNG image of the resulting PDF document intended as a quick preview +- Use the Koma-Script package `scrlayer-scrpage` for the headers and footers instead of the package `fancyhdr` (#174, khaveesh). + - Fix a header and footer bug when using `oneside` introduced by the migration to `scrlayer-scrpage` (#248, ret2src). + - Restore pagestyle `plain` for chapters (#275). Headers and footers are removed from chapter pages, as it has been before the migration to `scrlayer-scrpage`. +- Correct the examples and documentation (#239, mprobson), (#261, supcik). +- Exclude title page from page count (#230, shmalebx9). +- Make code-block-font-size not affect inline listings (#229, LudvigHz). +- Rename the Eisvogel template variable `logo` to `titlepage-logo`. + - `logo` is already used by beamer, and one might want to use both + formats (beamer and latex) without the logo appearing as a + background image on beamer slides. +- Add an example for a table of contents (#283). + +## [2.0.0] - 2021-01-31 + +**This release includes breaking changes.** + +- Merged changes from the pandoc default LaTeX template. +- Fix broken travis build by modifying the `--resource-path` + + When specifying the resource path via `--resource-path` the template will be searched there since pandoc 2.9.2.1. + To fix the broken travis build (`Could not find data file templates/eisvogel.latex`) the current working directory `.` is included in the resource path for pandoc to find the template again. + + For more information visit the pandoc issue . +- Rename template to `eisvogel.latex` after release (#182). There is no need for renaming the template file after the download. + + This is a breaking change because there will be no file `eisvogel.latex` in the released artifacts anymore. + +- Option `logo-width` has no hard coded unit `pt` anymore (#221). + + The width of the logo can be specified with various units e.g. `pt`, `in`, `mm`. + + This is a breaking change because a previously specified `logo-width` without a unit needs a unit now. If there is no unit LaTeX will emit an error `Illegal unit of measure (pt inserted)` and no document will be created. + + The default value for `logo-width` has also changed from `100pt` to `35mm`. + +## [1.6.1] - 2020-11-26 + +- Merged changes from the pandoc default LaTeX template (https://github.com/jgm/pandoc/blob/master/data/templates/default.latex). + - This merge should fix a compilation error when using tables because of the missing `calc` package. + +## [1.6.0] - 2020-11-02 + +- Merged changes from the pandoc default LaTeX template (https://github.com/jgm/pandoc/blob/master/data/templates/default.latex). + - This merge should fix problems related to using CSL bibliographies (#201). +- Added documentation about common errors to the readme. +- The command `\thedate` can be used in the source document or metadata fields (#163). + +## [1.5.0] - 2020-06-14 + +- Create release assets with and without version number for easy access (#175). +- Added example `boxes-with-pandoc-latex-environment-and-tcolorbox` This example shows how to render beautiful boxes with the filter `pandoc-latex-environment` and the package `tcolorbox`. +- Fix LaTeX installation problems on Travis by installing everything manually. +- Fixed a couple of LuaLaTeX warnings (#169, khaveesh) +- Mention required LaTeX package for option `footnotes-disable-backlinks` in the Readme (#148, salim-b). +- Remove `graphicx` dependency (#149, noraj). Please see https://github.com/jgm/pandoc/issues/5848 for the full discussion. + +## [1.4.0] - 2020-02-02 + +- Added support for a page background (#138, evildead). + - The variable `page-background` specifies the path to a background image for any page. The background image is scaled to cover the entire page. + - The variable `page-background-opacity` specifies the background image opacity. +- Added an example on how to generate admonition boxes (#115). The example demonstrates the use of the filter `pandoc-latex-environments` to create custom admonition boxes with the `awesomebox` package. +- Added an example on how to compile Chinese documents (#140). +- Added a section on *required LaTeX packages* to the readme (#141). The section explains how to install the required packages with TeX Live and MiKtEX. +- Corrected the command `tlmgr` in `README.md` (#143). + +## [1.3.1] - 2019-12-08 + +- Fixed wrong margins when not using the titlepage option (#135). + +## [1.3.0] - 2019-10-26 + +- Clarified the location of the pandoc templates directory in the readme. +- Added missing `$endif$` that caused a compilation failure (#125, 0az). +- Merged changes from the pandoc default LaTeX template. +- Fixed a bug where specifying a font via `mainfont` when using pdfLaTeX would not apply the default font Source Sans Pro. +- Improve formatting of footnotes with the variables `footnotes-pretty` and `footnotes-disable-backlinks` (#107, salim-b). +- Added the variable `code-block-font-size` to change the font size for code blocks via the supplied LaTeX command (#123, #17). +- Improve Japanese dummy text (#86, JKPOKE) +- Added an example on how to change header and footer (#109). +- Added example backgrounds to the titlepage example. +- Added support for background images on the title page with the variable `titlepage-background` (#31, #41). +- Disabled striped tables per default. Enable them with the variable `table-use-row-colors: true` (#29). +- Updated listings definition for Java which is the default language when using listings. This means that more keywords such as `var` from Java 10 are highlighted. +- Added support for additional keyword colors when using `listings` for syntax highlighting. The support depends on the used language. Some languages like `motorola68k`, `x86masm`, `inform`, `llvm`, `lua`, `metapost`, `mupad`, `ocl`, `python`, `verrilog`, `basic`, `cil`, `fortran` and `hansl` will have additional colors for some keywords. +- Fixed: Long lines in code blocks (verbatim environment) wrap automatically (#2). + +## [1.2.4] - 2019-06-16 + +- Fixed: The template now compiles with the output format `beamer` (#99). The styling for the generated slides is currently not customized. + +## [1.2.3] - 2019-06-12 + +- Fixed: Code blocks were too close to the text above. +- Fixed: The default float placement of figures can be changed with the variable `float-placement-figure`. +- Changed: Merged changes from the pandoc default LaTeX template. +- Added: A changelog is available as `CHANGELOG.md`. +- Changed: Updated installation instructions in the README with new XDG support (#89, Andrew Zhou). + +## [1.2.2] - 2019-04-09 + +- Merged changes from the pandoc default LaTeX template. +- Fixed: Support custom values for `secnumdepth` and `toc-depth` (#87, Juan Grigera). + +## [1.2.1] - 2019-03-10 + +- Removed double inclusion of package `xcolor` and cleaned up some comments. +- Removed unused `\captionsetup[longtable]`. +- Moved listing colors to the listings block in the template. +- Changed the top and bottom spacing of listings. +- Merged changes from the pandoc default LaTeX template. +- Changed the release script to also create a `tar.gz` archive. + +## [1.2.0] - 2019-03-03 + +- Fixed curly quotes in code listings under XeTeX engine (#79, Andrew Hodgkinson). +- Merged changes from the pandoc default LaTeX template `default.latex`. +- Updated the installation instructions in the README and moved the release script to the `tools` folder. + +## [1.1.0] - 2019-02-17 + +- Defined a default pagestyle to make it easier to change the pagestyle on certain pages or define a custom one (#77). +- Add support for `first-chapter` variable in case it's desirable for a book not to begin with chapter 1 (#74, umanovskis). + +## [1.0.0] - 2018-12-07 + +- First release of the template as a ZIP file with the examples. + +[2.5.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.2...v2.5.0 +[2.4.2]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.1...v2.4.2 +[2.4.1]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.0...v2.4.1 +[2.4.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.3.0...v2.4.0 +[2.3.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.2.0...v2.3.0 +[2.2.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.1.0...v2.2.0 +[2.1.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.0.0...v2.1.0 +[2.0.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.6.1...v2.0.0 +[1.6.1]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.6.0...v1.6.1 +[1.6.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.5.0...v1.6.0 +[1.5.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.4.0...v1.5.0 +[1.4.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.3.1...v1.4.0 +[1.3.1]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.3.0...v1.3.1 +[1.3.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.2.4...v1.3.0 +[1.2.4]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.2.3...v1.2.4 +[1.2.3]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.2.2...v1.2.3 +[1.2.2]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.2.1...v1.2.2 +[1.2.1]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.2.0...v1.2.1 +[1.2.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/1.1.0...v1.2.0 +[1.1.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v1.0.0...1.1.0 +[1.0.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/releases/tag/v1.0.0 diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/LICENSE b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/LICENSE new file mode 100644 index 0000000..d1658d0 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2017 - 2021, Pascal Wagler; +Copyright (c) 2014 - 2021, John MacFarlane +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/README.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/README.md new file mode 100644 index 0000000..2b0a052 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/README.md @@ -0,0 +1,481 @@ + + +# Eisvogel + +A clean **pandoc LaTeX template** to convert your markdown files to PDF or LaTeX. It is designed for lecture notes and exercises with a focus on computer science. The template is compatible with pandoc 3. + +## Preview + +| A custom title page | A basic example page | +| :------------------: | :------------------: | +| [![A custom title page](examples/title-page-custom/preview.png)](examples/title-page-custom/document.pdf) | [![A basic example page](examples/basic-example/preview.png)](examples/basic-example/document.pdf) | + +## Installation + +1. Install pandoc from . You also need to install [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Installation#Distributions). +2. Download the latest version of the Eisvogel template from [the release page](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest). +3. Extract the downloaded ZIP archive and open the folder. +4. Move the template `eisvogel.latex` to your pandoc templates folder. The location of the templates folder depends on your operating system: + - Unix, Linux, macOS: `/Users/USERNAME/.local/share/pandoc/templates/` or `/Users/USERNAME/.pandoc/templates/` + - Windows Vista or later: `C:\Users\USERNAME\AppData\Roaming\pandoc\templates\` + + If there are no folders called `templates` or `pandoc` you need to create them and put the template `eisvogel.latex` inside. You can find the default user data directory on your system by looking at the output of `pandoc --version`. + + +### Docker image + +Alternatively, if you don't want to install LaTeX, you can use the Docker +image named [pandoc/extra]. The image contains pandoc, LaTeX and a curated +selection of components such as the eisvogel template, pandoc filters and +open source fonts. A common use of the image looks like this +(line breaks for readability): + +``` bash +docker run --rm \ + --volume "$(pwd):/data" \ + --user $(id -u):$(id -g) \ + pandoc/extra example.md -o example.pdf --template eisvogel --listings +``` + +For frequent command line use, you can define the following shell alias: + +``` bash +alias pandock='docker run --rm -v "$(pwd):/data" -u $(id -u):$(id -g) pandoc/extra' +``` + +The example invocation with Docker from above now looks like this: + +``` bash +pandock example.md -o example.pdf --template eisvogel --listings +``` + +[pandoc/extra]: https://hub.docker.com/r/pandoc/extra + +## Usage + +1. Open the terminal and navigate to the folder where your markdown file is located. + +2. Execute the following command + + ``` bash + pandoc example.md -o example.pdf --from markdown --template eisvogel --listings + ``` + + where `example.md` is the markdown file you want to convert to PDF. + +In order to have nice headers and footers you need to supply metadata to your document. You can do that with a [YAML metadata block](http://pandoc.org/MANUAL.html#extension-yaml_metadata_block) at the top of your markdown document (see the [example markdown file](examples/basic-example/document.md)). Your markdown document may look like the following: + +``` markdown +--- +title: "The Document Title" +author: [Example Author, Another Author] +date: "2017-02-20" +keywords: [Markdown, Example] +... + +Here is the actual document text... +``` + +### Custom Template Variables + +This template defines some new variables to control the appearance of the resulting PDF document. The existing template variables from pandoc are all supported and their documentation can be found in [the pandoc manual](https://pandoc.org/MANUAL.html#variables-for-latex). + + - `titlepage` (defaults to `false`) + + turns on the title page when `true` + + - `titlepage-color` + + the background color of the title page. The color value must be given as an HTML hex color like `D8DE2C` without the leading number sign (`#`). When specifying the color in YAML, it is advisable to enclose it in quotes like so `titlepage-color: "D8DE2C"` to avoid the truncation of the color (e.g. `000000` becoming `0`). + + - `titlepage-text-color` (defaults to `5F5F5F`) + + the text color of the title page + + - `titlepage-rule-color` (defaults to `435488`) + + the color of the rule on the top of the title page + + - `titlepage-rule-height` (defaults to `4`) + + the height of the rule on the top of the title page (in points) + + - `titlepage-logo` + + path to an image that will be displayed on the title page. The path is always relative to where pandoc is executed. The option `--resource-path` has no effect. + + - `titlepage-background` + + the path to a background image for the title page. The background image is scaled to cover the entire page. In the examples folder under `titlepage-background` are a few example background images. + + - `page-background` + + the path to a background image for any page. The background image is scaled to cover the entire page. In the examples folder under `page-background` are a few example background images. + + - `page-background-opacity` (defaults to `0.2`) + + the background image opacity + + - `caption-justification` (defaults to `raggedright`) + + justification setting for captions (uses the `justification` parameter of the [caption](https://ctan.org/pkg/caption?lang=en) package) + + - `toc-own-page` (defaults to `false`) + + begin new page after table of contents, when `true` + + - `listings-disable-line-numbers` (defaults to `false`) + + disables line numbers for all listings + + - `listings-no-page-break` (defaults to `false`) + + avoid page break inside listings + + - `disable-header-and-footer` (default to `false`) + + disables the header and footer completely on all pages + + - `header-left` (defaults to the title) + + the text on the left side of the header + + - `header-center` + + the text in the center of the header + + - `header-right` (defaults to the date) + + the text on the right side of the header + + - `footer-left` (defaults to the author) + + the text on the left side of the footer + + - `footer-center` + + the text in the center of the footer + + - `footer-right` (defaults to the page number) + + the text on the right side of the footer + + - `footnotes-pretty` (defaults to `false`) + + prettifies formatting of footnotes (requires package `footmisc`) + + - `footnotes-disable-backlinks` (defaults to `false`) + + disables making the reference from the footnote at the bottom of the page into a link back to the occurrence of the footnote in the main text (enabling requires package `footnotebackref`). + + - `book` (defaults to `false`) + + typeset as book + + - `logo-width` (defaults to `35mm`) + + the width of the logo. One needs to specify the width with a (TeX) unit e.g. `100pt` or `35mm`. The following units can be used: + + - `pt`: Point + - `pc`: pica (12 `pt`) + - `in`: inch (72.27 `pt`) + - `bp`: Big point (72 `bp` = 1 `in`) + - `cm`: Centimeter + - `mm`: Millimeter + - `dd`: Didot point + - `cc`: cicero (12 `dd`) + - `sp`: Scaled point (65,536 `sp` = 1 `pt`) + - `ex`: Nomimal x-height + - `em`: Nominal m-width + - `px`: Pixel (only for pdfTeX and LuaTeX) The dimension given to the `\pdfpxdimen` primitive; default value is 1 `bp`, corresponding to a pixel density of 72 dpi. + + A visual overview of the length units is available at . + + - `first-chapter` (defaults to `1`) + + if typesetting a book with chapter numbers, specifies the number that will be assigned to the first chapter + + - `float-placement-figure` (defaults to `H`) + + Reset the default placement specifier for figure environments to the supplied value e.g. `htbp`. The available specifiers are listed below. The first four placement specifiers can be combined. + + 1. `h`: Place the float *here*, i.e., approximately at the same point it occurs in the source text. + 2. `t`: Place the float at the *top* of the page. + 3. `b`: Place the float at the *bottom* of the page. + 4. `p`: Place the float on the next *page* that will contain only floats like figures and tables. + 5. `H`: Place the float *HERE* (exactly where it occurs in the source text). The `H` specifier is provided by the [float package](https://ctan.org/pkg/float) and may not be used in conjunction with any other placement specifiers. + + - `table-use-row-colors` (defaults to `false`) + + enables row colors for tables. The default value is `false` because the coloring extends beyond the edge of the table and there is currently no way to change that. + + - `code-block-font-size` (defaults to `\small`) + + LaTeX command to change the font size for code blocks. The available values are `\tiny`, `\scriptsize`, `\footnotesize`, `\small`, `\normalsize`, `\large`, `\Large`, `\LARGE`, `\huge` and `\Huge`. This option will change the font size for default code blocks using the verbatim environment and for code blocks generated with listings. + +## Required LaTeX Packages + +LaTeX manages addons and additional functionality in so called packages. You +might get the following error when compiling a document with the Eisvogel +template: + + +``` sh +! LaTeX Error: File `footnotebackref.sty' not found. + +Type X to quit or to proceed, +or enter new name. (Default extension: sty) + +Enter file name: +! Emergency stop. + +``` + +LaTeX informs you that the additional package `footnotebackref` is required to +render the document. + +### Texlive + +Eisvogel requires a full texlive distribution that can be installed by running +`apt-get install texlive-full` in the terminal. Because `texlive-full` is very +large (about 5 Gigabytes) you can also install the smaller texlive bundles and +add any missing packages manually. + +A smaller texlive bundle is `texlive-latex-extra`. With `texlive-latex-extra` +you also need to install these packages manually: + +``` +adjustbox babel-german background bidi collectbox csquotes everypage filehook +footmisc footnotebackref framed fvextra letltxmacro ly1 mdframed mweights +needspace pagecolor sourcecodepro sourcesanspro titling ucharcat ulem +unicode-math upquote xecjk xurl zref +``` + +Install them with the following command: + +``` sh +tlmgr install soul adjustbox babel-german background bidi collectbox csquotes everypage filehook footmisc footnotebackref framed fvextra letltxmacro ly1 mdframed mweights needspace pagecolor sourcecodepro sourcesanspro titling ucharcat ulem unicode-math upquote xecjk xurl zref +``` + +Additional information about the different texlive packages can be found at +this TeX-StackExchange answer: + +### MiKTeX + +If you don't want to install all missing packages manually, [MiKTeX might be +an alternative](https://miktex.org/howto/miktex-console). + +> MiKTeX has the ability to automatically install missing packages. +> You can turn this feature on or off. And you can let MiKTeX ask you each time a package has to be installed: +> +> - Click `Settings` to navigate to the settings page. +> - Click the `General` tab. +> - Click one of the radio buttons: +> - `Ask me` +> - `Always install missing packages on-the-fly` +> - `Never install missing packages on-the-fly` + +## Examples + +### Numbered Sections + +For PDFs with [numbered sections](http://pandoc.org/MANUAL.html#options-affecting-specific-writers) use the `--number-sections` or `-N` option. + +``` bash +pandoc example.md -o example.pdf --template eisvogel --number-sections +``` + +### Syntax Highlighting with Listings + +You can get syntax highlighting of delimited code blocks by using the LaTeX package listings with the option `--listings`. This example will produce the same syntax highlighting as in the example PDF. + +``` bash +pandoc example.md -o example.pdf --template eisvogel --listings +``` + +### Syntax Highlighting Without Listings + +The following examples show [syntax highlighting of delimited code blocks](http://pandoc.org/MANUAL.html#syntax-highlighting) without using listings. To see a list of all the supported highlight styles, type `pandoc --list-highlight-styles`. + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style pygments +``` + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style kate +``` + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style espresso +``` + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style tango +``` + +### Standalone LaTeX Document + +To produce a standalone LaTeX document for compiling with any LaTeX editor use `.tex` as an output file extension. + +``` bash +pandoc example.md -o example.tex --template eisvogel +``` + +### Changing the Document Language + +The default language of this template is American English. The `lang` variable identifies the main language of the document, using a code according to [BCP 47](https://tools.ietf.org/html/bcp47) (e.g. `en` or `en-GB`). For an incomplete list of the supported language codes see [the documentation for the hyph-utf8 package (Section 2)](http://mirrors.ctan.org/language/hyph-utf8/doc/generic/hyph-utf8/hyph-utf8.pdf). The following example changes the language to British English: + +``` bash +pandoc example.md -o example.pdf --template eisvogel -V lang=en-GB +``` + +The following example changes the language to German: + +``` bash +pandoc example.md -o example.pdf --template eisvogel -V lang=de +``` + +### Typesetting a Book + +To typeset a book supply the template variable `-V book` from the command line or via `book: true` in the metadata. + +To get the correct chapter headings you need to tell pandoc that it should convert first level headings (indicated by one `#` in markdown) to chapters with the command line option `--top-level-division=chapter`. Chapter numbers start at 1. If you need to change that, specify `first-chapter` in the template variables. + +There will be one blank page before each chapter because the template is two-sided per default. So if you plan to publish your book as a PDF and don’t need a blank page you should add the class option `onesided` which can be done by supplying a template variable `-V classoption=oneside`. + +### Example Images + +| A green title page | A background image on the title page | +| :----------------: | :----------------: | +| [![A green title page](examples/title-page-green/preview.png)](examples/title-page-green/document.pdf) | [![A background image on the title page](examples/title-page-background/preview.png)](examples/title-page-background/document.pdf) | + +| images and tables | Code blocks styled without listings | +| :---------------: | :---------------: | +| [![images and tables](examples/images-and-tables/preview.png)](examples/images-and-tables/document.pdf) | [![Code blocks styled without listings](examples/code-blocks-without-listings/preview.png)](examples/code-blocks-without-listings/document.pdf) | + +| A book | Code blocks styled with listings | +| :----: | :----: | +| [![A book](examples/book/preview.png)](examples/book/document.pdf) | [![Code blocks styled with listings](examples/code-blocks-listings/preview.png)](examples/code-blocks-listings/document.pdf) | + +| A background images on all pages | CJK Support (when using XeLaTeX) | +| :----: | :----: | +| [![A background images on all pages](examples/page-background/preview.png)](examples/page-background/document.pdf) | [![CJK Support (when using XeLaTeX)](examples/language-japanese/preview.png)](examples/language-japanese/document.pdf) | + +## Common Errors / Issues + +The following section lists common errors and their solutions when using the +Eisvogel template. + +### LaTeX Errors `Missing endcsname inserted` or `File x not found` when using `titlepage-background`, `logo`, or `titlepage-logo`. + +``` latex +Error producing PDF. +! Missing endcsname inserted. + + protect +``` + +``` latex +Error producing PDF. +! Package pdftex.def Error: File `logo\T1\textunderscoreimage.pdf' not fou +nd: using draft setting. + +See the pdftex.def package documentation for explanation. +Type H for immediate help. +``` + +These errors occur when one includes a background image on the title page or a +logo that has an underscore (`_`) in the filename. + +A quick fix would be to replace all underscores in the filename of the image +with a hyphen (`-`). If the background image is specified in your YAML front +matter like so, + +``` yaml +titlepage-background: "background_image.pdf" +``` + +you can advise pandoc to interpret this as LaTeX and include it in the document +without parsing. + +``` yaml +titlepage-background: "`background_image.pdf`{=latex}" +``` + +The same fix can be used for the logo image as well: + +``` yaml +logo: "`logo_image.pdf`{=latex}" +``` + +Corresponding issues: + +- [Wandmalfarbe/pandoc-latex-template#100](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/100) +- [Wandmalfarbe/pandoc-latex-template#166](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/166) + +### LaTeX Error `Missing \begin{document}` + +``` +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.7 < + !DOCTYPE html> +! ==> Fatal error occurred, no output PDF file produced! +``` + +This error indicates that you try to use some text file for conversion that is +not the Eisvogel template. Please download the [latest Eisvogel template](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest) from the releases page and start the conversion again. + +### LaTeX Error `auto expansion is only possible with scalable fonts` + +``` latex +Error producing PDF. +! pdfTeX error (font expansion): auto expansion is only possible with scalable +fonts. +\AtBegShi@Output ...ipout \box \AtBeginShipoutBox + \fi \fi +l.643 \begin{lstlisting} +``` + +This error likely occurs on Windows with MiKTeX installed. StackOverflow user +[Krebto provided the following fix](https://tex.stackexchange.com/a/392467): + +> To solve the problem navigate to `C:\Program Files\MiKTeX 2.9\miktex\bin\x64` and run `updmap.exe`. The program may seem as it hangs for a while, but its probably because it tries to update the whole font tree. This solved the problem for me. After re-compiling everything should work fine. + +Corresponding issue: + +- [Wandmalfarbe/pandoc-latex-template#133](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/133) + +### LaTeX Error `cannot find image file` + +``` latex +Error producing PDF. +! error: (file "/tmp/tex2pdf.-be734e802ef6d0c3/""fdcfc29edcf252186f1b0a52f18f50 +43abaeb2d0".png) (pdf backend): cannot find image file '"/tmp/tex2pdf.-be734e802 +ef6d0c3/""fdcfc29edcf252186f1b0a52f18f5043abaeb2d0".png' +! ==> Fatal error occurred, no output PDF file produced! +``` + +In general this error means that LaTeX is unable to find the included image +file. Please check all image references and file names for correctness. + +This error also occurs if you use an old version of Eisvogel with the package +`grffile` and have an old LaTeX distribution installed. Please update Eisvogel +and your LaTeX distribution. + +Corresponding issues: + +- [jgm/pandoc#5848](https://github.com/jgm/pandoc/issues/5848) +- [Wandmalfarbe/pandoc-latex-template#149](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/149) + +## Credits + + - This template includes code for styling block quotations from [pandoc-letter](https://github.com/aaronwolen/pandoc-letter) by [Aaron Wolen](https://github.com/aaronwolen). + +## License + +This project is open source licensed under the BSD 3-Clause License. Please see the [LICENSE file](LICENSE) for more information. diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/docs/_config.yml b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/docs/_config.yml new file mode 100644 index 0000000..49b401c --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/docs/_config.yml @@ -0,0 +1,3 @@ +theme: jekyll-theme-cayman +title: Eisvogel +description: A clean pandoc LaTeX template to convert your markdown files to PDF or LaTeX. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/docs/index.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/docs/index.md new file mode 100644 index 0000000..0f6748c --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/docs/index.md @@ -0,0 +1,436 @@ + + +# Eisvogel + +A clean **pandoc LaTeX template** to convert your markdown files to PDF or LaTeX. It is designed for lecture notes and exercises with a focus on computer science. The template is compatible with pandoc 2. + +## Preview + +| A custom title page | A basic example page | +| :------------------: | :------------------: | +| [![A custom title page](../examples/custom-titlepage/custom-titlepage.png)](../examples/custom-titlepage/custom-titlepage.pdf) | [![A basic example page](../examples/basic-example/basic-example.png)](../examples/basic-example/basic-example.pdf) | + +## Installation + +1. Install pandoc from . You also need to install [LaTeX](https://en.wikibooks.org/wiki/LaTeX/Installation#Distributions). +2. Download the latest version of the Eisvogel template from [the release page](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest). +3. Extract the downloaded ZIP archive and open the folder. +4. Move the template `eisvogel.tex` to your pandoc templates folder and rename the file to `eisvogel.latex`. The location of the templates folder depends on your operating system: + - Unix, Linux, macOS: `/Users/USERNAME/.local/share/pandoc/templates/` or `/Users/USERNAME/.pandoc/templates/` + - Windows Vista or later: `C:\Users\USERNAME\AppData\Roaming\pandoc\templates\` + + If there are no folders called `templates` or `pandoc` you need to create them and put the template `eisvogel.latex` inside. You can find the default user data directory on your system by looking at the output of `pandoc --version`. + +## Usage + +1. Open the terminal and navigate to the folder where your markdown file is located. + +2. Execute the following command + + ``` bash + pandoc example.md -o example.pdf --from markdown --template eisvogel --listings + ``` + + where `example.md` is the markdown file you want to convert to PDF. + +In order to have nice headers and footers you need to supply metadata to your document. You can do that with a [YAML metadata block](http://pandoc.org/MANUAL.html#extension-yaml_metadata_block) at the top of your markdown document (see the [example markdown file](../examples/basic-example/basic-example.md)). Your markdown document may look like the following: + +``` markdown +--- +title: "The Document Title" +author: [Example Author, Another Author] +date: "2017-02-20" +keywords: [Markdown, Example] +... + +Here is the actual document text... +``` + +### Custom Template Variables + +This template defines some new variables to control the appearance of the resulting PDF document. The existing template variables from pandoc are all supported and their documentation can be found in [the pandoc manual](https://pandoc.org/MANUAL.html#variables-for-latex). + + - `titlepage` (defaults to `false`) + + turns on the title page when `true` + + - `titlepage-color` + + the background color of the title page. The color value must be given as an HTML hex color like `D8DE2C` without the leading number sign (`#`). When specifying the color in YAML, it is advisable to enclose it in quotes like so `titlepage-color: "D8DE2C"` to avoid the truncation of the color (e.g. `000000` becoming `0`). + + - `titlepage-text-color` (defaults to `5F5F5F`) + + the text color of the title page + + - `titlepage-rule-color` (defaults to `435488`) + + the color of the rule on the top of the title page + + - `titlepage-rule-height` (defaults to `4`) + + the height of the rule on the top of the title page (in points) + + - `titlepage-background` + + the path to a background image for the title page. The background image is scaled to cover the entire page. In the examples folder under `titlepage-background` are a few example background images. + + - `page-background` + + the path to a background image for any page. The background image is scaled to cover the entire page. In the examples folder under `page-background` are a few example background images. + + - `page-background-opacity` (defaults to `0.2`) + + the background image opacity + + - `caption-justification` (defaults to `raggedright`) + + justification setting for captions (uses the `justification` parameter of the [caption](https://ctan.org/pkg/caption?lang=en) package) + + - `toc-own-page` (defaults to `false`) + + begin new page after table of contents, when `true` + + - `listings-disable-line-numbers` (defaults to `false`) + + disables line numbers for all listings + + - `listings-no-page-break` (defaults to `false`) + + avoid page break inside listings + + - `disable-header-and-footer` (default to `false`) + + disables the header and footer completely on all pages + + - `header-left` (defaults to the title) + + the text on the left side of the header + + - `header-center` + + the text in the center of the header + + - `header-right` (defaults to the date) + + the text on the right side of the header + + - `footer-left` (defaults to the author) + + the text on the left side of the footer + + - `footer-center` + + the text in the center of the footer + + - `footer-right` (defaults to the page number) + + the text on the right side of the footer + + - `footnotes-pretty` (defaults to `false`) + + prettifies formatting of footnotes (requires package `footmisc`) + + - `footnotes-disable-backlinks` (defaults to `false`) + + disables making the reference from the footnote at the bottom of the page into a link back to the occurrence of the footnote in the main text (enabling requires package `footnotebackref`). + + - `book` (defaults to `false`) + + typeset as book + + - `logo` + + path to an image that will be displayed on the title page. The path is always relative to where pandoc is executed. The option `--resource-path` has no effect. + + - `logo-width` (defaults to `100`) + + the width of the logo (in points) + + - `first-chapter` (defaults to `1`) + + if typesetting a book with chapter numbers, specifies the number that will be assigned to the first chapter + + - `float-placement-figure` (defaults to `H`) + + Reset the default placement specifier for figure environments to the supplied value e.g. `htbp`. The available specifiers are listed below. The first four placement specifiers can be combined. + + 1. `h`: Place the float *here*, i.e., approximately at the same point it occurs in the source text. + 2. `t`: Place the float at the *top* of the page. + 3. `b`: Place the float at the *bottom* of the page. + 4. `p`: Place the float on the next *page* that will contain only floats like figures and tables. + 5. `H`: Place the float *HERE* (exactly where it occurs in the source text). The `H` specifier is provided by the [float package](https://ctan.org/pkg/float) and may not be used in conjunction with any other placement specifiers. + + - `table-use-row-colors` (defaults to `false`) + + enables row colors for tables. The default value is `false` because the coloring extends beyond the edge of the table and there is currently no way to change that. + + - `code-block-font-size` (defaults to `\small`) + + LaTeX command to change the font size for code blocks. The available values are `\tiny`, `\scriptsize`, `\footnotesize`, `\small`, `\normalsize`, `\large`, `\Large`, `\LARGE`, `\huge` and `\Huge`. This option will change the font size for default code blocks using the verbatim environment and for code blocks generated with listings. + +## Required LaTeX Packages + +LaTeX manages addons and additional functionality in so called packages. You +might get the following error when compiling a document with the Eisvogel +template: + + +``` sh +! LaTeX Error: File `footnotebackref.sty' not found. + +Type X to quit or to proceed, +or enter new name. (Default extension: sty) + +Enter file name: +! Emergency stop. + +``` + +LaTeX informs you that the additional package `footnotebackref` is required to +render the document. + +### Texlive + +Eisvogel requires a full texlive distribution that can be installed by running +`apt-get install texlive-full` in the terminal. Because `texlive-full` is very +large (about 5 Gigabytes) you can also install the smaller texlive bundles and +add any missing packages manually. + +A smaller texlive bundle is `texlive-latex-extra`. With `texlive-latex-extra` +you also need to install these packages manually: + +``` +adjustbox babel-german background bidi collectbox csquotes everypage filehook +footmisc footnotebackref framed fvextra letltxmacro ly1 mdframed mweights +needspace pagecolor sourcecodepro sourcesanspro titling ucharcat ulem +unicode-math upquote xecjk xurl zref +``` + +Install them with the following command: + +``` sh +tlmgr install adjustbox babel-german background bidi collectbox csquotes everypage filehook footmisc footnotebackref framed fvextra letltxmacro ly1 mdframed mweights needspace pagecolor sourcecodepro sourcesanspro titling ucharcat ulem unicode-math upquote xecjk xurl zref +``` + +Additional information about the different texlive packages can be found at +this TeX-StackExchange answer: + +### MiKTeX + +If you don't want to install all missing packages manually, [MiKTeX might be +an alternative](https://miktex.org/howto/miktex-console). + +> MiKTeX has the ability to automatically install missing packages. +> You can turn this feature on or off. And you can let MiKTeX ask you each time a package has to be installed: +> +> - Click `Settings` to navigate to the settings page. +> - Click the `General` tab. +> - Click one of the radio buttons: +> - `Ask me` +> - `Always install missing packages on-the-fly` +> - `Never install missing packages on-the-fly` + +## Examples + +### Numbered Sections + +For PDFs with [numbered sections](http://pandoc.org/MANUAL.html#options-affecting-specific-writers) use the `--number-sections` or `-N` option. + +``` bash +pandoc example.md -o example.pdf --template eisvogel --number-sections +``` + +### Syntax Highlighting with Listings + +You can get syntax highlighting of delimited code blocks by using the LaTeX package listings with the option `--listings`. This example will produce the same syntax highlighting as in the example PDF. + +``` bash +pandoc example.md -o example.pdf --template eisvogel --listings +``` + +### Syntax Highlighting Without Listings + +The following examples show [syntax highlighting of delimited code blocks](http://pandoc.org/MANUAL.html#syntax-highlighting) without using listings. To see a list of all the supported highlight styles, type `pandoc --list-highlight-styles`. + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style pygments +``` + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style kate +``` + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style espresso +``` + +``` bash +pandoc example.md -o example.pdf --template eisvogel --highlight-style tango +``` + +### Standalone LaTeX Document + +To produce a standalone LaTeX document for compiling with any LaTeX editor use `.tex` as an output file extension. + +``` bash +pandoc example.md -o example.tex --template eisvogel +``` + +### Changing the Document Language + +The default language of this template is American English. The `lang` variable identifies the main language of the document, using a code according to [BCP 47](https://tools.ietf.org/html/bcp47) (e.g. `en` or `en-GB`). For an incomplete list of the supported language codes see [the documentation for the hyph-utf8 package (Section 2)](http://mirrors.ctan.org/language/hyph-utf8/doc/generic/hyph-utf8/hyph-utf8.pdf). The following example changes the language to British English: + +``` bash +pandoc example.md -o example.pdf --template eisvogel -V lang=en-GB +``` + +The following example changes the language to German: + +``` bash +pandoc example.md -o example.pdf --template eisvogel -V lang=de +``` + +### Typesetting a Book + +To typeset a book supply the template variable `-V book` from the command line or via `book: true` in the metadata. + +To get the correct chapter headings you need to tell pandoc that it should convert first level headings (indicated by one `#` in markdown) to chapters with the command line option `--top-level-division=chapter`. Chapter numbers start at 1. If you need to change that, specify `first-chapter` in the template variables. + +There will be one blank page before each chapter because the template is two-sided per default. So if you plan to publish your book as a PDF and don’t need a blank page you should add the class option `onesided` which can be done by supplying a template variable `-V classoption=oneside`. + +### Example Images + +| A green title page | A background image on the title page | +| :----------------: | :----------------: | +| [![A green title page](../examples/green-titlepage/green-titlepage.png)](../examples/green-titlepage/green-titlepage.pdf) | [![A background image on the title page](../examples/titlepage-background/titlepage-background.png)](../examples/titlepage-background/titlepage-background.pdf) | + +| images and tables | Code blocks styled without listings | +| :---------------: | :---------------: | +| [![images and tables](../examples/images-and-tables/images-and-tables.png)](../examples/images-and-tables/images-and-tables.pdf) | [![Code blocks styled without listings](../examples/without-listings/without-listings.png)](../examples/without-listings/without-listings.pdf) | + +| A book | Code blocks styled with listings | +| :----: | :----: | +| [![A book](../examples/book/book.png)](../examples/book/book.pdf) | [![Code blocks styled with listings](../examples/listings/listings.png)](../examples/listings/listings.pdf) | + +| A background images on all pages | CJK Support (when using XeLaTeX) | +| :----: | :----: | +| [![A background images on all pages](../examples/page-background/page-background.png)](../examples/page-background/page-background.pdf) | [![CJK Support (when using XeLaTeX)](../examples/japanese/japanese.png)](../examples/japanese/japanese.pdf) | + +## Common Errors / Issues + +The following section lists common errors and their solutions when using the +Eisvogel template. + +### LaTeX Errors `Missing endcsname inserted` or `File x not found` when using `titlepage-background` or `logo` + +``` latex +Error producing PDF. +! Missing endcsname inserted. + + protect +``` + +``` latex +Error producing PDF. +! Package pdftex.def Error: File `logo\T1\textunderscoreimage.pdf' not fou +nd: using draft setting. + +See the pdftex.def package documentation for explanation. +Type H for immediate help. +``` + +These errors occur when one includes a background image on the title page or a +logo that has an underscore (`_`) in the filename. + +A quick fix would be to replace all underscores in the filename of the image +with a hyphen (`-`). If the background image is specified in your YAML front +matter like so, + +``` yaml +titlepage-background: "background_image.pdf" +``` + +you can advise pandoc to interpret this as LaTeX and include it in the document +without parsing. + +``` yaml +titlepage-background: "`background_image.pdf`{=latex}" +``` + +The same fix can be used for the logo image as well: + +``` yaml +logo: "`logo_image.pdf`{=latex}" +``` + +Corresponding issues: + +- [Wandmalfarbe/pandoc-latex-template#100](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/100) +- [Wandmalfarbe/pandoc-latex-template#166](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/166) + +### LaTeX Error `Missing \begin{document}` + +``` +! LaTeX Error: Missing \begin{document}. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.7 < + !DOCTYPE html> +! ==> Fatal error occurred, no output PDF file produced! +``` + +This error indicates that you try to use some text file for conversion that is +not the Eisvogel template. Please download the [latest Eisvogel template](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest) from the releases page and start the conversion again. + +### LaTeX Error `auto expansion is only possible with scalable fonts` + +``` latex +Error producing PDF. +! pdfTeX error (font expansion): auto expansion is only possible with scalable +fonts. +\AtBegShi@Output ...ipout \box \AtBeginShipoutBox + \fi \fi +l.643 \begin{lstlisting} +``` + +This error likely occurs on Windows with MiKTeX installed. StackOverflow user +[Krebto provided the following fix](https://tex.stackexchange.com/a/392467): + +> To solve the problem navigate to `C:\Program Files\MiKTeX 2.9\miktex\bin\x64` and run `updmap.exe`. The program may seem as it hangs for a while, but its probably because it tries to update the whole font tree. This solved the problem for me. After re-compiling everything should work fine. + +Corresponding issue: + +- [Wandmalfarbe/pandoc-latex-template#133](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/133) + +### LaTeX Error `cannot find image file` + +``` latex +Error producing PDF. +! error: (file "/tmp/tex2pdf.-be734e802ef6d0c3/""fdcfc29edcf252186f1b0a52f18f50 +43abaeb2d0".png) (pdf backend): cannot find image file '"/tmp/tex2pdf.-be734e802 +ef6d0c3/""fdcfc29edcf252186f1b0a52f18f5043abaeb2d0".png' +! ==> Fatal error occurred, no output PDF file produced! +``` + +In general this error means that LaTeX is unable to find the included image +file. Please check all image references and file names for correctness. + +This error also occurs if you use an old version of Eisvogel with the package +`grffile` and have an old LaTeX distribution installed. Please update Eisvogel +and your LaTeX distribution. + +Corresponding issues: + +- [jgm/pandoc#5848](https://github.com/jgm/pandoc/issues/5848) +- [Wandmalfarbe/pandoc-latex-template#149](https://github.com/Wandmalfarbe/pandoc-latex-template/issues/149) + +## Credits + + - This template includes code for styling block quotations from [pandoc-letter](https://github.com/aaronwolen/pandoc-letter) by [Aaron Wolen](https://github.com/aaronwolen). + +## License + +This project is open source licensed under the BSD 3-Clause License. Please see the [LICENSE file](LICENSE) for more information. diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/eisvogel.tex b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/eisvogel.tex new file mode 100644 index 0000000..742b0f5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/eisvogel.tex @@ -0,0 +1,1156 @@ +%% +% Copyright (c) 2017 - 2024, Pascal Wagler; +% Copyright (c) 2014 - 2024, John MacFarlane +% +% All rights reserved. +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions +% are met: +% +% - Redistributions of source code must retain the above copyright +% notice, this list of conditions and the following disclaimer. +% +% - Redistributions in binary form must reproduce the above copyright +% notice, this list of conditions and the following disclaimer in the +% documentation and/or other materials provided with the distribution. +% +% - Neither the name of John MacFarlane nor the names of other +% contributors may be used to endorse or promote products derived +% from this software without specific prior written permission. +% +% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +% FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +% COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +% POSSIBILITY OF SUCH DAMAGE. +%% + +%% +% This is the Eisvogel pandoc LaTeX template. +% +% For usage information and examples visit the official GitHub page: +% https://github.com/Wandmalfarbe/pandoc-latex-template +%% + +% Options for packages loaded elsewhere +\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} +\PassOptionsToPackage{hyphens}{url} +\PassOptionsToPackage{dvipsnames,svgnames,x11names,table}{xcolor} +$if(CJKmainfont)$ +\PassOptionsToPackage{space}{xeCJK} +$endif$ +% +\documentclass[ +$if(fontsize)$ + $fontsize$, +$endif$ +$if(papersize)$ + $papersize$paper, +$else$ + paper=a4, +$endif$ +$if(beamer)$ + ignorenonframetext, +$if(handout)$ + handout, +$endif$ +$if(aspectratio)$ + aspectratio=$aspectratio$, +$endif$ +$if(babel-lang)$ + $babel-lang$, +$endif$ +$endif$ +$for(classoption)$ + $classoption$$sep$, +$endfor$ + ,captions=tableheading +]{$if(beamer)$$documentclass$$else$$if(book)$scrbook$else$scrartcl$endif$$endif$} +$if(beamer)$ +$if(background-image)$ +\usebackgroundtemplate{% + \includegraphics[width=\paperwidth]{$background-image$}% +} +% In beamer background-image does not work well when other images are used, so this is the workaround +\pgfdeclareimage[width=\paperwidth,height=\paperheight]{background}{$background-image$} +\usebackgroundtemplate{\pgfuseimage{background}} +$endif$ +\usepackage{pgfpages} +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{caption label separator}{: } +\setbeamercolor{caption name}{fg=normal text.fg} +\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ +$for(beameroption)$ +\setbeameroption{$beameroption$} +$endfor$ +% Prevent slide breaks in the middle of a paragraph +\widowpenalties 1 10000 +\raggedbottom +$if(section-titles)$ +\setbeamertemplate{part page}{ + \centering + \begin{beamercolorbox}[sep=16pt,center]{part title} + \usebeamerfont{part title}\insertpart\par + \end{beamercolorbox} +} +\setbeamertemplate{section page}{ + \centering + \begin{beamercolorbox}[sep=12pt,center]{section title} + \usebeamerfont{section title}\insertsection\par + \end{beamercolorbox} +} +\setbeamertemplate{subsection page}{ + \centering + \begin{beamercolorbox}[sep=8pt,center]{subsection title} + \usebeamerfont{subsection title}\insertsubsection\par + \end{beamercolorbox} +} +\AtBeginPart{ + \frame{\partpage} +} +\AtBeginSection{ + \ifbibliography + \else + \frame{\sectionpage} + \fi +} +\AtBeginSubsection{ + \frame{\subsectionpage} +} +$endif$ +$endif$ +$if(beamerarticle)$ +\usepackage{beamerarticle} % needs to be loaded first +$endif$ +\usepackage{amsmath,amssymb} +$if(linestretch)$ +\usepackage{setspace} +$else$ +% Use setspace anyway because we change the default line spacing. +% The spacing is changed early to affect the titlepage and the TOC. +\usepackage{setspace} +\setstretch{1.2} +$endif$ +\usepackage{iftex} +\ifPDFTeX + \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provide euro and other symbols +\else % if luatex or xetex +$if(mathspec)$ + \ifXeTeX + \usepackage{mathspec} % this also loads fontspec + \else + \usepackage{unicode-math} % this also loads fontspec + \fi +$else$ + \usepackage{unicode-math} % this also loads fontspec +$endif$ + \defaultfontfeatures{Scale=MatchLowercase}$-- must come before Beamer theme + \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} +\fi +$if(fontfamily)$ +$else$ +$-- Set default font before Beamer theme so the theme can override it +\usepackage{lmodern} +$endif$ +$-- Set Beamer theme before user font settings so they can override theme +$if(beamer)$ +$if(theme)$ +\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} +$endif$ +$if(colortheme)$ +\usecolortheme{$colortheme$} +$endif$ +$if(fonttheme)$ +\usefonttheme{$fonttheme$} +$endif$ +$if(mainfont)$ +\usefonttheme{serif} % use mainfont rather than sansfont for slide text +$endif$ +$if(innertheme)$ +\useinnertheme{$innertheme$} +$endif$ +$if(outertheme)$ +\useoutertheme{$outertheme$} +$endif$ +$endif$ +$-- User font settings (must come after default font and Beamer theme) +$if(fontfamily)$ +\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} +$endif$ +\ifPDFTeX\else + % xetex/luatex font selection +$if(mainfont)$ + $if(mainfontfallback)$ + \ifLuaTeX + \usepackage{luaotfload} + \directlua{luaotfload.add_fallback("mainfontfallback",{ + $for(mainfontfallback)$"$mainfontfallback$"$sep$,$endfor$ + })} + \fi + $endif$ + \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$} +$endif$ +$if(sansfont)$ + $if(sansfontfallback)$ + \ifLuaTeX + \usepackage{luaotfload} + \directlua{luaotfload.add_fallback("sansfontfallback",{ + $for(sansfontfallback)$"$sansfontfallback$"$sep$,$endfor$ + })} + \fi + $endif$ + \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$$if(sansfontfallback)$,RawFeature={fallback=sansfontfallback}$endif$]{$sansfont$} +$endif$ +$if(monofont)$ + $if(monofontfallback)$ + \ifLuaTeX + \usepackage{luaotfload} + \directlua{luaotfload.add_fallback("monofontfallback",{ + $for(monofontfallback)$"$monofontfallback$"$sep$,$endfor$ + })} + \fi + $endif$ + \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$if(monofontfallback)$,RawFeature={fallback=monofontfallback}$endif$]{$monofont$} +$endif$ +$for(fontfamilies)$ + \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} +$endfor$ +$if(mathfont)$ +$if(mathspec)$ + \ifXeTeX + \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \else + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \fi +$else$ + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} +$endif$ +$endif$ +$if(CJKmainfont)$ + \ifXeTeX + \usepackage{xeCJK} + \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + $if(CJKsansfont)$ + \setCJKsansfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKsansfont$} + $endif$ + $if(CJKmonofont)$ + \setCJKmonofont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmonofont$} + $endif$ + \fi +$endif$ +$if(luatexjapresetoptions)$ + \ifLuaTeX + \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} + \fi +$endif$ +$if(CJKmainfont)$ + \ifLuaTeX + \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} + \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + \fi +$endif$ +\fi +$if(zero-width-non-joiner)$ +%% Support for zero-width non-joiner characters. +\makeatletter +\def\zerowidthnonjoiner{% + % Prevent ligatures and adjust kerning, but still support hyphenating. + \texorpdfstring{% + \TextOrMath{\nobreak\discretionary{-}{}{\kern.03em}% + \ifvmode\else\nobreak\hskip\z@skip\fi}{}% + }{}% +} +\makeatother +\ifPDFTeX + \DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner} +\else + \catcode`^^^^200c=\active + \protected\def ^^^^200c{\zerowidthnonjoiner} +\fi +%% End of ZWNJ support +$endif$ +% Use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\IfFileExists{microtype.sty}{% use microtype if available + \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} + \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +$if(indent)$ +$else$ +\makeatletter +\@ifundefined{KOMAClassName}{% if non-KOMA class + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt}} +}{% if KOMA class + \KOMAoptions{parskip=half}} +\makeatother +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +\usepackage{xcolor} +\definecolor{default-linkcolor}{HTML}{A50000} +\definecolor{default-filecolor}{HTML}{A50000} +\definecolor{default-citecolor}{HTML}{4077C0} +\definecolor{default-urlcolor}{HTML}{4077C0} +$if(footnotes-pretty)$ +% load footmisc in order to customize footnotes (footmisc has to be loaded before hyperref, cf. https://tex.stackexchange.com/a/169124/144087) +\usepackage[hang,flushmargin,bottom,multiple]{footmisc} +\setlength{\footnotemargin}{0.8em} % set space between footnote nr and text +\setlength{\footnotesep}{\baselineskip} % set space between multiple footnotes +\setlength{\skip\footins}{0.3cm} % set space between page content and footnote +\setlength{\footskip}{0.9cm} % set space between footnote and page bottom +$endif$ +$if(geometry)$ +$if(beamer)$ +\geometry{$for(geometry)$$geometry$$sep$,$endfor$} +$else$ +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$else$ +$if(beamer)$ +$else$ +\usepackage[margin=2.5cm,includehead=true,includefoot=true,centering,$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$endif$ +$if(titlepage-logo)$ +\usepackage[export]{adjustbox} +\usepackage{graphicx} +$endif$ +$if(beamer)$ +\newif\ifbibliography +$endif$ +$if(listings)$ +\usepackage{listings} +\newcommand{\passthrough}[1]{#1} +\lstset{defaultdialect=[5.3]Lua} +\lstset{defaultdialect=[x86masm]Assembler} +$endif$ +$if(listings-no-page-break)$ +\usepackage{etoolbox} +\BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}} +\AfterEndEnvironment{lstlisting}{\end{minipage}\par\addvspace{\topskip}} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(highlighting-macros)$ +$highlighting-macros$ + +% Workaround/bugfix from jannick0. +% See https://github.com/jgm/pandoc/issues/4302#issuecomment-360669013) +% or https://github.com/Wandmalfarbe/pandoc-latex-template/issues/2 +% +% Redefine the verbatim environment 'Highlighting' to break long lines (with +% the help of fvextra). Redefinition is necessary because it is unlikely that +% pandoc includes fvextra in the default template. +\usepackage{fvextra} +\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}} + +$endif$ +$if(tables)$ +\usepackage{longtable,booktabs,array} +$if(multirow)$ +\usepackage{multirow} +$endif$ +\usepackage{calc} % for calculating minipage widths +$if(beamer)$ +\usepackage{caption} +% Make caption package work with longtable +\makeatletter +\def\fnum@table{\tablename~\thetable} +\makeatother +$else$ +% Correct order of tables after \paragraph or \subparagraph +\usepackage{etoolbox} +\makeatletter +\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} +\makeatother +% Allow footnotes in longtable head/foot +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} +\makesavenoteenv{longtable} +$endif$ +$endif$ +% add backlinks to footnote references, cf. https://tex.stackexchange.com/questions/302266/make-footnote-clickable-both-ways +$if(footnotes-disable-backlinks)$ +$else$ +\usepackage{footnotebackref} +$endif$ +$if(graphics)$ +\usepackage{graphicx} +\makeatletter +\newsavebox\pandoc@box +\newcommand*\pandocbounded[1]{% scales image to fit in text height/width + \sbox\pandoc@box{#1}% + \Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}% + \Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}% + \ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both + \ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}% + \else\usebox{\pandoc@box}% + \fi% +} +% Set default figure placement to htbp +% Make use of float-package and set default placement for figures to H. +% The option H means 'PUT IT HERE' (as opposed to the standard h option which means 'You may put it here if you like'). +\usepackage{float} +\floatplacement{figure}{$if(float-placement-figure)$$float-placement-figure$$else$H$endif$} +\makeatother +$endif$ +$if(svg)$ +\usepackage{svg} +$endif$ +$if(strikeout)$ +$-- also used for underline +\ifLuaTeX + \usepackage{luacolor} + \usepackage[soul]{lua-ul} +\else +\usepackage{soul} +$if(beamer)$ + \makeatletter + \let\HL\hl + \renewcommand\hl{% fix for beamer highlighting + \let\set@color\beamerorig@set@color + \let\reset@color\beamerorig@reset@color + \HL} + \makeatother +$endif$ +$if(CJKmainfont)$ + \ifXeTeX + % soul's \st doesn't work for CJK: + \usepackage{xeCJKfntef} + \renewcommand{\st}[1]{\sout{#1}} + \fi +$endif$ +\fi +$endif$ +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(numbersections)$ +\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} +$else$ +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering +$endif$ +$if(subfigure)$ +\usepackage{subcaption} +$endif$ +$if(beamer)$ +$else$ +$if(block-headings)$ +% Make \paragraph and \subparagraph free-standing +\makeatletter +\ifx\paragraph\undefined\else + \let\oldparagraph\paragraph + \renewcommand{\paragraph}{ + \@ifstar + \xxxParagraphStar + \xxxParagraphNoStar + } + \newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}} + \newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else + \let\oldsubparagraph\subparagraph + \renewcommand{\subparagraph}{ + \@ifstar + \xxxSubParagraphStar + \xxxSubParagraphNoStar + } + \newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}} + \newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +\makeatother +$endif$ +$endif$ +$if(pagestyle)$ +\pagestyle{$pagestyle$} +$endif$ +$if(csl-refs)$ +% definitions for citeproc citations +\NewDocumentCommand\citeproctext{}{} +\NewDocumentCommand\citeproc{mm}{% + \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} +\makeatletter + % allow citations to break across lines + \let\@cite@ofmt\@firstofone + % avoid brackets around text for \cite: + \def\@biblabel#1{} + \def\@cite#1#2{{#1\if@tempswa , #2\fi}} +\makeatother +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing + {\begin{list}{}{% + \setlength{\itemindent}{0pt} + \setlength{\leftmargin}{0pt} + \setlength{\parsep}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 + \setlength{\leftmargin}{\cslhangindent} + \setlength{\itemindent}{-1\cslhangindent} + \fi + % set entry spacing + \setlength{\itemsep}{#2\baselineskip}}} + {\end{list}} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +$if(lang)$ +\ifLuaTeX +\usepackage[bidi=basic]{babel} +\else +\usepackage[bidi=default]{babel} +\fi +$if(babel-lang)$ +\babelprovide[main,import]{$babel-lang$} +$if(mainfont)$ +\ifPDFTeX +\else +\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$} +\fi +$endif$ +$endif$ +$for(babel-otherlangs)$ +\babelprovide[import]{$babel-otherlangs$} +$endfor$ +$for(babelfonts/pairs)$ +\babelfont[$babelfonts.key$]{rm}{$babelfonts.value$} +$endfor$ +% get rid of language-specific shorthands (see #6817): +\let\LanguageShortHands\languageshorthands +\def\languageshorthands#1{} +$if(selnolig-langs)$ +\ifLuaTeX + \usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures +\fi +$endif$ +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ +$if(dir)$ +\ifPDFTeX + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi +$endif$ +$if(natbib)$ +\usepackage[$natbiboptions$]{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ +$if(nocite-ids)$ +\nocite{$for(nocite-ids)$$it$$sep$, $endfor$} +$endif$ +$if(csquotes)$ +\usepackage{csquotes} +$endif$ +\usepackage{bookmark} +\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available +\urlstyle{$if(urlstyle)$$urlstyle$$else$same$endif$} +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(verbatim-in-note)$ +\VerbatimFootnotes % allow verbatim text in footnotes +$endif$ +\hypersetup{ +$if(title-meta)$ + pdftitle={$title-meta$}, +$endif$ +$if(author-meta)$ + pdfauthor={$author-meta$}, +$endif$ +$if(lang)$ + pdflang={$lang$}, +$endif$ +$if(subject)$ + pdfsubject={$subject$}, +$endif$ +$if(keywords)$ + pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, +$endif$ +$if(colorlinks)$ + colorlinks=true, + linkcolor={$if(linkcolor)$$linkcolor$$else$default-linkcolor$endif$}, + filecolor={$if(filecolor)$$filecolor$$else$default-filecolor$endif$}, + citecolor={$if(citecolor)$$citecolor$$else$default-citecolor$endif$}, + urlcolor={$if(urlcolor)$$urlcolor$$else$default-urlcolor$endif$}, +$else$ +$if(boxlinks)$ +$else$ + hidelinks, +$endif$ +$endif$ + breaklinks=true, + pdfcreator={LaTeX via pandoc with the Eisvogel template}} +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +$if(beamer)$ +$else$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large #1 \par}}{}{} +} +\makeatother +$endif$ +\subtitle{$subtitle$} +$endif$ +\author{$for(author)$$author$$sep$ \and $endfor$} +\date{$date$} +$if(beamer)$ +$if(institute)$ +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +$if(titlegraphic)$ +\titlegraphic{\includegraphics$if(titlegraphicoptions)$[$for(titlegraphicoptions)$$titlegraphicoptions$$sep$, $endfor$]$endif${$titlegraphic$}} +$endif$ +$if(logo)$ +\logo{\includegraphics{$logo$}} +$endif$ +$endif$ + + + +%% +%% added +%% + +$if(page-background)$ +\usepackage[pages=all]{background} +$endif$ + +% +% for the background color of the title page +% +$if(titlepage)$ +\usepackage{pagecolor} +\usepackage{afterpage} +$if(titlepage-background)$ +\usepackage{tikz} +$endif$ +$if(geometry)$ +$else$ +\usepackage[margin=2.5cm,includehead=true,includefoot=true,centering]{geometry} +$endif$ +$endif$ + +% +% break urls +% +\PassOptionsToPackage{hyphens}{url} + +% +% When using babel or polyglossia with biblatex, loading csquotes is recommended +% to ensure that quoted texts are typeset according to the rules of your main language. +% +\usepackage{csquotes} + +% +% captions +% +\definecolor{caption-color}{HTML}{777777} +$if(beamer)$ +$else$ +\usepackage[font={stretch=1.2}, textfont={color=caption-color}, position=top, skip=4mm, labelfont=bf, singlelinecheck=false, justification=$if(caption-justification)$$caption-justification$$else$raggedright$endif$]{caption} +\setcapindent{0em} +$endif$ + +% +% blockquote +% +\definecolor{blockquote-border}{RGB}{221,221,221} +\definecolor{blockquote-text}{RGB}{119,119,119} +\usepackage{mdframed} +\newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote} +\renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}% +\item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}} + +% +% Source Sans Pro as the default font family +% Source Code Pro for monospace text +% +% 'default' option sets the default +% font family to Source Sans Pro, not \sfdefault. +% +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + $if(fontfamily)$ + $else$ + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + $endif$ +\else % if not pdftex + $if(mainfont)$ + $else$ + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + + % XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887 + % This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the + % fix is still unreleased. + % TODO: Remove this workaround when the new version of sourcecodepro is released on CTAN. + \ifxetex + \makeatletter + \defaultfontfeatures[\ttfamily] + { Numbers = \sourcecodepro@figurestyle, + Scale = \SourceCodePro@scale, + Extension = .otf } + \setmonofont + [ UprightFont = *-\sourcecodepro@regstyle, + ItalicFont = *-\sourcecodepro@regstyle It, + BoldFont = *-\sourcecodepro@boldstyle, + BoldItalicFont = *-\sourcecodepro@boldstyle It ] + {SourceCodePro} + \makeatother + \fi + $endif$ +\fi + +% +% heading color +% +\definecolor{heading-color}{RGB}{40,40,40} +$if(beamer)$ +$else$ +\addtokomafont{section}{\color{heading-color}} +$endif$ +% When using the classes report, scrreprt, book, +% scrbook or memoir, uncomment the following line. +%\addtokomafont{chapter}{\color{heading-color}} + +% +% variables for title, author and date +% +$if(beamer)$ +$else$ +\usepackage{titling} +\title{$title$} +\author{$for(author)$$author$$sep$, $endfor$} +\date{$date$} +$endif$ + +% +% tables +% +$if(tables)$ + +\definecolor{table-row-color}{HTML}{F5F5F5} +\definecolor{table-rule-color}{HTML}{999999} + +%\arrayrulecolor{black!40} +\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule +\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule +\renewcommand{\arraystretch}{1.3} % spacing (padding) + +$if(table-use-row-colors)$ +% Unfortunately the colored cells extend beyond the edge of the +% table because pandoc uses @-expressions (@{}) like so: +% +% \begin{longtable}[]{@{}ll@{}} +% \end{longtable} +% +% https://en.wikibooks.org/wiki/LaTeX/Tables#.40-expressions +\usepackage{etoolbox} +\AtBeginEnvironment{longtable}{\rowcolors{2}{}{table-row-color!100}} +\preto{\toprule}{\hiderowcolors}{}{} +\appto{\endhead}{\showrowcolors}{}{} +\appto{\endfirsthead}{\showrowcolors}{}{} +$endif$ +$endif$ + +% +% remove paragraph indentation +% +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +\setlength{\emergencystretch}{3em} % prevent overfull lines + +% +% +% Listings +% +% + +$if(listings)$ + +% +% general listing colors +% +\definecolor{listing-background}{HTML}{F7F7F7} +\definecolor{listing-rule}{HTML}{B3B2B3} +\definecolor{listing-numbers}{HTML}{B3B2B3} +\definecolor{listing-text-color}{HTML}{000000} +\definecolor{listing-keyword}{HTML}{435489} +\definecolor{listing-keyword-2}{HTML}{1284CA} % additional keywords +\definecolor{listing-keyword-3}{HTML}{9137CB} % additional keywords +\definecolor{listing-identifier}{HTML}{435489} +\definecolor{listing-string}{HTML}{00999A} +\definecolor{listing-comment}{HTML}{8E8E8E} + +\lstdefinestyle{eisvogel_listing_style}{ + language = java, +$if(listings-disable-line-numbers)$ + xleftmargin = 0.6em, + framexleftmargin = 0.4em, +$else$ + numbers = left, + xleftmargin = 2.7em, + framexleftmargin = 2.5em, +$endif$ + backgroundcolor = \color{listing-background}, + basicstyle = \color{listing-text-color}\linespread{1.0}% + \lst@ifdisplaystyle% + $if(code-block-font-size)$$code-block-font-size$$else$\small$endif$% + \fi\ttfamily{}, + breaklines = true, + frame = single, + framesep = 0.19em, + rulecolor = \color{listing-rule}, + frameround = ffff, + tabsize = 4, + numberstyle = \color{listing-numbers}, + aboveskip = 1.0em, + belowskip = 0.1em, + abovecaptionskip = 0em, + belowcaptionskip = 1.0em, + keywordstyle = {\color{listing-keyword}\bfseries}, + keywordstyle = {[2]\color{listing-keyword-2}\bfseries}, + keywordstyle = {[3]\color{listing-keyword-3}\bfseries\itshape}, + sensitive = true, + identifierstyle = \color{listing-identifier}, + commentstyle = \color{listing-comment}, + stringstyle = \color{listing-string}, + showstringspaces = false, + escapeinside = {/*@}{@*/}, % Allow LaTeX inside these special comments + literate = + {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1 + {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1 + {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1 + {À}{{\`A}}1 {È}{{\`E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1 + {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 + {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 + {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1 + {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1 + {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1 + {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1 + {€}{{\EUR}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1 + {»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1 + {…}{{\ldots}}1 {≥}{{>=}}1 {≤}{{<=}}1 {„}{{\glqq}}1 {“}{{\grqq}}1 + {”}{{''}}1 +} +\lstset{style=eisvogel_listing_style} + +% +% Java (Java SE 12, 2019-06-22) +% +\lstdefinelanguage{Java}{ + morekeywords={ + % normal keywords (without data types) + abstract,assert,break,case,catch,class,continue,default, + do,else,enum,exports,extends,final,finally,for,if,implements, + import,instanceof,interface,module,native,new,package,private, + protected,public,requires,return,static,strictfp,super,switch, + synchronized,this,throw,throws,transient,try,volatile,while, + % var is an identifier + var + }, + morekeywords={[2] % data types + % primitive data types + boolean,byte,char,double,float,int,long,short, + % String + String, + % primitive wrapper types + Boolean,Byte,Character,Double,Float,Integer,Long,Short + % number types + Number,AtomicInteger,AtomicLong,BigDecimal,BigInteger,DoubleAccumulator,DoubleAdder,LongAccumulator,LongAdder,Short, + % other + Object,Void,void + }, + morekeywords={[3] % literals + % reserved words for literal values + null,true,false, + }, + sensitive, + morecomment = [l]//, + morecomment = [s]{/*}{*/}, + morecomment = [s]{/**}{*/}, + morestring = [b]", + morestring = [b]', +} + +\lstdefinelanguage{XML}{ + morestring = [b]", + moredelim = [s][\bfseries\color{listing-keyword}]{<}{\ }, + moredelim = [s][\bfseries\color{listing-keyword}]{}, + moredelim = [l][\bfseries\color{listing-keyword}]{/>}, + moredelim = [l][\bfseries\color{listing-keyword}]{>}, + morecomment = [s]{}, + morecomment = [s]{}, + commentstyle = \color{listing-comment}, + stringstyle = \color{listing-string}, + identifierstyle = \color{listing-identifier} +} +$endif$ + +% +% header and footer +% +$if(beamer)$ +$else$ +$if(disable-header-and-footer)$ +$else$ +\usepackage[headsepline,footsepline]{scrlayer-scrpage} + +\newpairofpagestyles{eisvogel-header-footer}{ + \clearpairofpagestyles + \ihead*{$if(header-left)$$header-left$$else$$title$$endif$} + \chead*{$if(header-center)$$header-center$$else$$endif$} + \ohead*{$if(header-right)$$header-right$$else$$date$$endif$} + \ifoot*{$if(footer-left)$$footer-left$$else$$for(author)$$author$$sep$, $endfor$$endif$} + \cfoot*{$if(footer-center)$$footer-center$$else$$endif$} + \ofoot*{$if(footer-right)$$footer-right$$else$\thepage$endif$} + \addtokomafont{pageheadfoot}{\upshape} +} +\pagestyle{eisvogel-header-footer} + +$if(book)$ +\deftripstyle{ChapterStyle}{}{}{}{}{\pagemark}{} +\renewcommand*{\chapterpagestyle}{ChapterStyle} +$endif$ + +$if(page-background)$ +\backgroundsetup{ +scale=1, +color=black, +opacity=$if(page-background-opacity)$$page-background-opacity$$else$0.2$endif$, +angle=0, +contents={% + \includegraphics[width=\paperwidth,height=\paperheight]{$page-background$} + }% +} +$endif$ +$endif$ +$endif$ + +%% +%% end added +%% + +\begin{document} + +%% +%% begin titlepage +%% +$if(beamer)$ +$else$ +$if(titlepage)$ +\begin{titlepage} +$if(titlepage-background)$ +\newgeometry{top=2cm, right=4cm, bottom=3cm, left=4cm} +$else$ +\newgeometry{left=6cm} +$endif$ +$if(titlepage-color)$ +\definecolor{titlepage-color}{HTML}{$titlepage-color$} +\newpagecolor{titlepage-color}\afterpage{\restorepagecolor} +$endif$ +$if(titlepage-background)$ +\tikz[remember picture,overlay] \node[inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth,height=\paperheight]{$titlepage-background$}}; +$endif$ +\newcommand{\colorRule}[3][black]{\textcolor[HTML]{#1}{\rule{#2}{#3}}} +\begin{flushleft} +\noindent +\\[-1em] +\color[HTML]{$if(titlepage-text-color)$$titlepage-text-color$$else$5F5F5F$endif$} +\makebox[0pt][l]{\colorRule[$if(titlepage-rule-color)$$titlepage-rule-color$$else$435488$endif$]{1.3\textwidth}{$if(titlepage-rule-height)$$titlepage-rule-height$$else$4$endif$pt}} +\par +\noindent + +$if(titlepage-background)$ +% The titlepage with a background image has other text spacing and text size +{ + \setstretch{2} + \vfill + \vskip -8em + \noindent {\huge \textbf{\textsf{$title$}}} + $if(subtitle)$ + \vskip 1em + {\Large \textsf{$subtitle$}} + $endif$ + \vskip 2em + \noindent {\Large \textsf{$for(author)$$author$$sep$, $endfor$} \vskip 0.6em \textsf{$date$}} + \vfill +} +$else$ +{ + \setstretch{1.4} + \vfill + \noindent {\huge \textbf{\textsf{$title$}}} + $if(subtitle)$ + \vskip 1em + {\Large \textsf{$subtitle$}} + $endif$ + \vskip 2em + \noindent {\Large \textsf{$for(author)$$author$$sep$, $endfor$}} + \vfill +} +$endif$ + +$if(titlepage-logo)$ +\noindent +\includegraphics[width=$if(logo-width)$$logo-width$$else$35mm$endif$, left]{$titlepage-logo$} +$endif$ + +$if(titlepage-background)$ +$else$ +\textsf{$date$} +$endif$ +\end{flushleft} +\end{titlepage} +\restoregeometry +\pagenumbering{arabic} +$endif$ +$endif$ + +%% +%% end titlepage +%% + +$if(has-frontmatter)$ +\frontmatter +$endif$ +$if(title)$ +$if(beamer)$ +\frame{\titlepage} +% don't generate the default title +% $else$ +% \maketitle +$endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ +$endif$ + +$if(first-chapter)$ +\setcounter{chapter}{$first-chapter$} +\addtocounter{chapter}{-1} +$endif$ + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$if(toc-title)$ +\renewcommand*\contentsname{$toc-title$} +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks] +$if(toc-title)$ + \frametitle{$toc-title$} +$endif$ + \setcounter{tocdepth}{$toc-depth$} + \tableofcontents +\end{frame} +$if(toc-own-page)$ +\newpage +$endif$ +$else$ +{ +$if(colorlinks)$ +\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} +$endif$ +\setcounter{tocdepth}{$toc-depth$} +\tableofcontents +$if(toc-own-page)$ +\newpage +$endif$ +} +$endif$ +$endif$ +$if(lof)$ +\listoffigures +$endif$ +$if(lot)$ +\listoftables +$endif$ +$if(linestretch)$ +\setstretch{$linestretch$} +$endif$ +$if(has-frontmatter)$ +\mainmatter +$endif$ +$body$ + +$if(has-frontmatter)$ +\backmatter +$endif$ +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(has-chapters)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue +$endif$ + \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} +$if(beamer)$ +\end{frame} +$endif$ + +$endif$ +$endif$ +$if(biblatex)$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue + \printbibliography[heading=none] +\end{frame} +$else$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ + +$endif$ +$for(include-after)$ +$include-after$ + +$endfor$ +\end{document} diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/document.md new file mode 100644 index 0000000..8997fa6 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/document.md @@ -0,0 +1,57 @@ +--- +title: "Example PDF" +author: [Author] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "en" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +> Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/document.pdf new file mode 100644 index 0000000..a2799b8 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/preview.png new file mode 100644 index 0000000..09b5406 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/basic-example/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/build.sh new file mode 100644 index 0000000..f3dd669 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --to beamer --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/document.md new file mode 100644 index 0000000..3c1f569 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/document.md @@ -0,0 +1,52 @@ +--- +title: "Example PDF" +author: [Author] +date: "2019-06-16" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "en" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +# Obscura atque coniuge, per de coniunx + +- Vertitur iura tum nepotis causa motus. + +```html + + + + This is the title of the page. + + + This is an image. + + +``` + +# Scyrumve spiro subitusque mente + +```{.sql caption="Pallas nuper longusque cratere habuisse sepulcro pectore fertur."} +CREATE TYPE person_t AS ( + firstName VARCHAR(50) NOT NULL, + lastName VARCHAR(50) NOT NULL +); + +CREATE Or REPLACE FUNCTION getFormattedName(person) RETURNS text AS + $$ SELECT 'P: ' || initcap($1.firstName); $$ +LANGUAGE SQL; +``` \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/document.pdf new file mode 100644 index 0000000..5792985 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/preview.png new file mode 100644 index 0000000..fcd3b60 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/beamer/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/build.sh new file mode 100644 index 0000000..9eaa123 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings --top-level-division="chapter" \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/document.md new file mode 100644 index 0000000..3936437 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/document.md @@ -0,0 +1,104 @@ +--- +title: "Example PDF" +author: [Author] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +book: true +classoption: [oneside] +... + +# Crinis mixtaque factisque ille + +## Aut nunc furori ad latarumque Philomela + +Lorem markdownum includite volenti monticolae videre vocem hac sparsit puta +gelidis vestros egressus sex. Undis eris per auguris armis. Est saevior pater. +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + +## Gaudet Silenus iuvenis + +Mulciber denique faces ingratus, in umeros umeri cum, iram ira custos non. +Pariterque admissa nubes, in ait ecce setae summis sacrorum me gaudete tellus. +Ille tu perire ille, artificis caede. + +```scala +def sumLeaves(t: Tree): Int = t match { + case Branch(l, r) => sumLeaves(l) + sumLeaves(r) + case Leaf(x) => x +} +``` + +Cephea rector minorque, quem corpora, +Argus. Superi hoc tenuavit timebant ossibus totque non serpere animo corpore +superas gelidae, comitate deus Iunonigenaeque +pectora. + +- Tuis Cereris armiferae fugiunt suus derepta vel +- Veniam mea cum sollertior arbore flore +- Ceae saecula +- Tamen est + +## Dies tunc in enim + +Gerunt urimur violaeque agricolis iussa locis puppis +simul cognita, vertentia Romana +obprobrium pignora superem est certe nondum suffuderat. Nox Pasiphaeia domo: +**abiit** catenas utro crimine gramina ingemuere mixtae. Quem trabibus etiamnum +orbe addita, eiaculatur videri cervo artus. Nutritur cupidine silentia Maeoniam +aere enim gemuit adgreditur, telasque *annis* nos cum Arctonque ingens lateri +cum iaculoque ferus. + +## Et dextra utque per lenius portus eburnae + +Cui vittas aris ibi putat dicere; factum sedere antiqua? Cognita Lyncides iuste +insuetum lacerum in sinamus arces; aves aevum spatiumque de utrumque moveret in? +Tertia ordine, Epidaurius, *has sed et* et novat: quod superare concubitusque +retia quoque, ne totiens. + +Est paenitet Cerealia sparsit; carne insignia in maris; tibi Nec, que Peleu meum +buxus. Propoetides formae magna auro ad gerat cohibentur facienda partem at +nunc, foret? **Ad stirpe**! Ut latius pararet: vestibus cumque pedibus ficta +prior summas cancer ipsa Marte Buten es +terruit. Opifex dixit oculos Oete quoque, quot silvarum abrepti nutrix concita +obsidis consistere fibula saxum, Antigonen minabitur tota. + +# Vagata eiectatamque sidera satis reducet + +## Talem ex aliquo ingemuit + +Lorem markdownum solus miserabile sitae. Tantum Syron limenque cupidine: litore +modo coniuge: in huc, illo crimen novena, vocisque gratia, quae. Sua manusque +patris nec meritorum pedibus hominis virgine, ruere tamen virtus aliter. Tunc +ego. Solitaque remittant fagus omnia eat. + +$$r_d^i(t+1) = \min\{r_s,\max\{0, r_d^i(t) + \beta(n_t - \lvert N_i(t)\rvert)\}\}$$ + +Obstitit silentia et novi non, huic metitur, coronantur lucos. Bracchia aura; +donis quod volucris illi futurae, ut +*venturorumque tellus* arma: saxumque. + +## Vera tum est putes adspicit noxque + +Hora et vidit figere tangi! Omni bis *prior nunc* capilli, pulsat tuam Pallante, +*suis*. Solae decore ipso armorum coitusque paro audita *viveret tibi* apparuit +flammasque lapides. Cursu anas usus eundo anticipata, intabescere quae concita +fallit. Dea corpore fabrae: nec Neptunus membris, falsa murice; fac Marte quam +in. + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et. + +## Arachnes deus tum penetralia tempore aurea populante + +Lentae spissisque *carne*. Fixit inquit cautes et iugis novus sim quisquam nisi +haesurum vel deorum fetibus virgo. + +Sub nautae, tegebat clamat. Credas Parrhasio. Commemorat nescio liceatque +excipit! Uris clipeo ego visa amplexas meos ibitis condidit Taenaria, si. Tua +ora tempus patrio revulsos, tellus curru facies, Gange gemit agitata! + +Ruinam ipsaque sibi ovis Teucer Iovis tibi; erat versus neque victa attonitus +doque, quod! Dixit carmina, eo, per capillis quid lina, qua, ille. Siqua +caelestum flammas ferre super et saevissime inmisit quoque suis sic aspergine +vis praerupit. Et puellae summa eventu. +Placeat ut medio *plectrumque inferni* Talia; pertimui opem. diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/document.pdf new file mode 100644 index 0000000..9ec8efa Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/preview.png new file mode 100644 index 0000000..b0bee1d Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/book/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/build.sh new file mode 100644 index 0000000..3d461f0 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --filter pandoc-latex-environment --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.md new file mode 100644 index 0000000..944196f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.md @@ -0,0 +1,130 @@ +--- +title: "Boxes with pandoc-latex-environment and awesomebox" +author: [Author] +date: "2020-01-01" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "en" +colorlinks: true +header-includes: +- | + ```{=latex} + \usepackage{awesomebox} + ``` +pandoc-latex-environment: + noteblock: [note] + tipblock: [tip] + warningblock: [warning] + cautionblock: [caution] + importantblock: [important] +... + +# Boxes with `pandoc-latex-environment` and `awesomebox` + +This example demonstrates the use of the filter [`pandoc-latex-environments`] to create custom boxes with the [`awesomebox`] package. *pandoc-latex-environment* is a pandoc filter for adding LaTeX environment on specific HTML div tags. + + +## Box Types + +For a list of all available boxes and options visit the [`awesomebox` documentation](https://ctan.org/pkg/awesomebox). + +```markdown +::: note +Lorem ipsum dolor ... +::: +``` + +::: note +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero +quis lectus elementum fermentum. + +Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum +felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl. +::: + +```markdown +::: tip +Lorem ipsum dolor ... +::: +``` + +::: tip +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero +quis lectus elementum fermentum. + +Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum +felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl. +::: + +```markdown +::: warning +Lorem ipsum dolor ... +::: +``` + +::: warning +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero +quis lectus elementum fermentum. + +Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum +felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl. +::: + +```markdown +::: caution +Lorem ipsum dolor ... +::: +``` + +::: caution +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero +quis lectus elementum fermentum. + +Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum +felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl. +::: + +```markdown +::: important +Lorem ipsum dolor ... +::: +``` + +::: important +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero +quis lectus elementum fermentum. + +Fusce aliquet augue sapien, non efficitur mi ornare sed. Morbi at dictum +felis. Pellentesque tortor lacus, semper et neque vitae, egestas commodo nisl. +::: + +One can also use raw HTML `div` tags to create the custom environments. + +```markdown +
+Lorem ipsum dolor ... +
+``` + +
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero +quis lectus elementum fermentum. +
+ +Markdown formatting inside the environments is supported. + +::: important +**Lorem ipsum dolor** sit amet, `consectetur adipiscing` elit. + +``` +if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); +} +``` + +*Nam aliquet libero +quis lectus elementum fermentum.* +::: + +[`pandoc-latex-environments`]: https://github.com/chdemko/pandoc-latex-environment/ +[`awesomebox`]: https://ctan.org/pkg/awesomebox \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf new file mode 100644 index 0000000..49b4de0 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/preview.png new file mode 100644 index 0000000..455f855 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-awesomebox/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/build.sh new file mode 100644 index 0000000..3d461f0 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --filter pandoc-latex-environment --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.md new file mode 100644 index 0000000..89eca98 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.md @@ -0,0 +1,78 @@ +--- +title: "Boxes with pandoc-latex-environment and tcolorbox" +author: [Author] +date: "2020-01-01" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "en" +colorlinks: true +header-includes: +- | + ```{=latex} + \usepackage{tcolorbox} + + \newtcolorbox{info-box}{colback=cyan!5!white,arc=0pt,outer arc=0pt,colframe=cyan!60!black} + \newtcolorbox{warning-box}{colback=orange!5!white,arc=0pt,outer arc=0pt,colframe=orange!80!black} + \newtcolorbox{error-box}{colback=red!5!white,arc=0pt,outer arc=0pt,colframe=red!75!black} + ``` +pandoc-latex-environment: + tcolorbox: [box] + info-box: [info] + warning-box: [warning] + error-box: [error] +... + +# Boxes with `pandoc-latex-environment` and `tcolorbox` + +This example demonstrates the use of the filter [`pandoc-latex-environments`] +to create custom boxes with the [`tcolorbox`] package. +*pandoc-latex-environment* is a pandoc filter for adding LaTeX environment on +specific HTML div tags. For a list of all available options visit the +[`tcolorbox` documentation](https://ctan.org/pkg/tcolorbox). + +## Simple Box + +::: box +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam aliquet libero +quis lectus elementum fermentum. +::: + +## Markdown inside the Box + +Markdown formatting inside the environment is supported. + +::: box +Lorem ipsum **dolor** sit amet, `consectetur adipiscing` elit. + +``` +if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); +} +``` + +*Nam aliquet libero +quis lectus elementum fermentum.* +::: + +## Custom Box + +One can define custom boxes in the LaTeX preamble with the variable +`header-includes` at the top of this document. + +::: info +**Info**: This is a custom box that may be used to show info messages in your +document. +::: + +::: warning +**Warning**: This is a custom box that may be used to show warning messages in +your document. +::: + +::: error +**Error**: This is a custom box that may be used to show error messages in your +document. +::: + +[`pandoc-latex-environments`]: https://github.com/chdemko/pandoc-latex-environment/ +[`tcolorbox`]: https://ctan.org/pkg/tcolorbox \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf new file mode 100644 index 0000000..fe2f6b1 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/preview.png new file mode 100644 index 0000000..f93827c Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/build-examples.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/build-examples.sh new file mode 100644 index 0000000..a1a399c --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/build-examples.sh @@ -0,0 +1,38 @@ +#!/bin/bash +set -e + +echo "##" +echo "# building examples" +echo "##" +echo "" + +containsElement () { + local e match="$1" + shift + for e; do [[ "$e" == "$match" ]] && return 0; done + return 1 +} + +# these examples are skipped because they don't run in CI builds (for now) +skippedExamples=("language-chinese" "language-japanese") + +# loop all files in the current folder +for f in *; do + # run only for folders + if [ -d "$f" ]; then + + if containsElement "$f" "${skippedExamples[@]}"; then + echo "skipping '$f'" + echo "" + else + echo "building '$f'" + cd "$f" + echo " - running pandoc build script" + bash "$PWD/build.sh" + echo " - generating preview" + pdftoppm -r 150 -png "document.pdf" > "preview.png" + echo "" + cd ".." + fi + fi +done diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/document.md new file mode 100644 index 0000000..63883f7 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/document.md @@ -0,0 +1,55 @@ +--- +title: "Example PDF" +author: [Author] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios -- "figurae flectentem annis aliquid Peneosque" ab +esse, 'obstat' gravitate. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. Obscura atque coniuge, per de coniunx, sibi medias +commentaque virgine anima tamen comitemque petis, sed. + +```{.html caption="Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. Obscura atque coniuge, per de coniunx, sibi medias +commentaque virgine anima tamen comitemque petis, sed."} + + + + This is the title of the page. + + + This is a link. + This is an image. + + +``` + +Vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +```sql +CREATE TYPE person_t AS ( + firstName VARCHAR(50) NOT NULL, + lastName VARCHAR(50) NOT NULL +); +CREATE Or REPLACE FUNCTION getFormattedName(person) RETURNS text AS + $$ SELECT 'P: ' || initcap($1.firstName); $$ +LANGUAGE SQL; +``` \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/document.pdf new file mode 100644 index 0000000..ff3ce73 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/preview.png new file mode 100644 index 0000000..ec3b4cd Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-listings/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/build.sh new file mode 100644 index 0000000..f28e859 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --highlight-style kate \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/document.md new file mode 100644 index 0000000..f8848c5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/document.md @@ -0,0 +1,52 @@ +--- +title: "Example PDF" +author: [Author] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "en" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque +abesse obstat. + +```java +public class Example implements LoremIpsum { + public static void map(String[] sortedLeft, Long[] sortedRight, int splitIndex) { + if(sortedLeft == null || sortedRight == null) { + System.err.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur +obscura atque coniuge. + +```html + + + + This is the title of the page. + + + This is a link. + This is an image. + + +``` + +Vertitur iura tum nepotis causa; motus. Diva virtus! Acrota destruitis vos +iubet quo et classis excessere. + +```sql +CREATE TYPE person_t AS ( + firstName VARCHAR(50) NOT NULL, +); + +CREATE Or REPLACE FUNCTION getFormattedName(person) RETURNS text AS + $$ SELECT 'P: ' || initcap($1.firstName); $$ +LANGUAGE SQL; +``` \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/document.pdf new file mode 100644 index 0000000..2264b3d Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/preview.png new file mode 100644 index 0000000..16fad36 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/code-blocks-without-listings/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/document.md new file mode 100644 index 0000000..f9106f6 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/document.md @@ -0,0 +1,62 @@ +--- +title: "Example PDF" +author: [Author] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +header-left: "\\hspace{1cm}" +header-center: "\\leftmark" +header-right: "Page \\thepage" +footer-left: "\\thetitle" +footer-center: "This is \\LaTeX{}" +footer-right: "\\theauthor" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +> Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/document.pdf new file mode 100644 index 0000000..495fe6f Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/preview.png new file mode 100644 index 0000000..2df4748 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/header-and-footer/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/document.md new file mode 100644 index 0000000..395a711 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/document.md @@ -0,0 +1,65 @@ +--- +title: "Example PDF" +author: [Author] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "en" +table-use-row-colors: false +... + +# Images and Tables + +## LaTeX Table with Caption + +At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr. + +\begin{longtable}[]{llllllll} +\caption[Nam liber tempor cum soluta nobis eleifend option congue.]{Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.} \\ +\toprule +Test Nr. & Position & Radius & Rot & Grün & Blau & +beste Fitness & Abweichung\tabularnewline +\midrule +\endhead +1 & 20 \% & 20 \% & 20 \% & 20 \% & 20 \% & 7,5219 & +0,9115\tabularnewline +2 & 0 \% & 25 \% & 25 \% & 25 \% & 25 \% & 8,0566 & +1,4462\tabularnewline +3 & 0 \% & 0 \% & 33 \% & 33 \% & 33 \% & 8,7402 & 2,1298\tabularnewline +4 & 50 \% & 20 \% & 10 \% & 10 \% & 10 \% & 6,6104 & +0,0000\tabularnewline +5 & 70 \% & 0 \% & 10 \% & 10 \% & 10 \% & 7,0696 & +0,4592\tabularnewline +6 & 20 \% & 50 \% & 10 \% & 10 \% & 10 \% & 7,0034 & +0,3930\tabularnewline +\bottomrule +\end{longtable} + +At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr. + +## Image with Caption + +![Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.](image.png) + +## Markdown Table without Caption + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque abesse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi medias +commentaque virgine anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +Test Nr. | Position | Radius | Rot | Grün | Blau | beste Fitness | Abweichung | +|---|---|---|---|---|---|---|---| +1 | 20 % | 20 % | 20 % | 20 % | 20 % | 7,5219 | 0,9115 | +2 | 0 % | 25 % | 25 % | 25 % | 25 % | 8,0566 | 1,4462 | +3 | 0 % | 0 % | 33 % | 33 % | 33 % | 8,7402 | 2,1298 | +4 | 50 % | 20 % | 10 % | 10 % | 10 % | 6,6104 | 0,0000 | +5 | 70 % | 0 % | 10 % | 10 % | 10 % | 7,0696 | 0,4592 | +6 | 20 % | 50 % | 10 % | 10 % | 10 % | 7,0034 | 0,3930 | +7 | 40 % | 15 % | 15 % | 15 % | 15 % | 6,9122 | 0,3018 | + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente Pirithoi abstulit, lapides. + +## Image without Caption + +![](image.png) \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/document.pdf new file mode 100644 index 0000000..793e641 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/image.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/image.png new file mode 100644 index 0000000..95a787c Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/image.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/preview.png new file mode 100644 index 0000000..11ffe55 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/images-and-tables/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/build.sh new file mode 100644 index 0000000..52dad0f --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/build.sh @@ -0,0 +1,2 @@ +# No lang option (-V lang=zh) here because Chinese is unsupported in polyglossia and babel. +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings --pdf-engine "xelatex" -V CJKmainfont="HiraginoSans-W4" \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/document.md new file mode 100644 index 0000000..99d1079 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/document.md @@ -0,0 +1,27 @@ +--- +title: "価備手述改陸夜数木田了転由。" +author: [作者日期] +date: "2019-01-10" +subject: "Markdown" +keywords: [Markdown, Example] +... + +# 陣委百三秋康経重示面合雪減背井足府迷根間。 + +陣委百三秋康経重示面合雪減背井足府迷根間。米式十良提馬紀研園要中募用刊。考稿協中写万捜寄三誠女文惑応担。動忍負陣表要回厳盛質属全任。意渡稿針当京注合在成唱皇月諸感丘売。業暮題武同海変公飯伝習真質期込者。読性聞点社質求庫勢応系飛。読有約求不政球県台却観展明来連使。暗双属場證北日増吉望団私録写日奈惑紙。 + +賞方広選付疑京将主豊祉歳兆。亮行災視民信軒全太当刑際大。設紙校系顔実困講将用求年作。禁査調線無聞銅案性約会有整兄名城敬番棋。催題趣蔵今権全演権専治整。記査調埼毎断読犬石川年実作問情設情経。地面観参軽地多愛提帯瀬面側天側。価備手述改陸夜数木田了転由。上転為護吾載何研防著取足調出声的与歯。 + +## 参街能業南達伊市無百兆無聞手覧常努団他。 + +参街能業南達伊市無百兆無聞手覧常努団他。応臨覧処面板施盛会同交展安期。善無継東約知紙地言展掲世起都幕紙仕。配稿理第心酸知月勝庭上図真全。本顕品毎信稿蓄秀神池課道。空米打資級油週報白受支写住文科権初航逮政。売打込箕長陳雪択選男真庭。改取確育迎田袴者豊尾京毎景終彦思。意試役能五子込宙転知校細。内速排索医林経一応係古測辺水。 + +紋正介市及早拒木霊記済複治中。了岐都援盛手価民選覧必庭温背木済円力治。年生算純投器小市系統出字明稚喫部秘集。背伝歳適虫解無集園意明属賞方社件。公紹情高無主考全度監授掲。三退新田面封一基会功康売詳夜増義芸。特積夫紀北赤子演載識顔産済再測質。新岐張年読原体畑住郎門当合止吹士天意藤。明延立派購新政医士定速農。 + +神図先名当揃存工紙広渡民晩記各面得続告増。将枝素実更造藤胞界投健記室申張講訴。店裁山党手政者校訓会清終定浪案。普大的比将響認経変度与合兄退景意経。歌池京割覧製断訳載割写載女作想用魂覚申。舞夜負亡古特在事準催進不全先自代上業後者。学上育手係真最芋本代定作供下能読分。 + +- 汁酬英性向竹室比著給稿刻学年機稿生写。投面記偏回必写際著危女競林思。対事管現馬打能夜月顧身最恵共谷盟社必出。事退問更理併裏少切写禁権丁金提限最写求。者打記舎作馬研作辞家地子無遠者情島。諸井訓団取転燃大広応毎断略並。力持極業育権者住今展線際玉。集政謙期伝変争一他拉方海話連委下混必。囲渡園早位形量英酒椅食始発児政。 +- 年京船装街論初維器送遂考都連。携訪後細断点洋再説月間必道休光事築河。聞直電原竹銭報発興埼校球米口暮定奨重芸聞。京和使検聞服運加航認著著真技事実。弘断機試勢感金換稼治山谷皇真人肥霧。夜需崎影書属葉総登抜見発養内日現際園。場小行評歳映徹浸力政中募暮日朝金子武東。映申地換方無次記暮動練供事惑部意喜半戦壇。 +- 勝技枝図辞決受温見会図休自意少帰質者栄。務単時幹典盟園先入販江紀聞択色務。逮人覇品努博関復際部給体寛明理。限袖住教催広州係響体回接決治過銀。世提応枝録少説営援紙遠勤災宿。試電重捕切譜練治真戦将東。在最真休治義地杉調掲参親平。必整能怒哲希存雪注気付終表転県横隊早。覧教夕徹八学然害犬米無調億立図平受受位編。 + +昌手挨一主要入削禁図送無高慕収後毎投業。感心台観道際町存更団打目今。生記投報重東点回際護高田独東。球野技検業大芸聞共最集飛禁。無黄手著凱縮産総智幕配示。名旧合提丼畿幅間任問場投悪変団。津地全真罪禁友容崩図新足連問完。域勲市録関写気意傷遣米安極漢。個疑調尾陸能案相浮接格校田新本下能。日銭信茶岡実締繰先分読独娘製商損真情。 \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/document.pdf new file mode 100644 index 0000000..a250906 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/preview.png new file mode 100644 index 0000000..89ca6e0 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-chinese/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/document.md new file mode 100644 index 0000000..c73b5da --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/document.md @@ -0,0 +1,57 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "de" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/document.pdf new file mode 100644 index 0000000..14e3ff5 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/preview.png new file mode 100644 index 0000000..e2e4a85 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-german/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/build.sh new file mode 100644 index 0000000..5b7f640 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/build.sh @@ -0,0 +1,2 @@ +# No lang option (-V lang=jp) here because Japanese unsupported in polyglossia. +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings --pdf-engine "xelatex" -V CJKmainfont="HiraginoSans-W4" \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/document.md new file mode 100644 index 0000000..942126b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/document.md @@ -0,0 +1,32 @@ +--- +title: "よ派にへたひ素ヘムナフュてるあてっはれねね区露。巣擢" +author: [むて絵ヤイヤ手津絵] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +... + +# よ派にへたひ素ヘムナフュてるあてっはれねね区露。巣擢 + + +もに氏留列阿ゃけんリヌョソュろまけやほこまネクフコテユうめね瀬雲舳目ょ舳鵜みやいみま。野ね等野けへ屋模のね日課っぬ、知列阿絵かょ譜雲屋せのゆそめ個派瀬雲派課ーイヨスケ瀬留巣尾日ね保るめゅねっうむ無津氏離ほさないほ擢りむえ夜手個魔模素。 + +よ派にへたひ素ヘムナフュてるあてっはれねね区露。巣擢。むて絵ヤイヤ手津絵舳ふち屋区根っクキオ氏露すムフヘゅ二遊むねれみらなまそ瀬ぬゆたヘクアウはてとしまる知。 + +むゆくら雲津手都あもは日遊れりゅへらっ日保留鵜絵す。の露日無ゆ遊二日りスツ毛留御遊擢御無模無ょやゆ樹毛阿留等、樹ルキテひょとて区列屋。うかるゃええま二擢きかしあんつ擢、っさく遊手名区列手ウヌマ区根以擢模擢素けせのれひんほおはよこふきなろ樹舳野尾尾ゃほふ列擢瀬舳名個区等こに名津、根夜、お。ろやほ保素根列らゆやしえろむっンサハラオ。 + +## とほ知他え目絵樹せ津素舳雲巣魔氏派夜列魔 + +まの課譜都手、やいゆぬてほめてよかおそふおょこ尾夜く阿差課根ぬナヒメケ舳二しけやろこち譜は巣津やれま、ネョセカあきあメシみ根根るあ、ろへ離都課ろうらくぬさにせぬ尾模等せ樹魔いそょ毛もし御名氏知。 + +課瀬毛御都列ヒャマナカフモ絵区区遊譜ほ、ほすゃもキウぬノサクサめろそなる他他津ふまお、譜阿手派夜っ他個かたか舳鵜日魔日雲派二離、にひ巣氏めすおひふめへな区っ鵜名瀬むう。ヨツミメ区素他都めすそか課区なうよ以遊へ。いり他譜けっへつ。保阿模野列魔てえ。以区素。 + +離擢留舳区クツコこつろと魔、ょもさよ尾うとほ知他え目絵樹せ津素舳雲巣魔氏派夜列魔氏絵夜課阿ふ知知区擢魔野さうにりよりうゅ個課列野ゃす毛二絵手ぬえ派尾樹屋夜。夜絵毛毛すりおいし遊手夜毛無とゆ瀬野毛名個ふふえゃ無都名無他氏等ふこたも。 + +以たろきお都ゆし阿列鵜擢おんか、ッロマオゅ露他野列せ譜模ョー鵜尾野手毛素、ひす素野ろ氏御氏屋ほはもらりむふ離個とろいそつむ差手こつけっとへせっ。りぬ目無舳めむや離離ょほんく阿せえのんやや離雲雲魔はゃれひ。りそさ無阿樹さかん屋絵氏、つ区差。しレヨオキホテゆもお尾巣けのすもめきむやひけ。尾御津区列列課都雲り樹めぬやむては、舳名夜ッラチユ列都、保露、魔鵜。 + +1. りぬ目無舳めむや離離ょほんく阿せえのんやや離雲雲魔はゃれひ。りそさ無阿樹さかん屋絵氏、つ区差。しレヨオキホテゆもお +2. へ舳列っに「屋素留御以根」露派差離鵜けきうっ雲目以ナシ。日氏すゅともむ樹留素ふりう氏日夜れと +3. 他根かかぬ、くきれみけおへえほん保派絵くけよ譜モヌッアアウカ留譜絵目課離根以名阿さ樹他クッカクラ無課課瀬めつ列氏課そ目知屋舳手らへ舳列っに「屋素留御以根」露派差離鵜けきうっ雲目以ナシ。日氏すゅともむ樹留素ふりう氏日夜れとせさ鵜知めっゃ瀬露めゅむに遊雲舳野ひひよやめほくさめう舳名都とにてめは無めもはすにちひ遊モシルもねたらやょや。知以ほ以名さきにまむろせちょったか毛御差巣夜氏、きまむこ列模模阿。 + +阿瀬鵜屋さねや、う他列舳ヤマりれえんか、尾瀬カコノヒ名課巣鵜津せやおひく知二保手、そ派毛遊へろへよ。みす派毛はうよ樹二御派派等メノコせ区さ巣屋名のせ野毛。 \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/document.pdf new file mode 100644 index 0000000..5a64daf Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/preview.png new file mode 100644 index 0000000..6e3a8d4 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/language-japanese/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background1.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background1.pdf new file mode 100644 index 0000000..c0850b1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background1.pdf @@ -0,0 +1,70 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xeA@Es +. #.OѤiؐ* cw]B#X;\~JMb}j: {1mB +endstream +endobj +4 0 obj + 162 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000576 00000 n +0000000276 00000 n +0000000015 00000 n +0000000254 00000 n +0000000348 00000 n +0000000641 00000 n +0000000768 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +820 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background10.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background10.pdf new file mode 100644 index 0000000..709be17 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background10.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xeK@@s +. 8GpaE]Od4,=^x wS\=@CeykBsXp1LH*a rլVUb/LP1D +endstream +endobj +4 0 obj + 150 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000564 00000 n +0000000264 00000 n +0000000015 00000 n +0000000242 00000 n +0000000336 00000 n +0000000629 00000 n +0000000756 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +808 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background11.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background11.pdf new file mode 100644 index 0000000..946cd45 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background11.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background2.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background2.pdf new file mode 100644 index 0000000..054baf7 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background2.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background3.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background3.pdf new file mode 100644 index 0000000..b8aef37 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background3.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background4.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background4.pdf new file mode 100644 index 0000000..604b06e --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background4.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xeN 0 { +/'v`=eX("== +^]+V(K\g-Ie ^9ufwqqcUHOhl9JSrj]H$O6{ʥ_<_IHa 368;s+Ck +endstream +endobj +4 0 obj + 158 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000572 00000 n +0000000272 00000 n +0000000015 00000 n +0000000250 00000 n +0000000344 00000 n +0000000637 00000 n +0000000764 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +816 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background5.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background5.pdf new file mode 100644 index 0000000..f7839c3 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background5.pdf @@ -0,0 +1,70 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xm;@ D=/18 K삢D +rƯ0f|%߅ 1Dg,7 +!ijҔP /chpxr‰1W^Qd%q!9ZDj UѪApr$&]x_ʑȽIW?fr)6EU +endstream +endobj +4 0 obj + 168 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000582 00000 n +0000000282 00000 n +0000000015 00000 n +0000000260 00000 n +0000000354 00000 n +0000000647 00000 n +0000000774 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +826 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background6.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background6.pdf new file mode 100644 index 0000000..41702d0 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background6.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background7.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background7.pdf new file mode 100644 index 0000000..c7f3354 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background7.pdf @@ -0,0 +1,68 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +x1nAE908"qR@+mh==nNp , .φA2 $࠙ҐF1}7\v9Κvf_":eRijҎ*ف}FSVel~-%K{t'khXK"qg6lX +endstream +endobj +4 0 obj + 198 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000612 00000 n +0000000312 00000 n +0000000015 00000 n +0000000290 00000 n +0000000384 00000 n +0000000677 00000 n +0000000804 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +856 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background8.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background8.pdf new file mode 100644 index 0000000..06efe81 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background8.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background9.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background9.pdf new file mode 100644 index 0000000..da3a1ef --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/backgrounds/background9.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xPKn1\`(`0p!Lh_QHEwcJp6Pƈ`mb@6bL턃 `!$bM5CFvrGneu;zu&e̿v 9vQFֻZ]e7e)+G' +4?Ivi/XG +endstream +endobj +4 0 obj + 195 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000609 00000 n +0000000309 00000 n +0000000015 00000 n +0000000287 00000 n +0000000381 00000 n +0000000674 00000 n +0000000801 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +853 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/document.md new file mode 100644 index 0000000..ff460e5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/document.md @@ -0,0 +1,59 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum" +lang: "en" +page-background: "backgrounds/background1.pdf" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/document.pdf new file mode 100644 index 0000000..b4f9154 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/preview.png new file mode 100644 index 0000000..f9fb9e4 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/page-background/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/build.sh new file mode 100644 index 0000000..a2080cf --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/document.md new file mode 100644 index 0000000..da93460 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/document.md @@ -0,0 +1,59 @@ +--- +title: "Example PDF" +author: [Author] +date: "2022-03-04" +subject: "Markdown" +keywords: [Markdown, Example] +lang: "en" +toc: true +toc-own-page: true +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +> Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/document.pdf new file mode 100644 index 0000000..bbb78f3 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/preview.png new file mode 100644 index 0000000..80a0dbf Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/table-of-contents/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background1.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background1.pdf new file mode 100644 index 0000000..c0850b1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background1.pdf @@ -0,0 +1,70 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xeA@Es +. #.OѤiؐ* cw]B#X;\~JMb}j: {1mB +endstream +endobj +4 0 obj + 162 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000576 00000 n +0000000276 00000 n +0000000015 00000 n +0000000254 00000 n +0000000348 00000 n +0000000641 00000 n +0000000768 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +820 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background10.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background10.pdf new file mode 100644 index 0000000..709be17 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background10.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xeK@@s +. 8GpaE]Od4,=^x wS\=@CeykBsXp1LH*a rլVUb/LP1D +endstream +endobj +4 0 obj + 150 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000564 00000 n +0000000264 00000 n +0000000015 00000 n +0000000242 00000 n +0000000336 00000 n +0000000629 00000 n +0000000756 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +808 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background11.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background11.pdf new file mode 100644 index 0000000..946cd45 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background11.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background2.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background2.pdf new file mode 100644 index 0000000..054baf7 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background2.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background3.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background3.pdf new file mode 100644 index 0000000..b8aef37 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background3.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background4.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background4.pdf new file mode 100644 index 0000000..604b06e --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background4.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xeN 0 { +/'v`=eX("== +^]+V(K\g-Ie ^9ufwqqcUHOhl9JSrj]H$O6{ʥ_<_IHa 368;s+Ck +endstream +endobj +4 0 obj + 158 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000572 00000 n +0000000272 00000 n +0000000015 00000 n +0000000250 00000 n +0000000344 00000 n +0000000637 00000 n +0000000764 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +816 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background5.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background5.pdf new file mode 100644 index 0000000..f7839c3 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background5.pdf @@ -0,0 +1,70 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xm;@ D=/18 K삢D +rƯ0f|%߅ 1Dg,7 +!ijҔP /chpxr‰1W^Qd%q!9ZDj UѪApr$&]x_ʑȽIW?fr)6EU +endstream +endobj +4 0 obj + 168 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000582 00000 n +0000000282 00000 n +0000000015 00000 n +0000000260 00000 n +0000000354 00000 n +0000000647 00000 n +0000000774 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +826 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background6.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background6.pdf new file mode 100644 index 0000000..41702d0 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background6.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background7.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background7.pdf new file mode 100644 index 0000000..c7f3354 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background7.pdf @@ -0,0 +1,68 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +x1nAE908"qR@+mh==nNp , .φA2 $࠙ҐF1}7\v9Κvf_":eRijҎ*ف}FSVel~-%K{t'khXK"qg6lX +endstream +endobj +4 0 obj + 198 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000612 00000 n +0000000312 00000 n +0000000015 00000 n +0000000290 00000 n +0000000384 00000 n +0000000677 00000 n +0000000804 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +856 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background8.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background8.pdf new file mode 100644 index 0000000..06efe81 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background8.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background9.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background9.pdf new file mode 100644 index 0000000..da3a1ef --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/backgrounds/background9.pdf @@ -0,0 +1,69 @@ +%PDF-1.5 +% +3 0 obj +<< /Length 4 0 R + /Filter /FlateDecode +>> +stream +xPKn1\`(`0p!Lh_QHEwcJp6Pƈ`mb@6bL턃 `!$bM5CFvrGneu;zu&e̿v 9vQFֻZ]e7e)+G' +4?Ivi/XG +endstream +endobj +4 0 obj + 195 +endobj +2 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +5 0 obj +<< /Type /Page + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 3 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 2 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 5 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Creator (cairo 1.14.8 (http://cairographics.org)) + /Producer (cairo 1.14.8 (http://cairographics.org)) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000609 00000 n +0000000309 00000 n +0000000015 00000 n +0000000287 00000 n +0000000381 00000 n +0000000674 00000 n +0000000801 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +853 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/document.md new file mode 100644 index 0000000..82647b3 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/document.md @@ -0,0 +1,61 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum" +lang: "en" +titlepage: true, +titlepage-rule-color: "360049" +titlepage-background: "backgrounds/background1.pdf" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/document.pdf new file mode 100644 index 0000000..0652c79 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/preview.png new file mode 100644 index 0000000..c8d83bd Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-background/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/background.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/background.pdf new file mode 100644 index 0000000..6c8ed29 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/background.pdf @@ -0,0 +1,70 @@ +%PDF-1.5 +% +4 0 obj +<< /Length 5 0 R + /Filter /FlateDecode +>> +stream +xe 0FJcU$v?QȒ 㙁9q0f %=!W9(pWzُbif1R/YgX֗O0cbl]Kfz] +gd.➾Jw s [C + q0cbHNK2 +endstream +endobj +5 0 obj + 181 +endobj +3 0 obj +<< + /ExtGState << + /a0 << /CA 1 /ca 1 >> + >> +>> +endobj +2 0 obj +<< /Type /Page % 1 + /Parent 1 0 R + /MediaBox [ 0 0 595.275574 841.889771 ] + /Contents 4 0 R + /Group << + /Type /Group + /S /Transparency + /I true + /CS /DeviceRGB + >> + /Resources 3 0 R +>> +endobj +1 0 obj +<< /Type /Pages + /Kids [ 2 0 R ] + /Count 1 +>> +endobj +6 0 obj +<< /Producer (cairo 1.16.0 (https://cairographics.org)) + /CreationDate (D:20190804184551+02'00) +>> +endobj +7 0 obj +<< /Type /Catalog + /Pages 1 0 R +>> +endobj +xref +0 8 +0000000000 65535 f +0000000599 00000 n +0000000367 00000 n +0000000295 00000 n +0000000015 00000 n +0000000273 00000 n +0000000664 00000 n +0000000780 00000 n +trailer +<< /Size 8 + /Root 7 0 R + /Info 6 0 R +>> +startxref +832 +%%EOF diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/document.md new file mode 100644 index 0000000..cf73e26 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/document.md @@ -0,0 +1,63 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum" +lang: "en" +titlepage: true, +titlepage-text-color: "FFFFFF" +titlepage-rule-color: "360049" +titlepage-rule-height: 0 +titlepage-background: "background.pdf" +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/document.pdf new file mode 100644 index 0000000..9b56e7d Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/logo-inverted.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/logo-inverted.pdf new file mode 100644 index 0000000..2a7d392 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/logo-inverted.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/logo-inverted.svg b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/logo-inverted.svg new file mode 100644 index 0000000..ebea227 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/logo-inverted.svg @@ -0,0 +1,60 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/preview.png new file mode 100644 index 0000000..41a27ba Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-custom/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/document.md new file mode 100644 index 0000000..83844e2 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/document.md @@ -0,0 +1,59 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum" +lang: "en" +titlepage: true +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/document.pdf new file mode 100644 index 0000000..3b761cb Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/preview.png new file mode 100644 index 0000000..ce094ce Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-default/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/document.md new file mode 100644 index 0000000..7b6778b --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/document.md @@ -0,0 +1,63 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum" +lang: "en" +titlepage: true +titlepage-color: "3C9F53" +titlepage-text-color: "FFFFFF" +titlepage-rule-color: "FFFFFF" +titlepage-rule-height: 2 +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/document.pdf new file mode 100644 index 0000000..6f7342c Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/preview.png new file mode 100644 index 0000000..3ff8e6b Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-green/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/document.md new file mode 100644 index 0000000..df8dfa5 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/document.md @@ -0,0 +1,64 @@ +--- +title: "Vinaque sanguine metuenti cuiquam Alcyone fixus" +author: [Author Name] +date: "2017-02-20" +subject: "Markdown" +keywords: [Markdown, Example] +subtitle: "Aesculeae domus vincemur et Veneris adsuetus lapsum" +lang: "en" +titlepage: true +titlepage-text-color: "7137C8" +titlepage-rule-color: "7137C8" +titlepage-rule-height: 2 +titlepage-logo: "logo.pdf" +logo-width: 30mm +... + +# Vinaque sanguine metuenti cuiquam Alcyone fixus + +## Aesculeae domus vincemur et Veneris adsuetus lapsum + +Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab +esse, obstat gravitate. Obscura atque coniuge, per de coniunx, sibi **medias +commentaque virgine** anima tamen comitemque petis, sed. In Amphion vestros +hamos ire arceor mandere spicula, in licet aliquando. + +```java +public class Example implements LoremIpsum { + public static void main(String[] args) { + if(args.length < 2) { + System.out.println("Lorem ipsum dolor sit amet"); + } + } // Obscura atque coniuge, per de coniunx +} +``` + +Porrigitur et Pallas nuper longusque cratere habuisse sepulcro pectore fertur. +Laudat ille auditi; vertitur iura tum nepotis causa; motus. Diva virtus! Acrota +destruitis vos iubet quo et classis excessere Scyrumve spiro subitusque mente +Pirithoi abstulit, lapides. + +## Lydia caelo recenti haerebat lacerum ratae at + +Te concepit pollice fugit vias alumno **oras** quam potest +[rursus](http://example.com#rursus) optat. Non evadere orbem equorum, spatiis, +vel pede inter si. + +1. De neque iura aquis +2. Frangitur gaudia mihi eo umor terrae quos +3. Recens diffudit ille tantum + +\begin{equation}\label{eq:neighbor-propability} + p_{ij}(t) = \frac{\ell_j(t) - \ell_i(t)}{\sum_{k \in N_i(t)}^{} \ell_k(t) - \ell_i(t)} +\end{equation} + +Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae +adessent arbor. Florente perque at condeturque saxa et ferarum promittis tendebat. Armos nisi obortas refugit me. + +Et nepotes poterat, se qui. Euntem ego pater desuetaque aethera Maeandri, et +[Dardanio geminaque](http://example.com#Dardanio_geminaque) cernit. Lassaque poenas +nec, manifesta $\pi r^2$ mirantia captivarum prohibebant scelerato gradus unusque +dura. + +- Permulcens flebile simul +- Iura tum nepotis causa motus diva virtus Acrota. Tamen condeturque saxa Pallorque num et ferarum promittis inveni lilia iuvencae adessent arbor. Florente perque at ire arcum. \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/document.pdf new file mode 100644 index 0000000..92a55bc Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/logo.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/logo.pdf new file mode 100644 index 0000000..f6804f3 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/logo.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/logo.svg b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/logo.svg new file mode 100644 index 0000000..6fe84b7 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/logo.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/preview.png new file mode 100644 index 0000000..1b1d562 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/examples/title-page-logo/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/icon.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/icon.png new file mode 100644 index 0000000..c85de1b Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/icon.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/icon.svg b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/icon.svg new file mode 100644 index 0000000..40b533e --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/icon.svg @@ -0,0 +1,60 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/build-tests.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/build-tests.sh new file mode 100644 index 0000000..76fdfec --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/build-tests.sh @@ -0,0 +1,38 @@ +#!/bin/bash +set -e + +echo "##" +echo "# building tests" +echo "##" +echo "" + +containsElement () { + local e match="$1" + shift + for e; do [[ "$e" == "$match" ]] && return 0; done + return 1 +} + +# these examples are skipped because they don't run in CI builds (for now) +skippedExamples=() + +# loop all files in the current folder +for f in *; do + # run only for folders + if [ -d "$f" ]; then + + if containsElement "$f" "${skippedExamples[@]}"; then + echo "skipping '$f'" + echo "" + else + echo "building '$f'" + cd "$f" + echo " - running pandoc build script" + bash "$PWD/build.sh" + echo " - generating preview" + pdftoppm -r 150 -png "document.pdf" > "preview.png" + echo "" + cd ".." + fi + fi +done diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/document.md new file mode 100644 index 0000000..60ef278 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/document.md @@ -0,0 +1,32 @@ +--- +title: "Test: Heading" +author: [Author] +date: "2022-11-24" +subject: "Markdown" +keywords: [Markdown, Example, Text, Heading] +lang: "en" +... + +# Test: Heading + +## Setext-style headings + +level one +========= + +level two +--------- + +## ATX-style headings + +# level one + +## level two + +### level three + +#### level four + +##### level five + +###### level six diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/document.pdf new file mode 100644 index 0000000..342f291 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/preview.png new file mode 100644 index 0000000..babbbbc Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/heading/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/document.md new file mode 100644 index 0000000..f6a9444 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/document.md @@ -0,0 +1,28 @@ +--- +title: "Test: Horizontal Rule" +author: [Author] +date: "2022-11-24" +subject: "Markdown" +keywords: [Markdown, Example, Text, Horizontal Rule] +lang: "en" +... + +# Test: Horizontal Rule + +## Horizontal Rule with `*` (asterisk) + +**** + +********** + +## Horizontal Rule with `-` (minus) + +---- + +---------- + +## Horizontal Rule with `_` (underscore) + +____ + +__________ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/document.pdf new file mode 100644 index 0000000..ecda89e Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/preview.png new file mode 100644 index 0000000..561da89 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/horizontal-rule/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/document.md new file mode 100644 index 0000000..b13d021 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/document.md @@ -0,0 +1,29 @@ +--- +title: "Test: Definition List" +author: [Author] +date: "2022-11-24" +subject: "Markdown" +keywords: [Markdown, Example, Text, List, Definition List] +lang: "en" +... + +# Test: Definition List + +## Definition List with single definition + +Apple +: Pomaceous fruit of plants of the genus Malus in +the family Rosaceae. + +Orange +: The fruit of an evergreen tree of the genus Citrus. + +## Definition List with multiple definitions + +Apple +: Pomaceous fruit of plants of the genus Malus in + the family Rosaceae. +: An American computer company. + +Orange +: The fruit of an evergreen tree of the genus Citrus. diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/document.pdf new file mode 100644 index 0000000..04c3d19 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/preview.png new file mode 100644 index 0000000..d466e63 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-definition/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/document.md new file mode 100644 index 0000000..0a60ef6 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/document.md @@ -0,0 +1,43 @@ +--- +title: "Lists" +author: [Author] +date: "2022-11-24" +subject: "Markdown" +keywords: [Markdown, Example, Text, List, Ordered List] +lang: "en" +... + +# Test: Lists + +## Ordered list with number and period + +2. two +3. three +4. four + +## Ordered list with number and bracket + +8) eight +9) nine +10) ten + +## Ordered list with roman numerals + +II. one +III. two +IV. three + +## Ordered nested list + +1. one + 1) orange + 2) apple + * pine + * maple + 3) orange +2. two + 1. sunny + II. two + III. three + IV. four + 2. rainy diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/document.pdf new file mode 100644 index 0000000..2e06493 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/preview.png new file mode 100644 index 0000000..e796602 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-ordered/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/document.md new file mode 100644 index 0000000..e6b5128 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/document.md @@ -0,0 +1,34 @@ +--- +title: "Test: Task List" +author: [Author] +date: "2022-11-24" +subject: "Markdown" +keywords: [Markdown, Example, Text, List, Task List] +lang: "en" +... + +# Test: Task List + +## Task list unchecked + +- [ ] one +- [ ] two +- [ ] three + +## Task list checked + +- [x] one +- [x] two +- [x] three + +## Task list nested + +- [x] one + - [ ] orange + - [ ] apple + - [x] pine + - [x] maple + - [ ] mango +- [ ] two + - [x] sunny + - [ ] rainy diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/document.pdf new file mode 100644 index 0000000..97534f3 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/preview.png new file mode 100644 index 0000000..0d3be0a Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-task/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/build.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/build.sh new file mode 100644 index 0000000..ee87a78 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/build.sh @@ -0,0 +1 @@ +pandoc "document.md" -o "document.pdf" --from markdown --template "../../eisvogel.tex" --listings \ No newline at end of file diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/document.md b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/document.md new file mode 100644 index 0000000..fdd36a1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/document.md @@ -0,0 +1,43 @@ +--- +title: "List Unordered" +author: [Author] +date: "2022-11-24" +subject: "Markdown" +keywords: [Markdown, Example, Text, List, Unordered List] +lang: "en" +... + +# Test: List Unordered + +## Unordered list with dash + +- one +- two +- three + +## Unordered list with asterisk + +* one +* two +* three + +## Unordered list with plus sign + ++ one ++ two ++ three + +## Unordered nested list + +- one + - orange + - apple + * pine + * maple + - orange +- two + + sunny + * four + * five + * six + + rainy diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/document.pdf b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/document.pdf new file mode 100644 index 0000000..a838e82 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/document.pdf differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/preview.png b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/preview.png new file mode 100644 index 0000000..a7f7b94 Binary files /dev/null and b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tests/list-unordered/preview.png differ diff --git a/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tools/release.sh b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tools/release.sh new file mode 100644 index 0000000..8e150d1 --- /dev/null +++ b/vendor/git.knownelement.com/ExternalVendorCode/pandoc-latex-template/tools/release.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +rm -rf "dist" +mkdir "dist" + +cp "eisvogel.tex" "eisvogel.latex" + +# create .zip files +zip -r -X --exclude="*.DS_Store*" "dist/Eisvogel-${1}.zip" "examples" "eisvogel.latex" "icon.png" "LICENSE" "README.md" "CHANGELOG.md" +cp "dist/Eisvogel-${1}.zip" "dist/Eisvogel.zip" + +# create .tar.gz files +tar --exclude="*.DS_Store*" --include="examples" --include="eisvogel.latex" --include="icon.png" --include="LICENSE" --include="README.md" --include="CHANGELOG.md" -zcvf "dist/Eisvogel-${1}.tar.gz" * +cp "dist/Eisvogel-${1}.tar.gz" "dist/Eisvogel.tar.gz" + +rm "eisvogel.latex" \ No newline at end of file