pax_global_header00006660000000000000000000000064150665770640014532gustar00rootroot0000000000000052 comment=c045f36e7e089134a0b2c62d85091037e5fcda4e apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/000077500000000000000000000000001506657706400213225ustar00rootroot00000000000000apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/.gitignore000066400000000000000000000002651506657706400233150ustar00rootroot00000000000000*.pyc __pycache__/ _build/* build/ *.*~ .vscode/ .idea/ builddir/* build-aux/flatpak/_build/* build-aux/flatpak/.flatpak-builder/* flatpak/* .mypy_cache/ .flatpak/ .flatpak-builder/apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/.gitlab-ci.yml000066400000000000000000000010441506657706400237550ustar00rootroot00000000000000include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml' flatpak: image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master' variables: MANIFEST_PATH: "build-aux/flatpak/org.gnome.gitlab.somas.Apostrophe.json" MESON_ARGS: "-Dprofile=Devel" FLATPAK_MODULE: "apostrophe" APP_ID: "org.gnome.gitlab.somas.Apostrophe" RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo" BUNDLE: "apostrophe-dev.flatpak" extends: .flatpak apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/.gitlab/000077500000000000000000000000001506657706400226425ustar00rootroot00000000000000apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/.gitlab/issue_templates/000077500000000000000000000000001506657706400260505ustar00rootroot00000000000000apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/.gitlab/issue_templates/bug_report.md000066400000000000000000000011311506657706400305360ustar00rootroot00000000000000**Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Environment(please complete the following information):** - Linux distribution: - Desktop Enviroment: - DE version: - GTK version: **Additional context** Add any other context about the problem here. /label ~bug ~triage /assign @somas apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/.gitlab/issue_templates/feature_request.md000066400000000000000000000010211506657706400315670ustar00rootroot00000000000000**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. /label ~"feature request" /assign @somasapostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/AUTHORS000066400000000000000000000003001506657706400223630ustar00rootroot00000000000000Wolf Vollprecht Vova Kolobok Manuel Genovés Gonçalo Silva Thomas Lavend apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/LICENSE000066400000000000000000001045131506657706400223330ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 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 General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is 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. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. 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. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. 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 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. Use with the GNU Affero General Public License. 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 Affero 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 special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 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 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 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. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". 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 GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/NEWS000066400000000000000000000216351506657706400220300ustar00rootroot00000000000000Version 3.4 ~~~~~~~~~~~~~~~ Released: 2025-09-30 Notes: - The Apostrophe developer fully stands with Palestine and condemns the genocide Israel is enacting on its people right now. Any donation the project receives will be diverted to UNRWA Bugfixes: - Fixed some layout issues in certain locales at narrow sizes - Fixed an issue where closing and opening Apostrophe with a windowed preview active wouldn't open the editing window the second time - Updated some dependencies to fix some long-standing issues with GtkTextView Version 3.3 ~~~~~~~~~~~~~~~ Released: 2025-09-10 Notes: - The Apostrophe developer fully stands with Palestine and condemns the genocide Israel is enacting on its people right now. Any donation the project receives will be diverted to UNRWA Features: - Use Typst as the default render engine. LaTeX is no longer needed for exporting PDFs - Implemented crash recovery/autosaving functionality - Implemented a narrow mode. Apostrophe works now on mobile devices - Reimplemented inline previews. Ctrl+click on a word or selecting the "peek" entry in context menus will bring a popover with a preview of images, formulas, web, word definitions and more - Implemented new CLI options - The recents popover no longer shows deleted items - Make search case insensitive in the recents popover - Improved error dialog - Improved scroll sync between the editor and the preview panel - Improved spellchecking: allow different languages in different windows, load system default, persist selected language for each document across restarts - Use OTF fonts instead of TTF - Improved styles - Improved error handling when opening invalid files - Improved automatic indents and unindents - Persist window state (window size/fullscreen/maximized) across restarts - Improved custom widgetry - Improved touch handling - Improved the inline markdown rendering, better respecting Pandoc's markdown specification. Bugfixes: - Fixed several codeblocks markup handling bugs - Fixed incorrect tooltip in the expand toolbar button when it's open - Fixed IME input - Fixed "save as" and "export" dialogs not opening the correct folder by default - Fixed a bug where opening already opened files happened in new windows - Fixed buggy behaviour with copy-paste buttons when selecting text Translations: - Added Esperanto and Azerbaijani Misc: - UI/UX small fixes - Ban of LLM and GenAI contributions - Updated CoC Version 3.2 ~~~~~~~~~~~~~~~ Released: 2024-09-25 Bugfixes: - Fixed disability flag not being shown in the savebar - Fixed bold text not working on the live preview Features: - Updated dependencies - Updated Basque, Norwegian, Spanish, Turkish, Romanian and Finish translations Version 3.1 ~~~~~~~~~~~~~~~ Released: 2024-06-28 Bugfixes: - Fixed buggy drag and drop behavior - Fixed labels not displaying in the Recents popover when they had an ampersand Features: - Added pride colors to the savebar Version 3.0 ~~~~~~~~~~~~~~~ Released: 2024-05-01 Features: - Port to GTK4 and the newest libadwaita widgets - Improved UI and styling - New toolbar for interactively formatting text - Implement autoindentation and brace autocompletion - Live stats for selected text - Improved Hemingway Mode - New secured preview mode when opening potentially dangerous files - Detect when the file being edited is changed by another program - Added DocuWiki to the available export formats Version 2.6.3 ~~~~~~~~~~~~~~~ Released: 2022-04-29 Bugfixes: - Fix a bug where the preview wouldn't be shown when opening a file from Files or the CLI - Fix a bug where horizontal preview wouldn't request enough space at startup - Removed swipe gestures from the preview panel Features: - Added Persian translations, updated Catalan, German , Finnish and Turkish ones Version 2.6.2 ~~~~~~~~~~~~~~~ Released: 2022-03-31 Bugfixes: - Fix handling of windowed preview mode on some circumstances Features: - Add proper titles to the preview window - Update translations Version 2.6.1 ~~~~~~~~~~~~~~~ Released: 2022-03-20 Bugfixes: - A small bug in 2.6 which didn't allow to save files Version 2.6 ~~~~~~~~~~~~~~~ Released: 2022-03-19 Features: - Implemented multiwindow support - Save window state on exit - Ported to libhandy - Improved the overall UI - New animations - Follow the Dark Mode global preference - Add an "automatic" color mode - Improve the High Contrast styles - Improve inline preview markup Version 2.5 ~~~~~~~~~~~~~~~ Released: 2021-08-28 Features: - Added Sepia Mode - Improved exported HTML on small screens - Updated metadata and runtime version Version 2.4 ~~~~~~~~~~~~~~~ Released: 2021-03-10 Bugfixes: - Fixed a bug where the cursor could go over the bottom of the window - Fixed a bug where in certain circumstances the bottom line couldn't be clicked - Improved behaviour when dealing with unsaved files. - Improved start/end sentence detection in Focus Mode - Small improvements in the headerbar title - Cleaned a little bit the Shortcuts Window Version 2.3 ~~~~~~~~~~~~~~~ Released: 2021-03-01 Features: - New export dialog - Improved Reveal.js slideshow exports - Better input/output handling - Inhibit logout if the document is not saved - Migrate to xelatex - Better internal path handling - New animated progressbar on saving - Strict sandboxing support Bugfixes: - Undo/redo improvements - Fixes for bad markdown parsing of unordered lists Version 2.2.0.3 ~~~~~~~~~~~~~~~ Released: 2020-05-04 Bugfixes: - Better wording for some areas - Fixed some issues where Apostrophe couldn't open files from CLI/context menu - Now Apostrophe checks if there is unsaved work before exiting via CTRL + Q/W - Better parsing of weblinks and links to files - Fixed a bug where the bottom portion of the screen was insensitive to mouse input Version 2.2.0.2 ~~~~~~~~~~~~~~~ Released: 2020-04-20 Bugfixes: - Fixes for the Elementary OS platform - Fixed some links and metadata Version 2.2.0.1 ~~~~~~~~~~~~~~~ Released: 2020-04-18 Features: - New headerbar design - New preview modes, with the option to sync them to the edit view - New preview mode selector - New theme selector - Rework the autohiding mechanism; now the headerbar fades away when typing, only to reappear when the cursor moves to the top portion of the window - Now the content of the texview goes visually bellow the headerbar - Overall better styling - Added Hemingway mode, which disables the backspace key - Added Github Flavoured Markdow, MultiMarkdown, Pandoc's Markdown and Commonmark support, being CommonMark the default from now on - New stats counter, with the option to show count of characters/words/sentences/paragrafs/reading time - Better handling of DnD events - Export to A4 by default - Technical improvements * Port of the buildsystem to Meson. Now you can hit the "build" button on Builder and everything works as expected * Port to gspell * Partial port to gresources * Overall refactorization of the codebase * General bugfixes and improvements Version 2.1.5 ~~~~~~~~~~~~~ Released: 2019-03-10 Features: - Added italian language - Initial themes support: now apostrophe adapts his colors to the current GTK theme - Disabled scroll gradient, can be enabled in the preferences dialog - Allow to disable headerbar autohidding in Dconf - Now a single click is enough to open files in the recent files popover - Spellchecking status is now saved between sessions - Minor UI fixes - Added -d flag to enable webdev tools Version 2.1.4 ~~~~~~~~~~~~~ Released: 2018-12-06 Features: - Updated css styles. Version 2.1.3 ~~~~~~~~~~~~~ Released: 2018-11-28 Features: - This release features a new logo, polishes the Appmenu, fixes usability bugs and flatpak related bugs. Version 2.1.2 ~~~~~~~~~~~~~ Released: 2018-07-27 Features: - This release provides a fix to a bug that caused Apostrophe to not mark properly **bold**, *cursive*, and ***bold and cursive*** words. Version 2.1.1 ~~~~~~~~~~~~~ Released: 2018-07-26 Bugfixes: - One on focus mode which caused the lines to be highlighted on edit rather than on click - Non symbolic icons on the searchbar Version 2.1.0 ~~~~~~~~~~~~~ Released: 2018-07-18 Features: - Drop AppMenu support - HeaderBar and menus redesign, with a new unified menu and quick access buttons on the headerbar - Now the fullscreen view shows a headerbar when the cursor approaches the top of the screen - A new unified export dialog, with updated options, and quick access to pdf, odt and html export - Bugfixes. Version 2.0.4 ~~~~~~~~~~~~~ Released: 2018-06-24 Features: - Now the menu is a Popover instead a regular menu. - The headerbar matches the theme selected for the application. - Updated translations. Version 2.0.3 ~~~~~~~~~~~~~ Released: 2018-06-14 Bugfixes: - Small bug fixes, updated links. Version 2.0.2 ~~~~~~~~~~~~~ Released: 2018-05-16 Bugfixes: - Fix a bug with the preview mode. Version 2.0.1 ~~~~~~~~~~~~~ Released: 2018-05-14 Bugfixes: - Don’t use env variable to check if in flatpak. Version 2.0.0 ~~~~~~~~~~~~~ Released: 2018-05-12 Features: - First re-release apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/README.md000066400000000000000000000075341506657706400226120ustar00rootroot00000000000000[![Please do not theme this app](https://stopthemingmy.app/badge.svg)](https://stopthemingmy.app) # Apostrophe ![](screenshots/main.png) ## About Apostrophe is a [GTK+](https://www.gtk.org) based distraction free Markdown editor, originally developed by Wolf Vollprecht and currently developed and maintained by Manuel Genovés. It uses pandoc as back-end for parsing Markdown and offers a very clean and sleek user interface. ## Install Download on Flathub Also several unofficial builds are available: * Nix(OS): [`pkgs.apostrophe`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/apostrophe/default.nix) * [Fedora](https://src.fedoraproject.org/rpms/apostrophe): `sudo dnf install apostrophe` ## Code of Conduct When interacting with the project, the [GNOME Code of Conduct](https://conduct.gnome.org) applies. ## Translation If you want to help translating the project, please join us at [Damned Lies](https://l10n.gnome.org/module/apostrophe/). Any help is appreciated! ## Use of Generative AI This project does not allow contributions generated by large languages models (LLMs) and chatbots. This ban includes tools like ChatGPT, Claude, Copilot, DeepSeek, and Devin AI. We are taking these steps as precaution due to the potential negative influence of AI generated content on quality, as well as likely copyright violations. This ban of AI generated content applies to all parts of the projects, including, but not limited to, code, documentation, issues, and artworks. An exception applies for purely translating texts for issues and comments to English. ## Building ### Building using GNOME Builder GNOME Builder offers the easiest method to build Apostrophe. Just follow [this guide](https://welcome.gnome.org/app/Apostrophe/#getting-the-app-to-build) and you'll be up and running in a minute. ### Building from Git To build Apostrophe from source you need to have the following dependencies installed: - Build system: `meson ninja-build` - Pandoc, the program used to convert Markdown to basically anything else: `pandoc` - GTK4 and GLib development packages: `libgtk-4-dev libglib2.0-dev` - Rendering the preview panel: `libwebkit2gtk` - Python dependencies: `python3 python3-regex python3-setuptools python3-levenshtein python3-enchant python3-gi python3-cairo python3-pypandoc` - A copy of reveal.js in the apropriate directory. Flatpak takes care of it for you, packagers should put it into prefix/share/apostrophe/libs/reveal.js, fully unzipped - Libspelling and sourceview. - FiraSans-Regular, FiraMono-Regular, FiraMono-Bold, FiraMono-Medium - *optional:* AppStream utility: `appstreamcli` - *optional:* pdftex module: `texlive texlive-latex-extra` Depending on your setup you may need to install these schemas before building: ```bash $ sudo cp data/org.gnome.gitlab.somas.Apostrophe.gschema.xml /usr/share/glib-2.0/schemas/org.gnome.gitlab.somas.Apostrophe.gschema.xml $ sudo glib-compile-schemas /usr/share/glib-2.0/schemas ``` Once all dependencies are installed you can build Apostrophe using the following commands: ```bash $ git clone https://gitlab.gnome.org/World/apostrophe/ $ cd apostrophe $ meson builddir --prefix=/usr -Dprofile=development $ sudo ninja -C builddir install ``` Then you can run the installed package: ```bash $ apostrophe ``` Or a local version which runs from the source tree ```bash $ ./builddir/local-apostrophe ``` ### Building a flatpak package It's also possible to build, run and debug a flatpak package. All you need is to setup [flatpak-builder](https://docs.flatpak.org/en/latest/first-build.html) and run the following commands: ```bash $ cd build-aux/flatpak $ flatpak-builder --force-clean --install --user _build org.gnome.gitlab.somas.Apostrophe.json ``` apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe.doap000066400000000000000000000017701506657706400243600ustar00rootroot00000000000000 Apostrophe Edit Markdown in style Python Manuel Genovés somas apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe.in000077500000000000000000000035611506657706400240460ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2019, Wolf Vollprecht # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . ### END LICENSE ### DO NOT EDIT THIS FILE ### import sys import os import gettext import locale _LOCAL = @LOCAL_BUILD@ if _LOCAL: # In the local use case, use apostrophe module from the sourcetree sys.path.insert(1, '@PYTHON_DIR@') # In the local use case the installed schemas go in /data os.environ["XDG_DATA_DIRS"] = '@SCHEMAS_DIR@:' + os.environ.get("XDG_DATA_DIRS", "") from gi.repository import Gio import apostrophe localedir = '@LOCALE_DIR@' pkgdatadir = '@PKGDATA_DIR@' # L10n locale.textdomain('apostrophe') locale.bindtextdomain('apostrophe', localedir) gettext.textdomain('apostrophe') gettext.bindtextdomain('apostrophe', localedir) def run_application(): from apostrophe.application import Application app = Application('@APP_ID@') return app.run(sys.argv) def main(): resource = Gio.resource_load( os.path.join(pkgdatadir, 'apostrophe.gresource')) Gio.Resource._register(resource) return run_application() if __name__ == '__main__': if _LOCAL: print('Running from source tree, using local files.') sys.exit(main()) apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/000077500000000000000000000000001506657706400235065ustar00rootroot00000000000000apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/.pylintrc000066400000000000000000000426411506657706400253620ustar00rootroot00000000000000[MASTER] # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code. extension-pkg-whitelist= # Add files or directories to the blacklist. They should be base names, not # paths. ignore=CVS # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. ignore-patterns= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). #init-hook= # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use. jobs=1 # Control the amount of potential inferred values when inferring a single # object. This can help the performance when dealing with large functions or # complex, nested conditions. limit-inference-results=100 # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. load-plugins= # Pickle collected data for later comparisons. persistent=yes # Specify a configuration file. #rcfile= # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages. suggestion-mode=yes # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no [MESSAGES CONTROL] # Only show warnings with the listed confidence levels. Leave empty to show # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED. confidence= # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once). You can also use "--disable=all" to # disable everything first and then reenable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". disable=print-statement, parameter-unpacking, unpacking-in-except, old-raise-syntax, backtick, long-suffix, old-ne-operator, old-octal-literal, import-star-module-level, non-ascii-bytes-literal, raw-checker-failed, bad-inline-option, locally-disabled, locally-enabled, file-ignored, suppressed-message, useless-suppression, deprecated-pragma, use-symbolic-message-instead, apply-builtin, basestring-builtin, buffer-builtin, cmp-builtin, coerce-builtin, execfile-builtin, file-builtin, long-builtin, raw_input-builtin, reduce-builtin, standarderror-builtin, unicode-builtin, xrange-builtin, coerce-method, delslice-method, getslice-method, setslice-method, no-absolute-import, old-division, dict-iter-method, dict-view-method, next-method-called, metaclass-assignment, indexing-exception, raising-string, reload-builtin, oct-method, hex-method, nonzero-method, cmp-method, input-builtin, round-builtin, intern-builtin, unichr-builtin, map-builtin-not-iterating, zip-builtin-not-iterating, range-builtin-not-iterating, filter-builtin-not-iterating, using-cmp-argument, eq-without-hash, div-method, idiv-method, rdiv-method, exception-message-attribute, invalid-str-codec, sys-max-int, bad-python3-import, deprecated-string-function, deprecated-str-translate-call, deprecated-itertools-function, deprecated-types-field, next-method-defined, dict-items-not-iterating, dict-keys-not-iterating, dict-values-not-iterating, deprecated-operator-function, deprecated-urllib-function, xreadlines-attribute, deprecated-sys-function, exception-escape, comprehension-escape # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. enable=c-extension-no-member [REPORTS] # Python expression which should return a note less than 10 (10 is the highest # note). You have access to the variables errors warning, statement which # respectively contain the number of errors / warnings messages and the total # number of statements analyzed. This is used by the global evaluation report # (RP0004). evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details. #msg-template= # Set the output format. Available formats are text, parseable, colorized, json # and msvs (visual studio). You can also give a reporter class, e.g. # mypackage.mymodule.MyReporterClass. output-format=msvs # Tells whether to display a full report or only the messages. reports=yes # Activate the evaluation score. score=yes [REFACTORING] # Maximum number of nested blocks for function / method body max-nested-blocks=5 # Complete name of functions that never returns. When checking for # inconsistent-return-statements if a never returning function is called then # it will be considered as an explicit return statement and no message will be # printed. never-returning-functions=sys.exit [FORMAT] # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. expected-line-ending-format= # Regexp for a line that is allowed to be longer than the limit. ignore-long-lines=^\s*(# )??$ # Number of spaces of indent required inside a hanging or continued line. indent-after-paren=4 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). indent-string=' ' # Maximum number of characters on a single line. max-line-length=100 # Maximum number of lines in a module. max-module-lines=1000 # List of optional constructs for which whitespace checking is disabled. `dict- # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. # `trailing-comma` allows a space between comma and closing bracket: (a, ). # `empty-line` allows space-only lines. no-space-check=trailing-comma, dict-separator # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no # Allow the body of an if to be on the same line as the test if there is no # else. single-line-if-stmt=no [LOGGING] # Logging modules to check that the string format arguments are in logging # function parameter format. logging-modules=logging [SPELLING] # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions=4 # Spelling dictionary name. Available dictionaries: he (hspell), en_IE # (hunspell), es_BO (hunspell), en_NZ (hunspell), es_DO (hunspell), es_MX # (hunspell), en_ZA (hunspell), en_IN (hunspell), en_TT (hunspell), ca # (aspell), ca_FR (hunspell), es_HN (hunspell), ca_AD (hunspell), es_SV # (hunspell), es_PA (hunspell), en_DK (hunspell), es_NI (hunspell), es_PE # (hunspell), en_SG (hunspell), es_UY (hunspell), en_BS (hunspell), en_BW # (hunspell), es_CL (hunspell), es_AR (hunspell), en_BZ (hunspell), es_CO # (hunspell), en_ZW (hunspell), en_HK (hunspell), es_CR (hunspell), en_NA # (hunspell), es_PR (hunspell), en_JM (hunspell), es_VE (hunspell), en_AG # (hunspell), es_CU (hunspell), en_NG (hunspell), ca_ES (hunspell), es_ES # (hunspell), es_ANY (hunspell), es_EC (hunspell), es_GT (hunspell), en_PH # (hunspell), en_GB (hunspell), en_US (hunspell), ca_IT (hunspell), es_PY # (hunspell), en_GH (hunspell).. spelling-dict= # List of comma separated words that should not be checked. spelling-ignore-words= # A path to a file that contains private dictionary; one word per line. spelling-private-dict-file= # Tells whether to store unknown words to indicated private dictionary in # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words=no [SIMILARITIES] # Ignore comments when computing similarities. ignore-comments=yes # Ignore docstrings when computing similarities. ignore-docstrings=yes # Ignore imports when computing similarities. ignore-imports=no # Minimum lines number of a similarity. min-similarity-lines=4 [TYPECHECK] # List of decorators that produce context managers, such as # contextlib.contextmanager. Add to this list to register other decorators that # produce valid context managers. contextmanager-decorators=contextlib.contextmanager # List of members which are set dynamically and missed by pylint inference # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. generated-members= # Tells whether missing members accessed in mixin class should be ignored. A # mixin class is detected if its name ends with "mixin" (case insensitive). ignore-mixin-members=yes # Tells whether to warn about missing members when the owner of the attribute # is inferred to be None. ignore-none=yes # This flag controls whether pylint should warn about no-member and similar # checks whenever an opaque object is returned when inferring. The inference # can return multiple potential results while evaluating a Python object, but # some branches might not be evaluated, which results in partial inference. In # that case, it might be useful to still emit no-member and other checks for # the rest of the inferred objects. ignore-on-opaque-inference=yes # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of # qualified names. ignored-classes=optparse.Values,thread._local,_thread._local # List of module names for which member attributes should not be checked # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis. It # supports qualified module names, as well as Unix pattern matching. ignored-modules= # Show a hint with possible names when a member name was not found. The aspect # of finding the hint is based on edit distance. missing-member-hint=yes # The minimum edit distance a name should have in order to be considered a # similar match for a missing member name. missing-member-hint-distance=1 # The total number of similar names that should be taken in consideration when # showing a hint for a missing member. missing-member-max-choices=1 [BASIC] # Naming style matching correct argument names. argument-naming-style=snake_case # Regular expression matching correct argument names. Overrides argument- # naming-style. #argument-rgx= # Naming style matching correct attribute names. attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- # style. #attr-rgx= # Bad variable names which should always be refused, separated by a comma. bad-names=foo, bar, baz, toto, tutu, tata # Naming style matching correct class attribute names. class-attribute-naming-style=any # Regular expression matching correct class attribute names. Overrides class- # attribute-naming-style. #class-attribute-rgx= # Naming style matching correct class names. class-naming-style=PascalCase # Regular expression matching correct class names. Overrides class-naming- # style. #class-rgx= # Naming style matching correct constant names. const-naming-style=UPPER_CASE # Regular expression matching correct constant names. Overrides const-naming- # style. #const-rgx= # Minimum line length for functions/classes that require docstrings, shorter # ones are exempt. docstring-min-length=-1 # Naming style matching correct function names. function-naming-style=snake_case # Regular expression matching correct function names. Overrides function- # naming-style. #function-rgx= # Good variable names which should always be accepted, separated by a comma. good-names=i, j, k, ex, Run, _ # Include a hint for the correct naming format with invalid-name. include-naming-hint=yes # Naming style matching correct inline iteration names. inlinevar-naming-style=any # Regular expression matching correct inline iteration names. Overrides # inlinevar-naming-style. #inlinevar-rgx= # Naming style matching correct method names. method-naming-style=snake_case # Regular expression matching correct method names. Overrides method-naming- # style. #method-rgx= # Naming style matching correct module names. module-naming-style=snake_case # Regular expression matching correct module names. Overrides module-naming- # style. #module-rgx= # Colon-delimited sets of names that determine each other's naming style when # the name regexes allow several styles. name-group= # Regular expression which should only match function or class names that do # not require a docstring. no-docstring-rgx=^_ # List of decorators that produce properties, such as abc.abstractproperty. Add # to this list to register other decorators that produce valid properties. property-classes=abc.abstractproperty # Naming style matching correct variable names. variable-naming-style=snake_case # Regular expression matching correct variable names. Overrides variable- # naming-style. #variable-rgx= [VARIABLES] # List of additional names supposed to be defined in builtins. Remember that # you should avoid to define new builtins when possible. additional-builtins= # Tells whether unused global variables should be treated as a violation. allow-global-unused-variables=yes # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. callbacks=cb_, _cb # A regular expression matching the name of dummy variables (i.e. expected to # not be used). dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ # Argument names that match this expression will be ignored. Default to name # with leading underscore. ignored-argument-names=_.*|^ignored_|^unused_ # Tells whether we should check for unused import in __init__ files. init-import=no # List of qualified module names which can have objects that can redefine # builtins. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. notes=FIXME, XXX, TODO [CLASSES] # List of method names used to declare (i.e. assign) instance attributes. defining-attr-methods=__init__, __new__, setUp # List of member names, which should be excluded from the protected access # warning. exclude-protected=_asdict, _fields, _replace, _source, _make # List of valid names for the first argument in a class method. valid-classmethod-first-arg=cls # List of valid names for the first argument in a metaclass class method. valid-metaclass-classmethod-first-arg=cls [DESIGN] # Maximum number of arguments for function / method. max-args=5 # Maximum number of attributes for a class (see R0902). max-attributes=7 # Maximum number of boolean expressions in an if statement. max-bool-expr=5 # Maximum number of branch for function / method body. max-branches=12 # Maximum number of locals for function / method body. max-locals=15 # Maximum number of parents for a class (see R0901). max-parents=7 # Maximum number of public methods for a class (see R0904). max-public-methods=20 # Maximum number of return / yield for function / method body. max-returns=6 # Maximum number of statements in function / method body. max-statements=50 # Minimum number of public methods for a class (see R0903). min-public-methods=2 [IMPORTS] # Allow wildcard imports from modules that define __all__. allow-wildcard-with-all=no # Analyse import fallback blocks. This can be used to support both Python 2 and # 3 compatible code, which means that the block might have code that exists # only in one or another interpreter, leading to false positives when analysed. analyse-fallback-blocks=no # Deprecated modules which should not be used, separated by a comma. deprecated-modules=optparse,tkinter.tix # Create a graph of external dependencies in the given file (report RP0402 must # not be disabled). ext-import-graph= # Create a graph of every (i.e. internal and external) dependencies in the # given file (report RP0402 must not be disabled). import-graph= # Create a graph of internal dependencies in the given file (report RP0402 must # not be disabled). int-import-graph= # Force import order to recognize a module as part of the standard # compatibility libraries. known-standard-library= # Force import order to recognize a module as part of a third party library. known-third-party=enchant [EXCEPTIONS] # Exceptions that will emit a warning when being caught. Defaults to # "Exception". overgeneral-exceptions=Exception apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/__init__.py000066400000000000000000000015121506657706400256160ustar00rootroot00000000000000# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2019, Wolf Vollprecht # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . ### END LICENSE import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/application.py000066400000000000000000000276201506657706400263720ustar00rootroot00000000000000# Copyright (C) 2022, Manuel Genovés # 2019, Wolf Vollprecht # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. import logging import gi gi.require_version('Gtk', '4.0') gi.require_version('GtkSource', '5') gi.require_version('Adw', '1') from gettext import gettext as _ from gi.repository import Adw, Gdk, Gio, GLib, Gtk, GtkSource from apostrophe.helpers import get_debug_info, set_up_logging, get_media_path from apostrophe.preferences_dialog import ApostrophePreferencesDialog from apostrophe.inhibitor import Inhibitor from apostrophe.main_window import MainWindow from apostrophe.settings import Settings from apostrophe.theme_switcher import Theme LOGGER = logging.getLogger('apostrophe') class Application(Adw.Application): def __init__(self, application_id, *args, **kwargs): super().__init__(*args, application_id=application_id, flags=Gio.ApplicationFlags.HANDLES_OPEN, **kwargs) self.add_main_option("new-window", b"w", GLib.OptionFlags.NONE, GLib.OptionArg.NONE, "Open a new window", None) self.add_main_option("verbose", b"v", GLib.OptionFlags.NONE, GLib.OptionArg.NONE, "Verbose output", None) self.set_resource_base_path("/org/gnome/gitlab/somas/Apostrophe") # gtk_settings = Gtk.Settings.get_default() self.settings = Settings.new() self.inhibitor = None self._application_id = application_id def do_startup(self): Adw.Application.do_startup(self) # Set css theme css_sepia_provider_file = Gio.File.new_for_uri( "resource:///org/gnome/gitlab/somas/Apostrophe/style-sepia.css") self.sepia_style_provider = Gtk.CssProvider() self.sepia_style_provider.load_from_file(css_sepia_provider_file) # Style manager style_manager = Adw.StyleManager.get_default() style_manager.connect("notify::dark", self._set_color_scheme) style_manager.connect("notify::high-contrast", self._set_color_scheme) # Editor styles scheme_manager = GtkSource.StyleSchemeManager.get_default() scheme_manager.prepend_search_path(get_media_path("/styles")) # Set icons Gtk.IconTheme.get_for_display( Gdk.Display.get_default()).add_resource_path( "/org/gnome/gitlab/somas/Apostrophe/icons" ) color_scheme = self.settings.get_string("color-scheme") action = Gio.SimpleAction.new_stateful( "color_scheme", GLib.VariantType.new("s"), GLib.Variant.new_string(color_scheme)) action.connect("activate", self._set_color_scheme) self.add_action(action) action = Gio.SimpleAction.new("new-window", None) action.connect("activate", self.on_new_window) self.add_action(action) action = Gio.SimpleAction.new("preferences", None) action.connect("activate", self.on_preferences) self.add_action(action) action = Gio.SimpleAction.new("about", None) action.connect("activate", self.on_about) self.add_action(action) action = Gio.SimpleAction.new("quit", None) action.connect("activate", self.on_quit) self.add_action(action) # Stats Menu stat_default = self.settings.get_string("stat-default") action = Gio.SimpleAction.new_stateful( "stat_default", GLib.VariantType.new("s"), GLib.Variant.new_string(stat_default)) action.connect("activate", self.on_stat_default) self.add_action(action) # Shortcuts self.set_accels_for_action("win.focus_mode", ["d"]) self.set_accels_for_action("win.hemingway_mode", ["t"]) self.set_accels_for_action("win.preview", ["p"]) self.set_accels_for_action("win.fullscreen", ["F11"]) self.set_accels_for_action("win.find", ["f"]) self.set_accels_for_action("win.find_replace", ["h"]) self.set_accels_for_action("app.spellcheck", ["F7"]) self.set_accels_for_action("app.new-window", ["n"]) self.set_accels_for_action("app.preferences", ["comma"]) self.set_accels_for_action("win.open", ["o"]) self.set_accels_for_action("win.save", ["s"]) self.set_accels_for_action("win.save_as", ["s"]) self.set_accels_for_action("app.quit", ["q"]) self.set_accels_for_action("win.close", ["w"]) # Inhibitor self.inhibitor = Inhibitor() self.restore_snapshots() def do_activate(self, *args, **kwargs): win = self.get_active_window() if not win: self.settings.connect("changed", self.on_settings_changed) win = MainWindow(self) group = Gtk.WindowGroup.new() group.add_window(win) self._set_color_scheme() win.present() def do_handle_local_options(self, options): if options.contains("new-window"): self.register() if self.get_is_remote(): self.activate_action("new-window") return 0 if options.contains("verbose") or self._application_id \ == 'org.gnome.gitlab.somas.Apostrophe.Devel': set_up_logging(1) return -1 def do_open(self, files, _n_files, _hint): self.activate() empty_windows = list(filter(lambda window: window.textview.get_text() == "" and\ not window.did_change, self.get_main_windows())) for i, file in enumerate(files): if not file.query_exists(None): LOGGER.warning(f"{file.get_path()} doesn't exist") continue c = False for window in self.get_main_windows(): if not file or not window.current.gfile: continue file_id = file.query_info(Gio.FILE_ATTRIBUTE_ID_FILE, Gio.FileQueryInfoFlags.NONE, None).get_attribute_as_string(Gio.FILE_ATTRIBUTE_ID_FILE) window_file_id = window.current.gfile.query_info( Gio.FILE_ATTRIBUTE_ID_FILE, Gio.FileQueryInfoFlags.NONE, None).get_attribute_as_string(Gio.FILE_ATTRIBUTE_ID_FILE) if file_id == window_file_id: GLib.idle_add(window.present) c = True if c: continue if i < len(empty_windows): window = empty_windows[i] else: window = MainWindow(self) group = Gtk.WindowGroup.new() group.add_window(window) window.load_file(file) window.present() def restore_snapshots(self): snapshot_dir = Gio.File.new_for_path(GLib.build_filenamev([GLib.get_user_state_dir(),"snapshots"])) if not snapshot_dir.query_exists(None): return snapshotsEnum = snapshot_dir.enumerate_children('standard::name,standard::type', Gio.FileQueryInfoFlags.NONE) for i, snapshot_info in enumerate(snapshotsEnum): snapshot = snapshotsEnum.get_child(snapshot_info) if not snapshot.query_exists(None): LOGGER.warning(f"{snapshot.get_path()} doesn't exist") continue empty_windows = list(filter(lambda window: window.textview.get_text() == "" and\ not window.did_change, self.get_main_windows())) if i < len(empty_windows): window = empty_windows[i] else: window = MainWindow(self) group = Gtk.WindowGroup.new() group.add_window(window) window.load_snapshot(snapshot) window.present() def delete_snapshot(self, snapshot): self.hold() snapshot.delete_async( GLib.PRIORITY_DEFAULT, None, self._delete_snapshot_finish ) def _delete_snapshot_finish(self, gfile, result, callback=None): try: gfile.delete_finish(result) except GLib.Error as e: LOGGER.warning(f"Snapshot delete failed: {e}") self.release() def get_main_windows(self): return [window for window in self.get_windows() if isinstance(window, MainWindow)] def _set_color_scheme(self, *args, **kwargs): theme = Theme.get_current().name sepia = theme == "sepia" if not self.get_windows(): return if sepia: Gtk.StyleContext.add_provider_for_display( Gdk.Display.get_default(), self.sepia_style_provider, Gtk.STYLE_PROVIDER_PRIORITY_USER) else: Gtk.StyleContext.remove_provider_for_display( Gdk.Display.get_default(), self.sepia_style_provider ) for window in self.get_main_windows(): # refresh markup colors window.textview.markup.on_style_updated() # refresh sourceview styles scheme_manager = GtkSource.StyleSchemeManager.get_default() window.textview.buffer.set_style_scheme(scheme_manager.get_scheme(theme)) def on_settings_changed(self, settings, key): # TODO: change this ffs if not self.get_windows(): return match key: case "color-scheme": self._set_color_scheme() for window in self.get_main_windows(): window.reload_preview() case "input-format": for window in self.get_main_windows(): window.reload_preview() case "sync-scroll": for window in self.get_main_windows(): window.reload_preview(reshow=True) case "stat-default": for window in self.get_main_windows(): window.editor.update_default_stat() def on_new_window(self, _action, _value): window = MainWindow(self) self._set_color_scheme() window.present() group = Gtk.WindowGroup.new() group.add_window(window) def on_preferences(self, _action, _value): preferences_dialog = ApostrophePreferencesDialog() preferences_dialog.present(self.get_active_window()) def on_about(self, _action, _param): # TODO: what about non-csd builder = Gtk.Builder() builder.add_from_resource( "/org/gnome/gitlab/somas/Apostrophe/About.ui") about_dialog = builder.get_object("AboutDialog") about_dialog.set_debug_info(get_debug_info()) about_dialog.add_link(_("Donate"), "https://paypal.me/manuelgenoves") about_dialog.add_link(_("Translations"), "https://l10n.gnome.org/module/apostrophe/") about_dialog.present(self.get_active_window()) def on_quit(self, _action, _param): quit = True for window in self.get_windows(): if window.do_close_request(): quit = False if quit: self.quit() def on_stat_default(self, action, value): action.set_state(value) self.settings.set_string("stat-default", value.get_string()) apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/bottombar.py000066400000000000000000000171431506657706400260570ustar00rootroot00000000000000# Copyright (C) 2023, Manuel Genovés # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE """Manage the bottombar. It comprises the toolbar and the statsbar """ from gettext import gettext as _ import gi from apostrophe.stats_handler import StatsHandler gi.require_version('Gtk', '4.0') from gi.repository import Adw, GLib, GObject, Gtk, Gsk, Graphene, Gio from .settings import Settings @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/BottomBar.ui') class BottomBar(Gtk.Widget): __gtype_name__ = "ApostropheBottomBar" toolbar_ = None toolbar_narrow_ = None stats_ = None background_ = None toolbars_container = Gtk.Template.Child() stats_container = Gtk.Template.Child() background_container = Gtk.Template.Child() narrow = GObject.Property(type=bool, default=False) @GObject.Property(type=Gtk.Widget) def toolbar(self): return self.toolbar_ @toolbar.setter def toolbar(self, value): self.toolbars_container.add_named(value, "toolbar") self.toolbar_ = value @GObject.Property(type=Gtk.Widget) def toolbar_narrow(self): return self.toolbar_narrow_ @toolbar_narrow.setter def toolbar_narrow(self, value): self.toolbars_container.add_named(value, "toolbar_narrow") self.toolbar_narrow_ = value @GObject.Property(type=Gtk.Widget) def stats(self): return self.stats_ @stats.setter def stats(self, value): self.stats_container.set_child(value) self.stats_ = value @GObject.Property(type=Gtk.Widget) def background(self): return self.background_ @background.setter def background(self, value): self.background_container.set_child(value) self.background_ = value def __init__(self): super().__init__() self.queue_allocate() self.queue_resize() def do_size_allocate(self, width, height, baseline): toolbar_width = self.toolbars_container.measure(Gtk.Orientation.HORIZONTAL, -1).minimum toolbar_height = self.toolbars_container.measure(Gtk.Orientation.VERTICAL, -1).minimum stats_wide_width = self.stats.stats_button.measure(Gtk.Orientation.HORIZONTAL, -1).minimum if (toolbar_width + stats_wide_width) >= width or self.narrow: self.stats.buttons_stack.set_visible_child(self.stats.stats_button_short) else: self.stats.buttons_stack.set_visible_child(self.stats.stats_button) bg_min_w = self.background_container.measure(Gtk.Orientation.HORIZONTAL, -1).minimum bg_min_h = self.background_container.measure(Gtk.Orientation.HORIZONTAL, -1).minimum stats_width = self.stats_container.measure(Gtk.Orientation.HORIZONTAL, -1).minimum stats_height = self.toolbars_container.measure(Gtk.Orientation.VERTICAL, -1).minimum self.background_container.allocate(max(width, bg_min_w), max(toolbar_height, bg_min_h), baseline) if self.get_direction() == Gtk.TextDirection.LTR: offset = width - stats_width offset_transform = Gsk.Transform().translate(Graphene.Point().init(offset, 0)) self.toolbars_container.allocate(toolbar_width, toolbar_height, baseline) self.stats_container.allocate(stats_width, stats_height, baseline, offset_transform) elif self.get_direction() == Gtk.TextDirection.RTL: offset = width - toolbar_width offset_transform = Gsk.Transform().translate(Graphene.Point().init(offset, 0)) self.stats_container.allocate(stats_width, stats_height, baseline) self.toolbars_container.allocate(toolbar_width, toolbar_height, baseline, offset_transform) def do_measure(self, orientation, for_size): toolbar = self.toolbars_container.measure(orientation, -1) stats = self.stats.stats_button_short.measure(orientation, -1) if orientation == Gtk.Orientation.HORIZONTAL: return ( toolbar.minimum + stats.minimum, toolbar.natural + stats.natural, toolbar.minimum_baseline, toolbar.natural_baseline ) else: return ( max(toolbar.minimum, stats.minimum), max(toolbar.natural, stats.natural), toolbar.minimum_baseline, toolbar.natural_baseline ) def do_contains(self, x, y): bottombar_width = self.get_width() toolbar_width = self.toolbars_container.get_width() stats_width = self.stats_container.get_width() return y > 0 and ( (x < toolbar_width or x > (bottombar_width - stats_width)) or (self.toolbar.extra_toolbar_revealed and not self.narrow)) def get_expanded_width(self): toolbar_size = self.toolbar.toolbar_extra_revealer.get_child().measure(Gtk.Orientation.HORIZONTAL, -1) show_button_size = self.toolbar.show_extra_controls_button.measure(Gtk.Orientation.HORIZONTAL, -1) stats_size = self.stats.stats_button_short.measure(Gtk.Orientation.HORIZONTAL, -1) return toolbar_size.minimum + show_button_size.minimum + stats_size.minimum def do_dispose(self): self.toolbar = None self.toolbar_narrow = None self.stats = None self.background = None Gtk.Widget.do_dispose(self) @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Toolbar.ui') class Toolbar(Gtk.Revealer): __gtype_name__ = "Toolbar" show_extra_controls_button = Gtk.Template.Child() toolbar_extra_revealer = Gtk.Template.Child() show_extra_controls_button = Gtk.Template.Child() extra_toolbar_revealed = GObject.Property(type=bool, default=True) def __init__(self, **kwargs): super().__init__(**kwargs) self.settings = Settings.new() self.connect("notify::extra-toolbar-revealed", self.on_toolbar_reveal) self.settings.bind("toolbar-active", self, "extra-toolbar-revealed", Gio.SettingsBindFlags.DEFAULT|Gio.SettingsBindFlags.GET_NO_CHANGES) def on_toolbar_reveal(self, toolbar, revealed): if self.extra_toolbar_revealed: self.show_extra_controls_button.set_tooltip_text(_("Hide Toolbar")) else: self.show_extra_controls_button.set_tooltip_text(_("Show Toolbar")) @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/ToolbarNarrow.ui') class ToolbarNarrow(Gtk.Revealer): __gtype_name__ = "ToolbarNarrow" def __init__(self, **kwargs): super().__init__(**kwargs) @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Statsbar.ui') class Statsbar(Gtk.Revealer): __gtype_name__ = "Statsbar" stats_button = Gtk.Template.Child() stats_button_short = Gtk.Template.Child() buttons_stack = Gtk.Template.Child() def __init__(self, **kwargs): super().__init__(**kwargs) # make the stack report the biggest size while transitioning to not have jumps when allocating self.buttons_stack.bind_property("transition-running", self.buttons_stack, "hhomogeneous") apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/detailed_error.py000066400000000000000000000035071506657706400270510ustar00rootroot00000000000000# Copyright (C) 2024-2025 Sophie Herold # Copyright (C) 2023, Manuel Genovés # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE """Show generic errors with an optional detailed error description in a textview """ from gettext import gettext as _ import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gtk @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/DetailedError.ui') class DetailedError(Adw.Dialog): __gtype_name__ = "DetailedError" description = Gtk.Template.Child() message = Gtk.Template.Child() def __init__(self, description:None|str, message: str, **kwargs): super().__init__(**kwargs) if description: self.description.set_label(description) self.message.get_buffer().set_text(message) @Gtk.Template.Callback() def copy_error_message(self, *args, **kwargs): clipboard = self.get_clipboard() buffer = self.message.get_buffer() start, end = buffer.get_bounds() clipboard.set(self.message.get_buffer().get_text(start, end, False)) @Gtk.Template.Callback() def report_issue(self, *args, **kwargs): Gtk.UriLauncher.new("https://gitlab.gnome.org/World/apostrophe/-/issues").launch(self.get_root(), None, None, None)apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/editor.py000066400000000000000000000167661506657706400253660ustar00rootroot00000000000000# Copyright (C) 2023, Manuel Genovés # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE """Manage the bottombar. It comprises the toolbar and the statsbar """ import collections from datetime import datetime from gettext import gettext as _ import gi from apostrophe.movable_bin import ApostropheMovableBin from apostrophe.stats_handler import StatsHandler gi.require_version('Gtk', '4.0') from gi.repository import Adw, GLib, GObject, Gtk from apostrophe.bottombar import BottomBar, Statsbar, Toolbar from apostrophe.text_view_scroller import TextViewScroller, ApostropheBorderScrollable from .settings import Settings @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Editor.ui') class Editor(Adw.Bin): __gtype_name__ = "Editor" scrolledwindow = Gtk.Template.Child() toolbar_revealer = Gtk.Template.Child() toast_overlay = Gtk.Template.Child() stats_revealer = Gtk.Template.Child() background = Gtk.Template.Child() textview = Gtk.Template.Child() movablebin = Gtk.Template.Child() sizehandler = Gtk.Template.Child() bottombar = Gtk.Template.Child() top_margin = GObject.Property(type=int, default=0) hemingway_attempts = collections.deque(4*[datetime.min], 4) def __init__(self, **kwargs): super().__init__(**kwargs) self.settings = Settings.new() # Setup stats counter self.stats_handler = StatsHandler(self.stats_revealer.stats_button, self.stats_revealer.stats_button_short, self.textview) # Initialize bottombar background self.reveal_toolbar() self.bottombar.connect("notify::narrow", self.reveal_toolbar) self.textview.get_buffer().connect('attempted-hemingway', self.on_attempted_hemingway) self.textview.scroller = TextViewScroller(self.textview, self.scrolledwindow) self.scrolledwindow.get_vadjustment().connect("changed", self.textview._on_vadjustment_changed) self.scrolledwindow.get_vadjustment().connect("value-changed", self.textview._on_vadjustment_changed) self.sizehandler.set_size_request(360, 200) self.breakpoints = [] self.set_breakpoints() self.textview.connect("notify::bigger-text", self.set_breakpoints) @Gtk.Template.Callback() def reveal_toolbar(self, *_args): if self.toolbar_revealer.extra_toolbar_revealed or self.bottombar.narrow: self.background.add_css_class('shown') self.background.set_can_target(True) self.toolbar_revealer.show_extra_controls_button.add_css_class('active') else: self.background.remove_css_class('shown') self.background.set_can_target(False) self.toolbar_revealer.show_extra_controls_button.remove_css_class('active') @Gtk.Template.Callback() def reveal_bottombar(self, *args): if not self.stats_revealer.get_reveal_child(): self.stats_revealer.set_reveal_child(True) self.stats_revealer.set_halign(Gtk.Align.END) if not self.toolbar_revealer.get_reveal_child(): self.toolbar_revealer.set_reveal_child(True) if not self.background.get_reveal_child(): self.background.set_reveal_child(True) def set_breakpoints(self, *args, **kwargs): if self.breakpoints: for breakpoint in self.breakpoints: self.sizehandler.remove_breakpoint(breakpoint) self.breakpoints = [] # dict with all breakpoints and their setters # any setter is applied to smaller breakpoints as well # all breakpoints trigger textview.update_font_size breakpoints = {} # breakpoints for font sizes for font_size in self.textview._get_font_sizes(): # at this point self.line_chars should still be the default # we rely on that. width = self.textview.get_min_width(font_size) breakpoints.update({width: None}) if font_size == self.textview._get_font_sizes()[-1]: breakpoints.update({width: [(self.textview, "line_chars", 26)]}) # breakpoints for font sizes in narrow mode for font_size in self.textview._get_font_sizes(): width = self.textview.get_min_width(font_size, 26) if width > min(breakpoints.keys()): continue breakpoints.update({width: None}) # breakpoint for the toolbar breakpoints.update({ self.bottombar.get_expanded_width(): [ (self.bottombar, "narrow", True), (self.bottombar.toolbars_container, "visible-child", self.bottombar.toolbar_narrow), (self.textview, "line_chars", 26) ] }) # store in a set all setters so they're applied to smaller breakpoints props_to_apply = set() for width, props in sorted(breakpoints.items(), reverse=True): condition = Adw.BreakpointCondition.new_length(Adw.BreakpointConditionLengthType.MAX_WIDTH, width, Adw.LengthUnit.PX) breakpoint = Adw.Breakpoint.new(condition) breakpoint.connect("apply", self.textview.update_font_size) breakpoint.connect("unapply", self.textview.update_font_size) if props: for prop in props: props_to_apply.add(prop) if props_to_apply: for prop in props_to_apply: breakpoint.add_setter(*prop) self.breakpoints.append(breakpoint) self.sizehandler.add_breakpoint(breakpoint) def hide_bottombar(self): if self.bottombar.narrow: return if self.stats_revealer.get_reveal_child(): self.stats_revealer.set_reveal_child(False) self.stats_revealer.set_halign(Gtk.Align.FILL) if self.toolbar_revealer.get_reveal_child(): self.toolbar_revealer.set_reveal_child(False) if self.background.get_reveal_child(): self.background.set_reveal_child(False) def update_default_stat(self): self.stats_handler.update_default_stat() def on_attempted_hemingway(self, *args): # log the time into a list with max length of 4 # then check if the time differences are small enough # to show the help popover again self.hemingway_attempts.appendleft(datetime.now()) if (self.hemingway_attempts[0] - self.hemingway_attempts[3]).seconds <= 70: self.settings.set_int("hemingway-toast-count", 0) self.activate_action("win.show_hemingway_toast") pass spring_params = Adw.SpringParams.new(0.5, 50, 30000) target = Adw.PropertyAnimationTarget.new(self.movablebin, "offset-x") hemingway_animation = Adw.SpringAnimation.new(self, 0, 0, spring_params, target) hemingway_animation.set_initial_velocity(100) hemingway_animation.set_epsilon(0.01) hemingway_animation.play() apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/export_dialog.py000066400000000000000000000354251506657706400267310ustar00rootroot00000000000000# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # BEGIN LICENSE # Copyright (C) 2019, Wolf Vollprecht # 2021, Manuel Genovés # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE """Manages all the export operations and dialogs """ # pylint: disable=no-member import logging import os from gettext import gettext as _ import shutil from zipfile import ZipFile import json import gi gi.require_version('Gtk', '4.0') from gi.repository import Gtk, Gdk, Gio, GObject, Adw from apostrophe import helpers from apostrophe.theme_switcher import Theme LOGGER = logging.getLogger('apostrophe') class Format(GObject.Object): def __init__(self, name, ext, to, engine, **kwargs): super().__init__(**kwargs) self.name: str = name self.ext: str = ext self.to: str = to self.engine: None | str = engine @property def has_pages(self): return self.to in {"pdf", "odt", "docx", "latex"} @property def has_slides(self): return self.to == "beamer" @property def is_html(self): return self.to == "html5" @property def has_syntax(self): return self.ext in {"html", "tex", "docx", "pdf"} @property def is_presentation(self): return self.to in {"beamer", "revealjs", "dzslides"} @property def requires_texlive(self): return self.ext in {"tex", "pdf"} and self.engine != "typst" class ExportDialog: __gtype_name__ = "ExportDialog" formats = { "pdf": { "name": "PDF", "extension": "pdf", "to": "pdf", "mimetype": "application/pdf", "args": ["--pdf-engine=typst", "--variable=papersize:a4", "-V", "template=%s" % helpers.get_media_path('/pandoc_templates/typst.typ')] }, "html": { "name": "HTML", "extension": "html", "to": "html5", "mimetype": "text/html", "args": ["--embed-resources", "--standalone", "--css=%s" % Theme.get_current().web_css, "--mathjax"] }, "odt": { "name": "ODT", "extension": "odt", "to": "odt", "mimetype": "application/vnd.oasis.opendocument.text", "args": ["--variable=papersize:a4"] } } def __init__(self, file, _format, text): self.file = file self.format = _format self.text = text self.dialog = Gtk.FileChooserNative.new( _("Export"), None, Gtk.FileChooserAction.SAVE, _("Export to %s") % self.formats[self.format]["name"], _("Cancel")) dialog_filter = Gtk.FileFilter.new() dialog_filter.set_name(self.formats[self.format]["name"]) dialog_filter.add_mime_type(self.formats[self.format]["mimetype"]) self.dialog.add_filter(dialog_filter) self.dialog.set_current_name( file.name + '.' + self.formats[self.format]["extension"]) # / is the base path when the current file has not been saved if file.base_path != "/": self.dialog.set_current_folder(Gio.File.new_for_path(file.base_path)) def export(self, window): def on_response(dialog, response): file = self.dialog.get_file() fmt = self.formats[self.format]["to"] args = self.formats[self.format]["args"].copy() args.append("--metadata=base_path:%s" % self.file.base_path) args.append("--lua-filter=%s" % helpers.get_media_path('/lua/relative_to_absolute.lua')) if response == Gtk.ResponseType.ACCEPT: try: export(self.text, file, fmt, args) except (NotADirectoryError, RuntimeError) as e: helpers.show_detailed_error( window, _("Apostrophe experienced an error while trying to export:"), str(e) ) self.dialog.connect("response", on_response) self.dialog.show() @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Export.ui') class AdvancedExportDialog(Adw.Dialog): __gtype_name__ = "AdvancedExportDialog" formats_list = Gtk.Template.Child() split_view = Gtk.Template.Child() options_page = Gtk.Template.Child() formats_page = Gtk.Template.Child() # #### --option properties-- ##### sw_standalone = Gtk.Template.Child() sw_absolute = Gtk.Template.Child() sw_toc = Gtk.Template.Child() sw_numbers = Gtk.Template.Child() cmb_page_size = Gtk.Template.Child() cmb_slide_size = Gtk.Template.Child() sw_self_contained = Gtk.Template.Child() sw_syntax_highlighting = Gtk.Template.Child() cmb_syntax_highlighting = Gtk.Template.Child() sw_incremental_bullets = Gtk.Template.Child() # #### ---------------------- ##### formats = Gio.ListStore.new(Format) page_sizes = ['A4', 'Letter'] slide_sizes = ['4:3', '16:9'] syntax_styles = ['pygments', 'kate', 'monochrome', 'espresso', 'zenburn', 'haddock', 'tango'] def __init__(self, file, text, **kwargs): super().__init__(**kwargs) self.file = file self.text = text self.revealjs = helpers.get_media_path('/libs/reveal.js') if not self.formats: with open(helpers.get_media_path("/media/formats.json")) as f: _formats_list = json.load(f) for _i, format in enumerate(_formats_list): self.formats.append(Format(format["name"], format["ext"], format["to"], format.get("engine", None))) self.formats_list.bind_model(self.formats, self.row_constructor, None) self.formats_list.select_row(self.formats_list.get_row_at_index(0)) page_sizes_list = helpers.liststore_from_list(self.page_sizes) self.cmb_page_size.set_model(page_sizes_list) slide_sizes_list = helpers.liststore_from_list(self.slide_sizes) self.cmb_slide_size.set_model(slide_sizes_list) syntax_styles_list = helpers.liststore_from_list(self.syntax_styles) self.cmb_syntax_highlighting.set_model(syntax_styles_list) def update_title(self): name = self.formats_list.get_selected_row().item.name self.set_title(_("Export to {}").format(name)) @GObject.Property(type=bool, default=False) def show_page_size_options(self): return self.formats_list.get_selected_row().item.has_pages @GObject.Property(type=bool, default=False) def show_slide_size_options(self): return self.formats_list.get_selected_row().item.has_slides @GObject.Property(type=bool, default=False) def show_html_options(self): return self.formats_list.get_selected_row().item.is_html @GObject.Property(type=bool, default=False) def show_syntax_options(self): return self.formats_list.get_selected_row().item.has_syntax and self.formats_list.get_selected_row().item.engine != "typst" @GObject.Property(type=bool, default=False) def show_presentation_options(self): return self.formats_list.get_selected_row().item.is_presentation @GObject.Property(type=bool, default=False) def show_texlive_warning(self): is_tex = self.formats_list.get_selected_row().item.requires_texlive texlive_installed = helpers.exist_executable("pdftex") return is_tex and not texlive_installed @GObject.Property(type=str, default="options") def options_page_name(self): name = "texlive_warning" if self.show_texlive_warning else "options" return name @GObject.Property(type=bool, default=False) def exports_multiple_files(self): return self.formats_list.get_selected_row().item.to == "revealjs" def row_constructor(self, item, _user_data): row = Gtk.ListBoxRow.new() row.item = item label = Gtk.Label.new() label.set_label(item.name) label.set_xalign(0) label.set_wrap(True) row.set_child(label) return row @Gtk.Template.Callback() def on_format_selected(self, _widget, _row): self.split_view.set_show_content(True) self.notify("show_page_size_options") self.notify("show_slide_size_options") self.notify("show_html_options") self.notify("show_syntax_options") self.notify("show_presentation_options") self.notify("show_texlive_warning") self.notify("options_page_name") self.update_title() @Gtk.Template.Callback() def export(self, widget): self.retrieve_args() def on_response(dialog, response): if self.exports_multiple_files: folder = export_dialog.get_file() if self.revealjs: shutil.copytree(self.revealjs, os.path.join(folder.get_path(), 'reveal.js'), dirs_exist_ok=True) export_file = folder.get_child(self.file.name + '.' + self.formats_list.get_selected_row().item.ext) else: export_file = export_dialog.get_file() fmt = self.formats_list.get_selected_row().item.to args = self.retrieve_args() if response == Gtk.ResponseType.ACCEPT: try: export(self.text, export_file, fmt, args) except (NotADirectoryError, RuntimeError) as e: helpers.show_error( self, _("An error happened while trying to export:\n\n{err_msg}") .format(err_msg=str(e).encode().decode("unicode-escape"))) self.close() if self.exports_multiple_files: export_dialog = Gtk.FileChooserNative.new( _("Export"), None, Gtk.FileChooserAction.SELECT_FOLDER, _("Select folder"), _("Cancel")) else: export_dialog = Gtk.FileChooserNative.new( _("Export"), None, Gtk.FileChooserAction.SAVE, _("Export to %s") % self.formats_list.get_selected_row().item.name, _("Cancel")) export_dialog.set_current_name( self.file.name + '.' + self.formats_list.get_selected_row().item.ext) # / is the base path when the current file has not been saved if self.file.base_path != "/": export_dialog.set_current_folder(Gio.File.new_for_path(self.file.base_path)) export_dialog.set_modal(True) export_dialog.set_transient_for(self.get_root()) export_dialog.connect("response", on_response) export_dialog.show() def retrieve_args(self): args = [] if self.formats_list.get_selected_row().item.ext == "pdf": args.append(f"--pdf-engine={self.formats_list.get_selected_row().item.engine}") if self.formats_list.get_selected_row().item.engine == "typst": args.extend(['-V', 'template=%s' % helpers.get_media_path('/pandoc_templates/typst.typ')]) if self.sw_standalone.get_active(): args.append("--standalone") if self.sw_absolute.get_active(): args.append("--metadata=base_path:%s" % self.file.base_path) args.append("--lua-filter=%s" % helpers.get_media_path('/lua/relative_to_absolute.lua')) if self.sw_toc.get_active(): args.append("--toc") if self.sw_numbers.get_active(): args.append("--number-sections") if (self.show_page_size_options and self.cmb_page_size.get_selected() == 0): if ((fmt := self.formats_list.get_selected_row().item.to) in {"pdf", "latex", "context"}): args.append("--variable=papersize:a4") elif fmt in ("odt", "docx"): args.append("--reference-doc=" + helpers.get_media_path( "/reference_files/reference-a4." + fmt)) if (self.show_slide_size_options and self.cmb_slide_size.get_selected() == 1): if ((fmt := self.formats_list.get_selected_row().item.to) == "beamer"): args.append("--variable=classoption:aspectratio=169") if self.show_html_options: args.append("--css=%s" % Theme.get_current().web_css) args.append("--mathjax") if self.sw_self_contained.get_active(): args.append("--embed-resources") args.append("--standalone") if self.show_syntax_options: if self.sw_syntax_highlighting.get_enable_expansion(): selected_style = self.cmb_syntax_highlighting.get_selected_item().get_string() args.append("--highlight-style={}".format(selected_style)) if self.show_presentation_options: if self.sw_incremental_bullets.get_active(): args.append("--incremental") if self.formats_list.get_selected_row().item.to == "revealjs" and self.revealjs: args.extend(["-V", "revealjs-url=reveal.js"]) return args @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/TexliveWarning.ui') class TexliveWarning(Gtk.Stack): __gtype_name__ = 'TexliveWarning' command = Gtk.Template.Child() def __init__(self): super().__init__() child_name = "flatpak" if os.path.isfile("/.flatpak-info") else "distro" self.set_visible_child_name(child_name) @Gtk.Template.Callback() def copy(self, _widget): clipboard = self.get_clipboard() clipboard.set(self.command.get_text()) def export(text, file, _format, args): """Export the given text using the specified format. For advanced export, this includes special flags for the enabled options. Keyword Arguments: text {str} -- Text to export (default: {""}) """ to = _format helpers.pandoc_convert( text, to=to, args=args, outputfile=file.get_path()) apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/fix_table.py000066400000000000000000000151561506657706400260250ustar00rootroot00000000000000import re import gi gi.require_version('Gtk', '4.0') import logging logger = logging.getLogger('apostrophe') class FixTable(): def __init__(self, TextBuffer): self.TextBuffer = TextBuffer @staticmethod def create_seperator(widths, char): """ Generate a line of + and - as sepeartor Example: >>> create_separarator([2, 4], '-') '+----+------+' """ line = [] for w in widths: line.append("+" + char * (w + 2)) line.append("+") return ''.join(line) @staticmethod def create_line(columns, widths): """ Crea una fila de la tabla separando los campos con un '|'. El argumento `columns` es una lista con las celdas que se quieren imprimir y el argumento `widths` tiene el ancho de cada columna. Si la columna es mas ancha que el texto a imprimir se agregan espacios vacíos. Example >>> create_line(['nombre', 'apellido'], [7, 10]) '| nombre | apellido |' """ line = zip(columns, widths) result = [] for text, width in line: spaces = " " * (width - len(text)) text = "| " + text + spaces + " " result.append(text) result.append("|") return ''.join(result) @staticmethod def create_table(content): """Imprime una tabla en formato restructuredText. El argumento `content` tiene que ser una lista de celdas. Example: >>> print create_table([['software', 'vesion'], ['python', '3.2'], ['vim', '7.3']]) +----------+--------+ | software | vesion | +==========+========+ | python | 3.2 | +----------+--------+ | vim | 7.3 | +----------+--------+ """ # obtiene las columnas de toda la tabla. columns = zip(*content) # calcula el tamano maximo que debe tener cada columna. # replace with len() widths = [max([len(x) for x in i]) for i in columns] result = [] result.append(FixTable.create_seperator(widths, '-')) print(content, widths) result.append(FixTable.create_line(content[0], widths)) result.append(FixTable.create_seperator(widths, '=')) for line in content[1:]: result.append(FixTable.create_line(line, widths)) result.append(FixTable.create_seperator(widths, '-')) return '\n'.join(result) @staticmethod def are_in_a_table(current_line): "Line in a table?" return "|" in current_line or "+" in current_line @staticmethod def are_in_a_paragraph(current_line): "Line in a paragraph?" return len(current_line.strip()) >= 1 def get_table_bounds(self, are_in_callback): """ Gets the row number where the table begins and ends. are_in_callback argument must be a function                 indicating whether a particular line belongs or not                 to the table to be measured (or create).                 Returns two values ​​as a tuple """ top = 0 buf = self.TextBuffer start_iter = buf.get_start_iter() end_iter = buf.get_end_iter() text = self.TextBuffer.get_text( start_iter, end_iter, False).split('\n') logger.debug(text) length = len(text) bottom = length - 1 insert_mark = self.TextBuffer.get_insert() insert_iter = self.TextBuffer.get_iter_at_mark(insert_mark) current_row_index = insert_iter.get_line() for a in range(current_row_index, top, -1): if not are_in_callback(text[a]): top = a + 1 break for b in range(current_row_index, length): if not are_in_callback(text[b]): bottom = b - 1 break return top, bottom @staticmethod def remove_spaces(string): """Remove unnecessary spaces""" return re.sub("\\s\\s+", " ", string) @staticmethod def create_separators_removing_spaces(string): return re.sub("\\s\\s+", "|", string) @staticmethod def extract_cells_as_list(string): "Extrae el texto de una fila de tabla y lo retorna como una lista." string = FixTable.remove_spaces(string) return [item.strip() for item in string.split('|') if item] @staticmethod def extract_table(text, top, bottom): full_table_text = text[top:bottom] # selecciona solamente las lineas que tienen celdas con texto. only_text_lines = [x for x in full_table_text if '|' in x] # extrae las celdas y descarta los separadores innecesarios. return [FixTable.extract_cells_as_list(x) for x in only_text_lines] @staticmethod def extract_words_as_lists(text, top, bottom): "Genera una lista de palabras para crear una lista." lines = text[top:bottom + 1] return [FixTable.create_separators_removing_spaces( line).split('|') for line in lines] def fix_table(self): """ Fix Table, so all columns have the same width (again) `initial_row` is a int idicationg the current row index """ cursor_mark = self.TextBuffer.get_insert() cursor_iter = self.TextBuffer.get_iter_at_mark(cursor_mark) cursor_iter.set_line(cursor_iter.get_line()) end_line = cursor_iter.copy() end_line.forward_to_line_end() line_text = self.TextBuffer.get_text(cursor_iter, end_line, False) if FixTable.are_in_a_table(line_text): # obtiene el indice donde comienza y termina la tabla. r1, r2 = self.get_table_bounds(FixTable.are_in_a_table) logger.debug('asdasd ') # extrae de la tabla solo las celdas de texto buf = self.TextBuffer start_iter = buf.get_start_iter() end_iter = buf.get_end_iter() text = self.TextBuffer.get_text( start_iter, end_iter, False).split('\n') table_as_list = FixTable.extract_table(text, r1, r2) logger.debug(table_as_list) # genera una nueva tabla tipo restructured text y la dibuja en el # buffer. table_content = FixTable.create_table(table_as_list) logger.debug(table_content) # Insert table back into Buffer ... self.TextBuffer.insert(start_iter, table_content, -1) else: logger.debug("Not in a table") print("Not in table") apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/headerbars.py000066400000000000000000000057171506657706400261720ustar00rootroot00000000000000# Copyright (C) 2022, Manuel Genovés # 2019, Wolf Vollprecht # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE """Manage all the headerbars related stuff """ from gettext import gettext as _ import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, GLib, GObject, Gtk from .open_popover import ApostropheOpenPopover from .preview_layout_switcher import PreviewLayoutSwitcher from .settings import Settings from .theme_switcher import ThemeSwitcher @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Headerbar.ui') class BaseHeaderbar(Adw.Bin): __gtype_name__ = "BaseHeaderbar" """Base class for all headerbars """ headerbar = Gtk.Template.Child() menu_button = Gtk.Template.Child() open_menu = Gtk.Template.Child() preview_layout_switcher = Gtk.Template.Child() is_fullscreen = GObject.property(type=bool, default=False) title = GObject.Property(type=str) subtitle = GObject.Property(type=str) def __init__(self, **kwargs): super().__init__(**kwargs) # TODO - move to ui file, check on start self.bind_property("is-fullscreen", self.headerbar, "show-start-title-buttons", 6) self.bind_property("is-fullscreen", self.headerbar, "show-end-title-buttons", 6) popover = self.menu_button.get_popover() popover.add_child(ThemeSwitcher(), "themeswitcher") self.settings = Settings.new() @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/HeaderbarNarrow.ui') class BaseHeaderbarNarrow(Adw.Bin): __gtype_name__ = "BaseHeaderbarNarrow" headerbar = Gtk.Template.Child() menu_button = Gtk.Template.Child() open_menu = Gtk.Template.Child() preview_button = Gtk.Template.Child() is_fullscreen = GObject.property(type=bool, default=False) title = GObject.Property(type=str) subtitle = GObject.Property(type=str) preview_layout = GObject.property(type=int) def __init__(self, **kwargs): super().__init__(**kwargs) # TODO - move to ui file, check on start self.bind_property("is-fullscreen", self.headerbar, "show-start-title-buttons", 6) self.bind_property("is-fullscreen", self.headerbar, "show-end-title-buttons", 6) popover = self.menu_button.get_popover() popover.add_child(ThemeSwitcher(), "themeswitcher") self.settings = Settings.new() apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/helpers.py000066400000000000000000000154041506657706400255260ustar00rootroot00000000000000# Copyright (C) 2022, Manuel Genovés # 2019, Wolf Vollprecht # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE """Helpers for the application.""" import logging import os import shutil from contextlib import contextmanager from gettext import gettext as _ from typing import List import gi import pypandoc from gi.overrides.Pango import Pango gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gio, Gtk, Gdk, Gsk, GLib # pylint: disable=E0611 from apostrophe import config from apostrophe.detailed_error import DetailedError from apostrophe.settings import Settings __apostrophe_data_directory__ = '../data/' App = Gio.Application.get_default @contextmanager def user_action(text_buffer): text_buffer.begin_user_action() yield text_buffer text_buffer.end_user_action() def get_media_path(path): """Return the full path of a given path under the media dir (doesn't start with file:///) """ media_path = "{}{}".format(config.PKGDATA_DIR, path) if not os.path.exists(media_path): media_path = None return media_path class NullHandler(logging.Handler): def emit(self, _record): pass def set_up_logging(level): # add a handler to prevent basicConfig root = logging.getLogger() null_handler = NullHandler() root.addHandler(null_handler) formatter = logging.Formatter( "%(levelname)s:%(name)s: %(funcName)s() '%(message)s'") logger = logging.getLogger('apostrophe') logger_sh = logging.StreamHandler() logger_sh.setFormatter(formatter) logger.addHandler(logger_sh) # Set the logging level to show debug messages. if level == 1: logger.setLevel(logging.DEBUG) logger.debug('logging enabled') def show_error(parent, message): dialog = Adw.AlertDialog.new(_("Error"), message) dialog.add_response("close", _("Close")) dialog.set_close_response("close") dialog.present(parent) def show_detailed_error(parent: Gtk.Window, description:None|str, message:str): dialog = DetailedError(description, message) dialog.present(parent) def exist_executable(command): """return if a command can be executed in the SO Arguments: command {str} -- a command Returns: {bool} -- if the given command exists in the system """ return shutil.which(command) is not None def liststore_from_list(str_list: List[str]): """return a Gtk.ListStore object of Gtk.StringObjects constructed after a list of strings Arguments: str_list {List[str]} -- a list of strings Returns: {Gtk.ListStore} -- a ListStore of Gtk.StringObject """ list_store = Gio.ListStore.new(Gtk.StringObject) for element in str_list: obj = Gtk.StringObject.new(element) list_store.append(obj) return list_store def get_char_width(widget): return Pango.units_to_double( widget.get_pango_context().get_metrics().get_approximate_char_width()) def pandoc_convert(text, fr=None, to="html5", args=[], outputfile=None): if not fr: fr = Settings.new().get_value('input-format').get_string() or "markdown" # args.extend(["--quiet"]) if to=="html5": args.extend(["--wrap=none"]) return pypandoc.convert_text( text, to, fr, extra_args=args, outputfile=outputfile) def get_debug_info(): flatpak = "yes" if os.path.isfile("/.flatpak-info") else "no" os_name = GLib.get_os_info("NAME") os_version = GLib.get_os_info("VERSION") gtk_theme = os.getenv("GTK_THEME") default_display = Gdk.Display.get_default() display = type(default_display).__name__.strip("Gdk").strip("Display") default_surface = Gdk.Surface.new_toplevel(default_display) gsk_renderer = Gsk.Renderer.new_for_surface(default_surface) renderer = type(gsk_renderer).__name__.strip("Renderer") Gsk.Renderer.unrealize(gsk_renderer) info = "" info += f"Apostrophe {config.VERSION}\n" info += "\n" info += f"Flatpak: {flatpak}\n" info += f"GTK: {Gtk.get_major_version()}.{Gtk.get_minor_version()}.{Gtk.get_micro_version()}\n" info += f"GLib: {GLib.glib_version[0]}.{GLib.glib_version[1]}.{GLib.glib_version[2]}\n" info += f"Libadwaita: {Adw.get_major_version()}.{Adw.get_minor_version()}.{Adw.get_micro_version()}\n" info += f"Pandoc: {pypandoc.get_pandoc_version()}\n" info += "\n" info += f"OS: {os_name} {os_version}\n" info += f"Display: {display}\n" info += f"Renderer: {renderer}\n" info += "\n" info += f"gtk-theme-name: {Gtk.Settings.get_default().props.gtk_theme_name}\n" info += f"GTK_THEME: {gtk_theme}\n" info += "\n" settings = Settings.new() schema = settings.props.settings_schema for key in schema.list_keys(): info +=f"{key}: {settings.get_value(key)}\n" return info # https://gitlab.gnome.org/GNOME/pygobject/-/issues/98 def bind_enum(self, key, widget, prop, flags): """ Recreate g_settings_bind_with_mapping from scratch. This method was shamelessly stolen from Robert Park's gottengeography who shamelessly stolen it from John Stowers' gnome-tweak-tool on May 14, 2012. """ self._ignore_key_changed = False def key_changed(settings, key): if self._ignore_key_changed: return self._ignore_prop_changed = True widget.set_property(prop, self.get_enum(key)) self._ignore_prop_changed = False def prop_changed(widget, param): if self._ignore_prop_changed: return self._ignore_key_changed = True self.set_enum(key, widget.get_property(prop)) self._ignore_key_changed = False if not (flags & (Gio.SettingsBindFlags.SET | Gio.SettingsBindFlags.GET)): # ie Gio.SettingsBindFlags.DEFAULT flags |= Gio.SettingsBindFlags.SET | Gio.SettingsBindFlags.GET if flags & Gio.SettingsBindFlags.GET: key_changed(self, key) if not (flags & Gio.SettingsBindFlags.GET_NO_CHANGES): self.connect('changed::' + key, key_changed) if flags & Gio.SettingsBindFlags.SET: widget.connect('notify::' + prop, prop_changed) if not (flags & Gio.SettingsBindFlags.NO_SENSITIVITY): self.bind_writable(key, widget, "sensitive", False)apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/inhibitor.py000066400000000000000000000026551506657706400260570ustar00rootroot00000000000000# Copyright (C) 2022 Manuel Genovés # Copyright (C) 2017 Jason Gray # Copyright (C) 2017 Franz Dietrich # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE from gettext import gettext as _ from apostrophe.helpers import App class Inhibitor: def __init__(self): self.__cookie = 0 def inhibit(self, flags): """ Disable flags @param flags as Gtk.ApplicationInhibitFlags """ if not self.__cookie: self.__cookie = App().inhibit( App().get_active_window(), flags, _("Unsaved documents")) def uninhibit(self): """ Remove all the powermanagement settings """ if self.__cookie: App().uninhibit(self.__cookie) self.__cookie = 0 apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/inline_preview.py000066400000000000000000000422141506657706400271020ustar00rootroot00000000000000# Copyright (C) 2022, Manuel Genovés # 2019, Wolf Vollprecht # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE import os import regex as re import socket import threading from gettext import gettext as _ from urllib.parse import unquote import gi gi.require_version("Gtk", "4.0") gi.require_version('WebKit', '6.0') from gi.repository import Gdk, GObject, GLib, Gtk, WebKit, Adw from apostrophe import latex_to_PNG, markup_regex from apostrophe.settings import Settings class DictAccessor: reEndResponse = re.compile(br"^[2-5][0-58][0-9] .*\r\n$", re.DOTALL + re.MULTILINE) reDefinition = re.compile(br"^151(.*?)^\.", re.DOTALL + re.MULTILINE) def __init__(self, host="dict.dict.org", port=2628, timeout=60): self.socket = socket.create_connection((host, port), timeout) self.socket_file = self.socket.makefile("rb") self.login_response = self._read_response() def _read_response(self): response = b"" while True: line = self.socket_file.readline() response += line if self.reEndResponse.search(response): break return response def run_command(self, cmd): self.socket.sendall(cmd.encode("utf-8") + b"\r\n") return self._read_response() def get_matches(self, database, strategy, word): if database in ["", "all"]: d = "*" else: d = database if strategy in ["", "default"]: s = "." else: s = strategy w = word.replace("\"", r"\\\"") tsplit = self.run_command( "MATCH {} {} \"{}\"".format( d, s, w)).splitlines() mlist = list() if tsplit[-1].startswith(b"250 ok") and tsplit[0].startswith(b"1"): mlines = tsplit[1:-2] for line in mlines: lsplit = line.strip().split() db = lsplit[0] word = unquote(" ".join(lsplit[1:])) mlist.append((db, word)) return mlist def get_definition(self, database, word): if database in ["", "all"]: d = "*" else: d = database w = word.replace("\"", r"\\\"") dsplit = self.run_command( "DEFINE {} \"{}\"".format( d, w)).splitlines(True) dlist = list() if dsplit[-1].startswith(b"250 ok") and dsplit[0].startswith(b"1"): dlines = dsplit[1:-1] dtext = b"".join(dlines) dlist = [dtext] return dlist def close(self): t = self.run_command("QUIT") self.socket.close() return t def parse_wordnet(self, response): # consisting of group (n,v,adj,adv) # number, description, examples, synonyms, antonyms lines = response.splitlines() lines = lines[2:] lines = " ".join(lines) lines = re.sub(r"\s+", " ", lines).strip() lines = re.split(r"( adv | adj | n | v |^adv |^adj |^n |^v )", lines) res = [] act_res = {"defs": [], "class": "none", "num": "None"} for l in lines: l = l.strip() if not l: continue if l in ["adv", "adj", "n", "v"]: if act_res: res.append(act_res.copy()) act_res = {"defs": [], "class": l} else: ll = re.split(r"(?: |^)(\d): ", l) act_def = {} for lll in ll: if lll.strip().isdigit() or not lll.strip(): if "description" in act_def and act_def["description"]: act_res["defs"].append(act_def.copy()) act_def = {"num": lll} continue a = re.findall(r"(\[(syn|ant): (.+?)\] ??)+", lll) for n in a: if n[1] == "syn": act_def["syn"] = re.findall(r"{(.*?)}.*?", n[2]) else: act_def["ant"] = re.findall(r"{(.*?)}.*?", n[2]) tbr = re.search(r"\[.+\]", lll) if tbr: lll = lll[:tbr.start()] lll = lll.split(";") act_def["examples"] = [] act_def["description"] = [] for llll in lll: llll = llll.strip() if llll.strip().startswith("\""): act_def["examples"].append(llll) else: act_def["description"].append(llll) if act_def and "description" in act_def: act_res["defs"].append(act_def.copy()) res.append(act_res.copy()) return res def get_dictionary(term): da = DictAccessor() output = da.get_definition("wn", term) if output: output = output[0] else: return None return da.parse_wordnet(output.decode(encoding="UTF-8")) class FixedWidthContainer(Adw.Bin): __gtype_name__ = "FixedWidthContainer" content_ = None @GObject.Property(type=Gtk.Widget) def content(self): return self.content_ @content.setter def content(self, value): self.set_child(value) self.content_ = value def __init__(self): super().__init__() self.queue_allocate() self.queue_resize() self.set_layout_manager(None) def do_size_allocate(self, width, height, baseline): self.content.allocate(width, height, baseline) def do_measure(self, orientation, for_size): content_horizontal_natural = self.content.measure(Gtk.Orientation.HORIZONTAL, -1).natural if orientation == Gtk.Orientation.HORIZONTAL: min = natural = content_horizontal_natural else: min, natural, _, _ = self.content.measure(orientation, content_horizontal_natural) min_baseline = -1 nat_baseline = -1 return (min, natural, min_baseline, nat_baseline) @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/InlinePreviewPopover.ui') class InlinePreviewPopover(Gtk.Popover): __gtype_name__ = "InlinePreviewPopover" stack = Gtk.Template.Child() spinner = Gtk.Template.Child() empty = Gtk.Template.Child() error = Gtk.Template.Child() is_loaded = GObject.property(type=bool, default=False) preview_ = None @GObject.Property(type=Gtk.Widget) def preview(self): return self.preview_ @preview.setter def preview(self, value): self.remove_preview() self.stack.add_named(value, "view") self.stack.set_visible_child(value) self.preview_ = value self.is_loaded = True def __init__(self): super().__init__() self.connect("closed", self._on_popover_closed) self.stack.set_visible_child(self.empty) def set_loading(self): GLib.timeout_add(15, self.set_spinner, None, 0) def set_spinner(self, *args, **kwargs): if not self.is_loaded: self.stack.set_visible_child(self.spinner) return False def remove_preview(self): if preview:= self.stack.get_child_by_name("view"): self.stack.remove(preview) self.is_loaded = False self.stack.set_visible_child(self.empty) def set_not_found(self): self.is_loaded = True GLib.idle_add(self.stack.set_visible_child, self.error) def _on_popover_closed(self, *args, **kwargs): self.remove_preview() class InlinePreview(GObject.Object): WIDTH = 400 HEIGHT = 300 def __init__(self, text_view): self.settings = Settings.new() self.text_view = text_view self.text_buffer = text_view.get_buffer() self.latex_converter = latex_to_PNG.LatexToPNG() self.characters_per_line = self.settings.get_int("characters-per-line") self.popover = InlinePreviewPopover() self.popover.set_parent(text_view) self.popover.connect("closed", self._on_popover_closed) self.current_match = None self.preview_fns = { markup_regex.MATH: self.get_view_for_math, markup_regex.IMAGE: self.get_view_for_image, markup_regex.LINK: self.get_view_for_link, markup_regex.LINK_ALT: self.get_view_for_link, markup_regex.FOOTNOTE_ID: self.get_view_for_footnote, re.compile(r"(?P\w+)"): self.get_view_for_lexikon } def get_view_for_math(self, match): success, temp_result = self.latex_converter.generatepng(match.group("text")) if success: result = Gdk.Texture.new_from_filename(temp_result.name) temp_result.close() else: result = temp_result if match == self.current_match: GLib.idle_add(self.get_view_for_math_finish, success, result) def get_view_for_math_finish(self, success, result): if success: image = Gtk.Picture() image.set_paintable(result) width, height = result.get_intrinsic_width(), result.get_intrinsic_height() ratio = max(width/self.WIDTH, height/self.HEIGHT, 1) width, height = width/ratio, height/ratio view = Gtk.ScrolledWindow.new() view.set_min_content_width(width) view.set_min_content_height(height) view.set_child(image) else: if result == 2: error = _("LaTeX not found") else: error = _("Formula looks incorrect:") error += "\n\n“{}”".format(result) view = Gtk.Label(label=error) view.add_css_class("formula") self.popover.preview = view return False def get_view_for_image(self, match): path = match.group("url") window = self.text_view.get_root() basepath = window.current.base_path if path.startswith(("https://", "http://", "www.")): self.get_view_for_link(match) return if path.startswith(("file://")): path = path[7:] if not path.startswith(("/", "file://")) and basepath != "/": path = os.path.join(basepath, path) path = unquote(path) if match == self.current_match: try: texture = Gdk.Texture.new_from_filename(path) GLib.idle_add(self.get_view_for_image_finish, texture) except GLib.GError as error: self.popover.set_not_found() def get_view_for_image_finish(self, texture): image = Gtk.Picture() image.set_paintable(texture) width, height = texture.get_intrinsic_width(), texture.get_intrinsic_height() ratio = max(width/self.WIDTH, height/self.HEIGHT, 1) width, height = width/ratio, height/ratio view = Gtk.ScrolledWindow.new() view.set_min_content_width(width) view.set_min_content_height(height) view.set_child(image) self.popover.preview = view return False def get_view_for_link(self, match): if match == self.current_match: GLib.idle_add(self.get_view_for_link_finish, match) def get_view_for_link_finish(self, match): url = match.group("url") web_view = WebKit.WebView(zoom_level=0.3125) # ~1280x960 web_view.set_size_request(self.WIDTH, self.HEIGHT) if GLib.uri_parse_scheme(url) is None: url = "http://{}".format(url) web_view.load_uri(url) self.popover.preview = web_view return False def get_view_for_footnote(self, match): footnote_id = match.group("id") fn_matches = re.finditer( markup_regex.FOOTNOTE, self.text_buffer.get_text( *self.text_buffer.get_bounds(), False )) for fn_match in fn_matches: if fn_match.group("id") == footnote_id: if fn_match: footnote = re.sub("\n[\t ]+", "\n", fn_match.group("text")) else: footnote = _("No matching footnote found") if match == self.current_match: GLib.idle_add(self.get_view_for_footnote_finish, footnote) return False def get_view_for_footnote_finish(self, footnote): label = Gtk.Label(label=footnote) label.set_max_width_chars(self.characters_per_line) label.set_wrap(True) view = FixedWidthContainer() view.add_css_class("footnote") view.content = label self.popover.preview = view return False def get_view_for_lexikon(self, match): term = match.group("text") lexikon_dict = get_dictionary(term) if match == self.current_match: GLib.idle_add(self.get_view_for_lexikon_finish, term, lexikon_dict) def get_view_for_lexikon_finish(self, term, lexikon_dict): if lexikon_dict: grid = Gtk.Grid.new() grid.add_css_class("lexikon") grid.set_row_spacing(2) grid.set_column_spacing(4) i = 0 for entry in lexikon_dict: if not entry["defs"]: continue elif entry["class"].startswith("n"): word_type = _("noun") elif entry["class"].startswith("v"): word_type = _("verb") elif entry["class"].startswith("adj"): word_type = _("adjective") elif entry["class"].startswith("adv"): word_type = _("adverb") else: continue vocab_label = Gtk.Label.new(term + " ~ " + word_type) vocab_label.add_css_class("header") if i == 0: vocab_label.add_css_class("first") vocab_label.set_halign(Gtk.Align.START) vocab_label.set_justify(Gtk.Justification.LEFT) grid.attach(vocab_label, 0, i, 3, 1) for definition in entry["defs"]: i = i + 1 num_label = Gtk.Label.new(definition["num"] + ".") num_label.add_css_class("number") num_label.set_valign(Gtk.Align.START) grid.attach(num_label, 0, i, 1, 1) def_label = Gtk.Label( label=" ".join( definition["description"])) def_label.add_css_class("description") def_label.set_halign(Gtk.Align.START) def_label.set_max_width_chars(self.characters_per_line) def_label.set_wrap(True) def_label.set_justify(Gtk.Justification.FILL) grid.attach(def_label, 1, i, 1, 1) i = i + 1 if i > 0: view = Gtk.ScrolledWindow.new() view.set_max_content_height(self.HEIGHT) view.set_propagate_natural_width(True) view.set_propagate_natural_height(True) fixed_container = FixedWidthContainer() fixed_container.content = grid view.set_child(fixed_container) self.popover.preview = view else: self.popover.set_not_found() return False def open_popover(self, *args, **kwargs): rect = self.text_view.get_iter_location( self.text_buffer.get_iter_at_mark(self.text_buffer.get_insert())) rect.x, rect.y = self.text_view.buffer_to_window_coords( Gtk.TextWindowType.TEXT, rect.x, rect.y) self.popover.set_pointing_to(rect) self.popover.popup() self.popover.set_loading() self.populate_popover() def populate_popover(self, *args, **kwargs): start_iter = self.text_buffer.get_iter_at_mark(self.text_buffer.get_insert()) line_offset = start_iter.get_line_offset() end_iter = start_iter.copy() start_iter.set_line_offset(0) end_iter.forward_to_line_end() text = self.text_buffer.get_text(start_iter, end_iter, False) for regex, get_view_fn in self.preview_fns.items(): matches = re.finditer(regex, text) for match in matches: if match.start() <= line_offset <= match.end(): self.current_match = match threading.Thread(target=get_view_fn, args=(match,)).start() return self.popover.set_not_found() def _on_popover_closed(self, *args, **kwargs): self.current_match = None apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/latex_to_PNG.py000066400000000000000000000106351506657706400264100ustar00rootroot00000000000000# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- """ Based on latex2png.py from Stuart Rackham AUTHOR Written by Stuart Rackham, The code was inspired by Kjell Magne Fauske"s code: http://fauskes.net/nb/htmleqII/ See also: http://www.amk.ca/python/code/mt-math http://code.google.com/p/latexmath2png/ COPYING Copyright (C) 2010 Stuart Rackham. Free use of this software is granted under the terms of the MIT License. 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. """ import os import subprocess import tempfile class LatexToPNG: TEX_HEADER = r"""\documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{bm} \newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix command \newcommand{\vc}[1]{\mathbf{\bm{#1}}} % Vector command \newcommand{\T}{\text{T}} % Transpose \pagestyle{empty} \begin{document}""" TEX_FOOTER = r"""\end{document}""" def __init__(self): self.temp_result = None def latex2png(self, tex, outfile, dpi, modified): """Convert LaTeX input file infile to PNG file named outfile.""" outfile = os.path.abspath(outfile) outdir = os.path.dirname(outfile) texfile = tempfile.mktemp(suffix=".tex", dir=os.path.dirname(outfile)) basefile = os.path.splitext(texfile)[0] dvifile = basefile + ".dvi" temps = [basefile + ext for ext in (".tex", ".dvi", ".aux", ".log")] skip = False tex = "{}\n{}\n{}\n".format(self.TEX_HEADER, tex.strip(), self.TEX_FOOTER) open(texfile, "w").write(tex) saved_pwd = os.getcwd() args = ["latex", "-halt-on-error", "-output-directory=" + outdir, texfile] p = subprocess.Popen(args, stderr=subprocess.STDOUT, stdout=subprocess.PIPE) output = p.stdout output_lines = output.readlines() if os.path.isfile(dvifile): # DVI File exists # Convert DVI file to PNG. args = ["dvipng", "-D", str(dpi), "-T", "tight", "-x", "1000", "-z", "9", "-bg", "Transparent", "-o", outfile, dvifile] p = subprocess.Popen(args) p.communicate() else: self.clean_up(temps) """ Errors in Latex output start with "! " Stripping exclamation marks and superflous newlines and telling the user what they've done wrong. """ i = [] error = "" for line in output_lines: line = line.decode("utf-8") if line.startswith("!"): error += line[2:] # removing "! " if error.endswith("\n"): error = error[:-1] raise Exception(error) self.clean_up(temps) def generatepng(self, formula): try: self.temp_result = tempfile.NamedTemporaryFile(suffix=".png") formula = "$" + formula + "$" self.latex2png(formula, self.temp_result.name, 300, False) return True, self.temp_result except Exception as e: self.temp_result.close() return False, e.args[0] def clean_up(self, files): for f in files: if os.path.isfile(f): os.remove(f) apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/main_window.py000066400000000000000000001055011506657706400263750ustar00rootroot00000000000000# Copyright (C) 2022, Manuel Genovés # 2019, Wolf Vollprecht # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # END LICENSE import logging import os from dataclasses import dataclass from gettext import gettext as _ import chardet import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gdk, Gio, GLib, GObject, Gtk from apostrophe import helpers from apostrophe.editor import Editor from apostrophe.export_dialog import AdvancedExportDialog, ExportDialog from apostrophe.headerbars import BaseHeaderbar from apostrophe.helpers import App, bind_enum from apostrophe.panels import ApostrophePanels from apostrophe.preview_handler import PreviewHandler from apostrophe.preview_security import PreviewSecurity from apostrophe.search_and_replace import ApostropheSearchBar from apostrophe.settings import Settings from apostrophe.stats_handler import StatsHandler from apostrophe.text_view import ApostropheTextView from apostrophe.text_view_format_inserter import FormatInserter from apostrophe.preview_security import PreviewSecurityHandler from apostrophe.pride import apply_seasonal_style from apostrophe.sized_bin import ApostropheSizedBin LOGGER = logging.getLogger('apostrophe') @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Window.ui') class MainWindow(Adw.ApplicationWindow): __gtype_name__ = "ApostropheWindow" editor = Gtk.Template.Child() save_progressbar = Gtk.Template.Child() headerbar_revealer = Gtk.Template.Child() headerbar = Gtk.Template.Child() headerbar_narrow = Gtk.Template.Child() searchbar = Gtk.Template.Child() panels = Gtk.Template.Child() preview_stack = Gtk.Template.Child() security_warning = Gtk.Template.Child() discard_infobar = Gtk.Template.Child() preview_spinner = Gtk.Template.Child() webview_snapshot = Gtk.Template.Child() headerbars_breakpointbin = Gtk.Template.Child() headerbars_breakpoint = Gtk.Template.Child() subtitle = GObject.Property(type=str) is_fullscreen = GObject.Property(type=bool, default=False) preview = GObject.Property(type=bool, default=False) preview_layout = GObject.Property(type=int, default=1) did_change = GObject.Property(type=bool, default=False) current = GObject.Property(type=GObject.Object, default=None) snapshot = GObject.Property(type=Gio.File, default=None) snapshot_restored = GObject.Property(type=bool, default=False) topbars_height = GObject.Property(type=int, default=0) close_anyway = False file_monitor = None def __init__(self, app): """Set up the main window""" super().__init__(application=Gio.Application.get_default(), title="Apostrophe") os.chdir("/") # Preferences self.settings = Settings.new() # Connect signals that we can't connect on the UI file self.connect("notify::is-fullscreen", self._on_fullscreen) # Create new, empty file # TODO: load last opened file? self.current = File() # Setup text editor self.textview = self.editor.textview self.text_changed_handler_id = None self.autosave_timer = None # save metadata for spellchecking language self.textview.spelling_checker.connect("notify::language", self._on_spellchecking_language_changed) # Setup save progressbar an its animator def hide_progressbar(animation, *args): self.save_progressbar.hide() fade_target = Adw.PropertyAnimationTarget.new(self.save_progressbar, "opacity") self.progressbar_fade_out = Adw.TimedAnimation.new(self.save_progressbar, 1, 0, 500, fade_target) self.progressbar_fade_out.set_easing(Adw.Easing.EASE_OUT_CUBIC) self.progressbar_fade_out.connect("done", hide_progressbar) def on_progressbar_value(animation, *args): if animation.get_value() > 0.3 and self.did_change: animation.pause() def fade_out_progressbar(animation, *args): self.progressbar_fade_out.play() fraction_target = Adw.PropertyAnimationTarget.new(self.save_progressbar, "fraction") self.progressbar_animation = Adw.TimedAnimation.new(self.save_progressbar, 0, 1, 300, fraction_target) self.progressbar_animation.connect("notify::value", on_progressbar_value) self.progressbar_animation.connect("done", fade_out_progressbar) # Setup pride progressbar apply_seasonal_style(self.save_progressbar) # Setup preview self.preview_handler = PreviewHandler(self, self.textview, self.panels) # not really necessary but we'll keep a preview_layout property on the window # and bind it both to the switcher and the renderer self.bind_property("preview_layout", self.headerbar.preview_layout_switcher, "preview_layout", GObject.BindingFlags.BIDIRECTIONAL | GObject.BindingFlags.SYNC_CREATE) self.bind_property("preview_layout", self.panels, "layout", GObject.BindingFlags.SYNC_CREATE) self.panels.connect("close-panel-window", self.on_preview_window_close) # preview security handler self.preview_security_handler = PreviewSecurityHandler(self) # Headerbars breakpoint bin minimum size self.headerbars_breakpointbin.set_size_request( self.headerbar_narrow.measure(Gtk.Orientation.HORIZONTAL, -1).minimum, self.headerbar_narrow.measure(Gtk.Orientation.VERTICAL, -1).minimum ) # Search and replace initialization self.searchbar.attach(self.textview) # Hemingway Toast self.hemingway_toast = Adw.Toast.new(_("Text can't be deleted while on Hemingway mode")) self.hemingway_toast.set_timeout(3) self.hemingway_toast.set_action_name("win.show_hemingway_help") self.hemingway_toast.set_button_label(_("Tell me more")) # Actions action = Gio.PropertyAction.new("find", self.searchbar, "search-mode-enabled") self.add_action(action) action = Gio.PropertyAction.new("find_replace", self.searchbar, "replace-mode-enabled") self.add_action(action) action = Gio.PropertyAction.new("focus_mode", self.textview, "focus-mode") self.add_action(action) action = Gio.PropertyAction.new("hemingway_mode", self.textview.buffer, "hemingway-mode") self.add_action(action) self.textview.connect("notify::hemingway-mode", self.show_hemingway_toast) action = Gio.SimpleAction.new("show_hemingway_toast", None) action.connect("activate", self.show_hemingway_toast) self.add_action(action) action = Gio.SimpleAction.new("show_hemingway_help", None) action.connect("activate", self.show_hemingway_help) self.add_action(action) action = Gio.PropertyAction.new("fullscreen", self, "is-fullscreen") self.add_action(action) action = Gio.PropertyAction.new("preview", self, "preview") self.add_action(action) self.connect("notify::preview", self.toggle_preview) # currently unused, we rather open a new window action = Gio.SimpleAction.new("new", None) action.connect("activate", self.new_document) self.add_action(action) action = Gio.SimpleAction.new("open", None) action.connect("activate", self.open_document) self.add_action(action) action = Gio.SimpleAction.new("open_file", GLib.VariantType("s")) action.connect("activate", self.open_from_gvariant) self.add_action(action) action = Gio.SimpleAction.new("save", None) action.connect("activate", self.save_document) self.add_action(action) action = Gio.SimpleAction.new("save_as", None) action.connect("activate", self.save_document_as) self.add_action(action) action = Gio.SimpleAction.new("export", GLib.VariantType("s")) action.connect("activate", self.open_export) self.add_action(action) action = Gio.SimpleAction.new("advanced_export", None) action.connect("activate", self.open_advanced_export) self.add_action(action) action = Gio.SimpleAction.new("copy_html", None) action.connect("activate", self.copy_html_to_clipboard) self.add_action(action) action = Gio.SimpleAction.new("close", None) action.connect("activate", self.do_close_request) self.add_action(action) action = Gio.SimpleAction.new("insert-bold") action.connect_after("activate", FormatInserter().insert_bold, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-italic") action.connect_after("activate", FormatInserter().insert_italic, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-strikethrough",) action.connect_after("activate", FormatInserter().insert_strikethrough, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-header", GLib.VariantType("i")) action.connect_after("activate", FormatInserter().insert_header, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-hrule") action.connect_after("activate", FormatInserter().insert_horizontal_rule, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-listitem") action.connect_after("activate", FormatInserter().insert_list_item, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-checklist-listitem") action.connect_after("activate", FormatInserter().insert_checklist_item, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-ordered-listitem") action.connect_after("activate", FormatInserter().insert_ordered_list_item, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-blockquote") action.connect_after("activate", FormatInserter().insert_blockquote, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-codeblock") action.connect_after("activate", FormatInserter().insert_codeblock, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-link") action.connect_after("activate", FormatInserter().insert_link, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-image") action.connect_after("activate", FormatInserter().insert_image, self.textview) self.add_action(action) action = Gio.SimpleAction.new("insert-table", GLib.VariantType("ai")) action.connect_after("activate", FormatInserter().insert_table, self.textview) self.add_action(action) # update textview's top margin on topbar size changes self.connect("notify::topbars-height", self.update_textview_margin) # Bind gsettings self.settings.bind("window-width", self, "default-width", Gio.SettingsBindFlags.DEFAULT|Gio.SettingsBindFlags.GET_NO_CHANGES) self.settings.bind("window-height", self, "default-height", Gio.SettingsBindFlags.DEFAULT|Gio.SettingsBindFlags.GET_NO_CHANGES) self.settings.bind("is-maximized", self, "maximized", Gio.SettingsBindFlags.DEFAULT|Gio.SettingsBindFlags.GET_NO_CHANGES) self.settings.bind("is-fullscreen", self, "fullscreened", Gio.SettingsBindFlags.DEFAULT|Gio.SettingsBindFlags.GET_NO_CHANGES) bind_enum(self.settings, "preview-mode", self, "preview-layout", Gio.SettingsBindFlags.DEFAULT|Gio.SettingsBindFlags.GET_NO_CHANGES) self.settings.bind("preview-active", self, "preview", Gio.SettingsBindFlags.DEFAULT|Gio.SettingsBindFlags.GET_NO_CHANGES) self.new_document() if self.get_application()._application_id == 'org.gnome.gitlab.somas.Apostrophe.Devel': self.add_css_class('devel') def update_textview_margin(self, *args, **kwargs): self.textview.update_vertical_margin(self.topbars_height) self.textview.queue_resize() def on_text_changed(self, *_args): """called when the text changes, sets the self.did_change to true and updates the title and the counters to reflect that """ if self.did_change is False: self.did_change = True # Autosaving self.autosave_timer = GLib.timeout_add_seconds(self.settings.get_int("autosave-period"), self.autosave_snapshot) if self.snapshot_restored is True: self.snapshot_restored = False self.update_headerbar_title(True, True) if self.settings.get_value("autohide-headerbar"): self.hide_headerbar_bottombar() def _on_fullscreen(self, *args, **kwargs): """Puts the application in fullscreen mode and show/hides the poller for motion in the top border """ if self.is_fullscreen == True: self.fullscreen() self.hide_headerbar_bottombar() else: self.unfullscreen() self.reveal_headerbar_bottombar() self.textview.grab_focus() def on_preview_window_close(self, *args, **kwargs): self.preview = False def toggle_preview(self, *args, **kwargs): """Toggle the preview mode """ if self.preview: self.textview.grab_focus() self.preview_handler.show() else: self.preview_handler.hide() self.textview.grab_focus() @Gtk.Template.Callback() def load_restricted_preview(self, *args): self.current.security_level = PreviewSecurity.RESTRICTED @Gtk.Template.Callback() def load_preview(self, *args): self.current.security_level = PreviewSecurity.UNRESTRICTED def save_document(self, _action=None, _value=None, callback=None): """Try to save buffer in the current gfile. If the file doesn't exist calls save_document_as """ self.reveal_headerbar_bottombar() if self.current.gfile: LOGGER.info("saving") # cancel any file monitor that is active if self.file_monitor: self.file_monitor.cancel() self.discard_infobar.set_revealed(False) # We try to encode the file with the given encoding # if that doesn't work, we try with UTF-8 # if that fails as well, we return False try: try: encoded_text = self.textview.get_text()\ .encode(self.current.encoding) except UnicodeEncodeError: encoded_text = self.textview.get_text()\ .encode("UTF-8") self.current.encoding = "UTF-8" except UnicodeEncodeError as error: helpers.show_error(self, str(error.reason)) LOGGER.warning(str(error.reason)) return else: self.save_progressbar.set_opacity(1) self.save_progressbar.set_visible(True) self.progressbar_animation.play() self.current.gfile.replace_contents_bytes_async( GLib.Bytes.new(encoded_text), etag=None, make_backup=False, flags=Gio.FileCreateFlags.NONE, cancellable=None, callback=self._replace_contents_cb, user_data=callback) if self.snapshot_restored: self.snapshot_restored = False # if there's no GFile we ask for one: else: self.save_document_as(callback=callback) def save_document_as(self, _widget=None, _data=None, callback=None): """provide to the user a filechooser and save the document where they want. Call set_headbar_title after that """ def on_response(dialog, response): if response == Gtk.ResponseType.ACCEPT: file = dialog.get_file() if not file.query_exists(): try: file.create(Gio.FileCreateFlags.NONE) except GLib.GError as error: helpers.show_error(self, str(error.message)) LOGGER.warning(str(error.message)) return self.current.gfile = file self.update_headerbar_title(False, True) dialog.destroy() self.save_document(callback=callback) filefilter = Gtk.FileFilter.new() filefilter.add_mime_type('text/x-markdown') filefilter.add_mime_type('text/plain') filefilter.set_name('Markdown (.md)') self.filechooser = Gtk.FileChooserNative.new( _("Save your File"), self, Gtk.FileChooserAction.SAVE, _("Save"), _("Cancel") ) self.filechooser.add_filter(filefilter) self.filechooser.set_modal(True) self.filechooser.set_transient_for(self) # / is the base path when the current file has not been saved if self.current.base_path != "/": self.filechooser.set_current_folder(Gio.File.new_for_path(self.current.base_path)) title = self.current.title if not title.endswith(".md"): title += ".md" self.filechooser.set_current_name(title) self.filechooser.connect("response", on_response) self.filechooser.show() def _replace_contents_cb(self, gfile, result, callback=None): try: success, _etag = gfile.replace_contents_finish(result) except GLib.GError as error: LOGGER.warning(str(error.message)) self.did_change = True self.progressbar_fade_out.play() self._set_file_monitor() helpers.show_error(self, str(error.message)) return False if success: if self.progressbar_animation.get_state() == Adw.AnimationState.PAUSED: self.progressbar_animation.resume() self.update_headerbar_title() self.did_change = False # We add a 1ms delay to the call to avoid race conditions # see #456 GLib.timeout_add(500, self._set_file_monitor, None, 0) recents_manager = Gtk.RecentManager.get_default() recents_manager.add_item(self.current.gfile.get_uri()) if callback is not None: callback(self) # remove the snapshot as everything is secure on disc. # it'll be recreated if the document changes self.delete_snapshot() else: self.progressbar_fade_out.play() self.did_change = True self._set_file_monitor() return success def copy_html_to_clipboard(self, _widget=None, _date=None): """Copies only html without headers etc. to Clipboard """ output = helpers.pandoc_convert(self.textview.get_text()) clipboard = self.get_clipboard() clipboard.set(output) def open_document(self, _action, _value): """open the desired file """ self.headerbar.open_menu.popdown() def on_response(dialog, response): if response == Gtk.ResponseType.ACCEPT: self.get_application().open([dialog.get_file()], "") markdown_filter = Gtk.FileFilter.new() markdown_filter.add_mime_type('text/markdown') markdown_filter.add_mime_type('text/x-markdown') markdown_filter.add_suffix('md') markdown_filter.set_name(_('Markdown Files')) plaintext_filter = Gtk.FileFilter.new() plaintext_filter.add_mime_type('text/plain') plaintext_filter.set_name(_('Plain Text Files')) self.filechooser = Gtk.FileChooserNative.new( _("Open a .md file"), self, Gtk.FileChooserAction.OPEN, _("Open"), _("Cancel") ) self.filechooser.set_modal(True) self.filechooser.set_transient_for(self) self.filechooser.add_filter(markdown_filter) self.filechooser.add_filter(plaintext_filter) self.filechooser.connect("response", on_response) self.filechooser.show() def open_from_gvariant(self, _action, gvariant): self.headerbar.open_menu.popdown() self.get_application().open([Gio.File.new_for_uri(gvariant.get_string())], "") def load_file(self, file=None): """Open File from command line or open / open recent etc.""" LOGGER.info("trying to open %s", file.get_uri()) self.current.gfile = file self.preview_security_handler.set_file_security_level() if self.text_changed_handler_id: self.textview.get_buffer().disconnect(self.text_changed_handler_id) if spelling_language := file.query_info("metadata::spelling-language", Gio.FileQueryInfoFlags.NONE).get_attribute_string("metadata::spelling-language"): self.textview.spelling_checker.set_language(spelling_language) self.current.gfile.load_contents_async(None, self._load_contents_cb, None) self._set_file_monitor() @Gtk.Template.Callback() def reload_file(self, *args): self.discard_infobar.set_revealed(False) self.load_file(self.current.gfile) def _set_file_monitor(self, *args, **kwargs): if self.current.gfile: self.file_monitor = self.current.gfile.monitor_file(Gio.FileMonitorFlags.NONE, None) self.file_monitor.connect("changed", self._on_file_changed) @Gtk.Template.Callback() def dismiss_discard_infobar(self, dialog, response): if response == Gtk.ResponseType.CLOSE: self.discard_infobar.set_revealed(False) def _on_file_changed(self, file, other_file, event, *args): self.discard_infobar.set_revealed(True) def _on_spellchecking_language_changed(self, *args, **kwargs): if language:= self.textview.spelling_checker.get_language(): if self.current.gfile: self.current.gfile.set_attribute_string("metadata::spelling-language", language, Gio.FileQueryInfoFlags.NONE) def _load_contents_cb(self, gfile, result, snapshot_restored=False): try: _success, contents, _etag = gfile.load_contents_finish(result) except GLib.GError as error: helpers.show_error(self, str(error.message)) LOGGER.warning(str(error.message)) self.new_document() return try: try: self.current.encoding = 'UTF-8' decoded = contents.decode(self.current.encoding) except UnicodeDecodeError as error: self.current.encoding = chardet.detect(contents)['encoding'] if not self.current.encoding: raise error decoded = contents.decode(self.current.encoding) except UnicodeDecodeError as error: helpers.show_error( self, _("Failed to detect encoding for file:\n" "{file}\n\nThe error was:\n{err_msg}") .format(file=gfile.get_path(), err_msg=str(error).encode().decode("unicode-escape"))) LOGGER.warning(str(error)) self.new_document() return else: self.textview.set_text(decoded) self.preview_security_handler.assert_security_risk(decoded) start_iter = self.textview.get_buffer().get_start_iter() GLib.idle_add( lambda: self.textview.get_buffer().place_cursor(start_iter)) # reconnect the text changed handler self.text_changed_handler_id = self.textview.get_buffer().connect('changed', self.on_text_changed) # add file to recents manager once it's fully loaded, # unless it is an internal resource if self.current.gfile and not self.current.gfile.get_uri().startswith("resource:"): recents_manager = Gtk.RecentManager.get_default() recents_manager.add_item(self.current.gfile.get_uri()) self.update_headerbar_title() # when restoring a snapshot we want to preserve the "did_change" state # because we restored a dirty state, but we need to revert the snapshot_restored # back and show again the headerbar if snapshot_restored: self.textview.get_buffer().emit("changed") self.snapshot_restored = True self.reveal_headerbar_bottombar() def check_change(self, callback = None): """Show dialog to prevent loss of unsaved changes """ if self.did_change: dialog = Adw.AlertDialog.new(_("Save Changes?"), _("“%s” contains unsaved changes. " + "If you don’t save, " + "all your changes will be " + "permanently lost.") % self.current.title ) dialog.add_response("cancel", _("Cancel")) dialog.add_response("close", _("Discard")) dialog.add_response("save", _("Save")) dialog.set_response_appearance("close", Adw.ResponseAppearance.DESTRUCTIVE) dialog.set_response_appearance("save", Adw.ResponseAppearance.SUGGESTED) dialog.set_default_response("save") dialog.set_close_response("cancel") def on_response(message_dialog, response): match response: case "cancel": return case "close": callback(self) case "save": # If the saving fails, retry self.save_document(callback=callback) dialog.connect("response", on_response) dialog.present(self) else: if callback is not None: callback(self) def new_document(self, *args, **kwargs): """create new document in the same window """ def callback(self): self.textview.clear() self.text_changed_handler_id = self.textview.get_buffer().connect('changed', self.on_text_changed) self.did_change = False self.current.gfile = None self.preview_security_handler.set_file_security_level(PreviewSecurity.UNRESTRICTED) self.update_headerbar_title(False, False) self.check_change(callback) def reload_preview(self, reshow=False): self.preview_handler.reload(reshow=reshow) def open_export(self, _action, value): """open the export dialog """ text = bytes(self.textview.get_text(), "utf-8") export_format = value.get_string() export_dialog = ExportDialog(self.current, export_format, text) export_dialog.export(self) def open_advanced_export(self, *args, **kwargs): """open the advanced export dialog """ text = bytes(self.textview.get_text(), "utf-8") export_dialog = AdvancedExportDialog(self.current, text) export_dialog.present(self) def show_hemingway_toast(self, *args): if self.textview.buffer.hemingway_mode: # Only show the first three times count = self.settings.get_int("hemingway-toast-count") if count >= 3: return count += 1 self.settings.set_int("hemingway-toast-count", count) self.editor.toast_overlay.add_toast(self.hemingway_toast) def show_hemingway_help(self, *args): hemingway_dialog = Gtk.Builder.new_from_resource("/org/gnome/gitlab/somas/Apostrophe/ui/AboutHemingway.ui")\ .get_object("dialog") hemingway_dialog.present(self) @Gtk.Template.Callback() def reveal_headerbar_bottombar(self, *args): self.editor.reveal_bottombar() if not self.headerbar_revealer.get_reveal_child(): self.headerbar_revealer.set_reveal_child(True) self.remove_css_class("no-headerbar") def hide_headerbar_bottombar(self): if self.headerbars_breakpointbin.get_current_breakpoint() == self.headerbars_breakpoint: return if self.searchbar.search_mode_enabled or\ self.discard_infobar.get_revealed() or\ self.snapshot_restored: return if self.headerbar_revealer.get_reveal_child(): self.headerbar_revealer.set_reveal_child(False) self.add_css_class("no-headerbar") self.editor.hide_bottombar() # TODO: this has to go def update_headerbar_title(self, is_unsaved: bool = False, has_subtitle: bool = True): """update headerbar title and subtitle """ if is_unsaved: prefix = "• " # TODO: this doesn't really belong here App().inhibitor.inhibit(Gtk.ApplicationInhibitFlags.LOGOUT) else: prefix = "" App().inhibitor.uninhibit() title = prefix + self.current.title if has_subtitle: subtitle = self.current.path else: subtitle = "" self.set_title(title) self.subtitle = subtitle self.headerbar.set_tooltip_text(subtitle) def do_close_request(self, *args): LOGGER.info('close request called') if self.close_anyway: self.run_dispose() return False # called if check_change decides we can throw away the contents of the textview def callback(window): window.close_anyway = True window.do_close_request() self.check_change(callback) return True def autosave_snapshot(self): try: try: encoded_text = self.textview.get_text()\ .encode(self.current.encoding) except UnicodeEncodeError: encoded_text = self.textview.get_text()\ .encode("UTF-8") self.current.encoding = "UTF-8" except UnicodeEncodeError as error: LOGGER.warning(str(error.reason)) return if not encoded_text: return else: if not self.snapshot: import uuid snapshot_dir = GLib.build_filenamev([GLib.get_user_state_dir(), "snapshots"]) GLib.mkdir_with_parents(snapshot_dir, 0o750) snapshot_path = GLib.build_filenamev([snapshot_dir, uuid.uuid4().hex]) self.snapshot = Gio.File.new_for_path(snapshot_path) self.snapshot.replace_contents_bytes_async( GLib.Bytes.new(encoded_text), etag=None, make_backup=False, flags=Gio.FileCreateFlags.NONE, cancellable=None, callback=self._autosave_finish) return True def _autosave_finish(self, gfile, result, callback=None): try: success, _etag = gfile.replace_contents_finish(result) except GLib.GError as error: LOGGER.warning(str(error.message)) return if success and self.current.gfile and self.current.gfile.get_path(): self.snapshot.set_attribute_string("metadata::original-path", self.current.gfile.get_path(), Gio.FileQueryInfoFlags.NONE) return success def load_snapshot(self, file): """Load a snapshot file contents while setting apostrophe's gfile to the actual user file.""" LOGGER.info("trying to load snapshot %s", file.get_uri()) self.snapshot = file if gfile_path := file.query_info("metadata::original-path", Gio.FileQueryInfoFlags.NONE).get_attribute_string("metadata::original-path"): self.current.gfile = Gio.File.new_for_path(gfile_path) self.snapshot_restored = True self.textview.get_buffer().disconnect(self.text_changed_handler_id) self.snapshot.load_contents_async(None, self._load_contents_cb, self.snapshot_restored) self._set_file_monitor() def delete_snapshot(self): # delete snapshots in the application in case the deletion outlives the window if self.autosave_timer: GLib.Source.remove(self.autosave_timer) self.autosave_timer = None if self.snapshot: self.get_application().delete_snapshot(self.snapshot) self.snapshot = None def do_dispose(self): self.delete_snapshot() super().do_dispose() #@dataclass class File(GObject.Object): """Class for keeping track of files, their attributes, and their methods""" __gtype_name__ = "ApostropheFile" security_level = GObject.Property(type=int, default=PreviewSecurity.ASK) _gfile = None @GObject.Property(type=GObject.Object, default=None) def gfile(self): return self._gfile @gfile.setter def gfile(self, file): if file: if file.is_native(): self.path = file.get_parent().get_path() self.base_path = file.get_parent().get_path() else: self.path = file.get_parent().get_uri() self.base_path = "/" file_info = file.query_info("standard", Gio.FileQueryInfoFlags.NONE, None) self.title = file_info.get_attribute_as_string( "standard::display-name") else: self.title = _("New File") self.base_path = "/" self.name = self.title if self.name.endswith(".md"): self.name = self.name[:-3] self._gfile = file def __init__(self, gfile=None, encoding="UTF-8"): super().__init__() self._settings = Settings.new() self.gfile = gfile self.encoding = encoding self.path = "" self.base_path = "/" self.title = _("New File") self.name = "" self.security_level = PreviewSecurity.ASK def do_dispose(self): self.gfile = None super().do_dispose() apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/markup_regex.py000066400000000000000000000200201506657706400265430ustar00rootroot00000000000000import regex as re ITALIC_ASTERISK = re.compile( r""" (? # Text content group (?: # either [^\s*\\] # a single character that is not whitespace, _ or backslash | # or [^\s*] # Can't start text with whitespace or * .*? [^\\*] # Can't end text with * or \ ) ) \* # End with * (?!\*) # Can't end with extra * """, flags=re.VERBOSE ) ITALIC_UNDERSCORE = re.compile( r""" (? # Text content group (?: # either [^\s_\\] # a single character that is not whitespace, _ or backslash | # or [^\s_] # Can't start text with whitespace or _ .*? [^\\_] # Can't end text with _ or \ ) ) _ # End with _ (?![\p{L}\p{N}_]) # Can't follow up with alphanumeric character or _ """, flags=re.VERBOSE ) BOLD = re.compile( r""" (? # Text content group (?: # either [^\s_*\\] # a single character that is not whitespace, _, * or backslash | # or [^\s*] # Can't start with whitespace .*? [^\\] # Can't end text with \ ) ) \1 # Delimiter (matches opening) """, flags=re.VERBOSE ) BOLD_ITALIC = re.compile( r""" (? (?: # either [^\s_*\\] # a single character that is not whitespace, _, * or backslash | # or [^\s*] # Can't start with whitespace .*? [^\\] # Can't end text with \ ) ) (?:\5\4|\3\2) """, flags=re.VERBOSE) STRIKETHROUGH = re.compile( r""" (? (?: # either [^\s_*\\] # a single character that is not whitespace, _, * or backslash | # or [^\s*] # Can't start with whitespace .*? [^\s\\] # Can't end text with \ or whitespace ) ) ~~ """, flags=re.VERBOSE) CODE = re.compile( r""" (?`+) (?!`) (?P.+?) # (?.*?)\] # [link text] \( # opening parenthesis (?P.+?) # URL (?:[ ]\"(?P.+)\")? # optional title \) """, flags=re.VERBOSE) LINK_ALT = re.compile( r""" <(?P<text>(?P<url>((https?|ftp):[^'">\s]+)))> """, flags=re.VERBOSE) URL = re.compile( r"[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)", re.I) IMAGE = re.compile( r""" !\[(?P<text>.*?)\] \( (?P<url>.+?) (?:[ ]\"(?P<title>.+)\")? \) """, flags=re.VERBOSE) HORIZONTAL_RULE = re.compile( r""" (?:^|\n{2,})[ ]{0,3} # Maximum 3 spaces at the beginning of the line. (?P<symbols> (-[ ]{0,2}){3,} | # 3 or more hyphens, with 2 spaces maximum between each hyphen. (_[ ]{0,2}){3,} | # Idem, but with underscores. (\*[ ]{0,2}){3,} # Idem, but with asterisks. ) [ \t]* # Optional trailing spaces or tabs. (?:\n{2,}|$) # either two or more newlines, or end of document """, flags=re.VERBOSE) LIST = re.compile( r""" (?:^|\n) # assert start of line or newline (?P<content> (?P<indent>(?:\t|[ ]{2})*) # tab or 4 spaces, any number of times (?P<symbol>(?:[\-*+])) # the bullet can be - * or + [ ](?!\[[xX ]\]) # don't match checklist ([ ]/ [x] / [X]) (?:\t|[ ]{2})* # tab or 4 spaces, any number of times (?P<text> .+ )? # we don't match multiline text, but it's ok ) """, flags=re.VERBOSE) CHECKLIST = re.compile( r""" (?:^|\n) # assert start of line or newline (?P<content> (?P<indent>(?:\t|[ ]{2})*) # tab or 2 spaces, any number of times (?P<symbol>(?:[\-*+])) # the bullet can be - * or + [ ]\[(?P<check>(?:[xX ]))\][ ]# match checklist ([ ]/ [x] / [X]) (?:\t|[ ]{4})* # tab or 4 spaces, any number of times (?P<text> .+ )? # we don't match multiline text, but it's ok ) """, flags=re.VERBOSE) ORDERED_LIST = re.compile( r""" (?:^|\n) # assert start of line or newline (?P<content> (?P<indent>(?>\t|[ ]{2})*) # tab or 4 spaces, any number of times (?P<prefix> (?: (?P<number>\d+) # either a digit, any number of times | [a-z]+ # or a letter, any number of times ) (?P<delimiter>[.)]) # . or ) as delimiter ) [ \t]* # at least a tab or space after the delimiter (?P<text> .+ )? ) """, flags=re.VERBOSE) BLOCK_QUOTE = re.compile( r""" ^[ ]{0,3}(?:>[ ]?)+(?P<text>.+) """, flags=re.VERBOSE|re.MULTILINE) HEADER = re.compile( r""" ^ # start of line (?P<level>\#{1,6})[ ] # between 1 and 6 "#" followed by a space (?P<text>[^\n]+) # any text until a newline """, flags=re.VERBOSE|re.MULTILINE) HEADER_UNDER = re.compile( r""" ^ # start of line (?P<text>.+)[ \t]* # match any text (not including trailing whitespace) \n [=-]+[ \t]* # any number of = or -, followed by optional trailing whitespace (?:\n) # end with newline """, flags=re.VERBOSE|re.MULTILINE) CODE_BLOCK = re.compile( r""" ^[ ]{0,3} (?P<block> ([`~]{3}) # ``` or ~~~ (?P<text>.+?) # any text (?<![ ])[ ]{0,3} # no more than three spaces before the closing \2 # ``` or ~~~ (same as before) ) (?:\s+?$|$) # end with newline or spaces + newline """, flags=re.VERBOSE|re.DOTALL|re.MULTILINE) TABLE = re.compile( r"^[\-+]{5,}\n(?P<text>.+?)\n[\-+]{5,}\n", re.S) MATH = re.compile( r""" ([$]{1,2}) # $ or $$ (?P<text> [^`\\ ]{1,2} # if we have one/two chars, they can't be `,\ or space | [^` ].+?[^`\\ ]) # otherwise, the string can't start with `,space, or end with '',\ or space \1 # $ or $$ (same as before) """, flags=re.VERBOSE|re.DOTALL|re.MULTILINE) FOOTNOTE_ID = re.compile( r""" (?P<text>[^\s]+) # any text without spaces \[\^(?P<id>[^\s]+)\] # [^id_without_spaces] """, flags=re.VERBOSE) FOOTNOTE = re.compile( r""" [ ]{0,3} # trailing spaces \[\^(?P<id>[^\s]+)\]: # [^id_without_spaces] [ ]{0,7} # trailing space (?P<text> (?: [^\n]+ # either text without newlines | \n+(?=(?:\t|[ ]{4})) # or a newline followed by a tab/ 4 spaces )+ # any number of times ) (?:\n+|$) # an extra newline or end of document """, flags=re.VERBOSE|re.MULTILINE) FRONTMATTER = re.compile( r"^(?:---)\n(?P<text>.+?)\n(?:---|\.{3})", re.DOTALL )����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/movable_bin.py������������������0000664�0000000�0000000�00000003444�15066577064�0026342�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2024, Manuel Genovés <manuel.genoves@gmail.com> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gio, GLib, GObject, Graphene, Gsk, Gtk class ApostropheMovableBin(Adw.Bin): __gtype_name__ = "ApostropheMovableBin" offset_x_ = 0 @GObject.Property(type=float, default=0) def offset_x(self): return self.offset_x_ @offset_x.setter def offset_x(self, value): self.offset_x_ = value self.queue_allocate() def __init__(self): super().__init__() self.set_layout_manager(None) def do_size_allocate(self, width, height, baseline): if not self.get_child(): return transform = Gsk.Transform().translate(Graphene.Point().init(-self.offset_x*1, 0)) self.get_child().allocate(width, height, baseline, transform) def do_measure(self, orientation, for_size): if not self.get_child(): return(0, 0, -1, -1) child_size = self.get_child().measure(orientation, for_size) return ( child_size.minimum, child_size.natural, child_size.minimum_baseline, child_size.natural_baseline ) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/open_popover.py�����������������0000664�0000000�0000000�00000007467�15066577064�0026611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # 2021, Christian Hergert <chergert@redhat.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE """Open/recents popover """ from gettext import gettext as _ from os import close import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gio, GLib, GObject, Gtk from .settings import Settings class RecentItem(GObject.Object): def __init__(self, name, path, uri, **kwargs): super().__init__(**kwargs) self.name: str = name self.path: str = path self.uri: str = uri @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Recents.ui') class ApostropheOpenPopover(Gtk.Popover): __gtype_name__ = "ApostropheOpenPopover" """Open/recents popover """ list_box = Gtk.Template.Child() stack = Gtk.Template.Child() empty = Gtk.Template.Child() recent = Gtk.Template.Child() model = Gio.ListStore.new(RecentItem) recents_manager = Gtk.RecentManager.get_default() def __init__(self, **kwargs): super().__init__(**kwargs) self.list_box.bind_model(self.model, self.create_row) self.on_manager_changed() self.recents_manager.connect("changed", self.on_manager_changed) def create_row(self, item, **args): row = Adw.ActionRow.new() row.item = item row.set_title(item.name) row.set_subtitle(item.path) delete_button = Gtk.Button.new_from_icon_name("window-close-symbolic") delete_button.add_css_class("flat") delete_button.add_css_class("circular") delete_button.set_valign(Gtk.Align.CENTER) delete_button.connect("clicked", self.on_delete_click, item) row.add_suffix(delete_button) row.set_activatable(True) row.set_action_name("win.open_file") row.set_action_target_value(GLib.Variant.new_string(item.uri)) return row def on_manager_changed(self, *args, **kwargs): self.model.remove_all() recents_list = filter(lambda item: item.get_mime_type() == 'text/markdown', self.recents_manager.get_items()) for item in recents_list: if item.exists(): name = GLib.markup_escape_text(item.get_display_name()) path = GLib.markup_escape_text(item.get_uri_display()).removesuffix(f'/{name}') self.model.append(RecentItem(name, path, item.get_uri())) else: self.recents_manager.remove_item(item.get_uri()) self.stack.set_visible_child(self.recent if self.model else self.empty) @Gtk.Template.Callback() def on_search_entry_changed_cb(self, search_entry): filtered_list = filter(lambda item: item.get_mime_type() == 'text/markdown' and search_entry.get_text().casefold() in item.get_display_name().casefold(), self.recents_manager.get_items()) self.model.remove_all() for item in filtered_list: self.model.append(RecentItem(GLib.markup_escape_text(item.get_display_name()), GLib.markup_escape_text(item.get_uri_display()), item.get_uri())) def on_delete_click(self, _widget, item): self.recents_manager.remove_item(item.uri) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/panels.py�����������������������0000664�0000000�0000000�00000037643�15066577064�0025357�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import logging from gettext import gettext as _ import gi from apostrophe.preview_layout_switcher import PreviewLayout from apostrophe.preview_window import PreviewWindow gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gio, GLib, GObject, Graphene, Gsk, Gtk LOGGER = logging.getLogger('apostrophe') @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Panels.ui') class ApostrophePanels(Gtk.Widget, Gtk.Orientable): __gtype_name__ = "ApostrophePanels" __gsignals__ = { 'close-panel-window': (GObject.SIGNAL_RUN_LAST, None, ()), } content_ = None panel_ = None layout_ = 0 content_progress_ = 1 panel_progress_ = 0 orientation_ = None panels_collapsed_size = None previous_layout = None revealed_ = None reveal_duration = GObject.Property(type=float, default=250) content_tw = None panel_tw = None content_container = Gtk.Template.Child() panel_container = Gtk.Template.Child() separator = Gtk.Template.Child() panel_window = None panel_window_title = GObject.Property(type=str) @GObject.Property(type=Gtk.Orientation, default=Gtk.Orientation.VERTICAL) def orientation(self): return self.orientation_ @orientation.setter def orientation(self, value): self.orientation_ = value self.queue_allocate() @GObject.Property(type=Gtk.Widget) def content(self): return self.content_ @content.setter def content(self, value): self.content_container.set_child(value) self.content_ = value @GObject.Property(type=Gtk.Widget) def panel(self): return self.panel_ @panel.setter def panel(self, value): self.panel_container.set_child(value) self.panel_ = value @GObject.Property(type=int, default=1) def layout(self): return self.layout_ @layout.setter def layout(self, value): if self.layout == value: return self.layout_ = value # only move stuff around if the panel is revealed if self.revealed: self.relayout() self.previous_layout = self.layout # if layout is 0, we also set self.revealed to false # but we shouldn't get it here so we issue a warning as well if value == PreviewLayout.CLOSED: self.revealed = False LOGGER.warning("That layout shouldn't be set programatically. Try setting revealed to False instead.") @GObject.Property(type=bool, default=False) def revealed(self): return self.revealed_ @revealed.setter def revealed(self, value): if self.revealed == value: return self.revealed_ = value if value == True: self.relayout(PreviewLayout.CLOSED, self.layout) else: self.relayout(self.layout, PreviewLayout.CLOSED) @GObject.Property(type=float, minimum=0, maximum=1) def content_progress(self): return self.content_progress_ @content_progress.setter def content_progress(self, value): self.content_progress_ = value self.queue_resize() self.queue_allocate() @GObject.Property(type=float, minimum=0, maximum=1) def panel_progress(self): return self.panel_progress_ @panel_progress.setter def panel_progress(self, value): self.panel_progress_ = value self.queue_resize() self.queue_allocate() def __init__(self): super().__init__() self.queue_allocate() self.queue_resize() self.previous_layout = self.layout self.content_tw = Adw.TimedAnimation.new(self, 0, 0, 0, Adw.PropertyAnimationTarget.new(self, "content-progress")) self.panel_tw = Adw.TimedAnimation.new(self, 0, 0, 0, Adw.PropertyAnimationTarget.new(self, "panel-progress")) self.panels_collapsed_size = (self.get_size(Gtk.Orientation.HORIZONTAL), self.get_size(Gtk.Orientation.VERTICAL)) def do_size_allocate(self, width, height, baseline): if not self.content_progress + self.panel_progress >= 1: LOGGER.warning("The panel and content progress can't be both less than 1") if self.panel_progress + self.content_progress == 1: self.panels_collapsed_size = (self.get_size(Gtk.Orientation.HORIZONTAL), self.get_size(Gtk.Orientation.VERTICAL)) orientation = self.get_orientation() cross_orientation = Gtk.Orientation.HORIZONTAL if orientation == Gtk.Orientation.VERTICAL else Gtk.Orientation.VERTICAL container_min_along = self.content_container.measure(orientation, -1).minimum separator_along = self.separator.measure(orientation, -1).minimum panel_min_along = self.panel.measure(orientation, -1).minimum panels_along = self.get_size(orientation) panels_across = self.get_size(cross_orientation) needed_along = container_min_along*2 + separator_along if panels_along >= needed_along: if self.content_progress + self.panel_progress == 1: container_along = panels_along panel_along = panels_along - separator_along container_offset = round((1 - self.content_progress) * container_along, 0) panel_offset = round((1 - self.panel_progress) * panel_along, 0) else: container_along = round(panels_along/2 + (1 - self.panel_progress)*panels_along/2, 0) panel_along = round(panels_along/2 + (1 - self.content_progress)*panels_along/2, 0) container_offset = round((1 - self.content_progress) * panels_along/2, 0) panel_offset = round((1 - self.panel_progress) * panels_along/2, 0) else: container_along = container_min_along + round((self.panels_collapsed_size[orientation] - container_min_along) * (2- self.panel_progress- self.content_progress), 0) panel_along = container_min_along + round((self.panels_collapsed_size[orientation] - container_min_along) * (2- self.content_progress- self.panel_progress), 0) container_offset = round(container_along * (1 - self.content_progress), 0) container_offset = round((1 - self.content_progress) * container_along, 0) panel_offset = round((1 - self.panel_progress) * panel_along, 0) # add the separator width to the offset of the panel we're hidding container_offset += separator_along if self.content_progress < 1 else 0 panel_offset += separator_along if self.panel_progress < 1 else 0 if orientation == Gtk.Orientation.HORIZONTAL: if self.get_direction() == Gtk.TextDirection.LTR: content_transform = Gsk.Transform().translate(Graphene.Point().init(-container_offset, 0)) separator_transform = Gsk.Transform().translate(Graphene.Point().init(container_along - container_offset, 0)) panel_transform = Gsk.Transform().translate(Graphene.Point().init(container_along - container_offset + separator_along, 0)) elif self.get_direction() == Gtk.TextDirection.RTL: panel_transform = Gsk.Transform().translate(Graphene.Point().init(-panel_offset, 0)) separator_transform = Gsk.Transform().translate(Graphene.Point().init(panel_along - panel_offset, 0)) content_transform = Gsk.Transform().translate(Graphene.Point().init(panel_along - panel_offset + separator_along, 0)) self.content_container.allocate(container_along, panels_across, -1, content_transform) self.separator.allocate(separator_along, panels_across, -1, separator_transform) self.panel_container.allocate(panel_along, panels_across, -1, panel_transform) else: content_transform = Gsk.Transform().translate(Graphene.Point().init(0, -container_offset)) separator_transform = Gsk.Transform().translate(Graphene.Point().init(0, container_along - container_offset)) panel_transform = Gsk.Transform().translate(Graphene.Point().init(0, container_along - container_offset + separator_along)) self.content_container.allocate(panels_across, container_along, -1, content_transform) self.separator.allocate(panels_across, separator_along, -1, separator_transform) self.panel_container.allocate(panels_across, panel_along, -1, panel_transform) def do_measure(self, orientation, for_size): content = self.content_container.measure(orientation, for_size) panel = self.panel_container.measure(orientation, for_size) separator = self.separator.measure(orientation, for_size) same_orientation = self.get_orientation() == orientation # froze panel's width if we're in a transition to/from a two panel configuration if (self.content_tw.get_state() == Adw.AnimationState.PLAYING or self.panel_tw.get_state() == Adw.AnimationState.PLAYING) and\ self.content_progress+self.panel_progress > 1: return ( round(content.minimum + (self.panels_collapsed_size[self.get_orientation()] - content.minimum)*(2-self.content_progress-self.panel_progress)*same_orientation + content.minimum*(self.panel_progress + self.content_progress - 1)*same_orientation + separator.minimum, 0), round(content.natural + (self.panels_collapsed_size[self.get_orientation()] - content.natural)*(2-self.content_progress-self.panel_progress)*same_orientation + content.natural*(self.panel_progress + self.content_progress - 1)*same_orientation + separator.natural, 0), content.minimum_baseline, content.natural_baseline) else: return ( round(content.minimum + content.minimum*(self.panel_progress + self.content_progress - 1)*same_orientation + separator.minimum*((self.panel_progress + self.content_progress) > 1), 0), round(content.natural + content.natural*(self.panel_progress + self.content_progress - 1)*same_orientation + separator.natural*((self.panel_progress + self.content_progress) > 1), 0), content.minimum_baseline, content.natural_baseline) def do_root(self): Gtk.Widget.do_root(self) if not self.content_container.get_parent(): self.content_container.set_parent(self) if not self.panel_container.get_parent(): self.panel_container.set_parent(self) if not self.separator.get_parent(): self.separator.set_parent(self) def do_unroot(self): self.content_container.unparent() self.panel_container.unparent() self.separator.unparent() Gtk.Widget.do_unroot(self) def do_dispose(self): self.content_container = None self.panel_container = None self.separator = None Gtk.Widget.do_dispose(self) layouts = { PreviewLayout.CLOSED: { 'content': 1, 'panel': 0, 'orientation': Gtk.Orientation.HORIZONTAL, 'detached': False }, PreviewLayout.HALF_WIDTH: { 'content': 1, 'panel': 1, 'orientation': Gtk.Orientation.HORIZONTAL, 'detached': False }, PreviewLayout.FULL_WIDTH: { 'content': 0, 'panel': 1, 'orientation': Gtk.Orientation.HORIZONTAL, 'detached': False }, PreviewLayout.HALF_HEIGHT: { 'content': 1, 'panel': 1, 'orientation': Gtk.Orientation.VERTICAL, 'detached': False }, PreviewLayout.WINDOWED: { 'content': 1, 'panel': 0, 'orientation': Gtk.Orientation.HORIZONTAL, 'detached': True } } def relayout(self, from_layout=None, to_layout=None): # we want to be able to hook any value, for example to # manually relayout when showing and hidding the panel if from_layout is None: from_layout = self.previous_layout if to_layout is None: to_layout = self.layout if self.layouts[from_layout]['detached']: self.reatach_panel() from_layout = PreviewLayout.CLOSED if self.layouts[to_layout]['detached']: self.animate_to_layout(from_layout, PreviewLayout.CLOSED, self.detach_panel) elif self.layouts[from_layout]['orientation'] != self.layouts[to_layout]['orientation']: # move to layout PreviewLayout.CLOSED self.animate_to_layout(from_layout, PreviewLayout.CLOSED, self.change_orientation, to_layout) else: self.animate_to_layout(from_layout, to_layout, None) def change_orientation(self, *args, **kwargs): # we pop to_layout from the cb data if it exists to_layout = args[-1] if isinstance(args[-1], int) else self.layout self.set_orientation(self.layouts[to_layout]['orientation']) self.animate_to_layout(PreviewLayout.CLOSED, to_layout, None) def detach_panel(self, *args, **kwarg): self.panel_window = PreviewWindow() self.panel.unparent() self.panel_window.preview_box.append(self.panel) self.panel_window.show() self.bind_property("panel_window_title", self.panel_window, "title") self.panel_window.connect("close-request", self.on_panel_window_closed) def on_panel_window_closed(self, *args, **kwargs): self.emit("close-panel-window") def reatach_panel(self): self.panel_window.preview_box.remove(self.panel) self.panel.unparent() self.panel.set_parent(self.panel_container) self.panel_window.destroy() self.panel_window = None self.queue_allocate() self.queue_resize() def animate_to_layout(self, from_layout, to_layout, callback = None, cb_data = None): callback_hooked = False if from_layout == to_layout: if callback: callback(cb_data) if self.layouts[from_layout]['content'] != self.layouts[to_layout]['content']: content_target = Adw.PropertyAnimationTarget.new(self, "content-progress") self.content_tw = Adw.TimedAnimation.new(self, self.layouts[from_layout]['content'], self.layouts[to_layout]['content'], self.reveal_duration, content_target) if callback: self.content_tw.connect("done", callback, cb_data) callback_hooked = True self.content_tw.play() if self.layouts[from_layout]['panel'] != self.layouts[to_layout]['panel']: panel_target = Adw.PropertyAnimationTarget.new(self, "panel-progress") self.panel_tw = Adw.TimedAnimation.new(self, self.layouts[from_layout]['panel'], self.layouts[to_layout]['panel'], self.reveal_duration, panel_target) if callback and not callback_hooked: self.panel_tw.connect("done", callback, cb_data) self.panel_tw.play() ���������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/preferences_dialog.py�����������0000664�0000000�0000000�00000013154�15066577064�0027704�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # 2019, Wolf Vollprecht <w.vollprecht@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE """this dialog adjusts values in gsettings """ import webbrowser import gi from apostrophe import helpers gi.require_version('Gtk', '4.0') import logging from gi.repository import Adw, Gio, GObject, Gtk logger = logging.getLogger('apostrophe') from gettext import gettext as _ from apostrophe.preview_security import PreviewSecurity from apostrophe.settings import Settings class InputFormat(GObject.Object): __gtype_name__ = "InputFormat" name = GObject.Property(type=str) format = GObject.Property(type=str) help = GObject.Property(type=str) def __init__(self, name, format, help, **kwargs): super().__init__(**kwargs) self.name: str = name self.format: str = format self.help: str = help class SecurityFormat(GObject.Object): __gtype_name__ = "SecurityFormat" id = GObject.Property(type=int) name = GObject.Property(type=str) def __init__(self, id, name, **kwargs): super().__init__(**kwargs) self.id: int = id self.name: str = name @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/Preferences.ui') class ApostrophePreferencesDialog(Adw.PreferencesDialog): __gtype_name__ = "ApostrophePreferencesDialog" formats = [ { "name": "Pandoc's Markdown", "format": "markdown", "help": "https://pandoc.org/MANUAL.html#pandocs-markdown" }, { "name": "CommonMark", "format": "commonmark", "help": "https://commonmark.org" }, { "name": "GitHub Flavored Markdown", "format": "gfm", "help": "https://help.github.com/en/categories/writing-on-github" }, { "name": "MultiMarkdown", "format": "markdown_mmd", "help": "https://fletcherpenney.net/multimarkdown" }, { "name": "Plain Markdown", "format": "markdown_strict", "help": "https://daringfireball.net/projects/markdown" } ] security_levels = [ { "id": PreviewSecurity.ASK, "name": _("Always Ask") }, { "id": PreviewSecurity.RESTRICTED, "name": _("Always Use Restricted Preview") }, { "id": PreviewSecurity.UNRESTRICTED, "name": _("Always Use Unrestricted Preview") }, ] autohide_headerbar_row = Gtk.Template.Child() spellcheck_row = Gtk.Template.Child() input_format_comborow = Gtk.Template.Child() preview_security_comborow = Gtk.Template.Child() bigger_text_row = Gtk.Template.Child() settings = Settings.new() def __init__(self): super().__init__() input_formats = Gio.ListStore.new(InputFormat) for i, format in enumerate(self.formats): input_formats.append(InputFormat(format["name"], format["format"], format["help"])) if (format["format"] == self.settings.get_string("input-format")): current_format = i self.input_format_comborow.set_model(input_formats) if current_format: self.input_format_comborow.set_selected(current_format) security_levels = Gio.ListStore.new(SecurityFormat) for i, level in enumerate(self.security_levels): security_levels.append(SecurityFormat(level["id"], level["name"])) if (level["id"] == self.settings.get_enum("preview-security")): current_security_level = i self.preview_security_comborow.set_model(security_levels) if current_security_level: self.preview_security_comborow.set_selected(current_security_level) self.settings.bind("autohide-headerbar", self.autohide_headerbar_row, "active", Gio.SettingsBindFlags.DEFAULT) self.settings.bind("spellcheck", self.spellcheck_row, "active", Gio.SettingsBindFlags.DEFAULT) self.settings.bind("bigger-text", self.bigger_text_row, "active", Gio.SettingsBindFlags.DEFAULT) @Gtk.Template.Callback() def on_input_format(self, _widget, _index): fmt = self.input_format_comborow.get_selected_item() self.settings.set_string("input-format", fmt.format) @Gtk.Template.Callback() def on_input_format_help(self, _): fmt = self.input_format_comborow.get_selected_item() webbrowser.open(fmt.help) @Gtk.Template.Callback() def on_security(self, _widget, _index): fmt = self.preview_security_comborow.get_selected_item() self.settings.set_enum("preview-security", fmt.id)��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/preview_converter.py������������0000664�0000000�0000000�00000003761�15066577064�0027637�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from queue import Queue from threading import Thread from gi.repository import GLib from apostrophe import helpers from apostrophe.settings import Settings from apostrophe.theme_switcher import Theme, ThemeSwitcher class PreviewConverter: """Converts markdown to html using a background thread.""" def __init__(self): super().__init__() self.queue = Queue() worker = Thread(target=self.__do_convert, name="preview-converter") worker.daemon = True worker.start() def convert(self, text, secure_preview, base_path, callback, *user_data): """Converts text to html, calling callback when done. The callback argument contains the result.""" self.queue.put((text, secure_preview, base_path, callback, user_data)) def stop(self): """Stops the background worker. PreviewConverter shouldn't be used after this.""" self.queue.put((None, None)) def __do_convert(self): while True: while True: (text, secure_preview, base_path, callback, user_data) = self.queue.get() if text is None and callback is None: return if self.queue.empty(): break if secure_preview: fr = "markdown-raw_html" else: fr = Settings.new().get_value('input-format').get_string() or "markdown" args = ['--metadata=pagetitle:""', '--standalone', '--mathjax', '--css=' + Theme.get_current().web_css, '--metadata=base_path:' + base_path, '--lua-filter=' + helpers.get_media_path('/lua/relative_to_absolute.lua')] if Theme.get_current().name == "dark": args.append ('--highlight-style=breezedark') text = helpers.pandoc_convert(text, fr=fr, to="html5", args=args) GLib.idle_add(callback, text, *user_data) ���������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/preview_handler.py��������������0000664�0000000�0000000�00000022443�15066577064�0027243�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # 2019, Gonçalo Silva # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import logging import os import webbrowser from enum import IntEnum, auto from gettext import gettext as _ import gi from apostrophe.preview_layout_switcher import PreviewLayout from apostrophe.preview_security import PreviewSecurity from apostrophe.settings import Settings gi.require_version('WebKit', '6.0') gi.require_version('Gtk', '4.0') from gi.repository import Gtk, WebKit, GObject from apostrophe import config from apostrophe.preview_converter import PreviewConverter from apostrophe.preview_web_view import PreviewWebView logger = logging.getLogger('apostrophe') class Step(IntEnum): CONVERT_HTML = auto() LOAD_WEBVIEW = auto() RENDER = auto() class PreviewHandler: """Handles showing/hiding the preview, and allows the user to toggle between modes. The rendering itself is handled by `PreviewRendered`. This class handles conversion/loading and connects it all together (including synchronization, ie. text changes, scroll).""" def __init__(self, window, text_view, panels): self.window = window.weak_ref(self.on_main_window_closed) self.text_view = text_view.weak_ref() self.panels = panels.weak_ref() self.web_view = None self.web_view_pending_html = None self.preview_converter = PreviewConverter() self.text_changed_handler_id = None self.settings = Settings.new() self.scroll_handler_id = None self.loading = False self.shown = False self.preview_visible = self.settings.get_boolean("preview-active") self.snapshot = False self.window().connect("notify::title", self.on_window_title_changed) def show(self): self.__show() self.panels().revealed = True def __show(self, html=None, step=Step.CONVERT_HTML, *args): if self.window().current.security_level not in [PreviewSecurity.RESTRICTED, PreviewSecurity.UNRESTRICTED]: return if step == Step.CONVERT_HTML: # First step: convert text to HTML. buf = self.text_view().get_buffer() secure_preview = self.window().current.security_level == PreviewSecurity.RESTRICTED self.preview_converter.convert( buf.get_text(buf.get_start_iter(), buf.get_end_iter(), False), secure_preview, self.window().current.base_path, self.__show, Step.LOAD_WEBVIEW) elif step == Step.LOAD_WEBVIEW: # Second step: load HTML. if not self.web_view: self.web_view = PreviewWebView() self.web_view.get_settings().set_allow_universal_access_from_file_urls(True) self.web_view.get_settings().set_enable_developer_extras(config.PROFILE == '.Devel') # Show preview once the load is finished self.web_view.connect_after("load-changed", self.on_load_changed) self.web_view.connect("rendered", self.on_rendered) # All links will be opened in default browser, but local files are opened in apps. self.web_view.connect("decide-policy", self.on_click_link) self.web_view.connect("context-menu", self.on_right_click) # Bind the windows topbar height to the webview's top margin self.window().connect("notify::topbars-height", self._update_preview_top_margin) # only make a new screenshot if the preview is fully loaded and rendered if self.web_view.get_estimated_load_progress() == 1 and not self.loading: self.web_view.get_snapshot( WebKit.SnapshotRegion.VISIBLE, WebKit.SnapshotOptions.NONE, None, self.update_webview_snapshot) # stop syncing the scroll scale if self.scroll_handler_id: self.scroll_handler_id.unbind() self.scroll_handler_id = None if self.loading: self.web_view_pending_html = html else: self.loading = True self.web_view.load_html(html, "file://localhost/") elif step == Step.RENDER: # Last step: show the preview. This is a one-time step. if not self.text_changed_handler_id: self.text_changed_handler_id = \ self.text_view().get_buffer().connect("changed-debounced", self.__show) if not self.preview_visible: self.preview_visible = True self.__show() def reload(self, *_widget, reshow=False): if self.preview_visible: if reshow: self.hide() self.show() def refresh_preview(self, *args, **kwargs): if self.preview_visible: self.__show() def load_webview(self): if not self.window().preview_stack.get_child_by_name("webview"): self.window().preview_stack.add_named(self.web_view, "webview") self.window().preview_stack.set_visible_child(self.web_view) def hide(self, *args, **kwargs): if self.preview_visible: self.preview_visible = False self.panels().revealed = False if self.text_changed_handler_id: self.text_view().get_buffer().disconnect(self.text_changed_handler_id) self.text_changed_handler_id = None if self.scroll_handler_id: self.scroll_handler_id.unbind() self.scroll_handler_id = None if self.loading: self.loading = False self.panels().revealed = False def update_webview_snapshot(self, web_view, result): try: self.snapshot = web_view.get_snapshot_finish(result) self.window().webview_snapshot.set_paintable(self.snapshot) except Exception as e: logger.debug(e) def on_load_changed(self, web_view, event): if event == WebKit.LoadEvent.STARTED: if self.snapshot: # we need to change the transition to none to not bleed the loading underneath self.window().preview_stack.set_transition_type(Gtk.StackTransitionType.NONE) self.window().preview_stack.set_visible_child(self.window().webview_snapshot) self.window().preview_stack.set_transition_type(Gtk.StackTransitionType.CROSSFADE) self.shown = False elif event == WebKit.LoadEvent.FINISHED: if self.web_view_pending_html: self.__show(html=self.web_view_pending_html, step=Step.LOAD_WEBVIEW) self.web_view_pending_html = None def on_rendered(self, web_view): self.loading = False # sync scroll before showing again the preview if self.settings.get_boolean("sync-scroll") and not self.scroll_handler_id: self.scroll_handler_id = self.text_view().bind_property("scroll-scale", self.web_view, "scroll-scale", GObject.BindingFlags.DEFAULT | GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.BIDIRECTIONAL, ) if not self.shown: self.load_webview() self.shown = True self.__show(step=Step.RENDER) # update top margin self._update_preview_top_margin() def on_window_title_changed(self, *args, **kwargs): self.panels().panel_window_title = self.window().get_title() + " - " + _("Preview") def on_main_window_closed(self, *args): if self.panels().panel_window: self.panels().panel_window.destroy() self.panels().panel_window = None @staticmethod def on_click_link(web_view, decision, _decision_type): if web_view.get_uri().startswith(("http://", "https://", "www.")): webbrowser.open(web_view.get_uri()) decision.ignore() return True @staticmethod def on_right_click(web_view, context_menu, _hit_test): # disable some context menu option for item in context_menu.get_items(): if item.get_stock_action() in [WebKit.ContextMenuAction.RELOAD, WebKit.ContextMenuAction.GO_BACK, WebKit.ContextMenuAction.GO_FORWARD, WebKit.ContextMenuAction.STOP]: context_menu.remove(item) def _get_preview_top_margin(self): if self.panels().layout in [PreviewLayout.HALF_WIDTH, PreviewLayout.FULL_WIDTH]: return self.window().topbars_height else: return 0 def _update_preview_top_margin(self, *args, **kwargs): self.web_view.top_margin = self._get_preview_top_margin()�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/preview_layout_switcher.py������0000664�0000000�0000000�00000010071�15066577064�0031045�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# BEGIN LICENSE # Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # Copyright (C) 2021, Adrien Plazas <kekun.plazas@laposte.net> # Copyright (C) 2021, Alexander Mikhaylenko <exalm7659@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import enum from enum import IntEnum from gettext import gettext as _ import gi from gi.repository import GObject, Gtk from apostrophe.settings import Settings gi.require_version('Gtk', '4.0') class PreviewLayout(IntEnum): # preview modes FULL_WIDTH = 0 HALF_WIDTH = 1 HALF_HEIGHT = 2 WINDOWED = 3 CLOSED = 4 def get_text(self): if self == PreviewLayout.FULL_WIDTH: return _("Full-Width") elif self == PreviewLayout.HALF_WIDTH: return _("Half-Width") elif self == PreviewLayout.HALF_HEIGHT: return _("Half-Height") elif self == PreviewLayout.WINDOWED: return _("Windowed") else: raise ValueError("Unknown preview mode") def get_icon(self): if self == PreviewLayout.FULL_WIDTH: return "preview-layout-full-width-symbolic" elif self == PreviewLayout.HALF_WIDTH: return "preview-layout-half-width-symbolic" elif self == PreviewLayout.HALF_HEIGHT: return "preview-layout-half-height-symbolic" elif self == PreviewLayout.WINDOWED: return "preview-layout-windowed-symbolic" else: raise ValueError("Unknown preview mode") @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/PreviewLayoutSwitcherItem.ui') class PreviewLayoutSwitcherItem(Gtk.ListBoxRow): __gtype_name__ = "PreviewLayoutSwitcherItem" icon = Gtk.Template.Child() title = Gtk.Template.Child() checkmark = Gtk.Template.Child() selected = GObject.property(type=bool, default=False) def __init__(self, _layout): super().__init__() self.layout = _layout self.icon.set_from_icon_name(self.layout.get_icon()) self.title.set_label(self.layout.get_text()) self.connect("notify::selected", self.on_selected) def on_selected(self, *args, **kwargs): self.checkmark.props.opacity = 1 if self.selected else 0 @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/PreviewLayoutSwitcher.ui') class PreviewLayoutSwitcher(Gtk.Box): __gtype_name__ = "PreviewLayoutSwitcher" list_box = Gtk.Template.Child() layout_image = Gtk.Template.Child() layout_popover = Gtk.Template.Child() preview_switcher_toggle = Gtk.Template.Child() items = [] preview_layout = GObject.property(type=int) settings = Settings.new() def __init__(self): super().__init__() for layout in [PreviewLayout.HALF_WIDTH, PreviewLayout.FULL_WIDTH, PreviewLayout.HALF_HEIGHT, PreviewLayout.WINDOWED]: item = PreviewLayoutSwitcherItem(layout) self.list_box.append(item) self.items.append(item) self.update_ui() self.connect("notify::preview-layout", self.update_ui) @Gtk.Template.Callback() def update_ui(self, *args, **kwargs): self.layout_image.set_from_icon_name(PreviewLayout(self.preview_layout).get_icon()) for item in self.items: item.selected = item.layout == self.preview_layout item = self.items[self.preview_layout] self.list_box.select_row(item) @Gtk.Template.Callback() def on_row_activated(self, _listbox, row): self.preview_layout = row.layout self.layout_popover.popdown() �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/preview_security.py�������������0000664�0000000�0000000�00000006525�15066577064�0027500�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import regex as re from enum import IntEnum from apostrophe.settings import Settings class PreviewSecurity(IntEnum): ASK = 0 RESTRICTED = 1 UNRESTRICTED = 2 UNDETERMINED = 3 class PreviewSecurityHandler: def __init__(self, window): self.settings = Settings.new() self.window = window self.window.current.connect("notify::security-level", self.on_file_security_level_changed) def set_file_security_level(self, level=None): if level: self.window.current.security_level = level else: if self.settings.get_enum("preview-security") == PreviewSecurity.ASK: self.window.current.security_level = PreviewSecurity.UNDETERMINED else: self.window.current.security_level = self.settings.get_enum("preview-security") def on_file_security_level_changed(self, *args, **kwargs): match self.window.current.security_level: case PreviewSecurity.ASK: self.window.preview_stack.set_visible_child(self.window.security_warning) case PreviewSecurity.RESTRICTED: self.window.preview_stack.set_visible_child(self.window.preview_spinner) self.window.preview_handler.refresh_preview() pass case PreviewSecurity.UNRESTRICTED: self.window.preview_stack.set_visible_child(self.window.preview_spinner) self.window.preview_handler.refresh_preview() pass case PreviewSecurity.UNDETERMINED: self.window.preview_stack.set_visible_child(self.window.preview_spinner) def assert_security_risk(self, text): if self.settings.get_enum("preview-security") != PreviewSecurity.ASK: return tags = [ "<!DOCTYPE", "<a", "<abbr", "<acronym", "<address", "<applet", "<area", "<article", "<aside", "<audio", "<b", "<base", "<basefont", "<bdi", "<bdo", "<big", "<blockquote", "<body", "<br", "<button", "<canvas", "<caption", "<center", "<cite", "<code", "<col", "<colgroup", "<data", "<datalist", "<dd", "<del", "<details", "<dfn", "<dialog", "<dir", "<div", "<dl", "<dt", "<em", "<embed", "<fieldset", "<figcaption", "<figure", "<font", "<footer", "<form", "<frame", "<frameset", "<h[1-6]", "<head", "<header", "<hgroup", "<hr", "<html", "<i", "<iframe", "<img", "<input", "<ins", "<kbd", "<label", "<legend", "<li", "<link", "<main", "<map", "<mark", "<menu", "<meta", "<meter", "<nav", "<noframes", "<noscript", "<object", "<ol", "<optgroup", "<option", "<output", "<p", "<param", "<picture", "<pre", "<progress", "<q", "<rp", "<rt", "<ruby", "<s", "<samp", "<script", "<search", "<section", "<select", "<small", "<source", "<span", "<strike", "<strong", "<style", "<sub", "<summary", "<sup", "<svg", "<table", "<tbody", "<td", "<template", "<textarea", "<tfoot", "<th", "<thead", "<time", "<title", "<tr", "<track", "<tt", "<u", "<ul", "<var", "<video", "<wbr", ] tags_re = re.compile("|".join(tags), re.I) result = re.search(tags_re, text) if result: self.window.current.security_level = PreviewSecurity.ASK else: self.window.current.security_level = PreviewSecurity.RESTRICTED ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/preview_web_view.py�������������0000664�0000000�0000000�00000010144�15066577064�0027430�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # 2019, Gonçalo Silva # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import math import webbrowser from pathlib import Path import gi from .helpers import get_media_path gi.require_version('WebKit', '6.0') from gi.repository import GObject, WebKit class PreviewWebView(WebKit.WebView): """A WebView that provides read/write access to scroll. It does so using JavaScript, by continuously monitoring it while loaded. The alternative is using a WebExtension and C-bindings (see reference), but that is more complicated implementation-wise, as well as build-wise until we start building with Meson. Reference: https://github.com/aperezdc/webkit2gtk-python-webextension-example """ __gsignals__ = { "rendered": (GObject.SIGNAL_RUN_LAST, None, ()), } scroll_scale_ = 0 top_margin_ = 0 @GObject.Property(type=float) def scroll_scale(self): return self.scroll_scale_ @scroll_scale.setter def scroll_scale(self, value): if not math.isclose(value, self.scroll_scale_, rel_tol=1e-5): self.scroll_scale_ = value self.evaluate_javascript(f"observer.setScrollScale({value})", -1, None, None, None, None) self.notify("scroll_scale") @GObject.Property(type=float) def top_margin(self): return self.top_margin_ @top_margin.setter def top_margin(self, value): if value != self.top_margin_: self.top_margin_ = value # sync the default 34px height with textview's self.evaluate_javascript( """ (function() { let scale = observer.getScroll; document.documentElement.style.setProperty("--topbars-height", "%spx"); observer.setScrollScale(scale); })(); """ % (34 + value), -1, None, None, None, None ) self.notify("top_margin") def __init__(self): super().__init__() self.connect("decide-policy", self.on_decide_policy) self.scroll_scale = 0 script = WebKit.UserScript.new( Path(get_media_path("/media/js/scroll.js")).read_text(), WebKit.UserContentInjectedFrames.TOP_FRAME, WebKit.UserScriptInjectionTime.START, None, None ) self.content_manager = self.get_user_content_manager() self.content_manager.add_script(script) self.content_manager.connect("script-message-received::scrollChanged", self.on_webview_scroll) self.content_manager.connect("script-message-received::rendered", self.on_rendered) self.content_manager.register_script_message_handler("scrollChanged", None) self.content_manager.register_script_message_handler("rendered", None) def on_webview_scroll(self, content_manager, value): if value.is_number(): if not math.isclose(value.to_double(), self.scroll_scale_, rel_tol=1e-4): self.scroll_scale_ = value.to_double() self.notify("scroll_scale") def on_decide_policy(self, _web_view, decision, decision_type): if decision_type == WebKit.PolicyDecisionType.NAVIGATION_ACTION and \ decision.get_navigation_action().is_user_gesture(): webbrowser.open(decision.get_navigation_action().get_request().get_uri()) decision.ignore() # Do not follow the link in the WebView return True return False def on_rendered(self, *args, **kwargs): self.emit("rendered") ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/preview_window.py���������������0000664�0000000�0000000�00000002200�15066577064�0027122�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2024, Manuel Genovés <manuel.genoves@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gio, Gtk from gettext import gettext as _ @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/PreviewWindow.ui') class PreviewWindow(Adw.ApplicationWindow): __gtype_name__ = "ApostrophePreviewWindow" preview_box = Gtk.Template.Child() def __init__(self): super().__init__(application=Gio.Application.get_default(), title=_("Preview")) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/pride.py������������������������0000664�0000000�0000000�00000007700�15066577064�0025167�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2024, Manuel Genovés <manuel.genoves@gmail.com> # Fina Wilke <code@felinira.net> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE # Code adapted from Warp: <https://gitlab.gnome.org/World/warp/> from enum import Enum from datetime import datetime class Season(Enum): INTERSEX = "intersex" LESBIAN = "lesbian" AIDS = "aids" AUTISM = "autism" PAN = "pan" TRANS = "trans" ARO = "aro" ACE = "ace" BI = "bi" NON_BINARY = "non-binary" PRIDE = "pride" DISABILITY = "disability" BLACK_HISTORY = "black-history" def __str__(self): return self.value @classmethod def all(cls): return list(cls) def is_season(self, date): match self: case Season.INTERSEX: return (date.month == 10 and date.day == 26) or (date.month == 11 and date.day == 8) case Season.LESBIAN: return (date.month == 10 and date.day == 8) or \ (date.month == 4 and date.day >= 26) or \ (date.month == 5 and date.day <= 2) case Season.AIDS: return date.month == 12 and date.day == 1 case Season.AUTISM: return date.month == 6 and date.day == 18 case Season.PAN: return date.month == 5 and date.day == 24 case Season.TRANS: return (date.month == 11 and 13 <= date.day <= 19) or \ (date.month == 11 and date.day == 20) or \ (date.month == 3 and date.day == 31) case Season.ARO: february_14 = datetime(date.year, 2, 14) weekday_offset = february_14.weekday() start = 14 + 7 - weekday_offset end = start + 6 return date.month == 2 and start <= date.day <= end case Season.ACE: last_day_october = datetime(date.year, 10, 31) weekday_offset_last_day_october = last_day_october.weekday() start = 31 - 7 if weekday_offset_last_day_october == 6 else 31 - weekday_offset_last_day_october - 7 end = start + 6 return date.month == 10 and start <= date.day <= end case Season.BI: return date.month == 9 and 16 <= date.day <= 23 case Season.NON_BINARY: july_14 = datetime(date.year, 7, 14) weekday_july_14_offset = july_14.weekday() start = 14 - weekday_july_14_offset end = start + 7 return date.month == 7 and start <= date.day <= end case Season.PRIDE: return date.month == 6 case Season.DISABILITY: return date.month == 7 case Season.BLACK_HISTORY: return date.month in [2, 10] @classmethod def for_date(cls, date): return next((season for season in cls.all() if season.is_season(date)), None) @classmethod def current(cls): return cls.for_date(datetime.now()) def css_class(season): return f"flag-{season}" def apply_seasonal_style(widget): for season in Season.all(): widget.remove_css_class(css_class(season)) current_season = Season.current() if current_season: print(f"Adding pride CSS class {css_class(current_season)}") widget.add_css_class(css_class(current_season)) ����������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/search_and_replace.py�����������0000664�0000000�0000000�00000014540�15066577064�0027646�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2024, Manuel Genovés <manuel.genoves@gmail.com> # 2019, Wolf Vollprecht <w.vollprecht@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import logging import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, GObject, Gtk, GtkSource LOGGER = logging.getLogger('apostrophe') @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/SearchBar.ui') class ApostropheSearchBar(Adw.Bin): """ Adds (regex) search and replace functionality to apostrophe """ __gtype_name__ = "ApostropheSearchBar" replace_mode_enabled = GObject.property(type=bool, default=False) search_mode_enabled = GObject.property(type=bool, default=False) searchbar = Gtk.Template.Child() search_entry = Gtk.Template.Child() regex = Gtk.Template.Child() case_sensitive = Gtk.Template.Child() replace_entry = Gtk.Template.Child() @GObject.Property(type=bool, default=False) def can_move(self): return self.search_context.get_occurrences_count() > 0 @GObject.Property(type=bool, default=False) def can_replace(self): if self.textbuffer.get_has_selection(): start, end = self.textbuffer.get_selection_bounds() return self.can_move and self.textbuffer.get_has_selection() and self.search_context.get_occurrence_position(start, end) > 0 else: return False @GObject.Property(type=bool, default=False) def can_replace_all(self): return self.can_move def __init__(self): self.textbuffer = None self.search_settings = None self.search_context = None self.connect("notify::search-mode-enabled", self.search_enabled) self.connect("notify::replace-mode-enabled", self.replace_enabled) def attach(self, textview): self.textview = textview self.textbuffer = self.textview.get_buffer() self.search_settings = GtkSource.SearchSettings.new() self.search_context = GtkSource.SearchContext.new(self.textbuffer, self.search_settings) self.highlight = self.textbuffer.create_tag('search_highlight', background="yellow") self.search_context.connect("notify::occurrences-count", self._on_notify_occurrences_count) self.search_settings.set_wrap_around(True) self.regex.bind_property("active", self.search_settings, "regex-enabled") self.case_sensitive.bind_property("active", self.search_settings, "case-sensitive") def search_enabled(self, *args, **kwargs): if self.searchbar.get_search_mode(): self.textbuffer = self.textview.get_buffer() if self.textbuffer.get_has_selection(): self.search_entry.set_text(self.textbuffer.get_slice(*self.textbuffer.get_selection_bounds(), False)) self.search_entry.grab_focus() self.search_entry.select_region(0, -1) self.search_context.set_highlight(True) else: self.replace_mode_enabled = False self.textview.grab_focus() self.search_context.set_highlight(False) def replace_enabled(self, _widget, _data): if self.replace_mode_enabled and not self.search_mode_enabled: self.search_mode_enabled = True @Gtk.Template.Callback() def search_entry_changed(self, _widget=None, _data=None, scroll=True): self.search_settings.set_search_text(self.search_entry.get_text()) def select_search_occurrence(self, start, end): self.textbuffer.select_range(start, end) insert = self.textbuffer.get_insert() self.textview.scroller.smooth_scroll_to_mark(insert, center=True) def forward_search_finished(self, search_context, result): match_found, match_start, match_end, has_wrapped = search_context.forward_finish(result) if match_found: self.select_search_occurrence(match_start, match_end) self.notify("can_replace") @Gtk.Template.Callback() def forward_search(self, _widget, _data=None): if self.textbuffer.get_has_selection(): _, start_at = self.textbuffer.get_selection_bounds() else: start_at = self.textbuffer.get_iter_at_mark(self.textbuffer.get_insert()) self.search_context.forward_async(start_at, None, self.forward_search_finished) def backward_search_finished(self, search_context, result): match_found, match_start, match_end, has_wrapped = search_context.backward_finish(result) if match_found: self.select_search_occurrence(match_start, match_end) self.notify("can_replace") @Gtk.Template.Callback() def backward_search(self, _widget, _data=None): if self.textbuffer.get_has_selection(): start_at, _ = self.textbuffer.get_selection_bounds() else: start_at = self.textbuffer.get_iter_at_mark(self.textbuffer.get_insert()) self.search_context.backward_async(start_at, None, self.backward_search_finished) @Gtk.Template.Callback() def hide(self, *arg, **kwargs): self.search_mode_enabled = False @Gtk.Template.Callback() def replace_clicked(self, _widget, _data=None): match_start, match_end = self.textbuffer.get_selection_bounds() self.search_context.replace(match_start, match_end, self.replace_entry.get_text(), -1) iter = self.textbuffer.get_iter_at_mark(self.textbuffer.get_insert()) self.search_context.forward_async(iter, None, self.forward_search_finished) @Gtk.Template.Callback() def replace_all(self, _widget=None, _data=None): self.search_context.replace_all(self.replace_entry.get_text(), -1) def _on_notify_occurrences_count(self, *args, **kwargs): self.notify("can_move") self.notify("can_replace") self.notify("can_replace_all")����������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/settings.py���������������������0000664�0000000�0000000�00000002251�15066577064�0025720�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # 2019, Wolf Vollprecht <w.vollprecht@gmail.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE from gi.repository import Gio class Settings(Gio.Settings): """ Apostrophe Settings """ def __init__(self): """ Init Settings """ Gio.Settings.__init__(self) @classmethod def new(cls): """ Return a new Settings object """ settings = Gio.Settings.new("org.gnome.gitlab.somas.Apostrophe") settings.__class__ = Settings return settings �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/sized_bin.py��������������������0000664�0000000�0000000�00000003043�15066577064�0026026�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2024, Manuel Genovés <manuel.genoves@gmail.com> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, GObject, Graphene, Gsk, Gtk class ApostropheSizedBin(Adw.Bin): ''' A container that exposes its size as properties ''' __gtype_name__ = "ApostropheSizedBin" width = GObject.Property(type=int) height = GObject.Property(type=int) def __init__(self): super().__init__() self.set_layout_manager(None) self.queue_allocate() self.queue_resize() def do_size_allocate(self, width, height, baseline): if not self.get_child(): return self.width = width self.height = height self.get_child().allocate(width, height, baseline, None) def do_measure(self, orientation, for_size): if not self.get_child(): return (0, 0, -1, -1) return self.get_child().measure(orientation, for_size) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/stats_counter.py����������������0000664�0000000�0000000�00000010771�15066577064�0026763�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import regex as re from multiprocessing import Process, Pipe from gi.repository import GLib from apostrophe.markup_regex import ITALIC_ASTERISK, ITALIC_UNDERSCORE,\ BOLD_ITALIC, BOLD, STRIKETHROUGH, IMAGE, LINK, LINK_ALT, HORIZONTAL_RULE,\ LIST, MATH, TABLE, CODE_BLOCK, HEADER_UNDER, HEADER, BLOCK_QUOTE,\ ORDERED_LIST, FOOTNOTE_ID, FOOTNOTE class StatsCounter: """Counts characters, words, sentences and read time using a worker process.""" # Regexp that matches any character, # except for newlines and subsequent spaces. CHARACTERS = re.compile(r"[^\s]|(?:[^\S\n](?!\s))") # Regexp that matches Asian letters, general symbols and hieroglyphs, # as well as sequences of word characters optionally containing non-word # characters in-between. WORDS = re.compile(r"[\u3040-\uffff]|(?:\w+\S?\w*)+", re.UNICODE) # Regexp that matches sentence-ending punctuation characters, ie. # full stop, question mark, exclamation mark, paragraph, and variants. SENTENCES = re.compile(r"[^\n][.。।෴۔።?՞;⸮؟?፧꘏⳺⳻⁇﹖⁈⁉‽!﹗!՜߹႟᥄\n]+") # Regexp that matches paragraphs, ie. # anything separated by at least 2 newlines. PARAGRAPHS = re.compile(r"(?:[^\n]+\n?)+(?=\n{2,}|\Z)") # List of regexp whose matches should be replaced by their "text" group. # Order is important. MARKUP_REGEXP_REPLACE = ( BOLD_ITALIC, ITALIC_ASTERISK, ITALIC_UNDERSCORE, BOLD, STRIKETHROUGH, IMAGE, LINK, LINK_ALT, LIST, ORDERED_LIST, BLOCK_QUOTE, HEADER, HEADER_UNDER, CODE_BLOCK, TABLE, MATH, FOOTNOTE_ID, FOOTNOTE ) # List of regexp whose matches should be removed. Order is important. MARKUP_REGEXP_REMOVE = ( HORIZONTAL_RULE, ) def __init__(self, callback): super().__init__() # Worker process to handle counting. self.counting = False self.count_pending_text = None self.parent_conn, child_conn = Pipe() Process(target=self.do_count, args=(child_conn,), daemon=True).start() GLib.io_add_watch( self.parent_conn.fileno(), GLib.PRIORITY_LOW, GLib.IO_IN, self.on_counted, callback) def count(self, text): """Count stats for text. In case counting is already running, it will re-count once it finishes. This ensure that the pipe doesn't fill (and block) if multiple requests are made in quick succession.""" if not self.counting: self.counting = True self.count_pending_text = None self.parent_conn.send(text) else: self.count_pending_text = text def do_count(self, child_conn): """Counts stats in a worker process. The result is in the format (characters, words, sentences, (hours, minutes, seconds))""" while True: while True: try: text = child_conn.recv() if not child_conn.poll(): break except EOFError: child_conn.close() return for regexp in self.MARKUP_REGEXP_REPLACE: text = re.sub(regexp, r"\g<text>", text) for regexp in self.MARKUP_REGEXP_REMOVE: text = re.sub(regexp, "", text) character_count = len(re.findall(self.CHARACTERS, text)) word_count = len(re.findall(self.WORDS, text)) sentence_count = len(re.findall(self.SENTENCES, text)) paragraph_count = len(re.findall(self.PARAGRAPHS, text)) read_m, read_s = divmod(word_count / 200 * 60, 60) read_h, read_m = divmod(read_m, 60) read_time = (int(read_h), int(read_m), int(read_s)) child_conn.send( (character_count, word_count, sentence_count, paragraph_count, read_time)) def on_counted(self, _source, _condition, callback): """Reads the counting result from the pipe and triggers any pending count.""" self.counting = False if self.count_pending_text is not None: # self.count clears the pending text. self.count(self.count_pending_text) try: if self.parent_conn.poll(): callback(self.parent_conn.recv()) return True except EOFError: return False def stop(self): """Stops the worker process. StatsCounter shouldn't be used after this.""" self.parent_conn.close() �������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/stats_handler.py����������������0000664�0000000�0000000�00000015172�15066577064�0026721�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������from gettext import gettext as _ from gettext import ngettext from gi.repository import Gio, GLib, Gtk from apostrophe.settings import Settings from apostrophe.stats_counter import StatsCounter class StatsHandler: """Shows a default statistic on the stats button, and allows the user to toggle which one.""" # Must match the order/index defined in gschema.xml CHARACTERS = 0 WORDS = 1 SENTENCES = 2 PARAGRAPHS = 3 READ_TIME = 4 def __init__(self, stats_button, stats_button_short, text_view): super().__init__() self.stats_button = stats_button self.stats_button_short = stats_button_short self.stats_button.connect("destroy", self.on_destroy) self.text_view = text_view self.text_view.get_buffer().connect("changed", self.on_text_changed) # we don't have a better way to check when a selection changes size # so we listen to the cursor position and then check if there's a selection self.text_view.get_buffer().connect("notify::cursor-position", self.on_text_selected) self.characters = 0 self.words = 0 self.sentences = 0 self.paragraphs = 0 self.read_time = (0, 0, 0) self.selected_characters = 0 self.selected_words = 0 self.selected_sentences = 0 self.selected_paragraphs = 0 self.selected_read_time = (0, 0, 0) self.settings = Settings.new() self.stats_counter = StatsCounter(self.update_stats) self.selected_stats_counter = StatsCounter(self.update_selection_stats) self.popover = Gtk.PopoverMenu.new_from_model(Gio.Menu()) self.popover.set_halign(Gtk.Align.END) self.popover.set_margin_end(6) self.popover.set_margin_bottom(6) self.popover.set_has_arrow(False) self.stats_button.set_popover(self.popover) self.popover.connect('closed', self.on_popover_closed) self.stats_button.set_direction(Gtk.ArrowType.UP) self.stats_button.set_create_popup_func(self.on_stats_button_clicked) self.popover_short = Gtk.PopoverMenu.new_from_model(Gio.Menu()) self.popover_short.set_halign(Gtk.Align.END) self.popover_short.set_margin_end(6) self.popover_short.set_margin_bottom(6) self.popover_short.set_has_arrow(False) self.stats_button_short.set_popover(self.popover_short) self.popover.connect('closed', self.on_popover_closed) self.stats_button_short.set_direction(Gtk.ArrowType.UP) self.stats_button_short.set_create_popup_func(self.on_stats_button_short_clicked) self.update_default_stat() def on_stats_button_clicked(self, *args, **kwargs): menu = Gio.Menu() stats = self.settings.props.settings_schema.get_key( "stat-default").get_range()[1] for i, stat in enumerate(stats): menu_item = Gio.MenuItem.new(self.get_text_for_stat(i), None) menu_item.set_action_and_target_value( "app.stat_default", GLib.Variant.new_string(stat)) menu.append_item(menu_item) self.popover.set_menu_model(menu) def on_stats_button_short_clicked(self, *args, **kwargs): menu = Gio.Menu() stats = self.settings.props.settings_schema.get_key( "stat-default").get_range()[1] for i, stat in enumerate(stats): menu_item = Gio.MenuItem.new(self.get_text_for_stat(i), None) menu.append_item(menu_item) self.popover_short.set_menu_model(menu) def on_popover_closed(self, _popover): self.text_view.grab_focus() def on_text_changed(self, buf): self.stats_counter.count( buf.get_text( buf.get_start_iter(), buf.get_end_iter(), False)) def on_text_selected(self, buf, *args): if buf.get_has_selection(): (start, end) = buf.get_selection_bounds() self.selected_stats_counter.count( buf.get_text( start, end, False)) else: self.update_default_stat() def get_text_for_stat(self, stat): if stat == self.CHARACTERS: if self.text_view.get_buffer().get_has_selection(): return _("{:n} of {:n} Characters").format(self.selected_characters, self.characters) else: return ngettext("{:n} Character", "{:n} Characters", self.characters).format(self.characters) elif stat == self.WORDS: if self.text_view.get_buffer().get_has_selection(): return _("{:n} of {:n} Words").format(self.selected_words, self.words) else: return ngettext("{:n} Word", "{:n} Words", self.words).format(self.words) elif stat == self.SENTENCES: if self.text_view.get_buffer().get_has_selection(): return _("{:n} of {:n} Sentences").format(self.selected_sentences, self.sentences) else: return ngettext("{:n} Sentence", "{:n} Sentences", self.sentences).format(self.sentences) elif stat == self.PARAGRAPHS: if self.text_view.get_buffer().get_has_selection(): return _("{:n} of {:n} Paragraphs").format(self.selected_paragraphs, self.paragraphs) else: return ngettext("{:n} Paragraph", "{:n} Paragraphs", self.paragraphs).format(self.paragraphs) elif stat == self.READ_TIME: if self.text_view.get_buffer().get_has_selection(): return _("{:d}:{:02d}:{:02d} of {:d}:{:02d}:{:02d} Read Time").format(*self.selected_read_time, *self.read_time) else: return _("{:d}:{:02d}:{:02d} Read Time").format(*self.read_time) else: raise ValueError("Unknown stat {}".format(stat)) def update_stats(self, stats): (self.characters, self.words, self.sentences, self.paragraphs, self.read_time) = stats self.update_default_stat(False) def update_selection_stats(self, stats): (self.selected_characters, self.selected_words, self.selected_sentences, self.selected_paragraphs, self.selected_read_time) = stats self.update_default_stat(False) def update_default_stat(self, close_popover=True): stat = self.settings.get_enum("stat-default") text = self.get_text_for_stat(stat) self.stats_button.set_label(text) if close_popover and self.popover: self.popover.popdown() def on_destroy(self, _widget): self.stats_counter.stop() self.selected_stats_counter.stop() ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/table_input.py������������������0000664�0000000�0000000�00000006333�15066577064�0026373�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE from gettext import gettext as _ import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gio, GLib, GObject, Gtk @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/TableInput.ui') class TableInput(Gtk.Overlay): __gtype_name__ = "TableInput" grid = Gtk.Template.Child() label = Gtk.Template.Child() rows = GObject.Property(type=int) columns = GObject.Property(type=int) def __init__(self, **kwargs): super().__init__(**kwargs) self.connect("notify::rows", self._setup_grid) self.connect("notify::columns", self._setup_grid) def get_children(self): children = [] child = self.grid.get_first_child() if child is not None: children.append(child) while child.get_next_sibling(): child = child.get_next_sibling() children.append(child) return children def _setup_grid(self, *args, **kwargs): if len(self.get_children()) != self.rows*self.columns: for child in self.get_children(): self.grid.remove(child) for row in range(self.rows): for column in range(self.columns): button = Gtk.Button.new() button.set_action_name("win.insert-table") button.set_action_target_value(GLib.Variant("ai", [row+1, column+1])) if row == 0 and column == self.columns - 1: button.add_css_class("top-end") if row == self.rows - 1 and column == 0: button.add_css_class("bottom-start") button.connect("notify::has-focus", self._hover_region) controller = Gtk.EventControllerMotion.new() controller.connect("enter", self._hover_region) button.add_controller(controller) self.grid.attach(button, column, row, 1, 1) def _hover_region(self, caller, *args, **kwargs): if isinstance(caller, Gtk.EventControllerMotion): button = caller.get_widget() else: button = caller button_column, button_row, _, _ = self.grid.query_child(button) for child in self.get_children(): column, row, _, _ = self.grid.query_child(child) if column <= button_column and row <= button_row: child.add_css_class("hovered") else: child.remove_css_class("hovered") self.label.set_label(f"{button_row + 1} x {button_column + 1}") �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/text_buffer.py������������������0000664�0000000�0000000�00000025776�15066577064�0026416�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import logging from contextlib import contextmanager from itertools import cycle import gi import regex as re gi.require_version('Gtk', '4.0') gi.require_version('GtkSource', '5') from gi.repository import Gio, GLib, GObject, Gtk, GtkSource from apostrophe.helpers import user_action from apostrophe.markup_regex import CHECKLIST, LIST, ORDERED_LIST from apostrophe.settings import Settings LOGGER = logging.getLogger('apostrophe') class ApostropheTextBuffer(GtkSource.Buffer): __gtype_name__ = "ApostropheTextBuffer" __gsignals__ = { 'attempted-hemingway': (GObject.SignalFlags.ACTION, None, ()), 'changed-debounced': (GObject.SIGNAL_RUN_LAST, None, ()), } hemingway_mode = GObject.Property(type=bool, default=False) paste_ongoing = GObject.Property(type=bool, default=False) changed_debounced_timeout = GObject.Property(type=int, default=10) changed_debounced_timeout_id = None def __init__(self): super().__init__() self.settings = Settings.new() self.settings.bind("hemingway-mode", self, "hemingway-mode", Gio.SettingsBindFlags.DEFAULT | Gio.SettingsBindFlags.GET_NO_CHANGES) self.connect("paste-done", self._on_clipboard_paste_finished) @contextmanager def _temp_disable_hemingway(self): ''' Disables hemingway mode before an action and enables it right away ''' hemingway_cache = self.hemingway_mode if hemingway_cache: self.hemingway_mode = False yield self self.hemingway_mode = hemingway_cache def get_current_sentence_bounds(self): cursor_iter = self.get_iter_at_mark(self.get_insert()) start_sentence = cursor_iter.copy() if not start_sentence.starts_sentence(): start_sentence.backward_sentence_start() end_sentence = cursor_iter.copy() if not end_sentence.ends_sentence(): end_sentence.forward_sentence_end() return (start_sentence, end_sentence) def get_line_bounds(self, iter): # backward_line() doesn't seem to work as expected # so we just find the end of the line and backward the number of characters # that line has end_line = iter.copy() if not end_line.ends_line(): end_line.forward_to_line_end() start_line = end_line.copy() start_line.backward_chars(end_line.get_line_offset()) return (start_line, end_line) def get_current_line_bounds(self): return self.get_line_bounds(self.get_iter_at_mark(self.get_insert())) def get_previous_line_bounds(self): iter = self.get_iter_at_mark(self.get_insert()).copy() iter.backward_chars(1) return self.get_line_bounds(iter) def _indent(self): '''Takes over tab insertions. If the insertion happens within a list, it nicely handles it, otherwise inserts a plain \t''' with user_action(self): start_line, end_line = self.get_current_line_bounds() current_sentence = self.get_text(start_line, end_line, True) text = "" # Indent unordered lists match = re.fullmatch(LIST, current_sentence) if match and not match.group("text"): symbols = cycle(['-', '*', '+']) for i in range(3): if next(symbols) == match.group("symbol"): break next_symbol = next(symbols) indent = "\t" if "\t" in match.group("indent") else " " + match.group("indent") with self._temp_disable_hemingway(): self.delete(start_line, end_line) text = indent + next_symbol + " " # Indent ordered lists match = re.fullmatch(ORDERED_LIST, current_sentence) if match and not match.group("text"): indent = "\t" if "\t" in match.group("indent") else " " + match.group("indent") with self._temp_disable_hemingway(): self.delete(start_line, end_line) text = indent + "1" + match.group("delimiter") + " " position = self.get_iter_at_mark(self.get_insert()) GtkSource.Buffer.do_insert_text(self, position, text, -1) def _unindent(self, *args): with user_action(self): if self.hemingway_mode: self.emit("attempted-hemingway") return start_line, end_line = self.get_current_line_bounds() current_sentence = self.get_text(start_line, end_line, True) # Unindent unordered lists match = re.fullmatch(LIST, current_sentence) if match: indent = match.group("indent") if indent == "": # nothing to unindent return # iterate over previous lines and match the symbol and indentation # of the first occurence we find that had a smaller indentation # than the current one tmp_start = start_line.copy() for _ in range(50): tmp_start.backward_char() tmp_start, tmp_end = self.get_line_bounds(tmp_start) if tmp_match := re.fullmatch(LIST, self.get_text(tmp_start, tmp_end, True)): indent = tmp_match.group("indent") next_symbol = tmp_match.group("symbol") else: break if len(indent) < len(match.group("indent")): break self.delete(start_line, end_line) text = indent + next_symbol + " " if match.group("text"): text += match.group("text") position = self.get_iter_at_mark(self.get_insert()) GtkSource.Buffer.do_insert_text(self, position, text, -1) # Unindent regular tabs else: pen_iter = self.get_end_iter() pen_iter.backward_char() end_iter = self.get_end_iter() if pen_iter.get_char() == "\t": self.delete(pen_iter, end_iter) def _autocomplete_lists(self): with user_action(self): start_line, end_line = self.get_previous_line_bounds() previous_sentence = self.get_text(start_line, end_line, True) # Get current cursor position cursor_mark = self.get_insert() cursor_iter = self.get_iter_at_mark(cursor_mark) text_to_insert = "" delete_current_line = False # ORDERED LISTS match = re.match(ORDERED_LIST, previous_sentence) if match: if match.group("text"): if match.group("number"): next_prefix = (match.group("indent") + str(int(match.group("number")) + 1) + match.group("delimiter") + " ") text_to_insert = next_prefix else: delete_current_line = True # CHECKLIST elif match:= re.match(CHECKLIST, previous_sentence): if match.group("text"): next_prefix = match.group( "indent") + match.group("symbol") + " [ ] " text_to_insert = next_prefix else: delete_current_line = True # UNORDERED LISTS elif match:= re.match(LIST, previous_sentence): if match.group("text"): next_prefix = match.group( "indent") + match.group("symbol") + " " text_to_insert = next_prefix else: delete_current_line = True # Apply changes if delete_current_line: with self._temp_disable_hemingway(): self.delete(start_line, end_line) elif text_to_insert: self.insert(cursor_iter, text_to_insert) def do_insert_text(self, position, text, length): if self.hemingway_mode and self.get_has_selection(): return False move_cursor = None modified_text = text if not self.paste_ongoing: if text == "\n": GtkSource.Buffer.do_insert_text(self, position, text, length) GLib.idle_add(self._autocomplete_lists) return elif text == "\t": GtkSource.Buffer.do_insert_text(self, position, text, length) GLib.idle_add(self._indent) return elif text in "([{\"<": pairs = { "(": ")", "[": "]", "{": "}", '"': '"', "<": ">" } # is the next character whitespace? next_iter = position.copy() if (next_iter.get_char().isspace() or next_iter.is_end()): modified_text = text + pairs[text] length = len(modified_text) move_cursor = -1 elif text in ")]}\">": # check if the character at cursor matches what we're typing if position.get_char() == text: # skip insertion, just move cursor cursor_iter = self.get_iter_at_mark(self.get_insert()) cursor_iter.forward_cursor_positions(1) self.place_cursor(cursor_iter) return # don't insert anything GtkSource.Buffer.do_insert_text(self, position, modified_text, length) # Handle cursor movement after insertion if move_cursor: GLib.idle_add(lambda: self._move_cursor_relative(move_cursor)) def _move_cursor_relative(self, offset): try: cursor_iter = self.get_iter_at_mark(self.get_insert()) if offset > 0: cursor_iter.forward_cursor_positions(offset) else: cursor_iter.backward_cursor_positions(abs(offset)) self.place_cursor(cursor_iter) except Exception as e: LOGGER.warning(f"Cursor positioning error: {e}") pass def do_delete_range(self, start, end): if self.hemingway_mode: self.emit("attempted-hemingway") else: GtkSource.Buffer.do_delete_range(self, start, end) def changed_debounced(self): self.emit("changed-debounced") self.changed_debounced_timeout_id = None def do_changed(self): if self.changed_debounced_timeout_id: GLib.source_remove(self.changed_debounced_timeout_id) self.changed_debounced_timeout_id = None self.changed_debounced_timeout_id = GLib.timeout_add(self.changed_debounced_timeout, self.changed_debounced) def _on_clipboard_paste_finished(self, *args, **kwargs): self.paste_ongoing = False ��apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/text_view.py��������������������0000664�0000000�0000000�00000037021�15066577064�0026101�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # 2019, Gonçalo Silva # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import math import urllib from gettext import gettext as _ from os.path import basename import gi from apostrophe.helpers import user_action from apostrophe.inline_preview import InlinePreview from apostrophe.settings import Settings from apostrophe.text_view_format_inserter import FormatInserter from apostrophe.text_view_markup_handler import MarkupHandler from apostrophe.text_view_scroller import TextViewScroller from apostrophe.text_buffer import ApostropheTextBuffer from apostrophe.theme_switcher import Theme gi.require_version('Gtk', '4.0') gi.require_version('GtkSource', '5') gi.require_version('Spelling', '1') import logging from gi.repository import Adw, Gdk, Gio, GLib, GObject, Gtk, GtkSource, Spelling LOGGER = logging.getLogger('apostrophe') DEFAULT_DPI = 98304 @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/TextView.ui') class ApostropheTextView(GtkSource.View): """ApostropheTextView encapsulates all the features around the editor. It combines the following: - Undo / redo (via TextBufferUndoRedoHandler) - Markup (via TextBufferMarkupHandler) - Preview popover (via TextBufferMarkupHandler) - Drag and drop - Scrolling (via TextViewScroller) - The various modes supported by Apostrophe (e. Focus Mode, Hemingway Mode) """ __gtype_name__ = "ApostropheTextView" bigger_text = GObject.Property(type=bool, default=False) focus_mode = GObject.Property(type=bool, default=False) font_size = GObject.Property(type=int, default=16) line_chars = GObject.Property(type=int, default=66) spellcheck = GObject.Property(type=bool, default=True) spelling_adapter = None spelling_checker = None spelling_provider = None scroller = None _scroll_scale = 0 @GObject.Property(type=float, default=0) def scroll_scale(self): return self.scroller.get_scroll_scale_() if self.scroller else 0 @scroll_scale.setter def scroll_scale(self, scale): if self.scroller and not math.isclose(scale, self._scroll_scale, rel_tol=1e-5): self._scroll_scale = scale self.scroller.set_scroll_scale_(scale) gesture_controller = Gtk.Template.Child() def __init__(self): super().__init__() self.settings = Settings.new() self.buffer = self.get_buffer() # Spell checking self.spelling_provider = Spelling.Provider.get_default() self.spelling_checker = Spelling.Checker.new(self.spelling_provider, self.spelling_provider.get_default_code()) self.spelling_adapter = Spelling.TextBufferAdapter.new(self.buffer, self.spelling_checker) spellchecking_menu = self.spelling_adapter.get_menu_model() self.spelling_checker.connect("notify::language", self._on_spelling_language_changed) self.insert_action_group('spelling', self.spelling_adapter) self.settings.bind("spellcheck", self.spelling_adapter, "enabled", Gio.SettingsBindFlags.DEFAULT) # Setting up text size self.settings.bind("bigger-text", self, "bigger_text", Gio.SettingsBindFlags.GET) self.settings.bind("characters-per-line", self, "line_chars", Gio.SettingsBindFlags.GET) # Preview popover self.preview_popover = InlinePreview(self) action = Gio.SimpleAction.new("open_inline_preview") action.connect("activate", self.preview_popover.open_popover) group = Gio.SimpleActionGroup.new() group.add_action(action) self.insert_action_group("text", group) peek_menu = Gio.Menu() peek_item = Gio.MenuItem.new("Peek", 'text.open_inline_preview') peek_menu.append_item(peek_item) # Context menu extra_menu = Gio.Menu() extra_menu.append_section(None, peek_menu) extra_menu.append_section(None, spellchecking_menu) self.set_extra_menu(extra_menu) key = Gtk.EventControllerKey.new() key.set_propagation_phase(Gtk.PropagationPhase.CAPTURE) key.connect_after('key-pressed', self._on_key_pressed) self.add_controller(key) # Markup self.markup = MarkupHandler(self) self.connect('destroy', self.markup.stop) # Drag and drop formats = Gdk.ContentFormatsBuilder.new() formats.add_gtype(Gio.File) formats.add_gtype(GObject.TYPE_STRING) drop_target = Gtk.DropTarget(formats=formats.to_formats(), actions=Gdk.DragAction.COPY) drop_target.connect('drop', self.on_drop) self.add_controller(drop_target) # When pasting b-trees, we may get more than one insertion. # We want to disable autocompletion until the paste is done self.connect("paste-clipboard", self._on_clipboard_paste_started) self.update_vertical_margin() # color scheme theme = Theme.get_current().name scheme_manager = GtkSource.StyleSchemeManager.get_default() self.buffer.set_style_scheme(scheme_manager.get_scheme(theme)) # scroller self.scroller = None # update font size on next cycle once we have a proper measure GLib.idle_add(self.update_font_size) def _on_key_pressed(self, controller, key, keycode, state): if ((key == Gdk.KEY_Tab or key == Gdk.KEY_KP_Tab or key == Gdk.KEY_ISO_Left_Tab) and state == Gdk.ModifierType.SHIFT_MASK): self.buffer._unindent() return Gdk.EVENT_STOP def on_drop(self, drop_target, content, _x, _y): # check if a file was dropped try: # if we got a file, get its uri if isinstance(content, Gio.File): content = content.get_uri() GLib.Uri.is_valid(content, GLib.UriFlags.NONE) uri = GLib.Uri.parse(content, GLib.UriFlags.NONE) # we could try to use glib utils for handling uris but it's not that # worth it if content.startswith("file://"): # remove trailing newlines content = content.strip() name = basename(urllib.parse.unquote_plus(content)) mime = Gio.content_type_guess(content) # stripe "file://" content = content[7:] if mime[0] is not None and mime[0].startswith('image/'): basepath = self.get_root().current.base_path basepath = urllib.parse.quote(basepath) # for handling local URIs we need to substract the basepath # except when it is "/" (document not saved) # TODO: use g_uri_resolve_relative if content.startswith(basepath) and basepath != "/": content = content[len(basepath) + 1:] content = "![{}]({})".format(name, content) limit_left = 2 limit_right = len(name) else: content = "[{}]({})".format(name, content) limit_left = 1 limit_right = len(name) elif content.startswith(("https", "http")): content = "[{}]({})".format(_("web page"), content) limit_left = 1 limit_right = len(_("web page")) # otherwise we just received text except Exception as e: # delete automatically added DnD text insert_mark = self.buffer.get_insert() cursor_iter_l, cursor_iter_r = self.buffer.get_selection_bounds() self.buffer.delete(cursor_iter_l, cursor_iter_r) limit_left = 0 limit_right = 0 self.buffer.place_cursor(self.buffer.get_iter_at_mark( self.buffer.get_mark('gtk_drag_target'))) self.buffer.insert_at_cursor(content) insert_mark = self.buffer.get_insert() selection_bound = self.buffer.get_selection_bound() cursor_iter = self.buffer.get_iter_at_mark(insert_mark) cursor_iter.backward_chars(len(content) - limit_left) self.buffer.move_mark(insert_mark, cursor_iter) cursor_iter.forward_chars(limit_right) self.buffer.move_mark(selection_bound, cursor_iter) def get_text(self): start_iter = self.buffer.get_start_iter() end_iter = self.buffer.get_end_iter() return self.buffer.get_text(start_iter, end_iter, False) def set_text(self, text): """Set text and clear undo history""" self.buffer.begin_irreversible_action() with user_action(self.buffer): self.buffer.set_text(text) self.buffer.end_irreversible_action() def update_vertical_margin(self, top_margin=0): if self.focus_mode: height = self.get_height() + top_margin target_margin = height / 2 if self.get_top_margin() != target_margin + top_margin: self.set_top_margin(target_margin + top_margin) if self.get_bottom_margin() != target_margin: self.set_bottom_margin(target_margin) else: # we want 80 top margin when only the headerbar is shown, # top_margin is 46 in that case # sync that value with the webview's one self.set_top_margin(34 + top_margin) self.set_bottom_margin(64) def clear(self): """Clear text and undo history""" self.set_text('') def smooth_scroll_to(self, mark=None): """Scrolls if needed to ensure mark is visible. If mark is unspecified, the cursor is used.""" if self.scroller is None: return if mark is None: mark = self.buffer.get_insert() GLib.idle_add(self.scroller.smooth_scroll_to_mark, mark, self.focus_mode) @Gtk.Template.Callback() def _on_button_pressed_event(self, gesture, n_press, x, y): event = gesture.get_current_event() buffer_x, buffer_y = self.window_to_buffer_coords(Gtk.TextWindowType.TEXT, x, y) found, iter = self.get_iter_at_location(buffer_x, buffer_y) if found and not self.buffer.get_has_selection(): self.buffer.place_cursor(iter) if event.get_modifier_state() == Gdk.ModifierType.CONTROL_MASK and not event.triggers_context_menu(): self.preview_popover.open_popover() return False @Gtk.Template.Callback() def _on_button_release_event(self, *args, **kwargs): if self.focus_mode: self.markup.apply() self.smooth_scroll_to() return False @Gtk.Template.Callback() def _on_focus_mode_update(self, *args, **kwargs): self.update_vertical_margin() self.markup.apply() self.smooth_scroll_to() self._on_spellcheck_update() self.grab_focus() @Gtk.Template.Callback() def _on_mark_set(self, _text_buffer, _location, mark, _data=None): # only scroll if the cursor was moved by keyboard. # otherwise check _on_button_release_event if mark.get_name() == 'selection_bound' and not self.gesture_controller.is_active(): self.markup.apply() if not self.buffer.get_has_selection(): self.smooth_scroll_to(mark) elif mark.get_name() == 'gtk_drag_target': self.smooth_scroll_to(mark) return True @Gtk.Template.Callback() def _on_paste_done(self, *_): self.smooth_scroll_to() def _on_size_allocate(self, *_): self._update_horizontal_margin() self.markup.update_margins_indents() self.queue_draw() self.preview_popover.popover.present() @Gtk.Template.Callback() def _on_spellcheck_update(self, *args, **kwargs): self.spelling_adapter.set_enabled(self.spellcheck and not self.focus_mode) @Gtk.Template.Callback() def _on_text_changed(self, *_): self.markup.apply() self.smooth_scroll_to() def _on_vadjustment_changed(self, *_): if self.scroller.can_scroll(): self.notify("scroll_scale") def _on_spelling_language_changed(self, _obj, _spec): self.spelling_adapter.invalidate_all() def _on_clipboard_paste_started(self, *args, **kwargs): self.buffer.paste_ongoing = True @Gtk.Template.Callback() def update_font_size(self, *args, **kwargs): width = self.get_width() # Ensure the appropriate font size is being used for font_size in self._get_font_sizes(): if width >= self.get_min_width(font_size): if font_size != self.font_size: self.font_size = font_size for size_class in filter(lambda style_class: style_class.startswith("size"), self.get_css_classes()): self.remove_css_class(size_class) self.add_css_class("size{}".format(font_size)) self.queue_draw() self._update_horizontal_margin() break else: return def _update_horizontal_margin(self, *args, **kwargs): width = self.get_width() # Apply margin with the remaining space to allow for markup line_width = round((self.line_chars*self._get_char_width(self.font_size))) horizontal_margin = (width - line_width) // 2 self.set_left_margin(horizontal_margin) self.set_right_margin(width - line_width - horizontal_margin) def _get_font_sizes(self): font_sizes_list = [20, 18, 17, 16, 15, 14] if self.bigger_text: font_sizes_list[:0] = [24, 22] return font_sizes_list def get_min_width(self, font_size=None, line_chars=None): """Returns the minimum width of this text view.""" if font_size is None: font_size = self._get_font_sizes()[-1] if line_chars is None: line_chars = self.line_chars return round((line_chars + self._get_pad_chars(font_size)) * self._get_char_width(font_size)) def _get_pad_chars(self, font_size): """Returns the amount of character padding for font_size. Markup can use up to 7 in normal conditions, so the minimum is 14""" if self.bigger_text: return max(14, 8 * int((1 + (font_size - self._get_font_sizes()[-1])/3))) else: return max(14, 8 * (1 + font_size - self._get_font_sizes()[-1])) @staticmethod def _get_char_width(font_size): """Returns the font width for a given size. Note: specific to Fira Mono!""" # We scale by the text scale factor system-wide setting. # In the css the units are in em so they're automatically scaled # 14.666px == 1em settings = Gtk.Settings.get_default() scale_factor = settings.props.gtk_xft_dpi / DEFAULT_DPI return scale_factor * font_size * 0.6 def do_size_allocate(self, width, height, baseline): self._on_size_allocate() Gtk.TextView.do_size_allocate(self,width, height, baseline) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/text_view_format_inserter.py����0000664�0000000�0000000�00000056105�15066577064�0031370�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������import regex as re import urllib from gettext import gettext as _ import gi gi.require_version('Gtk', '4.0') from gi.repository import Gio, GLib, Gtk from apostrophe.helpers import user_action from apostrophe.markup_regex import CHECKLIST, HEADER, LIST, ORDERED_LIST, URL from apostrophe.table_input import TableInput from apostrophe.settings import Settings class FormatInserter: """Manages insertion of formatting. Methods can be called directly, as well as be used as signal callbacks.""" def insert_italic(self, action, data, text_view): """Insert italic or mark a selection as bold""" self.__wrap(text_view, "_", _("italic text")) def insert_bold(self, action, data, text_view): """Insert bold or mark a selection as bold""" self.__wrap(text_view, "**", _("bold text")) def insert_strikethrough(self, action, data, text_view): """Insert strikethrough or mark a selection as strikethrough""" self.__wrap(text_view, "~~", _("strikethrough text")) def insert_horizontal_rule(self, action, data, text_view): """Insert horizontal rule""" text_buffer = text_view.get_buffer() with user_action(text_buffer): text_buffer.insert_at_cursor("\n\n---\n") text_view.scroll_mark_onscreen(text_buffer.get_insert()) def insert_list_item(self, action, data, text_view): """Insert list item or mark a selection as list item""" text_buffer = text_view.get_buffer() helptext = _("Item") cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) with user_action(text_buffer): selection_length = 0 empty_line = False # get text of the current line (start, end) = text_buffer.get_current_line_bounds() text = text_buffer.get_text(start, end, False) if text_buffer.get_has_selection(): # if the current line has a list item we'll treat it entirely no matter what's really selected if match:=re.match(LIST, text): selection_length = len(match.group("text") or "") else: # otherwise use the current selection (start, end) = text_buffer.get_selection_bounds() text = text_buffer.get_text(start, end, False) selection_length = len(text) text_buffer.move_mark(cursor_mark, end) # let's check if it's an empty line if cursor_iter.starts_line() and cursor_iter.ends_line(): empty_line = True selection_length = len(helptext) # are we in the beginning of a line? if start.starts_line(): text = text_buffer.get_text(start, end, False) # check whether we have a list already to remove it if match:=re.match(LIST, text): delete_end = start.copy() delete_end.forward_chars(len(match.group("content")) - len(match.group("text") or "")) text_buffer.delete(start, delete_end) else: # check whether the previous line has items start_previous_line = start.copy() start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) match = re.match(LIST, previous_line) symbol = "-" indent = "" if match: symbol = match.group("symbol") indent = match.group("indent") else: # otherwise check if the second previous line is blank or not start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) if not previous_line: indent = "\n" text_buffer.insert(start, f"{indent}{symbol} {helptext if empty_line else ''}") # if we're not at the beginning of the line we just insert a newline and the item symbol else: text_buffer.insert(start, "\n\n- ") self.__select_text(text_view, 0, selection_length) def insert_checklist_item(self, action, data, text_view): """Insert checklist item or mark a selection as checklist item""" text_buffer = text_view.get_buffer() helptext = _("Item") cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) with user_action(text_buffer): selection_length = 0 empty_line = False # get text of the current line (start, end) = text_buffer.get_current_line_bounds() text = text_buffer.get_text(start, end, False) if text_buffer.get_has_selection(): # if the current line has a checklist item we'll treat it entirely no matter what's really selected if match:=re.match(CHECKLIST, text): selection_length = len(match.group("text") or "") else: # otherwise use the current selection (start, end) = text_buffer.get_selection_bounds() text = text_buffer.get_text(start, end, False) selection_length = len(text) text_buffer.move_mark(cursor_mark, end) # let's check if it's an empty line if cursor_iter.starts_line() and cursor_iter.ends_line(): empty_line = True selection_length = len(helptext) # are we in the beginning of a line? if start.starts_line(): text = text_buffer.get_text(start, end, False) value = " " # check whether we have a list already to toggle it if match:=re.match(CHECKLIST, text): delete_end = start.copy() delete_end.forward_chars(len(match.group("content")) - len(match.group("text") or "")) value = "x" if match.group("check") == " " else " " text_buffer.delete(start, delete_end) # check whether the previous line has items start_previous_line = start.copy() start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) match = re.match(CHECKLIST, previous_line) symbol = "-" indent = "" if match: symbol = match.group("symbol") indent = match.group("indent") else: # otherwise check if the second previous line is blank or not start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) if not previous_line: indent = "\n" text_buffer.insert(start, f"{indent}{symbol} [{value}] {helptext if empty_line else ''}") # if we're not at the beginning of the line we just insert a newline and the item symbol else: text_buffer.insert(start, "\n\n- [ ] ") self.__select_text(text_view, 0, selection_length) def insert_ordered_list_item(self, action, data, text_view): """Insert ordered item or mark a selection as an ordered list item""" text_buffer = text_view.get_buffer() helptext = _("Item") cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) with user_action(text_buffer): selection_length = 0 empty_line = False # get text of the current line (start, end) = text_buffer.get_current_line_bounds() text = text_buffer.get_text(start, end, False) if text_buffer.get_has_selection(): # if the current line has a list item we'll treat it entirely no matter what's really selected if match:=re.match(ORDERED_LIST, text): selection_length = len(match.group("text") or "") else: # otherwise use the current selection (start, end) = text_buffer.get_selection_bounds() text = text_buffer.get_text(start, end, False) selection_length = len(text) text_buffer.move_mark(cursor_mark, end) # let's check if it's an empty line if cursor_iter.starts_line() and cursor_iter.ends_line(): empty_line = True selection_length = len(helptext) # are we in the beginning of a line? if start.starts_line(): text = text_buffer.get_text(start, end, False) # check whether we have a numeration already to remove it if match:=re.match(ORDERED_LIST, text): delete_end = start.copy() delete_end.forward_chars(len(match.group("content")) - len(match.group("text") or "")) text_buffer.delete(start, delete_end) else: # check whether the previous line is numbered start_previous_line = start.copy() start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) match = re.match(ORDERED_LIST, previous_line) number = 1 delimiter = "." indent = "" if match: number = int(match.group("number")) + 1 delimiter = match.group("delimiter") indent = match.group("indent") else: # otherwise check if the second previous line is blank or not start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) if not previous_line: indent = "\n" text_buffer.insert(start, f"{indent}{number}{delimiter} {helptext if empty_line else ''}") # if we're not at the beginning of the line we just insert a newline and the numbering else: text_buffer.insert(start, "\n\n1. ") self.__select_text(text_view, 0, selection_length) def insert_header(self, action, level, text_view): """Insert header or mark a selection as a list header""" level = 1 if not level else level.get_int32() text_buffer = text_view.get_buffer() helptext = _("Header") cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) with user_action(text_buffer): selection_length = 0 indent= "" next_level = 1 empty_line = False # get text of the current line (start, end) = text_buffer.get_current_line_bounds() text = text_buffer.get_text(start, end, False) if text_buffer.get_has_selection(): # if the current line has a heading we'll treat it entirely no matter what's really selected if match:=re.match(HEADER, text): selection_length = len(match.group("text") or "") else: # otherwise we'll just use the selected text (start, end) = text_buffer.get_selection_bounds() text = text_buffer.get_text(start, end, False) selection_length = len(text) text_buffer.move_mark(cursor_mark, end) # let's check if it's an empty line if cursor_iter.starts_line() and cursor_iter.ends_line(): empty_line = True selection_length = len(helptext) # are we in the beginning of a line? if start.starts_line(): text = text_buffer.get_text(start, end, False) # check whether we have a header already if match:=re.match(HEADER, text): next_level = len(match.group("level")) delete_end = start.copy() delete_end.forward_chars(next_level + 1) text_buffer.delete(start, delete_end) if next_level == level: return # cycle between levels 1, 2 and 3. If we reach 0, we remove the heading next_level = (next_level + 1) % 4 # check whether the previous line has items start_previous_line = start.copy() start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) if previous_line not in [None, "\n", ""]: indent = "\n" # if we're not at the beginning of the line we just insert a newline else: indent = "\n\n" # only apply next level if we're coming from the toolbar level = next_level if level == -1 else level text_buffer.insert(start, indent + "#"*level + f" {helptext if empty_line else ''}") self.__select_text(text_view, 0, selection_length) def insert_blockquote(self, action, data, text_view): """Insert quote or mark a selection as a quote""" text_buffer = text_view.get_buffer() cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) helptext = _("Quote") with user_action(text_buffer): selection_length = 0 empty_line = False if text_buffer.get_has_selection(): (start, end) = text_buffer.get_selection_bounds() text_buffer.move_mark(cursor_mark, end) selection_length = len(text_buffer.get_text(start, end, False)) else: (start, end) = text_buffer.get_current_line_bounds() if start.starts_line() : text = text_buffer.get_text(start, end, False) if text.startswith("> "): delete_end = start.copy() delete_end.forward_chars(2) text_buffer.delete(start, delete_end) else: start_previous_line = start.copy() start_previous_line.backward_lines(1) previous_line = text_buffer.get_text(start_previous_line, start, False) indent = "\n" if not previous_line else "" if cursor_iter.starts_line() and cursor_iter.ends_line(): empty_line = True selection_length = len(helptext) text_buffer.insert(start, f"{indent}> {helptext if empty_line else ''}") else: text_buffer.insert(start, "\n\n> ") self.__select_text(text_view, 0, selection_length) def insert_codeblock(self, action, data, text_view): """Insert codeblock or mark a selection as an inline codeblock""" text_buffer = text_view.get_buffer() helptext = _("code") cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) with user_action(text_buffer): # let's check if it's an empty line to use block markup if cursor_iter.starts_line() and cursor_iter.ends_line(): self.__wrap(text_view, "```", f"\n{helptext}\n") # otherise we use inline markup else: self.__wrap(text_view, "`", helptext) def insert_link(self, action, data, text_view): """Insert weblink""" selection_length = 0 # 0 for text, 1 for URL selected_part = 1 text_buffer = text_view.get_buffer() url_helptext = _("https://www.example.com") helptext = _("link text") cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) with user_action(text_buffer): selection_length = len(url_helptext) if text_buffer.get_has_selection(): (start, end) = text_buffer.get_selection_bounds() text_buffer.move_mark(cursor_mark, end) text = text_buffer.get_text(start, end, False) text_buffer.delete(start, end) # is it selecting a url? if re.match(URL, text): url_helptext = text selection_length = len(helptext) selected_part = 0 else: helptext = text else: start = cursor_iter.copy() text_buffer.insert(start, f"[{helptext}]({url_helptext})") self.__select_text(text_view, 1 if selected_part == 1 else len(url_helptext)+3, selection_length) def insert_image(self, action, data, text_view): """Open a filechooser to grab a image uri and insert it properly formatted""" selection_length = 0 text_buffer = text_view.get_buffer() helptext = _("image caption") window = text_view.get_root() filefilter = Gtk.FileFilter.new() filefilter.add_mime_type('image/*') filefilter.set_name(_('Image')) filefilters = Gio.ListStore.new(Gtk.FileFilter) filefilters.append(filefilter) filechooser = Gtk.FileDialog.new() filechooser.set_title(_("Select an image")) filechooser.set_filters(filefilters) filechooser.set_modal(True) def filechooser_cb(dialog, result): try: image = dialog.open_finish(result) except GLib.GError as error: # we don't care much about what happened, just that we didn't # get an uri text_view.grab_focus() return basepath = window.current.base_path if basepath != "/": basepath = Gio.File.new_for_path(basepath) relative_path = basepath.get_relative_path(image) if relative_path: path = urllib.parse.quote(relative_path) else: path = urllib.parse.quote(image.get_path()) else: path = urllib.parse.quote(image.get_path()) helptext = _("image caption") cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) with user_action(text_buffer): if text_buffer.get_has_selection(): (start, end) = text_buffer.get_selection_bounds() text_buffer.move_mark(cursor_mark, end) text = text_buffer.get_text(start, end, False) text_buffer.delete(start, end) helptext = text else: start = cursor_iter.copy() text_buffer.insert(start, f"![{helptext}]({path})") selection_length = len(helptext) self.__select_text(text_view, len(path)+3, selection_length) filechooser.open(window, None, filechooser_cb) def insert_table(self, action, data, text_view): def generate_line(cells, width, content=" "): content = content*width if content else " "*width return "|" + (content+"|")*columns + "\n" text_buffer = text_view.get_buffer() cursor_iter = text_buffer.get_iter_at_mark(text_buffer.get_insert()) [rows, columns] = data self.settings = Settings.new() characters_per_line = self.settings.get_int('characters-per-line') max_width = 20 possible_width = (characters_per_line - columns - 1)//columns width = min(max_width, possible_width) table = "" for i in range(rows+2): table += generate_line(columns, width, "-" if i==1 else " ") text_buffer.insert(cursor_iter, table) @staticmethod def __wrap(text_view, wrap, helptext=""): """Inserts wrap format to the selected text (helper text when nothing selected)""" text_buffer = text_view.get_buffer() with user_action(text_buffer): if text_buffer.get_has_selection(): # Find current highlighting (start, end) = text_buffer.get_selection_bounds() moved = False if (start.get_offset() >= len(wrap) and end.get_offset() <= text_buffer.get_char_count() - len(wrap)): moved = True ext_start = start.copy() ext_start.backward_chars(len(wrap)) ext_end = end.copy() ext_end.forward_chars(len(wrap)) text = text_buffer.get_text(ext_start, ext_end, True) else: text = text_buffer.get_text(start, end, True) if moved and text.startswith(wrap) and text.endswith(wrap): text = text[len(wrap):-len(wrap)] new_text = text text_buffer.delete(ext_start, ext_end) move_back = 0 else: if moved: text = text[len(wrap):-len(wrap)] new_text = text.lstrip().rstrip() text = text.replace(new_text, wrap + new_text + wrap) text_buffer.delete(start, end) move_back = len(wrap) text_buffer.insert_at_cursor(text) text_length = len(new_text) else: text_buffer.insert_at_cursor(wrap + helptext + wrap) # we offset things by 1 char if we're inserting a codeblock text_length = len(helptext.strip("\n")) move_back = len(wrap) + (1 if helptext == _("\ncode\n") else 0) cursor_mark = text_buffer.get_insert() cursor_iter = text_buffer.get_iter_at_mark(cursor_mark) cursor_iter.backward_chars(move_back) text_buffer.move_mark_by_name('selection_bound', cursor_iter) cursor_iter.backward_chars(text_length) text_buffer.move_mark_by_name('insert', cursor_iter) text_view.grab_focus() @staticmethod def __select_text(text_view, offset, length): """Selects text starting at the current cursor minus offset, length characters.""" text_buffer = text_view.get_buffer() cursor_iter = text_buffer.get_iter_at_mark(text_buffer.get_insert()) cursor_iter.backward_chars(offset) text_buffer.move_mark_by_name('selection_bound', cursor_iter) cursor_iter.backward_chars(length) text_buffer.move_mark_by_name('insert', cursor_iter) text_view.grab_focus() �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/text_view_markup_handler.py�����0000664�0000000�0000000�00000043454�15066577064�0031164�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2022, Manuel Genovés <manuel.genoves@gmail.com> # 2019, Gonçalo Silva # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import regex as re from multiprocessing import Pipe, Process import gi from gi.repository import GLib, Gtk, Pango from apostrophe import helpers, markup_regex from apostrophe.markup_regex import (BLOCK_QUOTE, BOLD, BOLD_ITALIC, CODE, HEADER, HEADER_UNDER, HORIZONTAL_RULE, IMAGE, ITALIC_ASTERISK, ITALIC_UNDERSCORE, LINK, LINK_ALT, LIST, MATH, ORDERED_LIST, STRIKETHROUGH, TABLE) gi.require_version('Gtk', '4.0') class MarkupHandler: TAG_NAME_ITALIC = 'italic' TAG_NAME_BOLD = 'bold' TAG_NAME_BOLD_ITALIC = 'bold_italic' TAG_NAME_STRIKETHROUGH = 'strikethrough' TAG_NAME_CENTER = 'center' TAG_NAME_WRAP_NONE = 'wrap_none' TAG_NAME_PLAIN_TEXT = 'plain_text' TAG_NAME_GRAY_TEXT = 'gray_text' TAG_NAME_LINK_COLOR_TEXT = 'link_color_text' TAG_NAME_CODE_TEXT = 'code_text' TAG_NAME_CODE_BLOCK = 'code_block' TAG_NAME_UNFOCUSED_TEXT = 'unfocused_text' TAG_NAME_MARGIN_INDENT = 'margin_indent' def __init__(self, textview): self.textview = textview self.text_buffer = self.textview.get_buffer() self.marked_up_text = None # Tags. buffer = self.text_buffer self.tag_italic = buffer.create_tag(self.TAG_NAME_ITALIC, weight=Pango.Weight.NORMAL, style=Pango.Style.ITALIC) self.tag_bold = buffer.create_tag(self.TAG_NAME_BOLD, weight=Pango.Weight.BOLD, style=Pango.Style.NORMAL) self.tag_bold_italic = buffer.create_tag(self.TAG_NAME_BOLD_ITALIC, weight=Pango.Weight.BOLD, style=Pango.Style.ITALIC) self.tag_strikethrough = buffer.create_tag(self.TAG_NAME_STRIKETHROUGH, strikethrough=True) self.tag_center = buffer.create_tag(self.TAG_NAME_CENTER, justification=Gtk.Justification.CENTER) self.tag_wrap_none = buffer.create_tag(self.TAG_NAME_WRAP_NONE, wrap_mode=Gtk.WrapMode.NONE, pixels_above_lines=0, pixels_below_lines=0) self.tag_plain_text = buffer.create_tag(self.TAG_NAME_PLAIN_TEXT, weight=Pango.Weight.NORMAL, style=Pango.Style.NORMAL, strikethrough=False, justification=Gtk.Justification.LEFT) self.tag_gray_text = buffer.create_tag(self.TAG_NAME_GRAY_TEXT, foreground='gray', weight=Pango.Weight.NORMAL, style=Pango.Style.NORMAL) self.tag_link_color_text = buffer.create_tag(self.TAG_NAME_LINK_COLOR_TEXT, foreground='lightblue', weight=Pango.Weight.NORMAL, style=Pango.Style.ITALIC) self.tag_code_text = buffer.create_tag(self.TAG_NAME_CODE_TEXT, weight=Pango.Weight.NORMAL, style=Pango.Style.NORMAL, strikethrough=False) self.tag_code_block = buffer.create_tag(self.TAG_NAME_CODE_BLOCK, weight=Pango.Weight.NORMAL, style=Pango.Style.NORMAL, strikethrough=False, indent=self.get_margin_indent(0, 1)[1]) self.tags_markup = { self.TAG_NAME_ITALIC: lambda args: self.tag_italic, self.TAG_NAME_BOLD: lambda args: self.tag_bold, self.TAG_NAME_BOLD_ITALIC: lambda args: self.tag_bold_italic, self.TAG_NAME_STRIKETHROUGH: lambda args: self.tag_strikethrough, self.TAG_NAME_CENTER: lambda args: self.tag_center, self.TAG_NAME_WRAP_NONE: lambda args: self.tag_wrap_none, self.TAG_NAME_PLAIN_TEXT: lambda args: self.tag_plain_text, self.TAG_NAME_GRAY_TEXT: lambda args: self.tag_gray_text, self.TAG_NAME_LINK_COLOR_TEXT: lambda args: self.tag_link_color_text, self.TAG_NAME_CODE_TEXT: lambda args: self.tag_code_text, self.TAG_NAME_CODE_BLOCK: lambda args: self.tag_code_block, self.TAG_NAME_MARGIN_INDENT: lambda args: self.get_margin_indent_tag( *args) } # Focus mode. self.tag_unfocused_text = buffer.create_tag(self.TAG_NAME_UNFOCUSED_TEXT, foreground='gray', weight=Pango.Weight.NORMAL, style=Pango.Style.NORMAL) # Margin and indents. # A baseline margin is set to allow negative offsets for formatting # headers, lists, etc. self.tags_margins_indents = {} self.baseline_margin = 0 self.char_width = 0 self.update_margins_indents() # Style. self.on_style_updated() # Worker process to handle parsing. self.parsing = False self.apply_pending = False self.parent_conn, child_conn = Pipe() Process(target=self.parse, args=(child_conn,), daemon=True).start() GLib.io_add_watch( self.parent_conn.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, self.on_parsed) def on_style_updated(self, *_): style_context = self.textview.get_style_context() (found, color) = style_context.lookup_color('code_bg_color') if not found: (_, color) = style_context.lookup_color('background_color') self.tag_code_text.set_property("background", color.to_string()) self.tag_code_block.set_property( "paragraph-background", color.to_string()) (found, color) = style_context.lookup_color('link_fg_color') if not found: (_, color) = style_context.lookup_color('lightblue') self.tag_link_color_text.set_property("foreground", color.to_string()) def apply(self): """Applies markup, parsing it in a worker process if the text has changed. In case parsing is already running, it will re-apply once it finishes. This ensure that the pipe doesn't fill (and block) if multiple requests are made in quick succession.""" if not self.parsing: self.parsing = True self.apply_pending = False text = self.text_buffer.get_slice( self.text_buffer.get_start_iter(), self.text_buffer.get_end_iter(), False) if text != self.marked_up_text: self.parent_conn.send(text) else: self.do_apply(text) else: self.apply_pending = True def parse(self, child_conn): """Parses markup in a worker process.""" while True: while True: try: text = child_conn.recv() if not child_conn.poll(): break except EOFError: child_conn.close() return # List of tuples in the form (tag_name, tag_args, tag_start, # tag_end). result = [] # Find "```" code block tag (offset + colorize paragraph). code_blocks = [] matches = re.finditer(markup_regex.CODE_BLOCK, text) for match in matches: start, end = match.start("block"), match.end("block") result.append(( self.TAG_NAME_CODE_BLOCK, (), start, end)) code_blocks.append((start, end)) # helper functions to test if a range is inside code blocks. inside_code_blocks = lambda start, end: any(True for (s, e) in code_blocks if s < start < e or s < end < e) match_inside_code_blocks = lambda m: inside_code_blocks(m.start(), m.end()) # Find: # - "_italic_" (italic) # - "**bold**" (bold) # - "***bolditalic***" (bold/italic) # - "~~strikethrough~~" (strikethrough) # - "`code`" (colorize) # - "$math$" (colorize) # - "---" table (wrap/pixels) regexps = ( (ITALIC_ASTERISK, self.TAG_NAME_ITALIC), (ITALIC_UNDERSCORE, self.TAG_NAME_ITALIC), (BOLD, self.TAG_NAME_BOLD), (BOLD_ITALIC, self.TAG_NAME_BOLD_ITALIC), (STRIKETHROUGH, self.TAG_NAME_STRIKETHROUGH), (CODE, self.TAG_NAME_CODE_TEXT), (MATH, self.TAG_NAME_CODE_TEXT), (TABLE, self.TAG_NAME_WRAP_NONE) ) for regexp, tag_name in regexps: matches = re.finditer(regexp, text) for match in matches: if match_inside_code_blocks(match): continue result.append((tag_name, (), match.start(), match.end())) # Find: # - "[description](url)" (gray out) # - "![description](image_url)" (gray out) regexps = ( (LINK, self.TAG_NAME_LINK_COLOR_TEXT), (IMAGE, self.TAG_NAME_GRAY_TEXT) ) for regexp, tag_name in regexps: matches = re.finditer(regexp, text) for match in matches: if match_inside_code_blocks(match): continue result.append( (tag_name, (), match.start(), match.start("text"))) result.append( (tag_name, (), match.end("text"), match.end())) # Find "<url>" links (gray out). matches = re.finditer(LINK_ALT, text) for match in matches: if match_inside_code_blocks(match): continue result.append(( self.TAG_NAME_GRAY_TEXT, (), match.start("text"), match.end("text"))) # Find "---" horizontal rule (center). matches = re.finditer(HORIZONTAL_RULE, text) for match in matches: if match_inside_code_blocks(match): continue result.append(( self.TAG_NAME_CENTER, (), match.start("symbols"), match.end("symbols"))) # Find "> blockquote" (offset). matches = re.finditer(BLOCK_QUOTE, text) for match in matches: if match_inside_code_blocks(match): continue result.append((self.TAG_NAME_MARGIN_INDENT, (2, -2), match.start(), match.end())) # Find "# Header" (offset+bold). matches = re.finditer(HEADER, text) for match in matches: if match_inside_code_blocks(match): continue margin = -len(match.group("level")) - 1 result.append(( self.TAG_NAME_MARGIN_INDENT, (margin, 0), match.start(), match.end())) result.append( (self.TAG_NAME_BOLD, (), match.start(), match.end())) # Find "=======" header underline (bold). matches = re.finditer(HEADER_UNDER, text) for match in matches: if match_inside_code_blocks(match): continue # check if it's a YAML fronmatter if frontmatter := re.search(markup_regex.FRONTMATTER, text): if match.start() <= frontmatter.end(): continue result.append( (self.TAG_NAME_BOLD, (), match.start(), match.end())) # Send parsed data back. child_conn.send((text, result)) def on_parsed(self, _source, _condition): """Reads the parsing result from the pipe and triggers any pending apply.""" if self.apply_pending: self.parsing = False # self.apply will reenable it right away. self.apply() # self.apply clears the apply pending flag. try: if self.parent_conn.poll(): self.do_apply(*self.parent_conn.recv()) return True except EOFError: return False finally: self.parsing = False def do_apply(self, original_text, result=[]): """Applies the result of parsing if the current text matches the original text.""" buffer = self.text_buffer start = buffer.get_start_iter() end = buffer.get_end_iter() text = self.text_buffer.get_slice(start, end, False) # Apply markup tags. if text == original_text and text != self.marked_up_text: buffer.remove_tag(self.tag_italic, start, end) buffer.remove_tag(self.tag_bold, start, end) buffer.remove_tag(self.tag_bold_italic, start, end) buffer.remove_tag(self.tag_strikethrough, start, end) buffer.remove_tag(self.tag_center, start, end) buffer.remove_tag(self.tag_plain_text, start, end) buffer.remove_tag(self.tag_gray_text, start, end) buffer.remove_tag(self.tag_code_text, start, end) buffer.remove_tag(self.tag_code_block, start, end) buffer.remove_tag(self.tag_wrap_none, start, end) for tag in self.tags_margins_indents.values(): buffer.remove_tag(tag, start, end) for tag_name, tag_args, tag_start, tag_end in result: buffer.apply_tag( self.tags_markup[tag_name](tag_args), buffer.get_iter_at_offset(tag_start), buffer.get_iter_at_offset(tag_end)) # Apply focus mode tag (grey out before/after current sentence). buffer.remove_tag(self.tag_unfocused_text, start, end) if self.textview.focus_mode: start_sentence, end_sentence = buffer.get_current_sentence_bounds() buffer.apply_tag(self.tag_unfocused_text, start, start_sentence) buffer.apply_tag(self.tag_unfocused_text, end_sentence, end) # Margin and indent are cumulative. They differ in two ways: # * Margin is always in the beginning, # which means it effectively only affects the first line # of multi-line text. Indent is applied to every line. # * Margin level can be negative, as a baseline margin exists # from which it can be subtracted. # Indent is always positive, or 0. def get_margin_indent_tag(self, margin_level, indent_level): level = (margin_level, indent_level) if level not in self.tags_margins_indents: margin, indent = self.get_margin_indent(margin_level, indent_level) tag = self.text_buffer.create_tag( "margin_indent_{}_{}".format(margin_level, indent_level), left_margin=margin, indent=indent) self.tags_margins_indents[level] = tag return tag else: return self.tags_margins_indents[level] def get_margin_indent(self, margin_level, indent_level, baseline_margin=None, char_width=None): if baseline_margin is None: baseline_margin = self.textview.get_left_margin() if char_width is None: char_width = helpers.get_char_width(self.textview) margin = max(baseline_margin + char_width * margin_level, 0) indent = char_width * indent_level return margin, indent def update_margins_indents(self): baseline_margin = self.textview.get_left_margin() char_width = helpers.get_char_width(self.textview) # Bail out if neither the baseline margin nor character width change if baseline_margin == self.baseline_margin and char_width == self.char_width: return self.baseline_margin = baseline_margin self.char_width = char_width # Adjust tab size tab_array = Pango.TabArray.new(1, True) tab_array.set_tab(0, Pango.TabAlign.LEFT, 4 * char_width) self.textview.set_tabs(tab_array) # Adjust margins and indents for level, tag in self.tags_margins_indents.items(): margin, indent = self.get_margin_indent( *level, baseline_margin, char_width) tag.set_properties(left_margin=margin, indent=indent) def stop(self, *_): self.parent_conn.close() ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/text_view_scroller.py�����������0000775�0000000�0000000�00000016114�15066577064�0030011�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2019, Gonçalo Silva # 2021, Alice Mikhaylenko # 2025, Manuel Genovés # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gtk, GObject class TextViewScroller: def __init__(self, textview, scrolled_window): super().__init__() self.textview = textview self.scrolled_window = scrolled_window self.smooth_scroller = None def can_scroll(self): vap = self.scrolled_window.get_vadjustment() return vap.get_upper() > vap.get_page_size() def get_scroll_scale_(self): vap = self.scrolled_window.get_vadjustment() if vap.get_upper() > vap.get_page_size(): return vap.get_value() / (vap.get_upper() - vap.get_page_size()) else: return 0 def set_scroll_scale_(self, scale): vap = self.scrolled_window.get_vadjustment() vap.set_value((vap.get_upper() - vap.get_page_size()) * scale) def scroll_to_mark(self, mark, center): """Scrolls until mark is visible, if needed.""" target_pos = self.get_target_pos_for_mark(mark, center) if target_pos: self.scrolled_window.get_vadjustment().set_value(target_pos) def smooth_scroll_to_mark(self, mark, center): """Smoothly scrolls until mark is visible, if needed.""" if self.smooth_scroller and self.smooth_scroller.is_started: self.smooth_scroller.end() target_pos = self.get_target_pos_for_mark(mark, center) if target_pos: source_pos = self.scrolled_window.get_vadjustment().get_value() self.smooth_scroller = SmoothScroller( self.scrolled_window, source_pos, target_pos) self.smooth_scroller.start() def get_target_pos_for_mark(self, mark, center): margin = 32 mark_iter = self.textview.get_buffer().get_iter_at_mark(mark) mark_rect = self.textview.get_iter_location(mark_iter) vap = self.scrolled_window.get_vadjustment() pos_y = mark_rect.y + mark_rect.height + self.textview.get_top_margin() pos_viewport_y = pos_y - vap.get_value() target_pos = None if center: if pos_viewport_y != vap.get_page_size() / 2: target_pos = pos_y - (vap.get_page_size() / 2) elif pos_viewport_y > vap.get_page_size() - margin: target_pos = pos_y - vap.get_page_size() + margin elif pos_viewport_y < margin: target_pos = pos_y - margin - mark_rect.height return target_pos class SmoothScroller: def __init__(self, scrolled_window, source_pos, target_pos): super().__init__() self.scrolled_window = scrolled_window self.source_pos = source_pos self.target_pos = target_pos self.duration = max(100, (target_pos - source_pos) / 50) * 4000 self.is_started = False self.is_setup = False self.start_time = 0 self.end_time = 0 self.tick_callback_id = 0 def start(self): self.is_started = True self.tick_callback_id = self.scrolled_window.add_tick_callback( self.on_tick) def end(self): self.scrolled_window.remove_tick_callback(self.tick_callback_id) self.is_started = False def setup(self, time): self.start_time = time self.end_time = time + self.duration self.is_setup = True def on_tick(self, widget, frame_clock): def ease_out_cubic(value): return pow(value - 1, 3) + 1 now = frame_clock.get_frame_time() if not self.is_setup: self.setup(now) if now < self.end_time: time = float(now - self.start_time) / \ float(self.end_time - self.start_time) else: time = 1 self.end() time = ease_out_cubic(time) pos = self.source_pos + (time * (self.target_pos - self.source_pos)) widget.get_vadjustment().set_value(pos) return True class ApostropheBorderScrollable(Adw.Bin, Gtk.Scrollable): __gtype_name__ = 'ApostropheBorderScrollable' top_margin = GObject.Property(type=int, default=0) bottom_margin = GObject.Property(type=int, default=0) vadjustment = GObject.Property(type=Gtk.Adjustment, flags = GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT) hadjustment = GObject.Property(type=Gtk.Adjustment, flags = GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT) vscroll_policy = GObject.Property(type=Gtk.ScrollablePolicy, default=Gtk.ScrollablePolicy.MINIMUM) hscroll_policy = GObject.Property(type=Gtk.ScrollablePolicy, default=Gtk.ScrollablePolicy.MINIMUM) def __init__(self): super().__init__() self._bind_vadjustment = None self._bind_hadjustment = None self._bind_vscroll_policy = None self._bind_hscroll_policy = None self.connect('notify::child', self.on_child_notify) def on_child_notify(self, *args): self.unbind_properties() child = self.get_child() if isinstance(child, Gtk.Scrollable): self.bind_properties() def do_get_css_name(self): return "border-scrollable" def do_get_border(self): border = Gtk.Border() child = self.get_child() if not isinstance(child, Gtk.Scrollable): return False, border border.top += self.top_margin border.bottom += self.bottom_margin return True, border def bind_properties(self): child = self.get_child() if not child: return self._bind_vadjustment = self.bind_property( 'vadjustment', child, 'vadjustment', GObject.BindingFlags.SYNC_CREATE ) self._bind_hadjustment = self.bind_property( 'hadjustment', child, 'hadjustment', GObject.BindingFlags.SYNC_CREATE ) self._bind_vscroll_policy = self.bind_property( 'vscroll-policy', child, 'vscroll-policy', GObject.BindingFlags.SYNC_CREATE ) self._bind_hscroll_policy = self.bind_property( 'hscroll-policy', child, 'hscroll-policy', GObject.BindingFlags.SYNC_CREATE ) def unbind_properties(self): for binding_name in [ '_bind_vadjustment', '_bind_hadjustment', '_bind_vscroll_policy', '_bind_hscroll_policy' ]: binding = getattr(self, binding_name) if binding is not None: binding.unbind() setattr(self, binding_name, None) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/apostrophe/theme_switcher.py���������������0000664�0000000�0000000�00000010162�15066577064�0027072�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# BEGIN LICENSE # Copyright 2020, Manuel Genovés <manuel.genoves@gmail.com> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranties of # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR # PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # END LICENSE import gi gi.require_version('Gtk', '4.0') from gi.repository import Adw, Gio, GObject, Gtk from apostrophe.helpers import get_media_path from .settings import Settings class Theme: '''Abstracts getters for the current theme related resources''' settings = Settings.new() style_manager = Adw.StyleManager.get_default() def __init__(self, name, web_css): self.name = name self.web_css = web_css @classmethod def get_current(cls): current_theme = defaultThemes[0] color_scheme = cls.settings.get_string("color-scheme") for theme in defaultThemes: if color_scheme == "system": color_scheme = "dark" if cls.style_manager.get_dark() else "light" if color_scheme == theme.name: current_theme = theme return current_theme defaultThemes = [ Theme('light', get_media_path('/media/css/web/adwaita.css')), Theme('dark', get_media_path('/media/css/web/adwaita.css')), Theme('sepia', get_media_path('/media/css/web/adwaita-sepia.css')), ] @Gtk.Template(resource_path='/org/gnome/gitlab/somas/Apostrophe/ui/ThemeSwitcher.ui') class ThemeSwitcher(Gtk.Box): __gtype_name__ = "ThemeSwitcher" color_scheme = "light" system_selector = Gtk.Template.Child() light_selector = Gtk.Template.Child() sepia_selector = Gtk.Template.Child() dark_selector = Gtk.Template.Child() settings = Settings.new() show_system = GObject.property(type=bool, default=True) @GObject.Property(type=str) def selected_color_scheme(self): """Read-write integer property.""" return self.color_scheme @selected_color_scheme.setter def selected_color_scheme(self, color_scheme): self.color_scheme = color_scheme if color_scheme == "system": self.system_selector.set_active(True) self.style_manager.set_color_scheme(Adw.ColorScheme.PREFER_LIGHT) if color_scheme == "light": self.light_selector.set_active(True) self.style_manager.set_color_scheme(Adw.ColorScheme.FORCE_LIGHT) if color_scheme == "sepia": self.sepia_selector.set_active(True) self.style_manager.set_color_scheme(Adw.ColorScheme.FORCE_LIGHT) if color_scheme == "dark": self.dark_selector.set_active(True) self.style_manager.set_color_scheme(Adw.ColorScheme.FORCE_DARK) def __init__(self, **kwargs): super().__init__(**kwargs) self.style_manager = Adw.StyleManager.get_default() color_scheme = self.settings.get_string("color-scheme") self.color_scheme = color_scheme self.settings.bind( "color-scheme", self, "selected_color_scheme", Gio.SettingsBindFlags.DEFAULT) self.style_manager.bind_property("system-supports-color-schemes", self, "show_system", GObject.BindingFlags.SYNC_CREATE) @Gtk.Template.Callback() def _on_color_scheme_changed(self, widget, paramspec): if self.system_selector.get_active(): self.selected_color_scheme = "system" if self.light_selector.get_active(): self.selected_color_scheme = "light" if self.sepia_selector.get_active(): self.selected_color_scheme = "sepia" if self.dark_selector.get_active(): self.selected_color_scheme = "dark" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/���������������������������������0000775�0000000�0000000�00000000000�15066577064�0023214�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak/�������������������������0000775�0000000�0000000�00000000000�15066577064�0024636�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak/cargo-typst-sources.json�0000664�0000000�0000000�00000614740�15066577064�0031502�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[ { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/adler2/adler2-2.0.0.crate", "sha256": "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627", "dest": "cargo/vendor/adler2-2.0.0" }, { "type": "inline", "contents": "{\"package\": \"512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627\", \"files\": {}}", "dest": "cargo/vendor/adler2-2.0.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/aho-corasick/aho-corasick-1.1.3.crate", "sha256": "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916", "dest": "cargo/vendor/aho-corasick-1.1.3" }, { "type": "inline", "contents": "{\"package\": \"8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916\", \"files\": {}}", "dest": "cargo/vendor/aho-corasick-1.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/android-tzdata/android-tzdata-0.1.1.crate", "sha256": "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0", "dest": "cargo/vendor/android-tzdata-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0\", \"files\": {}}", "dest": "cargo/vendor/android-tzdata-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/android_system_properties/android_system_properties-0.1.5.crate", "sha256": "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311", "dest": "cargo/vendor/android_system_properties-0.1.5" }, { "type": "inline", "contents": "{\"package\": \"819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311\", \"files\": {}}", "dest": "cargo/vendor/android_system_properties-0.1.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/anstream/anstream-0.6.18.crate", "sha256": "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b", "dest": "cargo/vendor/anstream-0.6.18" }, { "type": "inline", "contents": "{\"package\": \"8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b\", \"files\": {}}", "dest": "cargo/vendor/anstream-0.6.18", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/anstyle/anstyle-1.0.10.crate", "sha256": "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9", "dest": "cargo/vendor/anstyle-1.0.10" }, { "type": "inline", "contents": "{\"package\": \"55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9\", \"files\": {}}", "dest": "cargo/vendor/anstyle-1.0.10", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/anstyle-parse/anstyle-parse-0.2.6.crate", "sha256": "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9", "dest": "cargo/vendor/anstyle-parse-0.2.6" }, { "type": "inline", "contents": "{\"package\": \"3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9\", \"files\": {}}", "dest": "cargo/vendor/anstyle-parse-0.2.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/anstyle-query/anstyle-query-1.1.2.crate", "sha256": "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c", "dest": "cargo/vendor/anstyle-query-1.1.2" }, { "type": "inline", "contents": "{\"package\": \"79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c\", \"files\": {}}", "dest": "cargo/vendor/anstyle-query-1.1.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/anstyle-wincon/anstyle-wincon-3.0.7.crate", "sha256": "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e", "dest": "cargo/vendor/anstyle-wincon-3.0.7" }, { "type": "inline", "contents": "{\"package\": \"ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e\", \"files\": {}}", "dest": "cargo/vendor/anstyle-wincon-3.0.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/approx/approx-0.5.1.crate", "sha256": "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6", "dest": "cargo/vendor/approx-0.5.1" }, { "type": "inline", "contents": "{\"package\": \"cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6\", \"files\": {}}", "dest": "cargo/vendor/approx-0.5.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/arbitrary/arbitrary-1.4.1.crate", "sha256": "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223", "dest": "cargo/vendor/arbitrary-1.4.1" }, { "type": "inline", "contents": "{\"package\": \"dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223\", \"files\": {}}", "dest": "cargo/vendor/arbitrary-1.4.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/arrayref/arrayref-0.3.9.crate", "sha256": "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb", "dest": "cargo/vendor/arrayref-0.3.9" }, { "type": "inline", "contents": "{\"package\": \"76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb\", \"files\": {}}", "dest": "cargo/vendor/arrayref-0.3.9", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/arrayvec/arrayvec-0.7.6.crate", "sha256": "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50", "dest": "cargo/vendor/arrayvec-0.7.6" }, { "type": "inline", "contents": "{\"package\": \"7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50\", \"files\": {}}", "dest": "cargo/vendor/arrayvec-0.7.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ascii/ascii-1.1.0.crate", "sha256": "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16", "dest": "cargo/vendor/ascii-1.1.0" }, { "type": "inline", "contents": "{\"package\": \"d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16\", \"files\": {}}", "dest": "cargo/vendor/ascii-1.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/autocfg/autocfg-1.4.0.crate", "sha256": "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26", "dest": "cargo/vendor/autocfg-1.4.0" }, { "type": "inline", "contents": "{\"package\": \"ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26\", \"files\": {}}", "dest": "cargo/vendor/autocfg-1.4.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/az/az-1.2.1.crate", "sha256": "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973", "dest": "cargo/vendor/az-1.2.1" }, { "type": "inline", "contents": "{\"package\": \"7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973\", \"files\": {}}", "dest": "cargo/vendor/az-1.2.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/base64/base64-0.22.1.crate", "sha256": "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6", "dest": "cargo/vendor/base64-0.22.1" }, { "type": "inline", "contents": "{\"package\": \"72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6\", \"files\": {}}", "dest": "cargo/vendor/base64-0.22.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/biblatex/biblatex-0.10.0.crate", "sha256": "a35a7317fcbdbef94b60d0dd0a658711a936accfce4a631fea4bf8e527eff3c2", "dest": "cargo/vendor/biblatex-0.10.0" }, { "type": "inline", "contents": "{\"package\": \"a35a7317fcbdbef94b60d0dd0a658711a936accfce4a631fea4bf8e527eff3c2\", \"files\": {}}", "dest": "cargo/vendor/biblatex-0.10.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/bincode/bincode-1.3.3.crate", "sha256": "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad", "dest": "cargo/vendor/bincode-1.3.3" }, { "type": "inline", "contents": "{\"package\": \"b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad\", \"files\": {}}", "dest": "cargo/vendor/bincode-1.3.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/bit-set/bit-set-0.5.3.crate", "sha256": "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1", "dest": "cargo/vendor/bit-set-0.5.3" }, { "type": "inline", "contents": "{\"package\": \"0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1\", \"files\": {}}", "dest": "cargo/vendor/bit-set-0.5.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/bit-vec/bit-vec-0.6.3.crate", "sha256": "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb", "dest": "cargo/vendor/bit-vec-0.6.3" }, { "type": "inline", "contents": "{\"package\": \"349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb\", \"files\": {}}", "dest": "cargo/vendor/bit-vec-0.6.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/bitflags/bitflags-1.3.2.crate", "sha256": "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a", "dest": "cargo/vendor/bitflags-1.3.2" }, { "type": "inline", "contents": "{\"package\": \"bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a\", \"files\": {}}", "dest": "cargo/vendor/bitflags-1.3.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/bitflags/bitflags-2.8.0.crate", "sha256": "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36", "dest": "cargo/vendor/bitflags-2.8.0" }, { "type": "inline", "contents": "{\"package\": \"8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36\", \"files\": {}}", "dest": "cargo/vendor/bitflags-2.8.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/bumpalo/bumpalo-3.17.0.crate", "sha256": "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf", "dest": "cargo/vendor/bumpalo-3.17.0" }, { "type": "inline", "contents": "{\"package\": \"1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf\", \"files\": {}}", "dest": "cargo/vendor/bumpalo-3.17.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/by_address/by_address-1.2.1.crate", "sha256": "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06", "dest": "cargo/vendor/by_address-1.2.1" }, { "type": "inline", "contents": "{\"package\": \"64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06\", \"files\": {}}", "dest": "cargo/vendor/by_address-1.2.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/bytemuck/bytemuck-1.21.0.crate", "sha256": "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3", "dest": "cargo/vendor/bytemuck-1.21.0" }, { "type": "inline", "contents": "{\"package\": \"ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3\", \"files\": {}}", "dest": "cargo/vendor/bytemuck-1.21.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/byteorder/byteorder-1.5.0.crate", "sha256": "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b", "dest": "cargo/vendor/byteorder-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b\", \"files\": {}}", "dest": "cargo/vendor/byteorder-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/byteorder-lite/byteorder-lite-0.1.0.crate", "sha256": "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495", "dest": "cargo/vendor/byteorder-lite-0.1.0" }, { "type": "inline", "contents": "{\"package\": \"8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495\", \"files\": {}}", "dest": "cargo/vendor/byteorder-lite-0.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/cc/cc-1.2.11.crate", "sha256": "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf", "dest": "cargo/vendor/cc-1.2.11" }, { "type": "inline", "contents": "{\"package\": \"e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf\", \"files\": {}}", "dest": "cargo/vendor/cc-1.2.11", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/cfg-if/cfg-if-1.0.0.crate", "sha256": "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd", "dest": "cargo/vendor/cfg-if-1.0.0" }, { "type": "inline", "contents": "{\"package\": \"baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd\", \"files\": {}}", "dest": "cargo/vendor/cfg-if-1.0.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/chinese-number/chinese-number-0.7.7.crate", "sha256": "49fccaef6346f6d6a741908d3b79fe97c2debe2fbb5eb3a7d00ff5981b52bb6c", "dest": "cargo/vendor/chinese-number-0.7.7" }, { "type": "inline", "contents": "{\"package\": \"49fccaef6346f6d6a741908d3b79fe97c2debe2fbb5eb3a7d00ff5981b52bb6c\", \"files\": {}}", "dest": "cargo/vendor/chinese-number-0.7.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/chinese-variant/chinese-variant-1.1.3.crate", "sha256": "7588475145507237ded760e52bf2f1085495245502033756d28ea72ade0e498b", "dest": "cargo/vendor/chinese-variant-1.1.3" }, { "type": "inline", "contents": "{\"package\": \"7588475145507237ded760e52bf2f1085495245502033756d28ea72ade0e498b\", \"files\": {}}", "dest": "cargo/vendor/chinese-variant-1.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/chrono/chrono-0.4.39.crate", "sha256": "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825", "dest": "cargo/vendor/chrono-0.4.39" }, { "type": "inline", "contents": "{\"package\": \"7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825\", \"files\": {}}", "dest": "cargo/vendor/chrono-0.4.39", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/chunked_transfer/chunked_transfer-1.5.0.crate", "sha256": "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901", "dest": "cargo/vendor/chunked_transfer-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901\", \"files\": {}}", "dest": "cargo/vendor/chunked_transfer-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ciborium/ciborium-0.2.2.crate", "sha256": "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e", "dest": "cargo/vendor/ciborium-0.2.2" }, { "type": "inline", "contents": "{\"package\": \"42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e\", \"files\": {}}", "dest": "cargo/vendor/ciborium-0.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ciborium-io/ciborium-io-0.2.2.crate", "sha256": "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757", "dest": "cargo/vendor/ciborium-io-0.2.2" }, { "type": "inline", "contents": "{\"package\": \"05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757\", \"files\": {}}", "dest": "cargo/vendor/ciborium-io-0.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ciborium-ll/ciborium-ll-0.2.2.crate", "sha256": "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9", "dest": "cargo/vendor/ciborium-ll-0.2.2" }, { "type": "inline", "contents": "{\"package\": \"57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9\", \"files\": {}}", "dest": "cargo/vendor/ciborium-ll-0.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/citationberg/citationberg-0.5.0.crate", "sha256": "e4595e03beafb40235070080b5286d3662525efc622cca599585ff1d63f844fa", "dest": "cargo/vendor/citationberg-0.5.0" }, { "type": "inline", "contents": "{\"package\": \"e4595e03beafb40235070080b5286d3662525efc622cca599585ff1d63f844fa\", \"files\": {}}", "dest": "cargo/vendor/citationberg-0.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/clap/clap-4.5.28.crate", "sha256": "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff", "dest": "cargo/vendor/clap-4.5.28" }, { "type": "inline", "contents": "{\"package\": \"3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff\", \"files\": {}}", "dest": "cargo/vendor/clap-4.5.28", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/clap_builder/clap_builder-4.5.27.crate", "sha256": "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7", "dest": "cargo/vendor/clap_builder-4.5.27" }, { "type": "inline", "contents": "{\"package\": \"1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7\", \"files\": {}}", "dest": "cargo/vendor/clap_builder-4.5.27", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/clap_complete/clap_complete-4.5.44.crate", "sha256": "375f9d8255adeeedd51053574fd8d4ba875ea5fa558e86617b07f09f1680c8b6", "dest": "cargo/vendor/clap_complete-4.5.44" }, { "type": "inline", "contents": "{\"package\": \"375f9d8255adeeedd51053574fd8d4ba875ea5fa558e86617b07f09f1680c8b6\", \"files\": {}}", "dest": "cargo/vendor/clap_complete-4.5.44", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/clap_derive/clap_derive-4.5.28.crate", "sha256": "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed", "dest": "cargo/vendor/clap_derive-4.5.28" }, { "type": "inline", "contents": "{\"package\": \"bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed\", \"files\": {}}", "dest": "cargo/vendor/clap_derive-4.5.28", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/clap_lex/clap_lex-0.7.4.crate", "sha256": "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6", "dest": "cargo/vendor/clap_lex-0.7.4" }, { "type": "inline", "contents": "{\"package\": \"f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6\", \"files\": {}}", "dest": "cargo/vendor/clap_lex-0.7.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/clap_mangen/clap_mangen-0.2.26.crate", "sha256": "724842fa9b144f9b89b3f3d371a89f3455eea660361d13a554f68f8ae5d6c13a", "dest": "cargo/vendor/clap_mangen-0.2.26" }, { "type": "inline", "contents": "{\"package\": \"724842fa9b144f9b89b3f3d371a89f3455eea660361d13a554f68f8ae5d6c13a\", \"files\": {}}", "dest": "cargo/vendor/clap_mangen-0.2.26", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/cobs/cobs-0.2.3.crate", "sha256": "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15", "dest": "cargo/vendor/cobs-0.2.3" }, { "type": "inline", "contents": "{\"package\": \"67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15\", \"files\": {}}", "dest": "cargo/vendor/cobs-0.2.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/codespan-reporting/codespan-reporting-0.11.1.crate", "sha256": "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e", "dest": "cargo/vendor/codespan-reporting-0.11.1" }, { "type": "inline", "contents": "{\"package\": \"3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e\", \"files\": {}}", "dest": "cargo/vendor/codespan-reporting-0.11.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/codex/codex-0.1.1.crate", "sha256": "724d27a0ee38b700e5e164350e79aba601a0db673ac47fce1cb74c3e38864036", "dest": "cargo/vendor/codex-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"724d27a0ee38b700e5e164350e79aba601a0db673ac47fce1cb74c3e38864036\", \"files\": {}}", "dest": "cargo/vendor/codex-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/color-print/color-print-0.3.7.crate", "sha256": "3aa954171903797d5623e047d9ab69d91b493657917bdfb8c2c80ecaf9cdb6f4", "dest": "cargo/vendor/color-print-0.3.7" }, { "type": "inline", "contents": "{\"package\": \"3aa954171903797d5623e047d9ab69d91b493657917bdfb8c2c80ecaf9cdb6f4\", \"files\": {}}", "dest": "cargo/vendor/color-print-0.3.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/color-print-proc-macro/color-print-proc-macro-0.3.7.crate", "sha256": "692186b5ebe54007e45a59aea47ece9eb4108e141326c304cdc91699a7118a22", "dest": "cargo/vendor/color-print-proc-macro-0.3.7" }, { "type": "inline", "contents": "{\"package\": \"692186b5ebe54007e45a59aea47ece9eb4108e141326c304cdc91699a7118a22\", \"files\": {}}", "dest": "cargo/vendor/color-print-proc-macro-0.3.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/color_quant/color_quant-1.1.0.crate", "sha256": "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b", "dest": "cargo/vendor/color_quant-1.1.0" }, { "type": "inline", "contents": "{\"package\": \"3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b\", \"files\": {}}", "dest": "cargo/vendor/color_quant-1.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/colorchoice/colorchoice-1.0.3.crate", "sha256": "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990", "dest": "cargo/vendor/colorchoice-1.0.3" }, { "type": "inline", "contents": "{\"package\": \"5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990\", \"files\": {}}", "dest": "cargo/vendor/colorchoice-1.0.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/comemo/comemo-0.4.0.crate", "sha256": "df6916408a724339aa77b18214233355f3eb04c42eb895e5f8909215bd8a7a91", "dest": "cargo/vendor/comemo-0.4.0" }, { "type": "inline", "contents": "{\"package\": \"df6916408a724339aa77b18214233355f3eb04c42eb895e5f8909215bd8a7a91\", \"files\": {}}", "dest": "cargo/vendor/comemo-0.4.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/comemo-macros/comemo-macros-0.4.0.crate", "sha256": "c8936e42f9b4f5bdfaf23700609ac1f11cb03ad4c1ec128a4ee4fd0903e228db", "dest": "cargo/vendor/comemo-macros-0.4.0" }, { "type": "inline", "contents": "{\"package\": \"c8936e42f9b4f5bdfaf23700609ac1f11cb03ad4c1ec128a4ee4fd0903e228db\", \"files\": {}}", "dest": "cargo/vendor/comemo-macros-0.4.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/core-foundation/core-foundation-0.9.4.crate", "sha256": "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f", "dest": "cargo/vendor/core-foundation-0.9.4" }, { "type": "inline", "contents": "{\"package\": \"91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f\", \"files\": {}}", "dest": "cargo/vendor/core-foundation-0.9.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/core-foundation-sys/core-foundation-sys-0.8.7.crate", "sha256": "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b", "dest": "cargo/vendor/core-foundation-sys-0.8.7" }, { "type": "inline", "contents": "{\"package\": \"773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b\", \"files\": {}}", "dest": "cargo/vendor/core-foundation-sys-0.8.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/core_maths/core_maths-0.1.1.crate", "sha256": "77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30", "dest": "cargo/vendor/core_maths-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"77745e017f5edba1a9c1d854f6f3a52dac8a12dd5af5d2f54aecf61e43d80d30\", \"files\": {}}", "dest": "cargo/vendor/core_maths-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/crc32fast/crc32fast-1.4.2.crate", "sha256": "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3", "dest": "cargo/vendor/crc32fast-1.4.2" }, { "type": "inline", "contents": "{\"package\": \"a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3\", \"files\": {}}", "dest": "cargo/vendor/crc32fast-1.4.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/crossbeam-deque/crossbeam-deque-0.8.6.crate", "sha256": "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51", "dest": "cargo/vendor/crossbeam-deque-0.8.6" }, { "type": "inline", "contents": "{\"package\": \"9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51\", \"files\": {}}", "dest": "cargo/vendor/crossbeam-deque-0.8.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/crossbeam-epoch/crossbeam-epoch-0.9.18.crate", "sha256": "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e", "dest": "cargo/vendor/crossbeam-epoch-0.9.18" }, { "type": "inline", "contents": "{\"package\": \"5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e\", \"files\": {}}", "dest": "cargo/vendor/crossbeam-epoch-0.9.18", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/crossbeam-utils/crossbeam-utils-0.8.21.crate", "sha256": "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28", "dest": "cargo/vendor/crossbeam-utils-0.8.21" }, { "type": "inline", "contents": "{\"package\": \"d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28\", \"files\": {}}", "dest": "cargo/vendor/crossbeam-utils-0.8.21", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/crunchy/crunchy-0.2.3.crate", "sha256": "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929", "dest": "cargo/vendor/crunchy-0.2.3" }, { "type": "inline", "contents": "{\"package\": \"43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929\", \"files\": {}}", "dest": "cargo/vendor/crunchy-0.2.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/csv/csv-1.3.1.crate", "sha256": "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf", "dest": "cargo/vendor/csv-1.3.1" }, { "type": "inline", "contents": "{\"package\": \"acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf\", \"files\": {}}", "dest": "cargo/vendor/csv-1.3.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/csv-core/csv-core-0.1.11.crate", "sha256": "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70", "dest": "cargo/vendor/csv-core-0.1.11" }, { "type": "inline", "contents": "{\"package\": \"5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70\", \"files\": {}}", "dest": "cargo/vendor/csv-core-0.1.11", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/data-url/data-url-0.3.1.crate", "sha256": "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a", "dest": "cargo/vendor/data-url-0.3.1" }, { "type": "inline", "contents": "{\"package\": \"5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a\", \"files\": {}}", "dest": "cargo/vendor/data-url-0.3.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/deranged/deranged-0.3.11.crate", "sha256": "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4", "dest": "cargo/vendor/deranged-0.3.11" }, { "type": "inline", "contents": "{\"package\": \"b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4\", \"files\": {}}", "dest": "cargo/vendor/deranged-0.3.11", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/derive_arbitrary/derive_arbitrary-1.4.1.crate", "sha256": "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800", "dest": "cargo/vendor/derive_arbitrary-1.4.1" }, { "type": "inline", "contents": "{\"package\": \"30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800\", \"files\": {}}", "dest": "cargo/vendor/derive_arbitrary-1.4.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/dirs/dirs-6.0.0.crate", "sha256": "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e", "dest": "cargo/vendor/dirs-6.0.0" }, { "type": "inline", "contents": "{\"package\": \"c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e\", \"files\": {}}", "dest": "cargo/vendor/dirs-6.0.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/dirs-sys/dirs-sys-0.5.0.crate", "sha256": "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab", "dest": "cargo/vendor/dirs-sys-0.5.0" }, { "type": "inline", "contents": "{\"package\": \"e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab\", \"files\": {}}", "dest": "cargo/vendor/dirs-sys-0.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/displaydoc/displaydoc-0.2.5.crate", "sha256": "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0", "dest": "cargo/vendor/displaydoc-0.2.5" }, { "type": "inline", "contents": "{\"package\": \"97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0\", \"files\": {}}", "dest": "cargo/vendor/displaydoc-0.2.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/downcast-rs/downcast-rs-1.2.1.crate", "sha256": "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2", "dest": "cargo/vendor/downcast-rs-1.2.1" }, { "type": "inline", "contents": "{\"package\": \"75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2\", \"files\": {}}", "dest": "cargo/vendor/downcast-rs-1.2.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ecow/ecow-0.2.3.crate", "sha256": "e42fc0a93992b20c58b99e59d61eaf1635a25bfbe49e4275c34ba0aee98119ba", "dest": "cargo/vendor/ecow-0.2.3" }, { "type": "inline", "contents": "{\"package\": \"e42fc0a93992b20c58b99e59d61eaf1635a25bfbe49e4275c34ba0aee98119ba\", \"files\": {}}", "dest": "cargo/vendor/ecow-0.2.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/either/either-1.13.0.crate", "sha256": "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0", "dest": "cargo/vendor/either-1.13.0" }, { "type": "inline", "contents": "{\"package\": \"60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0\", \"files\": {}}", "dest": "cargo/vendor/either-1.13.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/embedded-io/embedded-io-0.4.0.crate", "sha256": "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced", "dest": "cargo/vendor/embedded-io-0.4.0" }, { "type": "inline", "contents": "{\"package\": \"ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced\", \"files\": {}}", "dest": "cargo/vendor/embedded-io-0.4.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/embedded-io/embedded-io-0.6.1.crate", "sha256": "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d", "dest": "cargo/vendor/embedded-io-0.6.1" }, { "type": "inline", "contents": "{\"package\": \"edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d\", \"files\": {}}", "dest": "cargo/vendor/embedded-io-0.6.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/enum-ordinalize/enum-ordinalize-4.3.0.crate", "sha256": "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5", "dest": "cargo/vendor/enum-ordinalize-4.3.0" }, { "type": "inline", "contents": "{\"package\": \"fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5\", \"files\": {}}", "dest": "cargo/vendor/enum-ordinalize-4.3.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/enum-ordinalize-derive/enum-ordinalize-derive-4.3.1.crate", "sha256": "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff", "dest": "cargo/vendor/enum-ordinalize-derive-4.3.1" }, { "type": "inline", "contents": "{\"package\": \"0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff\", \"files\": {}}", "dest": "cargo/vendor/enum-ordinalize-derive-4.3.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/env_proxy/env_proxy-0.4.1.crate", "sha256": "3a5019be18538406a43b5419a5501461f0c8b49ea7dfda0cfc32f4e51fc44be1", "dest": "cargo/vendor/env_proxy-0.4.1" }, { "type": "inline", "contents": "{\"package\": \"3a5019be18538406a43b5419a5501461f0c8b49ea7dfda0cfc32f4e51fc44be1\", \"files\": {}}", "dest": "cargo/vendor/env_proxy-0.4.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/equivalent/equivalent-1.0.1.crate", "sha256": "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5", "dest": "cargo/vendor/equivalent-1.0.1" }, { "type": "inline", "contents": "{\"package\": \"5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5\", \"files\": {}}", "dest": "cargo/vendor/equivalent-1.0.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/errno/errno-0.3.10.crate", "sha256": "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d", "dest": "cargo/vendor/errno-0.3.10" }, { "type": "inline", "contents": "{\"package\": \"33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d\", \"files\": {}}", "dest": "cargo/vendor/errno-0.3.10", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fancy-regex/fancy-regex-0.11.0.crate", "sha256": "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2", "dest": "cargo/vendor/fancy-regex-0.11.0" }, { "type": "inline", "contents": "{\"package\": \"b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2\", \"files\": {}}", "dest": "cargo/vendor/fancy-regex-0.11.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fast-srgb8/fast-srgb8-1.0.0.crate", "sha256": "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1", "dest": "cargo/vendor/fast-srgb8-1.0.0" }, { "type": "inline", "contents": "{\"package\": \"dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1\", \"files\": {}}", "dest": "cargo/vendor/fast-srgb8-1.0.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fastrand/fastrand-2.3.0.crate", "sha256": "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be", "dest": "cargo/vendor/fastrand-2.3.0" }, { "type": "inline", "contents": "{\"package\": \"37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be\", \"files\": {}}", "dest": "cargo/vendor/fastrand-2.3.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fdeflate/fdeflate-0.3.7.crate", "sha256": "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c", "dest": "cargo/vendor/fdeflate-0.3.7" }, { "type": "inline", "contents": "{\"package\": \"1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c\", \"files\": {}}", "dest": "cargo/vendor/fdeflate-0.3.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/filetime/filetime-0.2.25.crate", "sha256": "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586", "dest": "cargo/vendor/filetime-0.2.25" }, { "type": "inline", "contents": "{\"package\": \"35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586\", \"files\": {}}", "dest": "cargo/vendor/filetime-0.2.25", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/flate2/flate2-1.0.35.crate", "sha256": "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c", "dest": "cargo/vendor/flate2-1.0.35" }, { "type": "inline", "contents": "{\"package\": \"c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c\", \"files\": {}}", "dest": "cargo/vendor/flate2-1.0.35", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/float-cmp/float-cmp-0.9.0.crate", "sha256": "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4", "dest": "cargo/vendor/float-cmp-0.9.0" }, { "type": "inline", "contents": "{\"package\": \"98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4\", \"files\": {}}", "dest": "cargo/vendor/float-cmp-0.9.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fnv/fnv-1.0.7.crate", "sha256": "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1", "dest": "cargo/vendor/fnv-1.0.7" }, { "type": "inline", "contents": "{\"package\": \"3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1\", \"files\": {}}", "dest": "cargo/vendor/fnv-1.0.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/foldhash/foldhash-0.1.4.crate", "sha256": "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f", "dest": "cargo/vendor/foldhash-0.1.4" }, { "type": "inline", "contents": "{\"package\": \"a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f\", \"files\": {}}", "dest": "cargo/vendor/foldhash-0.1.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fontconfig-parser/fontconfig-parser-0.5.7.crate", "sha256": "c1fcfcd44ca6e90c921fee9fa665d530b21ef1327a4c1a6c5250ea44b776ada7", "dest": "cargo/vendor/fontconfig-parser-0.5.7" }, { "type": "inline", "contents": "{\"package\": \"c1fcfcd44ca6e90c921fee9fa665d530b21ef1327a4c1a6c5250ea44b776ada7\", \"files\": {}}", "dest": "cargo/vendor/fontconfig-parser-0.5.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fontdb/fontdb-0.21.0.crate", "sha256": "37be9fc20d966be438cd57a45767f73349477fb0f85ce86e000557f787298afb", "dest": "cargo/vendor/fontdb-0.21.0" }, { "type": "inline", "contents": "{\"package\": \"37be9fc20d966be438cd57a45767f73349477fb0f85ce86e000557f787298afb\", \"files\": {}}", "dest": "cargo/vendor/fontdb-0.21.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/foreign-types/foreign-types-0.3.2.crate", "sha256": "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1", "dest": "cargo/vendor/foreign-types-0.3.2" }, { "type": "inline", "contents": "{\"package\": \"f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1\", \"files\": {}}", "dest": "cargo/vendor/foreign-types-0.3.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/foreign-types-shared/foreign-types-shared-0.1.1.crate", "sha256": "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b", "dest": "cargo/vendor/foreign-types-shared-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b\", \"files\": {}}", "dest": "cargo/vendor/foreign-types-shared-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/form_urlencoded/form_urlencoded-1.2.1.crate", "sha256": "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456", "dest": "cargo/vendor/form_urlencoded-1.2.1" }, { "type": "inline", "contents": "{\"package\": \"e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456\", \"files\": {}}", "dest": "cargo/vendor/form_urlencoded-1.2.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fs_extra/fs_extra-1.3.0.crate", "sha256": "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c", "dest": "cargo/vendor/fs_extra-1.3.0" }, { "type": "inline", "contents": "{\"package\": \"42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c\", \"files\": {}}", "dest": "cargo/vendor/fs_extra-1.3.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/fsevent-sys/fsevent-sys-4.1.0.crate", "sha256": "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2", "dest": "cargo/vendor/fsevent-sys-4.1.0" }, { "type": "inline", "contents": "{\"package\": \"76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2\", \"files\": {}}", "dest": "cargo/vendor/fsevent-sys-4.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/getrandom/getrandom-0.2.15.crate", "sha256": "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7", "dest": "cargo/vendor/getrandom-0.2.15" }, { "type": "inline", "contents": "{\"package\": \"c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7\", \"files\": {}}", "dest": "cargo/vendor/getrandom-0.2.15", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/getrandom/getrandom-0.3.1.crate", "sha256": "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8", "dest": "cargo/vendor/getrandom-0.3.1" }, { "type": "inline", "contents": "{\"package\": \"43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8\", \"files\": {}}", "dest": "cargo/vendor/getrandom-0.3.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/gif/gif-0.13.1.crate", "sha256": "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2", "dest": "cargo/vendor/gif-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2\", \"files\": {}}", "dest": "cargo/vendor/gif-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/half/half-2.4.1.crate", "sha256": "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888", "dest": "cargo/vendor/half-2.4.1" }, { "type": "inline", "contents": "{\"package\": \"6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888\", \"files\": {}}", "dest": "cargo/vendor/half-2.4.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/hashbrown/hashbrown-0.15.2.crate", "sha256": "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289", "dest": "cargo/vendor/hashbrown-0.15.2" }, { "type": "inline", "contents": "{\"package\": \"bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289\", \"files\": {}}", "dest": "cargo/vendor/hashbrown-0.15.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/hayagriva/hayagriva-0.8.1.crate", "sha256": "954907554bb7fcba29a4f917c2d43e289ec21b69d872ccf97db160eca6caeed8", "dest": "cargo/vendor/hayagriva-0.8.1" }, { "type": "inline", "contents": "{\"package\": \"954907554bb7fcba29a4f917c2d43e289ec21b69d872ccf97db160eca6caeed8\", \"files\": {}}", "dest": "cargo/vendor/hayagriva-0.8.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/heck/heck-0.5.0.crate", "sha256": "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea", "dest": "cargo/vendor/heck-0.5.0" }, { "type": "inline", "contents": "{\"package\": \"2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea\", \"files\": {}}", "dest": "cargo/vendor/heck-0.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/httpdate/httpdate-1.0.3.crate", "sha256": "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9", "dest": "cargo/vendor/httpdate-1.0.3" }, { "type": "inline", "contents": "{\"package\": \"df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9\", \"files\": {}}", "dest": "cargo/vendor/httpdate-1.0.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/hypher/hypher-0.1.5.crate", "sha256": "3b24ad5637230df201ab1034d593f1d09bf7f2a9274f2e8897638078579f4265", "dest": "cargo/vendor/hypher-0.1.5" }, { "type": "inline", "contents": "{\"package\": \"3b24ad5637230df201ab1034d593f1d09bf7f2a9274f2e8897638078579f4265\", \"files\": {}}", "dest": "cargo/vendor/hypher-0.1.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/iana-time-zone/iana-time-zone-0.1.61.crate", "sha256": "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220", "dest": "cargo/vendor/iana-time-zone-0.1.61" }, { "type": "inline", "contents": "{\"package\": \"235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220\", \"files\": {}}", "dest": "cargo/vendor/iana-time-zone-0.1.61", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/iana-time-zone-haiku/iana-time-zone-haiku-0.1.2.crate", "sha256": "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f", "dest": "cargo/vendor/iana-time-zone-haiku-0.1.2" }, { "type": "inline", "contents": "{\"package\": \"f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f\", \"files\": {}}", "dest": "cargo/vendor/iana-time-zone-haiku-0.1.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_collections/icu_collections-1.5.0.crate", "sha256": "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526", "dest": "cargo/vendor/icu_collections-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526\", \"files\": {}}", "dest": "cargo/vendor/icu_collections-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_locid/icu_locid-1.5.0.crate", "sha256": "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637", "dest": "cargo/vendor/icu_locid-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637\", \"files\": {}}", "dest": "cargo/vendor/icu_locid-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_locid_transform/icu_locid_transform-1.5.0.crate", "sha256": "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e", "dest": "cargo/vendor/icu_locid_transform-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e\", \"files\": {}}", "dest": "cargo/vendor/icu_locid_transform-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_locid_transform_data/icu_locid_transform_data-1.5.0.crate", "sha256": "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e", "dest": "cargo/vendor/icu_locid_transform_data-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e\", \"files\": {}}", "dest": "cargo/vendor/icu_locid_transform_data-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_normalizer/icu_normalizer-1.5.0.crate", "sha256": "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f", "dest": "cargo/vendor/icu_normalizer-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f\", \"files\": {}}", "dest": "cargo/vendor/icu_normalizer-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_normalizer_data/icu_normalizer_data-1.5.0.crate", "sha256": "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516", "dest": "cargo/vendor/icu_normalizer_data-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516\", \"files\": {}}", "dest": "cargo/vendor/icu_normalizer_data-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_properties/icu_properties-1.5.1.crate", "sha256": "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5", "dest": "cargo/vendor/icu_properties-1.5.1" }, { "type": "inline", "contents": "{\"package\": \"93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5\", \"files\": {}}", "dest": "cargo/vendor/icu_properties-1.5.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_properties_data/icu_properties_data-1.5.0.crate", "sha256": "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569", "dest": "cargo/vendor/icu_properties_data-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569\", \"files\": {}}", "dest": "cargo/vendor/icu_properties_data-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_provider/icu_provider-1.5.0.crate", "sha256": "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9", "dest": "cargo/vendor/icu_provider-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9\", \"files\": {}}", "dest": "cargo/vendor/icu_provider-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_provider_adapters/icu_provider_adapters-1.5.0.crate", "sha256": "d6324dfd08348a8e0374a447ebd334044d766b1839bb8d5ccf2482a99a77c0bc", "dest": "cargo/vendor/icu_provider_adapters-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"d6324dfd08348a8e0374a447ebd334044d766b1839bb8d5ccf2482a99a77c0bc\", \"files\": {}}", "dest": "cargo/vendor/icu_provider_adapters-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_provider_blob/icu_provider_blob-1.5.0.crate", "sha256": "c24b98d1365f55d78186c205817631a4acf08d7a45bdf5dc9dcf9c5d54dccf51", "dest": "cargo/vendor/icu_provider_blob-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"c24b98d1365f55d78186c205817631a4acf08d7a45bdf5dc9dcf9c5d54dccf51\", \"files\": {}}", "dest": "cargo/vendor/icu_provider_blob-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_provider_macros/icu_provider_macros-1.5.0.crate", "sha256": "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6", "dest": "cargo/vendor/icu_provider_macros-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6\", \"files\": {}}", "dest": "cargo/vendor/icu_provider_macros-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_segmenter/icu_segmenter-1.5.0.crate", "sha256": "a717725612346ffc2d7b42c94b820db6908048f39434504cb130e8b46256b0de", "dest": "cargo/vendor/icu_segmenter-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"a717725612346ffc2d7b42c94b820db6908048f39434504cb130e8b46256b0de\", \"files\": {}}", "dest": "cargo/vendor/icu_segmenter-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/icu_segmenter_data/icu_segmenter_data-1.5.0.crate", "sha256": "f739ee737260d955e330bc83fdeaaf1631f7fb7ed218761d3c04bb13bb7d79df", "dest": "cargo/vendor/icu_segmenter_data-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"f739ee737260d955e330bc83fdeaaf1631f7fb7ed218761d3c04bb13bb7d79df\", \"files\": {}}", "dest": "cargo/vendor/icu_segmenter_data-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/idna/idna-1.0.3.crate", "sha256": "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e", "dest": "cargo/vendor/idna-1.0.3" }, { "type": "inline", "contents": "{\"package\": \"686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e\", \"files\": {}}", "dest": "cargo/vendor/idna-1.0.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/idna_adapter/idna_adapter-1.2.0.crate", "sha256": "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71", "dest": "cargo/vendor/idna_adapter-1.2.0" }, { "type": "inline", "contents": "{\"package\": \"daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71\", \"files\": {}}", "dest": "cargo/vendor/idna_adapter-1.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/if_chain/if_chain-1.0.2.crate", "sha256": "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed", "dest": "cargo/vendor/if_chain-1.0.2" }, { "type": "inline", "contents": "{\"package\": \"cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed\", \"files\": {}}", "dest": "cargo/vendor/if_chain-1.0.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/image/image-0.25.5.crate", "sha256": "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b", "dest": "cargo/vendor/image-0.25.5" }, { "type": "inline", "contents": "{\"package\": \"cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b\", \"files\": {}}", "dest": "cargo/vendor/image-0.25.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/image-webp/image-webp-0.1.3.crate", "sha256": "f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904", "dest": "cargo/vendor/image-webp-0.1.3" }, { "type": "inline", "contents": "{\"package\": \"f79afb8cbee2ef20f59ccd477a218c12a93943d075b492015ecb1bb81f8ee904\", \"files\": {}}", "dest": "cargo/vendor/image-webp-0.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/imagesize/imagesize-0.13.0.crate", "sha256": "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285", "dest": "cargo/vendor/imagesize-0.13.0" }, { "type": "inline", "contents": "{\"package\": \"edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285\", \"files\": {}}", "dest": "cargo/vendor/imagesize-0.13.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/indexmap/indexmap-2.7.1.crate", "sha256": "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652", "dest": "cargo/vendor/indexmap-2.7.1" }, { "type": "inline", "contents": "{\"package\": \"8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652\", \"files\": {}}", "dest": "cargo/vendor/indexmap-2.7.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/inotify/inotify-0.11.0.crate", "sha256": "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3", "dest": "cargo/vendor/inotify-0.11.0" }, { "type": "inline", "contents": "{\"package\": \"f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3\", \"files\": {}}", "dest": "cargo/vendor/inotify-0.11.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/inotify-sys/inotify-sys-0.1.5.crate", "sha256": "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb", "dest": "cargo/vendor/inotify-sys-0.1.5" }, { "type": "inline", "contents": "{\"package\": \"e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb\", \"files\": {}}", "dest": "cargo/vendor/inotify-sys-0.1.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/is-docker/is-docker-0.2.0.crate", "sha256": "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3", "dest": "cargo/vendor/is-docker-0.2.0" }, { "type": "inline", "contents": "{\"package\": \"928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3\", \"files\": {}}", "dest": "cargo/vendor/is-docker-0.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/is-wsl/is-wsl-0.4.0.crate", "sha256": "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5", "dest": "cargo/vendor/is-wsl-0.4.0" }, { "type": "inline", "contents": "{\"package\": \"173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5\", \"files\": {}}", "dest": "cargo/vendor/is-wsl-0.4.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/is_terminal_polyfill/is_terminal_polyfill-1.70.1.crate", "sha256": "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf", "dest": "cargo/vendor/is_terminal_polyfill-1.70.1" }, { "type": "inline", "contents": "{\"package\": \"7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf\", \"files\": {}}", "dest": "cargo/vendor/is_terminal_polyfill-1.70.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/itoa/itoa-1.0.14.crate", "sha256": "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674", "dest": "cargo/vendor/itoa-1.0.14" }, { "type": "inline", "contents": "{\"package\": \"d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674\", \"files\": {}}", "dest": "cargo/vendor/itoa-1.0.14", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/js-sys/js-sys-0.3.77.crate", "sha256": "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f", "dest": "cargo/vendor/js-sys-0.3.77" }, { "type": "inline", "contents": "{\"package\": \"1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f\", \"files\": {}}", "dest": "cargo/vendor/js-sys-0.3.77", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/kamadak-exif/kamadak-exif-0.6.1.crate", "sha256": "1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837", "dest": "cargo/vendor/kamadak-exif-0.6.1" }, { "type": "inline", "contents": "{\"package\": \"1130d80c7374efad55a117d715a3af9368f0fa7a2c54573afc15a188cd984837\", \"files\": {}}", "dest": "cargo/vendor/kamadak-exif-0.6.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/kqueue/kqueue-1.0.8.crate", "sha256": "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c", "dest": "cargo/vendor/kqueue-1.0.8" }, { "type": "inline", "contents": "{\"package\": \"7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c\", \"files\": {}}", "dest": "cargo/vendor/kqueue-1.0.8", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/kqueue-sys/kqueue-sys-1.0.4.crate", "sha256": "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b", "dest": "cargo/vendor/kqueue-sys-1.0.4" }, { "type": "inline", "contents": "{\"package\": \"ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b\", \"files\": {}}", "dest": "cargo/vendor/kqueue-sys-1.0.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/kurbo/kurbo-0.11.1.crate", "sha256": "89234b2cc610a7dd927ebde6b41dd1a5d4214cffaef4cf1fb2195d592f92518f", "dest": "cargo/vendor/kurbo-0.11.1" }, { "type": "inline", "contents": "{\"package\": \"89234b2cc610a7dd927ebde6b41dd1a5d4214cffaef4cf1fb2195d592f92518f\", \"files\": {}}", "dest": "cargo/vendor/kurbo-0.11.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/libc/libc-0.2.169.crate", "sha256": "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a", "dest": "cargo/vendor/libc-0.2.169" }, { "type": "inline", "contents": "{\"package\": \"b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a\", \"files\": {}}", "dest": "cargo/vendor/libc-0.2.169", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/libm/libm-0.2.11.crate", "sha256": "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa", "dest": "cargo/vendor/libm-0.2.11" }, { "type": "inline", "contents": "{\"package\": \"8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa\", \"files\": {}}", "dest": "cargo/vendor/libm-0.2.11", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/libredox/libredox-0.1.3.crate", "sha256": "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d", "dest": "cargo/vendor/libredox-0.1.3" }, { "type": "inline", "contents": "{\"package\": \"c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d\", \"files\": {}}", "dest": "cargo/vendor/libredox-0.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/linked-hash-map/linked-hash-map-0.5.6.crate", "sha256": "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f", "dest": "cargo/vendor/linked-hash-map-0.5.6" }, { "type": "inline", "contents": "{\"package\": \"0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f\", \"files\": {}}", "dest": "cargo/vendor/linked-hash-map-0.5.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/linux-raw-sys/linux-raw-sys-0.4.15.crate", "sha256": "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab", "dest": "cargo/vendor/linux-raw-sys-0.4.15" }, { "type": "inline", "contents": "{\"package\": \"d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab\", \"files\": {}}", "dest": "cargo/vendor/linux-raw-sys-0.4.15", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/lipsum/lipsum-0.9.1.crate", "sha256": "636860251af8963cc40f6b4baadee105f02e21b28131d76eba8e40ce84ab8064", "dest": "cargo/vendor/lipsum-0.9.1" }, { "type": "inline", "contents": "{\"package\": \"636860251af8963cc40f6b4baadee105f02e21b28131d76eba8e40ce84ab8064\", \"files\": {}}", "dest": "cargo/vendor/lipsum-0.9.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/litemap/litemap-0.7.4.crate", "sha256": "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104", "dest": "cargo/vendor/litemap-0.7.4" }, { "type": "inline", "contents": "{\"package\": \"4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104\", \"files\": {}}", "dest": "cargo/vendor/litemap-0.7.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/lock_api/lock_api-0.4.12.crate", "sha256": "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17", "dest": "cargo/vendor/lock_api-0.4.12" }, { "type": "inline", "contents": "{\"package\": \"07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17\", \"files\": {}}", "dest": "cargo/vendor/lock_api-0.4.12", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/lockfree-object-pool/lockfree-object-pool-0.1.6.crate", "sha256": "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e", "dest": "cargo/vendor/lockfree-object-pool-0.1.6" }, { "type": "inline", "contents": "{\"package\": \"9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e\", \"files\": {}}", "dest": "cargo/vendor/lockfree-object-pool-0.1.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/log/log-0.4.25.crate", "sha256": "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f", "dest": "cargo/vendor/log-0.4.25" }, { "type": "inline", "contents": "{\"package\": \"04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f\", \"files\": {}}", "dest": "cargo/vendor/log-0.4.25", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/lzma-sys/lzma-sys-0.1.20.crate", "sha256": "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27", "dest": "cargo/vendor/lzma-sys-0.1.20" }, { "type": "inline", "contents": "{\"package\": \"5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27\", \"files\": {}}", "dest": "cargo/vendor/lzma-sys-0.1.20", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/memchr/memchr-2.7.4.crate", "sha256": "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3", "dest": "cargo/vendor/memchr-2.7.4" }, { "type": "inline", "contents": "{\"package\": \"78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3\", \"files\": {}}", "dest": "cargo/vendor/memchr-2.7.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/memmap2/memmap2-0.9.5.crate", "sha256": "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f", "dest": "cargo/vendor/memmap2-0.9.5" }, { "type": "inline", "contents": "{\"package\": \"fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f\", \"files\": {}}", "dest": "cargo/vendor/memmap2-0.9.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/minimal-lexical/minimal-lexical-0.2.1.crate", "sha256": "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a", "dest": "cargo/vendor/minimal-lexical-0.2.1" }, { "type": "inline", "contents": "{\"package\": \"68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a\", \"files\": {}}", "dest": "cargo/vendor/minimal-lexical-0.2.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/miniz_oxide/miniz_oxide-0.8.3.crate", "sha256": "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924", "dest": "cargo/vendor/miniz_oxide-0.8.3" }, { "type": "inline", "contents": "{\"package\": \"b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924\", \"files\": {}}", "dest": "cargo/vendor/miniz_oxide-0.8.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/mio/mio-1.0.3.crate", "sha256": "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd", "dest": "cargo/vendor/mio-1.0.3" }, { "type": "inline", "contents": "{\"package\": \"2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd\", \"files\": {}}", "dest": "cargo/vendor/mio-1.0.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/multi-stash/multi-stash-0.2.0.crate", "sha256": "685a9ac4b61f4e728e1d2c6a7844609c16527aeb5e6c865915c08e619c16410f", "dest": "cargo/vendor/multi-stash-0.2.0" }, { "type": "inline", "contents": "{\"package\": \"685a9ac4b61f4e728e1d2c6a7844609c16527aeb5e6c865915c08e619c16410f\", \"files\": {}}", "dest": "cargo/vendor/multi-stash-0.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/mutate_once/mutate_once-0.1.1.crate", "sha256": "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b", "dest": "cargo/vendor/mutate_once-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b\", \"files\": {}}", "dest": "cargo/vendor/mutate_once-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/native-tls/native-tls-0.2.13.crate", "sha256": "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c", "dest": "cargo/vendor/native-tls-0.2.13" }, { "type": "inline", "contents": "{\"package\": \"0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c\", \"files\": {}}", "dest": "cargo/vendor/native-tls-0.2.13", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/nom/nom-7.1.3.crate", "sha256": "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a", "dest": "cargo/vendor/nom-7.1.3" }, { "type": "inline", "contents": "{\"package\": \"d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a\", \"files\": {}}", "dest": "cargo/vendor/nom-7.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/notify/notify-8.0.0.crate", "sha256": "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943", "dest": "cargo/vendor/notify-8.0.0" }, { "type": "inline", "contents": "{\"package\": \"2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943\", \"files\": {}}", "dest": "cargo/vendor/notify-8.0.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/notify-types/notify-types-2.0.0.crate", "sha256": "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d", "dest": "cargo/vendor/notify-types-2.0.0" }, { "type": "inline", "contents": "{\"package\": \"5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d\", \"files\": {}}", "dest": "cargo/vendor/notify-types-2.0.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/num-bigint/num-bigint-0.4.6.crate", "sha256": "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9", "dest": "cargo/vendor/num-bigint-0.4.6" }, { "type": "inline", "contents": "{\"package\": \"a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9\", \"files\": {}}", "dest": "cargo/vendor/num-bigint-0.4.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/num-conv/num-conv-0.1.0.crate", "sha256": "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9", "dest": "cargo/vendor/num-conv-0.1.0" }, { "type": "inline", "contents": "{\"package\": \"51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9\", \"files\": {}}", "dest": "cargo/vendor/num-conv-0.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/num-integer/num-integer-0.1.46.crate", "sha256": "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f", "dest": "cargo/vendor/num-integer-0.1.46" }, { "type": "inline", "contents": "{\"package\": \"7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f\", \"files\": {}}", "dest": "cargo/vendor/num-integer-0.1.46", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/num-traits/num-traits-0.2.19.crate", "sha256": "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841", "dest": "cargo/vendor/num-traits-0.2.19" }, { "type": "inline", "contents": "{\"package\": \"071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841\", \"files\": {}}", "dest": "cargo/vendor/num-traits-0.2.19", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/numerals/numerals-0.1.4.crate", "sha256": "e25be21376a772d15f97ae789845340a9651d3c4246ff5ebb6a2b35f9c37bd31", "dest": "cargo/vendor/numerals-0.1.4" }, { "type": "inline", "contents": "{\"package\": \"e25be21376a772d15f97ae789845340a9651d3c4246ff5ebb6a2b35f9c37bd31\", \"files\": {}}", "dest": "cargo/vendor/numerals-0.1.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/once_cell/once_cell-1.20.2.crate", "sha256": "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775", "dest": "cargo/vendor/once_cell-1.20.2" }, { "type": "inline", "contents": "{\"package\": \"1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775\", \"files\": {}}", "dest": "cargo/vendor/once_cell-1.20.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/open/open-5.3.2.crate", "sha256": "e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95", "dest": "cargo/vendor/open-5.3.2" }, { "type": "inline", "contents": "{\"package\": \"e2483562e62ea94312f3576a7aca397306df7990b8d89033e18766744377ef95\", \"files\": {}}", "dest": "cargo/vendor/open-5.3.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/openssl/openssl-0.10.70.crate", "sha256": "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6", "dest": "cargo/vendor/openssl-0.10.70" }, { "type": "inline", "contents": "{\"package\": \"61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6\", \"files\": {}}", "dest": "cargo/vendor/openssl-0.10.70", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/openssl-macros/openssl-macros-0.1.1.crate", "sha256": "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c", "dest": "cargo/vendor/openssl-macros-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c\", \"files\": {}}", "dest": "cargo/vendor/openssl-macros-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/openssl-probe/openssl-probe-0.1.6.crate", "sha256": "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e", "dest": "cargo/vendor/openssl-probe-0.1.6" }, { "type": "inline", "contents": "{\"package\": \"d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e\", \"files\": {}}", "dest": "cargo/vendor/openssl-probe-0.1.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/openssl-src/openssl-src-300.4.1+3.4.0.crate", "sha256": "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c", "dest": "cargo/vendor/openssl-src-300.4.1+3.4.0" }, { "type": "inline", "contents": "{\"package\": \"faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c\", \"files\": {}}", "dest": "cargo/vendor/openssl-src-300.4.1+3.4.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/openssl-sys/openssl-sys-0.9.105.crate", "sha256": "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc", "dest": "cargo/vendor/openssl-sys-0.9.105" }, { "type": "inline", "contents": "{\"package\": \"8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc\", \"files\": {}}", "dest": "cargo/vendor/openssl-sys-0.9.105", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/option-ext/option-ext-0.2.0.crate", "sha256": "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d", "dest": "cargo/vendor/option-ext-0.2.0" }, { "type": "inline", "contents": "{\"package\": \"04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d\", \"files\": {}}", "dest": "cargo/vendor/option-ext-0.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/palette/palette-0.7.6.crate", "sha256": "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6", "dest": "cargo/vendor/palette-0.7.6" }, { "type": "inline", "contents": "{\"package\": \"4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6\", \"files\": {}}", "dest": "cargo/vendor/palette-0.7.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/palette_derive/palette_derive-0.7.6.crate", "sha256": "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30", "dest": "cargo/vendor/palette_derive-0.7.6" }, { "type": "inline", "contents": "{\"package\": \"f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30\", \"files\": {}}", "dest": "cargo/vendor/palette_derive-0.7.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/parking_lot/parking_lot-0.12.3.crate", "sha256": "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27", "dest": "cargo/vendor/parking_lot-0.12.3" }, { "type": "inline", "contents": "{\"package\": \"f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27\", \"files\": {}}", "dest": "cargo/vendor/parking_lot-0.12.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/parking_lot_core/parking_lot_core-0.9.10.crate", "sha256": "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8", "dest": "cargo/vendor/parking_lot_core-0.9.10" }, { "type": "inline", "contents": "{\"package\": \"1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8\", \"files\": {}}", "dest": "cargo/vendor/parking_lot_core-0.9.10", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/paste/paste-1.0.15.crate", "sha256": "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a", "dest": "cargo/vendor/paste-1.0.15" }, { "type": "inline", "contents": "{\"package\": \"57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a\", \"files\": {}}", "dest": "cargo/vendor/paste-1.0.15", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/pathdiff/pathdiff-0.2.3.crate", "sha256": "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3", "dest": "cargo/vendor/pathdiff-0.2.3" }, { "type": "inline", "contents": "{\"package\": \"df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3\", \"files\": {}}", "dest": "cargo/vendor/pathdiff-0.2.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/pdf-writer/pdf-writer-0.12.1.crate", "sha256": "5df03c7d216de06f93f398ef06f1385a60f2c597bb96f8195c8d98e08a26b1d5", "dest": "cargo/vendor/pdf-writer-0.12.1" }, { "type": "inline", "contents": "{\"package\": \"5df03c7d216de06f93f398ef06f1385a60f2c597bb96f8195c8d98e08a26b1d5\", \"files\": {}}", "dest": "cargo/vendor/pdf-writer-0.12.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/percent-encoding/percent-encoding-2.3.1.crate", "sha256": "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e", "dest": "cargo/vendor/percent-encoding-2.3.1" }, { "type": "inline", "contents": "{\"package\": \"e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e\", \"files\": {}}", "dest": "cargo/vendor/percent-encoding-2.3.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/phf/phf-0.11.3.crate", "sha256": "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078", "dest": "cargo/vendor/phf-0.11.3" }, { "type": "inline", "contents": "{\"package\": \"1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078\", \"files\": {}}", "dest": "cargo/vendor/phf-0.11.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/phf_generator/phf_generator-0.11.3.crate", "sha256": "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d", "dest": "cargo/vendor/phf_generator-0.11.3" }, { "type": "inline", "contents": "{\"package\": \"3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d\", \"files\": {}}", "dest": "cargo/vendor/phf_generator-0.11.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/phf_macros/phf_macros-0.11.3.crate", "sha256": "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216", "dest": "cargo/vendor/phf_macros-0.11.3" }, { "type": "inline", "contents": "{\"package\": \"f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216\", \"files\": {}}", "dest": "cargo/vendor/phf_macros-0.11.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/phf_shared/phf_shared-0.11.3.crate", "sha256": "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5", "dest": "cargo/vendor/phf_shared-0.11.3" }, { "type": "inline", "contents": "{\"package\": \"67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5\", \"files\": {}}", "dest": "cargo/vendor/phf_shared-0.11.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/pico-args/pico-args-0.5.0.crate", "sha256": "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315", "dest": "cargo/vendor/pico-args-0.5.0" }, { "type": "inline", "contents": "{\"package\": \"5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315\", \"files\": {}}", "dest": "cargo/vendor/pico-args-0.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/pixglyph/pixglyph-0.5.1.crate", "sha256": "d15afa937836bf3d876f5a04ce28810c06045857bf46c3d0d31073b8aada5494", "dest": "cargo/vendor/pixglyph-0.5.1" }, { "type": "inline", "contents": "{\"package\": \"d15afa937836bf3d876f5a04ce28810c06045857bf46c3d0d31073b8aada5494\", \"files\": {}}", "dest": "cargo/vendor/pixglyph-0.5.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/pkg-config/pkg-config-0.3.31.crate", "sha256": "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2", "dest": "cargo/vendor/pkg-config-0.3.31" }, { "type": "inline", "contents": "{\"package\": \"953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2\", \"files\": {}}", "dest": "cargo/vendor/pkg-config-0.3.31", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/plist/plist-1.7.0.crate", "sha256": "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016", "dest": "cargo/vendor/plist-1.7.0" }, { "type": "inline", "contents": "{\"package\": \"42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016\", \"files\": {}}", "dest": "cargo/vendor/plist-1.7.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/png/png-0.17.16.crate", "sha256": "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526", "dest": "cargo/vendor/png-0.17.16" }, { "type": "inline", "contents": "{\"package\": \"82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526\", \"files\": {}}", "dest": "cargo/vendor/png-0.17.16", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/portable-atomic/portable-atomic-1.10.0.crate", "sha256": "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6", "dest": "cargo/vendor/portable-atomic-1.10.0" }, { "type": "inline", "contents": "{\"package\": \"280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6\", \"files\": {}}", "dest": "cargo/vendor/portable-atomic-1.10.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/postcard/postcard-1.1.1.crate", "sha256": "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8", "dest": "cargo/vendor/postcard-1.1.1" }, { "type": "inline", "contents": "{\"package\": \"170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8\", \"files\": {}}", "dest": "cargo/vendor/postcard-1.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/powerfmt/powerfmt-0.2.0.crate", "sha256": "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391", "dest": "cargo/vendor/powerfmt-0.2.0" }, { "type": "inline", "contents": "{\"package\": \"439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391\", \"files\": {}}", "dest": "cargo/vendor/powerfmt-0.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ppv-lite86/ppv-lite86-0.2.20.crate", "sha256": "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04", "dest": "cargo/vendor/ppv-lite86-0.2.20" }, { "type": "inline", "contents": "{\"package\": \"77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04\", \"files\": {}}", "dest": "cargo/vendor/ppv-lite86-0.2.20", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/proc-macro2/proc-macro2-1.0.93.crate", "sha256": "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99", "dest": "cargo/vendor/proc-macro2-1.0.93" }, { "type": "inline", "contents": "{\"package\": \"60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99\", \"files\": {}}", "dest": "cargo/vendor/proc-macro2-1.0.93", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/psm/psm-0.1.24.crate", "sha256": "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810", "dest": "cargo/vendor/psm-0.1.24" }, { "type": "inline", "contents": "{\"package\": \"200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810\", \"files\": {}}", "dest": "cargo/vendor/psm-0.1.24", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/qcms/qcms-0.3.0.crate", "sha256": "edecfcd5d755a5e5d98e24cf43113e7cdaec5a070edd0f6b250c03a573da30fa", "dest": "cargo/vendor/qcms-0.3.0" }, { "type": "inline", "contents": "{\"package\": \"edecfcd5d755a5e5d98e24cf43113e7cdaec5a070edd0f6b250c03a573da30fa\", \"files\": {}}", "dest": "cargo/vendor/qcms-0.3.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/quick-error/quick-error-2.0.1.crate", "sha256": "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3", "dest": "cargo/vendor/quick-error-2.0.1" }, { "type": "inline", "contents": "{\"package\": \"a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3\", \"files\": {}}", "dest": "cargo/vendor/quick-error-2.0.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/quick-xml/quick-xml-0.32.0.crate", "sha256": "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2", "dest": "cargo/vendor/quick-xml-0.32.0" }, { "type": "inline", "contents": "{\"package\": \"1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2\", \"files\": {}}", "dest": "cargo/vendor/quick-xml-0.32.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/quick-xml/quick-xml-0.36.2.crate", "sha256": "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe", "dest": "cargo/vendor/quick-xml-0.36.2" }, { "type": "inline", "contents": "{\"package\": \"f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe\", \"files\": {}}", "dest": "cargo/vendor/quick-xml-0.36.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/quote/quote-1.0.38.crate", "sha256": "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc", "dest": "cargo/vendor/quote-1.0.38" }, { "type": "inline", "contents": "{\"package\": \"0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc\", \"files\": {}}", "dest": "cargo/vendor/quote-1.0.38", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rand/rand-0.8.5.crate", "sha256": "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404", "dest": "cargo/vendor/rand-0.8.5" }, { "type": "inline", "contents": "{\"package\": \"34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404\", \"files\": {}}", "dest": "cargo/vendor/rand-0.8.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rand_chacha/rand_chacha-0.3.1.crate", "sha256": "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88", "dest": "cargo/vendor/rand_chacha-0.3.1" }, { "type": "inline", "contents": "{\"package\": \"e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88\", \"files\": {}}", "dest": "cargo/vendor/rand_chacha-0.3.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rand_core/rand_core-0.6.4.crate", "sha256": "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c", "dest": "cargo/vendor/rand_core-0.6.4" }, { "type": "inline", "contents": "{\"package\": \"ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c\", \"files\": {}}", "dest": "cargo/vendor/rand_core-0.6.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rayon/rayon-1.10.0.crate", "sha256": "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa", "dest": "cargo/vendor/rayon-1.10.0" }, { "type": "inline", "contents": "{\"package\": \"b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa\", \"files\": {}}", "dest": "cargo/vendor/rayon-1.10.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rayon-core/rayon-core-1.12.1.crate", "sha256": "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2", "dest": "cargo/vendor/rayon-core-1.12.1" }, { "type": "inline", "contents": "{\"package\": \"1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2\", \"files\": {}}", "dest": "cargo/vendor/rayon-core-1.12.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/redox_syscall/redox_syscall-0.5.8.crate", "sha256": "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834", "dest": "cargo/vendor/redox_syscall-0.5.8" }, { "type": "inline", "contents": "{\"package\": \"03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834\", \"files\": {}}", "dest": "cargo/vendor/redox_syscall-0.5.8", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/redox_users/redox_users-0.5.0.crate", "sha256": "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b", "dest": "cargo/vendor/redox_users-0.5.0" }, { "type": "inline", "contents": "{\"package\": \"dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b\", \"files\": {}}", "dest": "cargo/vendor/redox_users-0.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/regex/regex-1.11.1.crate", "sha256": "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191", "dest": "cargo/vendor/regex-1.11.1" }, { "type": "inline", "contents": "{\"package\": \"b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191\", \"files\": {}}", "dest": "cargo/vendor/regex-1.11.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/regex-automata/regex-automata-0.4.9.crate", "sha256": "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908", "dest": "cargo/vendor/regex-automata-0.4.9" }, { "type": "inline", "contents": "{\"package\": \"809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908\", \"files\": {}}", "dest": "cargo/vendor/regex-automata-0.4.9", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/regex-syntax/regex-syntax-0.8.5.crate", "sha256": "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c", "dest": "cargo/vendor/regex-syntax-0.8.5" }, { "type": "inline", "contents": "{\"package\": \"2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c\", \"files\": {}}", "dest": "cargo/vendor/regex-syntax-0.8.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/resvg/resvg-0.43.0.crate", "sha256": "c7314563c59c7ce31c18e23ad3dd092c37b928a0fa4e1c0a1a6504351ab411d1", "dest": "cargo/vendor/resvg-0.43.0" }, { "type": "inline", "contents": "{\"package\": \"c7314563c59c7ce31c18e23ad3dd092c37b928a0fa4e1c0a1a6504351ab411d1\", \"files\": {}}", "dest": "cargo/vendor/resvg-0.43.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rgb/rgb-0.8.50.crate", "sha256": "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a", "dest": "cargo/vendor/rgb-0.8.50" }, { "type": "inline", "contents": "{\"package\": \"57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a\", \"files\": {}}", "dest": "cargo/vendor/rgb-0.8.50", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/roff/roff-0.2.2.crate", "sha256": "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3", "dest": "cargo/vendor/roff-0.2.2" }, { "type": "inline", "contents": "{\"package\": \"88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3\", \"files\": {}}", "dest": "cargo/vendor/roff-0.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/roxmltree/roxmltree-0.20.0.crate", "sha256": "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97", "dest": "cargo/vendor/roxmltree-0.20.0" }, { "type": "inline", "contents": "{\"package\": \"6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97\", \"files\": {}}", "dest": "cargo/vendor/roxmltree-0.20.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rust_decimal/rust_decimal-1.36.0.crate", "sha256": "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555", "dest": "cargo/vendor/rust_decimal-1.36.0" }, { "type": "inline", "contents": "{\"package\": \"b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555\", \"files\": {}}", "dest": "cargo/vendor/rust_decimal-1.36.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rustix/rustix-0.38.44.crate", "sha256": "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154", "dest": "cargo/vendor/rustix-0.38.44" }, { "type": "inline", "contents": "{\"package\": \"fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154\", \"files\": {}}", "dest": "cargo/vendor/rustix-0.38.44", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rustversion/rustversion-1.0.19.crate", "sha256": "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4", "dest": "cargo/vendor/rustversion-1.0.19" }, { "type": "inline", "contents": "{\"package\": \"f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4\", \"files\": {}}", "dest": "cargo/vendor/rustversion-1.0.19", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/rustybuzz/rustybuzz-0.18.0.crate", "sha256": "c85d1ccd519e61834798eb52c4e886e8c2d7d698dd3d6ce0b1b47eb8557f1181", "dest": "cargo/vendor/rustybuzz-0.18.0" }, { "type": "inline", "contents": "{\"package\": \"c85d1ccd519e61834798eb52c4e886e8c2d7d698dd3d6ce0b1b47eb8557f1181\", \"files\": {}}", "dest": "cargo/vendor/rustybuzz-0.18.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ryu/ryu-1.0.19.crate", "sha256": "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd", "dest": "cargo/vendor/ryu-1.0.19" }, { "type": "inline", "contents": "{\"package\": \"6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd\", \"files\": {}}", "dest": "cargo/vendor/ryu-1.0.19", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/same-file/same-file-1.0.6.crate", "sha256": "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502", "dest": "cargo/vendor/same-file-1.0.6" }, { "type": "inline", "contents": "{\"package\": \"93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502\", \"files\": {}}", "dest": "cargo/vendor/same-file-1.0.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/schannel/schannel-0.1.27.crate", "sha256": "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d", "dest": "cargo/vendor/schannel-0.1.27" }, { "type": "inline", "contents": "{\"package\": \"1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d\", \"files\": {}}", "dest": "cargo/vendor/schannel-0.1.27", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/scopeguard/scopeguard-1.2.0.crate", "sha256": "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49", "dest": "cargo/vendor/scopeguard-1.2.0" }, { "type": "inline", "contents": "{\"package\": \"94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49\", \"files\": {}}", "dest": "cargo/vendor/scopeguard-1.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/security-framework/security-framework-2.11.1.crate", "sha256": "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02", "dest": "cargo/vendor/security-framework-2.11.1" }, { "type": "inline", "contents": "{\"package\": \"897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02\", \"files\": {}}", "dest": "cargo/vendor/security-framework-2.11.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/security-framework-sys/security-framework-sys-2.14.0.crate", "sha256": "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32", "dest": "cargo/vendor/security-framework-sys-2.14.0" }, { "type": "inline", "contents": "{\"package\": \"49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32\", \"files\": {}}", "dest": "cargo/vendor/security-framework-sys-2.14.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/self-replace/self-replace-1.5.0.crate", "sha256": "03ec815b5eab420ab893f63393878d89c90fdd94c0bcc44c07abb8ad95552fb7", "dest": "cargo/vendor/self-replace-1.5.0" }, { "type": "inline", "contents": "{\"package\": \"03ec815b5eab420ab893f63393878d89c90fdd94c0bcc44c07abb8ad95552fb7\", \"files\": {}}", "dest": "cargo/vendor/self-replace-1.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/semver/semver-1.0.25.crate", "sha256": "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03", "dest": "cargo/vendor/semver-1.0.25" }, { "type": "inline", "contents": "{\"package\": \"f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03\", \"files\": {}}", "dest": "cargo/vendor/semver-1.0.25", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/serde/serde-1.0.217.crate", "sha256": "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70", "dest": "cargo/vendor/serde-1.0.217" }, { "type": "inline", "contents": "{\"package\": \"02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70\", \"files\": {}}", "dest": "cargo/vendor/serde-1.0.217", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/serde_derive/serde_derive-1.0.217.crate", "sha256": "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0", "dest": "cargo/vendor/serde_derive-1.0.217" }, { "type": "inline", "contents": "{\"package\": \"5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0\", \"files\": {}}", "dest": "cargo/vendor/serde_derive-1.0.217", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/serde_json/serde_json-1.0.138.crate", "sha256": "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949", "dest": "cargo/vendor/serde_json-1.0.138" }, { "type": "inline", "contents": "{\"package\": \"d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949\", \"files\": {}}", "dest": "cargo/vendor/serde_json-1.0.138", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/serde_spanned/serde_spanned-0.6.8.crate", "sha256": "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1", "dest": "cargo/vendor/serde_spanned-0.6.8" }, { "type": "inline", "contents": "{\"package\": \"87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1\", \"files\": {}}", "dest": "cargo/vendor/serde_spanned-0.6.8", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/serde_yaml/serde_yaml-0.9.34+deprecated.crate", "sha256": "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47", "dest": "cargo/vendor/serde_yaml-0.9.34+deprecated" }, { "type": "inline", "contents": "{\"package\": \"6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47\", \"files\": {}}", "dest": "cargo/vendor/serde_yaml-0.9.34+deprecated", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/shell-escape/shell-escape-0.1.5.crate", "sha256": "45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f", "dest": "cargo/vendor/shell-escape-0.1.5" }, { "type": "inline", "contents": "{\"package\": \"45bb67a18fa91266cc7807181f62f9178a6873bfad7dc788c42e6430db40184f\", \"files\": {}}", "dest": "cargo/vendor/shell-escape-0.1.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/shlex/shlex-1.3.0.crate", "sha256": "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64", "dest": "cargo/vendor/shlex-1.3.0" }, { "type": "inline", "contents": "{\"package\": \"0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64\", \"files\": {}}", "dest": "cargo/vendor/shlex-1.3.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/sigpipe/sigpipe-0.1.3.crate", "sha256": "5584bfb3e0d348139d8210285e39f6d2f8a1902ac06de343e06357d1d763d8e6", "dest": "cargo/vendor/sigpipe-0.1.3" }, { "type": "inline", "contents": "{\"package\": \"5584bfb3e0d348139d8210285e39f6d2f8a1902ac06de343e06357d1d763d8e6\", \"files\": {}}", "dest": "cargo/vendor/sigpipe-0.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/simd-adler32/simd-adler32-0.3.7.crate", "sha256": "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe", "dest": "cargo/vendor/simd-adler32-0.3.7" }, { "type": "inline", "contents": "{\"package\": \"d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe\", \"files\": {}}", "dest": "cargo/vendor/simd-adler32-0.3.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/simplecss/simplecss-0.2.2.crate", "sha256": "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c", "dest": "cargo/vendor/simplecss-0.2.2" }, { "type": "inline", "contents": "{\"package\": \"7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c\", \"files\": {}}", "dest": "cargo/vendor/simplecss-0.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/siphasher/siphasher-1.0.1.crate", "sha256": "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d", "dest": "cargo/vendor/siphasher-1.0.1" }, { "type": "inline", "contents": "{\"package\": \"56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d\", \"files\": {}}", "dest": "cargo/vendor/siphasher-1.0.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/slotmap/slotmap-1.0.7.crate", "sha256": "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a", "dest": "cargo/vendor/slotmap-1.0.7" }, { "type": "inline", "contents": "{\"package\": \"dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a\", \"files\": {}}", "dest": "cargo/vendor/slotmap-1.0.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/smallvec/smallvec-1.13.2.crate", "sha256": "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67", "dest": "cargo/vendor/smallvec-1.13.2" }, { "type": "inline", "contents": "{\"package\": \"3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67\", \"files\": {}}", "dest": "cargo/vendor/smallvec-1.13.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/spin/spin-0.9.8.crate", "sha256": "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67", "dest": "cargo/vendor/spin-0.9.8" }, { "type": "inline", "contents": "{\"package\": \"6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67\", \"files\": {}}", "dest": "cargo/vendor/spin-0.9.8", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/stable_deref_trait/stable_deref_trait-1.2.0.crate", "sha256": "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3", "dest": "cargo/vendor/stable_deref_trait-1.2.0" }, { "type": "inline", "contents": "{\"package\": \"a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3\", \"files\": {}}", "dest": "cargo/vendor/stable_deref_trait-1.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/stacker/stacker-0.1.17.crate", "sha256": "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b", "dest": "cargo/vendor/stacker-0.1.17" }, { "type": "inline", "contents": "{\"package\": \"799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b\", \"files\": {}}", "dest": "cargo/vendor/stacker-0.1.17", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/strict-num/strict-num-0.1.1.crate", "sha256": "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731", "dest": "cargo/vendor/strict-num-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731\", \"files\": {}}", "dest": "cargo/vendor/strict-num-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/string-interner/string-interner-0.18.0.crate", "sha256": "1a3275464d7a9f2d4cac57c89c2ef96a8524dba2864c8d6f82e3980baf136f9b", "dest": "cargo/vendor/string-interner-0.18.0" }, { "type": "inline", "contents": "{\"package\": \"1a3275464d7a9f2d4cac57c89c2ef96a8524dba2864c8d6f82e3980baf136f9b\", \"files\": {}}", "dest": "cargo/vendor/string-interner-0.18.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/strsim/strsim-0.11.1.crate", "sha256": "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f", "dest": "cargo/vendor/strsim-0.11.1" }, { "type": "inline", "contents": "{\"package\": \"7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f\", \"files\": {}}", "dest": "cargo/vendor/strsim-0.11.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/strum/strum-0.26.3.crate", "sha256": "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06", "dest": "cargo/vendor/strum-0.26.3" }, { "type": "inline", "contents": "{\"package\": \"8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06\", \"files\": {}}", "dest": "cargo/vendor/strum-0.26.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/strum_macros/strum_macros-0.26.4.crate", "sha256": "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be", "dest": "cargo/vendor/strum_macros-0.26.4" }, { "type": "inline", "contents": "{\"package\": \"4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be\", \"files\": {}}", "dest": "cargo/vendor/strum_macros-0.26.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/subsetter/subsetter-0.2.0.crate", "sha256": "74f98178f34057d4d4de93d68104007c6dea4dfac930204a69ab4622daefa648", "dest": "cargo/vendor/subsetter-0.2.0" }, { "type": "inline", "contents": "{\"package\": \"74f98178f34057d4d4de93d68104007c6dea4dfac930204a69ab4622daefa648\", \"files\": {}}", "dest": "cargo/vendor/subsetter-0.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/svg2pdf/svg2pdf-0.12.0.crate", "sha256": "5014c9dadcf318fb7ef8c16438e95abcc9de1ae24d60d5bccc64c55100c50364", "dest": "cargo/vendor/svg2pdf-0.12.0" }, { "type": "inline", "contents": "{\"package\": \"5014c9dadcf318fb7ef8c16438e95abcc9de1ae24d60d5bccc64c55100c50364\", \"files\": {}}", "dest": "cargo/vendor/svg2pdf-0.12.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/svgtypes/svgtypes-0.15.3.crate", "sha256": "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc", "dest": "cargo/vendor/svgtypes-0.15.3" }, { "type": "inline", "contents": "{\"package\": \"68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc\", \"files\": {}}", "dest": "cargo/vendor/svgtypes-0.15.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/syn/syn-2.0.98.crate", "sha256": "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1", "dest": "cargo/vendor/syn-2.0.98" }, { "type": "inline", "contents": "{\"package\": \"36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1\", \"files\": {}}", "dest": "cargo/vendor/syn-2.0.98", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/synstructure/synstructure-0.13.1.crate", "sha256": "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971", "dest": "cargo/vendor/synstructure-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971\", \"files\": {}}", "dest": "cargo/vendor/synstructure-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/syntect/syntect-5.2.0.crate", "sha256": "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1", "dest": "cargo/vendor/syntect-5.2.0" }, { "type": "inline", "contents": "{\"package\": \"874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1\", \"files\": {}}", "dest": "cargo/vendor/syntect-5.2.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tar/tar-0.4.43.crate", "sha256": "c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6", "dest": "cargo/vendor/tar-0.4.43" }, { "type": "inline", "contents": "{\"package\": \"c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6\", \"files\": {}}", "dest": "cargo/vendor/tar-0.4.43", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tempfile/tempfile-3.16.0.crate", "sha256": "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91", "dest": "cargo/vendor/tempfile-3.16.0" }, { "type": "inline", "contents": "{\"package\": \"38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91\", \"files\": {}}", "dest": "cargo/vendor/tempfile-3.16.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/termcolor/termcolor-1.4.1.crate", "sha256": "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755", "dest": "cargo/vendor/termcolor-1.4.1" }, { "type": "inline", "contents": "{\"package\": \"06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755\", \"files\": {}}", "dest": "cargo/vendor/termcolor-1.4.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/terminal_size/terminal_size-0.4.1.crate", "sha256": "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9", "dest": "cargo/vendor/terminal_size-0.4.1" }, { "type": "inline", "contents": "{\"package\": \"5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9\", \"files\": {}}", "dest": "cargo/vendor/terminal_size-0.4.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/thin-vec/thin-vec-0.2.13.crate", "sha256": "a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b", "dest": "cargo/vendor/thin-vec-0.2.13" }, { "type": "inline", "contents": "{\"package\": \"a38c90d48152c236a3ab59271da4f4ae63d678c5d7ad6b7714d7cb9760be5e4b\", \"files\": {}}", "dest": "cargo/vendor/thin-vec-0.2.13", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/thiserror/thiserror-1.0.69.crate", "sha256": "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52", "dest": "cargo/vendor/thiserror-1.0.69" }, { "type": "inline", "contents": "{\"package\": \"b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52\", \"files\": {}}", "dest": "cargo/vendor/thiserror-1.0.69", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/thiserror/thiserror-2.0.11.crate", "sha256": "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc", "dest": "cargo/vendor/thiserror-2.0.11" }, { "type": "inline", "contents": "{\"package\": \"d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc\", \"files\": {}}", "dest": "cargo/vendor/thiserror-2.0.11", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/thiserror-impl/thiserror-impl-1.0.69.crate", "sha256": "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1", "dest": "cargo/vendor/thiserror-impl-1.0.69" }, { "type": "inline", "contents": "{\"package\": \"4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1\", \"files\": {}}", "dest": "cargo/vendor/thiserror-impl-1.0.69", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/thiserror-impl/thiserror-impl-2.0.11.crate", "sha256": "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2", "dest": "cargo/vendor/thiserror-impl-2.0.11" }, { "type": "inline", "contents": "{\"package\": \"26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2\", \"files\": {}}", "dest": "cargo/vendor/thiserror-impl-2.0.11", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/time/time-0.3.37.crate", "sha256": "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21", "dest": "cargo/vendor/time-0.3.37" }, { "type": "inline", "contents": "{\"package\": \"35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21\", \"files\": {}}", "dest": "cargo/vendor/time-0.3.37", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/time-core/time-core-0.1.2.crate", "sha256": "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3", "dest": "cargo/vendor/time-core-0.1.2" }, { "type": "inline", "contents": "{\"package\": \"ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3\", \"files\": {}}", "dest": "cargo/vendor/time-core-0.1.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/time-macros/time-macros-0.2.19.crate", "sha256": "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de", "dest": "cargo/vendor/time-macros-0.2.19" }, { "type": "inline", "contents": "{\"package\": \"2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de\", \"files\": {}}", "dest": "cargo/vendor/time-macros-0.2.19", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tiny-skia/tiny-skia-0.11.4.crate", "sha256": "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab", "dest": "cargo/vendor/tiny-skia-0.11.4" }, { "type": "inline", "contents": "{\"package\": \"83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab\", \"files\": {}}", "dest": "cargo/vendor/tiny-skia-0.11.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tiny-skia-path/tiny-skia-path-0.11.4.crate", "sha256": "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93", "dest": "cargo/vendor/tiny-skia-path-0.11.4" }, { "type": "inline", "contents": "{\"package\": \"9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93\", \"files\": {}}", "dest": "cargo/vendor/tiny-skia-path-0.11.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tiny_http/tiny_http-0.12.0.crate", "sha256": "389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82", "dest": "cargo/vendor/tiny_http-0.12.0" }, { "type": "inline", "contents": "{\"package\": \"389915df6413a2e74fb181895f933386023c71110878cd0825588928e64cdc82\", \"files\": {}}", "dest": "cargo/vendor/tiny_http-0.12.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tinystr/tinystr-0.7.6.crate", "sha256": "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f", "dest": "cargo/vendor/tinystr-0.7.6" }, { "type": "inline", "contents": "{\"package\": \"9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f\", \"files\": {}}", "dest": "cargo/vendor/tinystr-0.7.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tinyvec/tinyvec-1.8.1.crate", "sha256": "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8", "dest": "cargo/vendor/tinyvec-1.8.1" }, { "type": "inline", "contents": "{\"package\": \"022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8\", \"files\": {}}", "dest": "cargo/vendor/tinyvec-1.8.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/tinyvec_macros/tinyvec_macros-0.1.1.crate", "sha256": "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20", "dest": "cargo/vendor/tinyvec_macros-0.1.1" }, { "type": "inline", "contents": "{\"package\": \"1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20\", \"files\": {}}", "dest": "cargo/vendor/tinyvec_macros-0.1.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/toml/toml-0.8.19.crate", "sha256": "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e", "dest": "cargo/vendor/toml-0.8.19" }, { "type": "inline", "contents": "{\"package\": \"a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e\", \"files\": {}}", "dest": "cargo/vendor/toml-0.8.19", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/toml_datetime/toml_datetime-0.6.8.crate", "sha256": "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41", "dest": "cargo/vendor/toml_datetime-0.6.8" }, { "type": "inline", "contents": "{\"package\": \"0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41\", \"files\": {}}", "dest": "cargo/vendor/toml_datetime-0.6.8", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/toml_edit/toml_edit-0.22.23.crate", "sha256": "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee", "dest": "cargo/vendor/toml_edit-0.22.23" }, { "type": "inline", "contents": "{\"package\": \"02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee\", \"files\": {}}", "dest": "cargo/vendor/toml_edit-0.22.23", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ttf-parser/ttf-parser-0.24.1.crate", "sha256": "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a", "dest": "cargo/vendor/ttf-parser-0.24.1" }, { "type": "inline", "contents": "{\"package\": \"5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a\", \"files\": {}}", "dest": "cargo/vendor/ttf-parser-0.24.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/two-face/two-face-0.4.3.crate", "sha256": "384eda438ddf62e2c6f39a174452d952d9d9df5a8ad5ade22198609f8dcaf852", "dest": "cargo/vendor/two-face-0.4.3" }, { "type": "inline", "contents": "{\"package\": \"384eda438ddf62e2c6f39a174452d952d9d9df5a8ad5ade22198609f8dcaf852\", \"files\": {}}", "dest": "cargo/vendor/two-face-0.4.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typed-arena/typed-arena-2.0.2.crate", "sha256": "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a", "dest": "cargo/vendor/typed-arena-2.0.2" }, { "type": "inline", "contents": "{\"package\": \"6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a\", \"files\": {}}", "dest": "cargo/vendor/typed-arena-2.0.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst/typst-0.13.1.crate", "sha256": "140458bc8c72b014266f8ea5fad57165c8159845105eea8949c8954b2a8f49f4", "dest": "cargo/vendor/typst-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"140458bc8c72b014266f8ea5fad57165c8159845105eea8949c8954b2a8f49f4\", \"files\": {}}", "dest": "cargo/vendor/typst-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-assets/typst-assets-0.13.1.crate", "sha256": "b5bf0cc3c2265502b51fcb73147cc7c951ceb694507195b93c2ab0b901abb902", "dest": "cargo/vendor/typst-assets-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"b5bf0cc3c2265502b51fcb73147cc7c951ceb694507195b93c2ab0b901abb902\", \"files\": {}}", "dest": "cargo/vendor/typst-assets-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-eval/typst-eval-0.13.1.crate", "sha256": "850733c95becdb1b0153fd50e979b06d1a3d42f2411f2a0206b3a793501205ac", "dest": "cargo/vendor/typst-eval-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"850733c95becdb1b0153fd50e979b06d1a3d42f2411f2a0206b3a793501205ac\", \"files\": {}}", "dest": "cargo/vendor/typst-eval-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-html/typst-html-0.13.1.crate", "sha256": "654de5a88b9104f9b19723166eb16b8aec6df72a060d91736b81dc72e905e7cc", "dest": "cargo/vendor/typst-html-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"654de5a88b9104f9b19723166eb16b8aec6df72a060d91736b81dc72e905e7cc\", \"files\": {}}", "dest": "cargo/vendor/typst-html-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-kit/typst-kit-0.13.1.crate", "sha256": "818fa9d54e1663fe20d15f6359945616cc4026d68c4de6c4eb0add7556fe2a90", "dest": "cargo/vendor/typst-kit-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"818fa9d54e1663fe20d15f6359945616cc4026d68c4de6c4eb0add7556fe2a90\", \"files\": {}}", "dest": "cargo/vendor/typst-kit-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-layout/typst-layout-0.13.1.crate", "sha256": "dc7f7129c44423e54e9943c8a87403a82e8a5a1bdfd3ef08c0aae1b66deec696", "dest": "cargo/vendor/typst-layout-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"dc7f7129c44423e54e9943c8a87403a82e8a5a1bdfd3ef08c0aae1b66deec696\", \"files\": {}}", "dest": "cargo/vendor/typst-layout-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-library/typst-library-0.13.1.crate", "sha256": "722b0d6dfd05aa5bb7da7f282586f624f452e3f285cd3a10ac0d7e99f3bc3048", "dest": "cargo/vendor/typst-library-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"722b0d6dfd05aa5bb7da7f282586f624f452e3f285cd3a10ac0d7e99f3bc3048\", \"files\": {}}", "dest": "cargo/vendor/typst-library-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-macros/typst-macros-0.13.1.crate", "sha256": "c5a7667bf2ff3111e25744e72abfdbbed5fed9a37476043448e935697e55a6fb", "dest": "cargo/vendor/typst-macros-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"c5a7667bf2ff3111e25744e72abfdbbed5fed9a37476043448e935697e55a6fb\", \"files\": {}}", "dest": "cargo/vendor/typst-macros-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-pdf/typst-pdf-0.13.1.crate", "sha256": "a78718a94c28b5ed5e9ee9826fa995004a81abbcc1c9d0e88a7e87656cbec5a4", "dest": "cargo/vendor/typst-pdf-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"a78718a94c28b5ed5e9ee9826fa995004a81abbcc1c9d0e88a7e87656cbec5a4\", \"files\": {}}", "dest": "cargo/vendor/typst-pdf-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-realize/typst-realize-0.13.1.crate", "sha256": "7bc724c3303b9864c01f25292d82c3aa8f0492512bd890836f1fb7242fa5b8af", "dest": "cargo/vendor/typst-realize-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"7bc724c3303b9864c01f25292d82c3aa8f0492512bd890836f1fb7242fa5b8af\", \"files\": {}}", "dest": "cargo/vendor/typst-realize-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-render/typst-render-0.13.1.crate", "sha256": "2e76277edcc37998910fa4a2e403056cdadd25e0f85dfbef1e98ac0377d9f04e", "dest": "cargo/vendor/typst-render-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"2e76277edcc37998910fa4a2e403056cdadd25e0f85dfbef1e98ac0377d9f04e\", \"files\": {}}", "dest": "cargo/vendor/typst-render-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-svg/typst-svg-0.13.1.crate", "sha256": "674c8e5cb94015c9f870c48bace6b64eb706075766643f3b1f67606c6b03feae", "dest": "cargo/vendor/typst-svg-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"674c8e5cb94015c9f870c48bace6b64eb706075766643f3b1f67606c6b03feae\", \"files\": {}}", "dest": "cargo/vendor/typst-svg-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-syntax/typst-syntax-0.13.1.crate", "sha256": "5ba949ac75a374ea6b2f61d32e6c63acb818e6179d16f78b2cba988fbb5e23a8", "dest": "cargo/vendor/typst-syntax-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"5ba949ac75a374ea6b2f61d32e6c63acb818e6179d16f78b2cba988fbb5e23a8\", \"files\": {}}", "dest": "cargo/vendor/typst-syntax-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-timing/typst-timing-0.13.1.crate", "sha256": "8ba4541664e98be2023db2267d92af206190eb903063a0229c668e1ab9dca976", "dest": "cargo/vendor/typst-timing-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"8ba4541664e98be2023db2267d92af206190eb903063a0229c668e1ab9dca976\", \"files\": {}}", "dest": "cargo/vendor/typst-timing-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-utils/typst-utils-0.13.1.crate", "sha256": "0eb71d59967e0fb32341f8a94f41ced8da520c63705cca2686ae653c9408fd96", "dest": "cargo/vendor/typst-utils-0.13.1" }, { "type": "inline", "contents": "{\"package\": \"0eb71d59967e0fb32341f8a94f41ced8da520c63705cca2686ae653c9408fd96\", \"files\": {}}", "dest": "cargo/vendor/typst-utils-0.13.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unic-langid/unic-langid-0.9.5.crate", "sha256": "23dd9d1e72a73b25e07123a80776aae3e7b0ec461ef94f9151eed6ec88005a44", "dest": "cargo/vendor/unic-langid-0.9.5" }, { "type": "inline", "contents": "{\"package\": \"23dd9d1e72a73b25e07123a80776aae3e7b0ec461ef94f9151eed6ec88005a44\", \"files\": {}}", "dest": "cargo/vendor/unic-langid-0.9.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unic-langid-impl/unic-langid-impl-0.9.5.crate", "sha256": "0a5422c1f65949306c99240b81de9f3f15929f5a8bfe05bb44b034cc8bf593e5", "dest": "cargo/vendor/unic-langid-impl-0.9.5" }, { "type": "inline", "contents": "{\"package\": \"0a5422c1f65949306c99240b81de9f3f15929f5a8bfe05bb44b034cc8bf593e5\", \"files\": {}}", "dest": "cargo/vendor/unic-langid-impl-0.9.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-bidi/unicode-bidi-0.3.18.crate", "sha256": "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5", "dest": "cargo/vendor/unicode-bidi-0.3.18" }, { "type": "inline", "contents": "{\"package\": \"5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5\", \"files\": {}}", "dest": "cargo/vendor/unicode-bidi-0.3.18", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-bidi-mirroring/unicode-bidi-mirroring-0.3.0.crate", "sha256": "64af057ad7466495ca113126be61838d8af947f41d93a949980b2389a118082f", "dest": "cargo/vendor/unicode-bidi-mirroring-0.3.0" }, { "type": "inline", "contents": "{\"package\": \"64af057ad7466495ca113126be61838d8af947f41d93a949980b2389a118082f\", \"files\": {}}", "dest": "cargo/vendor/unicode-bidi-mirroring-0.3.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-ccc/unicode-ccc-0.3.0.crate", "sha256": "260bc6647b3893a9a90668360803a15f96b85a5257b1c3a0c3daf6ae2496de42", "dest": "cargo/vendor/unicode-ccc-0.3.0" }, { "type": "inline", "contents": "{\"package\": \"260bc6647b3893a9a90668360803a15f96b85a5257b1c3a0c3daf6ae2496de42\", \"files\": {}}", "dest": "cargo/vendor/unicode-ccc-0.3.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-ident/unicode-ident-1.0.16.crate", "sha256": "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034", "dest": "cargo/vendor/unicode-ident-1.0.16" }, { "type": "inline", "contents": "{\"package\": \"a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034\", \"files\": {}}", "dest": "cargo/vendor/unicode-ident-1.0.16", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-math-class/unicode-math-class-0.1.0.crate", "sha256": "7d246cf599d5fae3c8d56e04b20eb519adb89a8af8d0b0fbcded369aa3647d65", "dest": "cargo/vendor/unicode-math-class-0.1.0" }, { "type": "inline", "contents": "{\"package\": \"7d246cf599d5fae3c8d56e04b20eb519adb89a8af8d0b0fbcded369aa3647d65\", \"files\": {}}", "dest": "cargo/vendor/unicode-math-class-0.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-normalization/unicode-normalization-0.1.24.crate", "sha256": "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956", "dest": "cargo/vendor/unicode-normalization-0.1.24" }, { "type": "inline", "contents": "{\"package\": \"5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956\", \"files\": {}}", "dest": "cargo/vendor/unicode-normalization-0.1.24", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-properties/unicode-properties-0.1.3.crate", "sha256": "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0", "dest": "cargo/vendor/unicode-properties-0.1.3" }, { "type": "inline", "contents": "{\"package\": \"e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0\", \"files\": {}}", "dest": "cargo/vendor/unicode-properties-0.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-script/unicode-script-0.5.7.crate", "sha256": "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f", "dest": "cargo/vendor/unicode-script-0.5.7" }, { "type": "inline", "contents": "{\"package\": \"9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f\", \"files\": {}}", "dest": "cargo/vendor/unicode-script-0.5.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-segmentation/unicode-segmentation-1.12.0.crate", "sha256": "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493", "dest": "cargo/vendor/unicode-segmentation-1.12.0" }, { "type": "inline", "contents": "{\"package\": \"f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493\", \"files\": {}}", "dest": "cargo/vendor/unicode-segmentation-1.12.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-vo/unicode-vo-0.1.0.crate", "sha256": "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94", "dest": "cargo/vendor/unicode-vo-0.1.0" }, { "type": "inline", "contents": "{\"package\": \"b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94\", \"files\": {}}", "dest": "cargo/vendor/unicode-vo-0.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unicode-width/unicode-width-0.1.14.crate", "sha256": "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af", "dest": "cargo/vendor/unicode-width-0.1.14" }, { "type": "inline", "contents": "{\"package\": \"7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af\", \"files\": {}}", "dest": "cargo/vendor/unicode-width-0.1.14", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unsafe-libyaml/unsafe-libyaml-0.2.11.crate", "sha256": "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861", "dest": "cargo/vendor/unsafe-libyaml-0.2.11" }, { "type": "inline", "contents": "{\"package\": \"673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861\", \"files\": {}}", "dest": "cargo/vendor/unsafe-libyaml-0.2.11", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/unscanny/unscanny-0.1.0.crate", "sha256": "e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47", "dest": "cargo/vendor/unscanny-0.1.0" }, { "type": "inline", "contents": "{\"package\": \"e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47\", \"files\": {}}", "dest": "cargo/vendor/unscanny-0.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/ureq/ureq-2.12.1.crate", "sha256": "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d", "dest": "cargo/vendor/ureq-2.12.1" }, { "type": "inline", "contents": "{\"package\": \"02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d\", \"files\": {}}", "dest": "cargo/vendor/ureq-2.12.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/url/url-2.5.4.crate", "sha256": "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60", "dest": "cargo/vendor/url-2.5.4" }, { "type": "inline", "contents": "{\"package\": \"32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60\", \"files\": {}}", "dest": "cargo/vendor/url-2.5.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/usvg/usvg-0.43.0.crate", "sha256": "6803057b5cbb426e9fb8ce2216f3a9b4ca1dd2c705ba3cbebc13006e437735fd", "dest": "cargo/vendor/usvg-0.43.0" }, { "type": "inline", "contents": "{\"package\": \"6803057b5cbb426e9fb8ce2216f3a9b4ca1dd2c705ba3cbebc13006e437735fd\", \"files\": {}}", "dest": "cargo/vendor/usvg-0.43.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/utf16_iter/utf16_iter-1.0.5.crate", "sha256": "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246", "dest": "cargo/vendor/utf16_iter-1.0.5" }, { "type": "inline", "contents": "{\"package\": \"c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246\", \"files\": {}}", "dest": "cargo/vendor/utf16_iter-1.0.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/utf8_iter/utf8_iter-1.0.4.crate", "sha256": "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be", "dest": "cargo/vendor/utf8_iter-1.0.4" }, { "type": "inline", "contents": "{\"package\": \"b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be\", \"files\": {}}", "dest": "cargo/vendor/utf8_iter-1.0.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/utf8parse/utf8parse-0.2.2.crate", "sha256": "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821", "dest": "cargo/vendor/utf8parse-0.2.2" }, { "type": "inline", "contents": "{\"package\": \"06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821\", \"files\": {}}", "dest": "cargo/vendor/utf8parse-0.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/vcpkg/vcpkg-0.2.15.crate", "sha256": "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426", "dest": "cargo/vendor/vcpkg-0.2.15" }, { "type": "inline", "contents": "{\"package\": \"accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426\", \"files\": {}}", "dest": "cargo/vendor/vcpkg-0.2.15", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/version_check/version_check-0.9.5.crate", "sha256": "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a", "dest": "cargo/vendor/version_check-0.9.5" }, { "type": "inline", "contents": "{\"package\": \"0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a\", \"files\": {}}", "dest": "cargo/vendor/version_check-0.9.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/walkdir/walkdir-2.5.0.crate", "sha256": "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b", "dest": "cargo/vendor/walkdir-2.5.0" }, { "type": "inline", "contents": "{\"package\": \"29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b\", \"files\": {}}", "dest": "cargo/vendor/walkdir-2.5.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasi/wasi-0.11.0+wasi-snapshot-preview1.crate", "sha256": "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423", "dest": "cargo/vendor/wasi-0.11.0+wasi-snapshot-preview1" }, { "type": "inline", "contents": "{\"package\": \"9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423\", \"files\": {}}", "dest": "cargo/vendor/wasi-0.11.0+wasi-snapshot-preview1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasi/wasi-0.13.3+wasi-0.2.2.crate", "sha256": "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2", "dest": "cargo/vendor/wasi-0.13.3+wasi-0.2.2" }, { "type": "inline", "contents": "{\"package\": \"26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2\", \"files\": {}}", "dest": "cargo/vendor/wasi-0.13.3+wasi-0.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasm-bindgen/wasm-bindgen-0.2.100.crate", "sha256": "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5", "dest": "cargo/vendor/wasm-bindgen-0.2.100" }, { "type": "inline", "contents": "{\"package\": \"1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5\", \"files\": {}}", "dest": "cargo/vendor/wasm-bindgen-0.2.100", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasm-bindgen-backend/wasm-bindgen-backend-0.2.100.crate", "sha256": "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6", "dest": "cargo/vendor/wasm-bindgen-backend-0.2.100" }, { "type": "inline", "contents": "{\"package\": \"2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6\", \"files\": {}}", "dest": "cargo/vendor/wasm-bindgen-backend-0.2.100", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasm-bindgen-macro/wasm-bindgen-macro-0.2.100.crate", "sha256": "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407", "dest": "cargo/vendor/wasm-bindgen-macro-0.2.100" }, { "type": "inline", "contents": "{\"package\": \"7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407\", \"files\": {}}", "dest": "cargo/vendor/wasm-bindgen-macro-0.2.100", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasm-bindgen-macro-support/wasm-bindgen-macro-support-0.2.100.crate", "sha256": "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de", "dest": "cargo/vendor/wasm-bindgen-macro-support-0.2.100" }, { "type": "inline", "contents": "{\"package\": \"8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de\", \"files\": {}}", "dest": "cargo/vendor/wasm-bindgen-macro-support-0.2.100", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasm-bindgen-shared/wasm-bindgen-shared-0.2.100.crate", "sha256": "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d", "dest": "cargo/vendor/wasm-bindgen-shared-0.2.100" }, { "type": "inline", "contents": "{\"package\": \"1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d\", \"files\": {}}", "dest": "cargo/vendor/wasm-bindgen-shared-0.2.100", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasmi/wasmi-0.40.0.crate", "sha256": "a19af97fcb96045dd1d6b4d23e2b4abdbbe81723dbc5c9f016eb52145b320063", "dest": "cargo/vendor/wasmi-0.40.0" }, { "type": "inline", "contents": "{\"package\": \"a19af97fcb96045dd1d6b4d23e2b4abdbbe81723dbc5c9f016eb52145b320063\", \"files\": {}}", "dest": "cargo/vendor/wasmi-0.40.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasmi_collections/wasmi_collections-0.40.0.crate", "sha256": "e80d6b275b1c922021939d561574bf376613493ae2b61c6963b15db0e8813562", "dest": "cargo/vendor/wasmi_collections-0.40.0" }, { "type": "inline", "contents": "{\"package\": \"e80d6b275b1c922021939d561574bf376613493ae2b61c6963b15db0e8813562\", \"files\": {}}", "dest": "cargo/vendor/wasmi_collections-0.40.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasmi_core/wasmi_core-0.40.0.crate", "sha256": "3a8c51482cc32d31c2c7ff211cd2bedd73c5bd057ba16a2ed0110e7a96097c33", "dest": "cargo/vendor/wasmi_core-0.40.0" }, { "type": "inline", "contents": "{\"package\": \"3a8c51482cc32d31c2c7ff211cd2bedd73c5bd057ba16a2ed0110e7a96097c33\", \"files\": {}}", "dest": "cargo/vendor/wasmi_core-0.40.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasmi_ir/wasmi_ir-0.40.0.crate", "sha256": "6e431a14c186db59212a88516788bd68ed51f87aa1e08d1df742522867b5289a", "dest": "cargo/vendor/wasmi_ir-0.40.0" }, { "type": "inline", "contents": "{\"package\": \"6e431a14c186db59212a88516788bd68ed51f87aa1e08d1df742522867b5289a\", \"files\": {}}", "dest": "cargo/vendor/wasmi_ir-0.40.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wasmparser/wasmparser-0.221.2.crate", "sha256": "9845c470a2e10b61dd42c385839cdd6496363ed63b5c9e420b5488b77bd22083", "dest": "cargo/vendor/wasmparser-0.221.2" }, { "type": "inline", "contents": "{\"package\": \"9845c470a2e10b61dd42c385839cdd6496363ed63b5c9e420b5488b77bd22083\", \"files\": {}}", "dest": "cargo/vendor/wasmparser-0.221.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/weezl/weezl-0.1.8.crate", "sha256": "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082", "dest": "cargo/vendor/weezl-0.1.8" }, { "type": "inline", "contents": "{\"package\": \"53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082\", \"files\": {}}", "dest": "cargo/vendor/weezl-0.1.8", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/winapi-util/winapi-util-0.1.9.crate", "sha256": "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb", "dest": "cargo/vendor/winapi-util-0.1.9" }, { "type": "inline", "contents": "{\"package\": \"cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb\", \"files\": {}}", "dest": "cargo/vendor/winapi-util-0.1.9", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows-core/windows-core-0.52.0.crate", "sha256": "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9", "dest": "cargo/vendor/windows-core-0.52.0" }, { "type": "inline", "contents": "{\"package\": \"33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9\", \"files\": {}}", "dest": "cargo/vendor/windows-core-0.52.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows-sys/windows-sys-0.52.0.crate", "sha256": "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d", "dest": "cargo/vendor/windows-sys-0.52.0" }, { "type": "inline", "contents": "{\"package\": \"282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d\", \"files\": {}}", "dest": "cargo/vendor/windows-sys-0.52.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows-sys/windows-sys-0.59.0.crate", "sha256": "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b", "dest": "cargo/vendor/windows-sys-0.59.0" }, { "type": "inline", "contents": "{\"package\": \"1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b\", \"files\": {}}", "dest": "cargo/vendor/windows-sys-0.59.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows-targets/windows-targets-0.52.6.crate", "sha256": "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973", "dest": "cargo/vendor/windows-targets-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973\", \"files\": {}}", "dest": "cargo/vendor/windows-targets-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_aarch64_gnullvm/windows_aarch64_gnullvm-0.52.6.crate", "sha256": "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3", "dest": "cargo/vendor/windows_aarch64_gnullvm-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3\", \"files\": {}}", "dest": "cargo/vendor/windows_aarch64_gnullvm-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_aarch64_msvc/windows_aarch64_msvc-0.52.6.crate", "sha256": "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469", "dest": "cargo/vendor/windows_aarch64_msvc-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469\", \"files\": {}}", "dest": "cargo/vendor/windows_aarch64_msvc-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_i686_gnu/windows_i686_gnu-0.52.6.crate", "sha256": "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b", "dest": "cargo/vendor/windows_i686_gnu-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b\", \"files\": {}}", "dest": "cargo/vendor/windows_i686_gnu-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_i686_gnullvm/windows_i686_gnullvm-0.52.6.crate", "sha256": "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66", "dest": "cargo/vendor/windows_i686_gnullvm-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66\", \"files\": {}}", "dest": "cargo/vendor/windows_i686_gnullvm-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_i686_msvc/windows_i686_msvc-0.52.6.crate", "sha256": "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66", "dest": "cargo/vendor/windows_i686_msvc-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66\", \"files\": {}}", "dest": "cargo/vendor/windows_i686_msvc-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_x86_64_gnu/windows_x86_64_gnu-0.52.6.crate", "sha256": "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78", "dest": "cargo/vendor/windows_x86_64_gnu-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78\", \"files\": {}}", "dest": "cargo/vendor/windows_x86_64_gnu-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_x86_64_gnullvm/windows_x86_64_gnullvm-0.52.6.crate", "sha256": "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d", "dest": "cargo/vendor/windows_x86_64_gnullvm-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d\", \"files\": {}}", "dest": "cargo/vendor/windows_x86_64_gnullvm-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/windows_x86_64_msvc/windows_x86_64_msvc-0.52.6.crate", "sha256": "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec", "dest": "cargo/vendor/windows_x86_64_msvc-0.52.6" }, { "type": "inline", "contents": "{\"package\": \"589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec\", \"files\": {}}", "dest": "cargo/vendor/windows_x86_64_msvc-0.52.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/winnow/winnow-0.7.1.crate", "sha256": "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f", "dest": "cargo/vendor/winnow-0.7.1" }, { "type": "inline", "contents": "{\"package\": \"86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f\", \"files\": {}}", "dest": "cargo/vendor/winnow-0.7.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/wit-bindgen-rt/wit-bindgen-rt-0.33.0.crate", "sha256": "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c", "dest": "cargo/vendor/wit-bindgen-rt-0.33.0" }, { "type": "inline", "contents": "{\"package\": \"3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c\", \"files\": {}}", "dest": "cargo/vendor/wit-bindgen-rt-0.33.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/write16/write16-1.0.0.crate", "sha256": "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936", "dest": "cargo/vendor/write16-1.0.0" }, { "type": "inline", "contents": "{\"package\": \"d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936\", \"files\": {}}", "dest": "cargo/vendor/write16-1.0.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/writeable/writeable-0.5.5.crate", "sha256": "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51", "dest": "cargo/vendor/writeable-0.5.5" }, { "type": "inline", "contents": "{\"package\": \"1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51\", \"files\": {}}", "dest": "cargo/vendor/writeable-0.5.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/xattr/xattr-1.4.0.crate", "sha256": "e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909", "dest": "cargo/vendor/xattr-1.4.0" }, { "type": "inline", "contents": "{\"package\": \"e105d177a3871454f754b33bb0ee637ecaaac997446375fd3e5d43a2ed00c909\", \"files\": {}}", "dest": "cargo/vendor/xattr-1.4.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/xmlparser/xmlparser-0.13.6.crate", "sha256": "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4", "dest": "cargo/vendor/xmlparser-0.13.6" }, { "type": "inline", "contents": "{\"package\": \"66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4\", \"files\": {}}", "dest": "cargo/vendor/xmlparser-0.13.6", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/xmlwriter/xmlwriter-0.1.0.crate", "sha256": "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9", "dest": "cargo/vendor/xmlwriter-0.1.0" }, { "type": "inline", "contents": "{\"package\": \"ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9\", \"files\": {}}", "dest": "cargo/vendor/xmlwriter-0.1.0", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/xmp-writer/xmp-writer-0.3.1.crate", "sha256": "7eb5954c9ca6dcc869e98d3e42760ed9dab08f3e70212b31d7ab8ae7f3b7a487", "dest": "cargo/vendor/xmp-writer-0.3.1" }, { "type": "inline", "contents": "{\"package\": \"7eb5954c9ca6dcc869e98d3e42760ed9dab08f3e70212b31d7ab8ae7f3b7a487\", \"files\": {}}", "dest": "cargo/vendor/xmp-writer-0.3.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/xz2/xz2-0.1.7.crate", "sha256": "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2", "dest": "cargo/vendor/xz2-0.1.7" }, { "type": "inline", "contents": "{\"package\": \"388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2\", \"files\": {}}", "dest": "cargo/vendor/xz2-0.1.7", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/yaml-rust/yaml-rust-0.4.5.crate", "sha256": "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85", "dest": "cargo/vendor/yaml-rust-0.4.5" }, { "type": "inline", "contents": "{\"package\": \"56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85\", \"files\": {}}", "dest": "cargo/vendor/yaml-rust-0.4.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/yoke/yoke-0.7.5.crate", "sha256": "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40", "dest": "cargo/vendor/yoke-0.7.5" }, { "type": "inline", "contents": "{\"package\": \"120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40\", \"files\": {}}", "dest": "cargo/vendor/yoke-0.7.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/yoke-derive/yoke-derive-0.7.5.crate", "sha256": "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154", "dest": "cargo/vendor/yoke-derive-0.7.5" }, { "type": "inline", "contents": "{\"package\": \"2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154\", \"files\": {}}", "dest": "cargo/vendor/yoke-derive-0.7.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zerocopy/zerocopy-0.7.35.crate", "sha256": "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0", "dest": "cargo/vendor/zerocopy-0.7.35" }, { "type": "inline", "contents": "{\"package\": \"1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0\", \"files\": {}}", "dest": "cargo/vendor/zerocopy-0.7.35", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zerocopy-derive/zerocopy-derive-0.7.35.crate", "sha256": "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e", "dest": "cargo/vendor/zerocopy-derive-0.7.35" }, { "type": "inline", "contents": "{\"package\": \"fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e\", \"files\": {}}", "dest": "cargo/vendor/zerocopy-derive-0.7.35", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zerofrom/zerofrom-0.1.5.crate", "sha256": "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e", "dest": "cargo/vendor/zerofrom-0.1.5" }, { "type": "inline", "contents": "{\"package\": \"cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e\", \"files\": {}}", "dest": "cargo/vendor/zerofrom-0.1.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zerofrom-derive/zerofrom-derive-0.1.5.crate", "sha256": "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808", "dest": "cargo/vendor/zerofrom-derive-0.1.5" }, { "type": "inline", "contents": "{\"package\": \"595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808\", \"files\": {}}", "dest": "cargo/vendor/zerofrom-derive-0.1.5", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zerotrie/zerotrie-0.1.3.crate", "sha256": "fb594dd55d87335c5f60177cee24f19457a5ec10a065e0a3014722ad252d0a1f", "dest": "cargo/vendor/zerotrie-0.1.3" }, { "type": "inline", "contents": "{\"package\": \"fb594dd55d87335c5f60177cee24f19457a5ec10a065e0a3014722ad252d0a1f\", \"files\": {}}", "dest": "cargo/vendor/zerotrie-0.1.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zerovec/zerovec-0.10.4.crate", "sha256": "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079", "dest": "cargo/vendor/zerovec-0.10.4" }, { "type": "inline", "contents": "{\"package\": \"aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079\", \"files\": {}}", "dest": "cargo/vendor/zerovec-0.10.4", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zerovec-derive/zerovec-derive-0.10.3.crate", "sha256": "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6", "dest": "cargo/vendor/zerovec-derive-0.10.3" }, { "type": "inline", "contents": "{\"package\": \"6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6\", \"files\": {}}", "dest": "cargo/vendor/zerovec-derive-0.10.3", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zip/zip-2.2.2.crate", "sha256": "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45", "dest": "cargo/vendor/zip-2.2.2" }, { "type": "inline", "contents": "{\"package\": \"ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45\", \"files\": {}}", "dest": "cargo/vendor/zip-2.2.2", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zopfli/zopfli-0.8.1.crate", "sha256": "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946", "dest": "cargo/vendor/zopfli-0.8.1" }, { "type": "inline", "contents": "{\"package\": \"e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946\", \"files\": {}}", "dest": "cargo/vendor/zopfli-0.8.1", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zune-core/zune-core-0.4.12.crate", "sha256": "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a", "dest": "cargo/vendor/zune-core-0.4.12" }, { "type": "inline", "contents": "{\"package\": \"3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a\", \"files\": {}}", "dest": "cargo/vendor/zune-core-0.4.12", "dest-filename": ".cargo-checksum.json" }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/zune-jpeg/zune-jpeg-0.4.14.crate", "sha256": "99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028", "dest": "cargo/vendor/zune-jpeg-0.4.14" }, { "type": "inline", "contents": "{\"package\": \"99a5bab8d7dedf81405c4bb1f2b83ea057643d9cb28778cea9eecddeedd2e028\", \"files\": {}}", "dest": "cargo/vendor/zune-jpeg-0.4.14", "dest-filename": ".cargo-checksum.json" }, { "type": "inline", "contents": "[source.vendored-sources]\ndirectory = \"cargo/vendor\"\n\n[source.crates-io]\nreplace-with = \"vendored-sources\"\n", "dest": "cargo", "dest-filename": "config" } ]��������������������������������flatpak_texlive_flathub.json������������������������������������������������������������������������0000664�0000000�0000000�00000006161�15066577064�0032345�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak���������������������������������������������������������������������������������������������{ "id": "org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive", "runtime": "org.gnome.gitlab.somas.Apostrophe", "branch": "stable", "runtime-version": "stable", "sdk": "org.gnome.Sdk//48", "build-extension": true, "separate-locales": false, "appstream-compose": false, "finish-args": [], "build-options" : { "prepend-path": "/app/extensions/TexLive", "env": { "PATH": "/app/extensions/TexLive/bin:/app/extensions/TexLive/bin/x86_64-linux:/app/bin:/usr/bin" } }, "modules": [ { "name": "p7zip", "no-autogen": true, "build-options": { "prefix": "/app/extensions/TexLive" }, "make-args": ["7z"], "cleanup": ["*"], "sources": [ { "type": "archive", "url": "https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_src_all.tar.bz2", "sha256": "5eb20ac0e2944f6cb9c2d51dd6c4518941c185347d4089ea89087ffdd6e2341f" }, { "type": "shell", "commands": ["sed -i 's|/usr/local|/app/extensions/TexLive|g' makefile.common"] }, { "type": "patch", "path" : "p7zip-gcc10.patch" } ] }, { "name": "texlive", "buildsystem": "simple", "sources": [ { "type":"file", "url": "http://mirrors.ctan.org/systems/texlive/Images/texlive.iso", "sha512": "1fd9a2234d086f50c832ab3ac8b83477bbc39b1138a3c4a2351244c1fd4b8bea6d1ac81d4a5b0cba95f2e82c00f0d9df5b33189eb222e4bae5dae1523ef0da0e" }, { "type": "file", "path": "texlive.profile" }, { "type": "shell", "commands": ["7z x texlive.iso"] } ], "build-commands": [ "chmod +x install-tl", "echo \"In\" | TEXLIVE_INSTALL_PREFIX=/app/extensions/TexLive ./install-tl --profile texlive.profile", "rm -rf /app/extensions/TexLive/texmf-dist/doc" ] }, { "name": "appdata", "buildsystem": "simple", "build-commands": [ "mkdir -p /app/extensions/TexLive/share/appdata", "install -Dm644 org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml /app/extensions/TexLive/share/appdata/org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml", "appstream-compose --basename=org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive --prefix=/app/extensions/TexLive --origin=flatpak org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive" ], "sources": [ { "type": "file", "path": "org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml" } ] } ] } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml����������������������������������������0000664�0000000�0000000�00000001007�15066577064�0040124�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak���������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8"?> <component type="addon"> <id>org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive</id> <extends>org.gnome.gitlab.somas.Apostrophe</extends> <name>TexLive Plugin</name> <summary>Allows to export to pdf and to show formulas in the inline preview</summary> <url type="homepage">https://www.tug.org/texlive//</url> <project_license>LPPL</project_license> <metadata_license>CC0-1.0</metadata_license> <update_contact>w.vollprecht_AT_gmail.com</update_contact> </component> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.json�����������������������������������������������0000664�0000000�0000000�00000004457�15066577064�0036700�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak���������������������������������������������������������������������������������������������{ "id": "org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive", "runtime": "org.gnome.gitlab.somas.Apostrophe", "branch": "stable", "sdk": "org.gnome.Sdk", "build-extension": true, "separate-locales": false, "appstream-compose": false, "finish-args": [ ], "build-options" : { "prefix": "/app/extensions/TexLive", "cflags": "-O2 -g", "cxxflags": "-O2 -g", "env": { "PATH": "/app/extensions/TexLive/bin:/app/extensions/TexLive/2019/bin/x86_64-linux:/app/bin:/usr/bin" } }, "cleanup": ["/bin/wget"], "modules": [ { "name": "wget", "builddir": true, "config-opts": ["--prefix=/app/extensions/TexLive"], "sources": [ { "type": "archive", "url": "https://ftp.gnu.org/gnu/wget/wget-1.19.4.tar.gz", "sha256": "93fb96b0f48a20ff5be0d9d9d3c4a986b469cb853131f9d5fe4cc9cecbc8b5b5" } ] }, { "name": "texlive", "builddir": false, "build-options" : { "build-args": ["--share=network"], "config-opts": ["--prefix=/app/extensions/TexLive"] }, "build-commands": [ ], "sources": [ { "type": "file", "path": "texlive_install.sh", "dest-filename": "configure" } ] }, { "name": "appdata", "buildsystem": "simple", "build-commands": [ "mkdir -p /app/extensions/TexLive/share/appdata", "install -Dm644 org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml /app/extensions/TexLive/share/appdata/org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml", "appstream-compose --basename=org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive --prefix=/app/extensions/TexLive --origin=flatpak org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive" ], "sources": [ { "type": "file", "path": "org.gnome.gitlab.somas.Apostrophe.Plugin.TexLive.appdata.xml" } ] } ] } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������org.gnome.gitlab.somas.Apostrophe.json��������������������������������������������������������������0000664�0000000�0000000�00000016336�15066577064�0034063�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak���������������������������������������������������������������������������������������������{ "app-id": "org.gnome.gitlab.somas.Apostrophe", "runtime": "org.gnome.Platform", "runtime-version": "master", "sdk": "org.gnome.Sdk", "sdk-extensions": [ "org.freedesktop.Sdk.Extension.rust-stable" ], "command": "apostrophe", "finish-args": [ "--socket=fallback-x11", "--socket=wayland", "--share=ipc", "--share=network", "--device=dri", "--filesystem=host", "--filesystem=xdg-run/gvfs", "--filesystem=xdg-run/gvfsd", "--talk-name=org.gtk.vfs.*", "--env=PATH=/app/bin:/usr/bin:/app/extensions/TexLive/bin/x86_64-linux/:/app/extensions/TexLive/bin/aarch64-linux/" ], "cleanup": [ "/lib/pkgconfig", "/share/vala", "/share/gir-1.0", "/share/gtk-doc" ], "add-extensions": { "org.gnome.gitlab.somas.Apostrophe.Plugin": { "directory": "extensions", "version": "stable", "subdirectories": true, "no-autodownload": true, "autodelete": true } }, "modules": [ { "name": "typst", "buildsystem": "simple", "build-options": { "append-path": "/usr/lib/sdk/rust-stable/bin", "env": { "CARGO_HOME": "/run/build/typst/cargo", "CARGO_NET_OFFLINE": "true" } }, "build-commands": [ "cargo fetch --manifest-path Cargo.toml --verbose", "cargo install --path . --root /app" ], "sources": [ "cargo-typst-sources.json", { "type": "archive", "archive-type": "tar-gzip", "url": "https://static.crates.io/crates/typst-cli/typst-cli-0.13.1.crate", "sha256": "a634de7356f417bb09250a926714f87be71777c26e1f62ce640ca2f38debb683" } ] }, { "name": "pandoc", "buildsystem": "simple", "build-commands": [ "cp bin/pandoc /app/bin/pandoc" ], "sources": [ { "type": "archive", "archive-type": "tar-gzip", "url": "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz", "sha512": "e3a64cc47f775fa1456a2a9339ecc47b442181a12cfc94b24453711b7d32d8f3b53d816cc962fe446ba9b3141a6e62e383ba3c7284529977e672480e68e0f8b5", "only-arches": [ "x86_64" ], "x-checker-data": { "type": "json", "url": "https://api.github.com/repos/jgm/pandoc/releases/latest", "version-query": ".tag_name", "url-query": ".assets[] | select(.name==\"pandoc-\" + $version + \"-linux-amd64.tar.gz\") | .browser_download_url" } }, { "type": "archive", "archive-type": "tar-gzip", "url": "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-arm64.tar.gz", "sha512": "dc377e6447439156e41fd12c18ad07881afbe714db0764546f23b201568af612abca620411489235c0b37506651420d955fc3c71c409d4f64af3db2e505f5115", "only-arches": [ "aarch64" ], "x-checker-data": { "type": "json", "url": "https://api.github.com/repos/jgm/pandoc/releases/latest", "version-query": ".tag_name", "url-query": ".assets[] | select(.name==\"pandoc-\" + $version + \"-linux-arm64.tar.gz\") | .browser_download_url" } } ] }, "python3-modules.json", { "name": "fira", "buildsystem": "simple", "build-commands": [ "mkdir -p /app/share/fonts/", "install -D otf/FiraSans-Regular.otf /app/share/fonts/", "install -D otf/FiraMono-Regular.otf /app/share/fonts/", "install -D otf/FiraMono-Bold.otf /app/share/fonts/", "install -D otf/FiraMono-Medium.otf /app/share/fonts/" ], "sources": [ { "type": "archive", "archive-type": "tar-gzip", "url": "https://api.github.com/repos/mozilla/Fira/tarball/4.202", "sha512": "ab9f00c7290aa252448b0730cecccfea07cd99daec09883d261cc49b88b1dadd13e951511517a359646ebd94e6cd13861f468437d26465a079cf2b86ab999356", "x-checker-data": { "type": "json", "url": "https://api.github.com/repos/mozilla/Fira/releases/latest", "version-query": ".tag_name", "url-query": ".tarball_url" } } ] }, { "name": "revealjs", "buildsystem": "simple", "build-commands": [ "mkdir -p /app/share/apostrophe/libs/reveal.js/", "cp -r * /app/share/apostrophe/libs/reveal.js/" ], "sources": [ { "type": "archive", "archive-type": "tar-gzip", "url": "https://api.github.com/repos/hakimel/reveal.js/tarball/5.2.1", "sha512": "4e0de08e6b44348d4c242363d899eb353131b36ab3e83ce24266740edad245210a4ef87550ece50dd95bff1e55ad24d9bcffc6fff600df8bae14424e1ddde2a8", "x-checker-data": { "type": "json", "url": "https://api.github.com/repos/hakimel/reveal.js/releases/latest", "version-query": ".tag_name", "url-query": ".tarball_url" } } ] }, { "name": "libspelling", "buildsystem": "meson", "config-opts": [ "-Ddocs=false", "-Dvapi=false" ], "sources": [ { "type": "archive", "url": "https://download.gnome.org/sources/libspelling/0.4/libspelling-0.4.9.tar.xz", "sha256": "d093fd35ae0f1c98fb58876505287fc0a885e47da9d2411d6d7cd595f34d4ebf", "x-checker-data": { "type": "gnome", "name": "libspelling" } } ] }, { "name": "apostrophe", "builddir": true, "buildsystem": "meson", "run-tests": true, "config-opts": [ "-Dprofile=development" ], "sources": [ { "type": "dir", "path": "../../" } ], "post-install": [ "install -d /app/extensions", "fc-cache -frv /app/share/fonts" ] } ] }��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak/p7zip-gcc10.patch��������0000664�0000000�0000000�00000001355�15066577064�0027627�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ --- a/CPP/Windows/ErrorMsg.cpp 2020-05-28 00:35:02.729896917 +0200 +++ b/CPP/Windows/ErrorMsg.cpp 2020-05-28 00:40:01.676442629 +0200 @@ -13,7 +13,7 @@ const char * txt = 0; AString msg; - switch(errorCode) { + switch(HRESULT(errorCode)) { case ERROR_NO_MORE_FILES : txt = "No more files"; break ; case E_NOTIMPL : txt = "E_NOTIMPL"; break ; case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ; @@ -43,7 +43,7 @@ const char * txt = 0; AString msg; - switch(messageID) { + switch(HRESULT(messageID)) { case ERROR_NO_MORE_FILES : txt = "No more files"; break ; case E_NOTIMPL : txt = "E_NOTIMPL"; break ; case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ; �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak/python3-modules.json�����0000664�0000000�0000000�00000006755�15066577064�0030620�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "name": "python3-modules", "buildsystem": "simple", "build-commands": [], "modules": [ { "name": "python3-regex", "buildsystem": "simple", "build-commands": [ "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"regex\" --no-build-isolation" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/b2/5a/4c63457fbcaf19d138d72b2e9b39405954f98c0349b31c601bfcb151582c/regex-2025.9.1.tar.gz", "sha256": "88ac07b38d20b54d79e704e38aa3bd2c0f8027432164226bdee201a1c0c9c9ff", "x-checker-data": { "type": "pypi", "name": "regex" } } ] }, { "name": "python3-pypandoc", "buildsystem": "simple", "build-commands": [ "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pypandoc\" --no-build-isolation" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/61/06/0763e0ccc81754d3eadb21b2cb86cf21bdedc9b52698c2ad6785db7f0a4e/pypandoc-1.15-py3-none-any.whl", "sha256": "4ededcc76c8770f27aaca6dff47724578428eca84212a31479403a9731fc2b16", "x-checker-data": { "type": "pypi", "name": "pypandoc", "packagetype": "bdist_wheel" } } ] }, { "name": "python3-chardet", "buildsystem": "simple", "build-commands": [ "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"chardet\" --no-build-isolation" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", "sha256": "e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", "x-checker-data": { "type": "pypi", "name": "chardet", "packagetype": "bdist_wheel" } } ] }, { "name": "python3-pyenchant", "buildsystem": "simple", "build-commands": [ "pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pyenchant\" --no-build-isolation" ], "sources": [ { "type": "file", "url": "https://files.pythonhosted.org/packages/54/4c/a741dddab6ad96f257d90cb4d23067ffadac526c9cab3a99ca6ce3c05477/pyenchant-3.2.2-py3-none-any.whl", "sha256": "5facc821ece957208a81423af7d6ec7810dad29697cb0d77aae81e4e11c8e5a6", "x-checker-data": { "type": "pypi", "name": "pyenchant", "packagetype": "bdist_wheel" } } ] } ] }�������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak/texlive.profile����������0000664�0000000�0000000�00000002001�15066577064�0027671�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������selected_scheme scheme-basic TEXDIR /app/extensions/TexLive/2018 TEXMFCONFIG /app/extensions/TexLive/.texlive2018/texmf-config TEXMFHOME /app/extensions/TexLive/texmf TEXMFLOCAL /app/extensions/TexLive/texmf-local TEXMFSYSCONFIG /app/extensions/TexLive/2018/texmf-config TEXMFSYSVAR /app/extensions/TexLive/2018/texmf-var TEXMFVAR /app/extensions/TexLive/.texlive2018/texmf-var binary_x86_64-linux 1 collection-latex 1 collection-xetex 1 collection-latexrecommended 1 collection-binextra 1 collection-fontsrecommended 1 collection-unicodetex 1 instopt_adjustpath 0 instopt_adjustrepo 1 instopt_letter 0 instopt_portable 1 instopt_write18_restricted 1 tlpdbopt_autobackup 1 tlpdbopt_backupdir tlpkg/backups tlpdbopt_create_formats 1 tlpdbopt_desktop_integration 1 tlpdbopt_file_assocs 1 tlpdbopt_generate_updmap 0 tlpdbopt_install_docfiles 0 tlpdbopt_install_srcfiles 0 tlpdbopt_post_code 1 tlpdbopt_sys_bin /usr/local/bin tlpdbopt_sys_info /usr/local/share/info tlpdbopt_sys_man /usr/local/share/man tlpdbopt_w32_multi_user 1�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/flatpak/texlive_install.sh�������0000775�0000000�0000000�00000004103�15066577064�0030401�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Download the installer! # Currently using 2017 edition, upgrade to 2018 tomorrow! (just released, needs) # time to propagate everywhere wget ftp://tug.org/historic/systems/texlive/2019/install-tl-unx.tar.gz myhash=$(sha256sum install-tl-unx.tar.gz | cut -d' ' -f1) if [ $myhash != "44aa41b5783e345b7021387f19ac9637ff1ce5406a59754230c666642dfe7750" ] ; then echo "CHECKSUM MISMATCH!"; exit 1 ; fi tar xvf install-tl-unx.tar.gz # The texlive profile sets some variables for the installation # so the installer doesn't use the text user interface # Most importantly (besides the paths') is "selected-scheme" # Currently set to scheme-minimal which installs almost nothing # (which is great for testing, but less for actual usage! :) cat <<EOF > texlive.profile # texlive.profile written on Sat Apr 28 18:37:30 2018 UTC # It will NOT be updated and reflects only the # installation profile at installation time. selected_scheme scheme-basic TEXDIR /app/extensions/TexLive/2019 TEXMFCONFIG ~/.texlive2019/texmf-config TEXMFHOME ~/texmf TEXMFLOCAL /app/extensions/TexLive/texmf-local TEXMFSYSCONFIG /app/extensions/TexLive/2019/texmf-config TEXMFSYSVAR /app/extensions/TexLive/2019/texmf-var TEXMFVAR ~/.texlive2019/texmf-var binary_x86_64-linux 1 collection-latex 1 collection-binextra 1 collection-fontsrecommended 1 instopt_adjustpath 0 instopt_adjustrepo 1 instopt_letter 0 instopt_portable 1 instopt_write18_restricted 1 tlpdbopt_autobackup 1 tlpdbopt_backupdir tlpkg/backups tlpdbopt_create_formats 1 tlpdbopt_desktop_integration 1 tlpdbopt_file_assocs 1 tlpdbopt_generate_updmap 0 tlpdbopt_install_docfiles 0 tlpdbopt_install_srcfiles 0 tlpdbopt_post_code 1 tlpdbopt_sys_bin /usr/local/bin tlpdbopt_sys_info /usr/local/share/info tlpdbopt_sys_man /usr/local/share/man tlpdbopt_w32_multi_user 1 EOF # Makefile which is required by flatpak ... so this one is almost empty # except for the install command which uses the texlive installer to download # all the packages! cat <<EOF > Makefile all: echo "I am a pretty empty Makefile." install: ./install-tl-20190410/install-tl --profile texlive.profile EOF �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/meson_post_config.py�������������0000664�0000000�0000000�00000000663�15066577064�0027306�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 import os import subprocess build_root = os.environ.get('MESON_BUILD_ROOT') source_root = os.environ.get('MESON_SOURCE_ROOT') print('Install schemas in build dir...') subprocess.call(['glib-compile-schemas', source_root + '/data/']) subprocess.call(['mkdir', '-p', build_root + '/data/glib-2.0/schemas']) subprocess.call(['mv', source_root + '/data/gschemas.compiled', build_root + '/data/glib-2.0/schemas']) �����������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/build-aux/meson_post_install.py������������0000775�0000000�0000000�00000000704�15066577064�0027506�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python3 from os import environ, path from subprocess import call if not environ.get('DESTDIR', ''): PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr/local') DATA_DIR = path.join(PREFIX, 'share') print('Updating icon cache...') call(['gtk-update-icon-cache', '-qtf', path.join(DATA_DIR, 'icons/hicolor')]) print("compiling new schemas") call(["glib-compile-schemas", path.join(DATA_DIR, 'glib-2.0/schemas')]) ������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/config.py.in�������������������������������0000664�0000000�0000000�00000000274�15066577064�0023551�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������APP_ID = "@APP_ID@" PKGDATA_DIR = "@PKGDATA_DIR@" PROFILE = "@PROFILE@" NAME_SUFFIX = "@NAME_SUFFIX@" VERSION = "@VERSION@" GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@" LOCALEDIR = "@LOCALEDIR@" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/data/��������������������������������������0000775�0000000�0000000�00000000000�15066577064�0022233�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/data/apostrophe.gresource.xml��������������0000664�0000000�0000000�00000007631�15066577064�0027145�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8"?> <gresources> <gresource prefix="/org/gnome/gitlab/somas/Apostrophe/"> <file compressed="true" alias="icons/scalable/actions/external-link-symbolic.svg">media/icons/external-link-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/preview-layout-full-width-symbolic.svg">media/icons/preview-layout-full-width-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/preview-layout-half-width-symbolic.svg">media/icons/preview-layout-half-width-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/preview-layout-windowed-symbolic.svg">media/icons/preview-layout-windowed-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/preview-layout-half-height-symbolic.svg">media/icons/preview-layout-half-height-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/checkmark-symbolic.svg">media/icons/checkmark-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/code-symbolic.svg">media/icons/code-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/quotation-symbolic.svg">media/icons/quotation-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/table-symbolic.svg">media/icons/table-symbolic.svg</file> <file compressed="true" alias="icons/scalable/actions/format-text-heading-symbolic.svg">media/icons/format-text-heading-symbolic.svg</file> <file compressed="true" alias="style.css">media/css/gtk/style.css</file> <file compressed="true" alias="style-dark.css">media/css/gtk/style-dark.css</file> <file compressed="true" alias="style-hc.css">media/css/gtk/style-hc.css</file> <file compressed="true" alias="style-sepia.css">media/css/gtk/style-sepia.css</file> <file compressed="true" preprocess="xml-stripblanks">ui/BottomBar.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/DetailedError.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Editor.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Export.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Headerbar.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/HeaderbarNarrow.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/InlinePreviewPopover.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Panels.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Preferences.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/PreviewLayoutSwitcher.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/PreviewLayoutSwitcherItem.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/PreviewWindow.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Recents.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/SearchBar.ui</file> <file compressed="true" preprocess="xml-stripblanks" alias="gtk/help-overlay.ui">ui/Shortcuts.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Statsbar.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/TableInput.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/TexliveWarning.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/TextView.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Toolbar.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/ToolbarNarrow.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/ThemeSwitcher.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/Window.ui</file> <file compressed="true" preprocess="xml-stripblanks">ui/AboutHemingway.ui</file> <file compressed="true" preprocess="xml-stripblanks">About.ui</file> <file compressed="true">media/apostrophe_markdown.md</file> </gresource> </gresources> �������������������������������������������������������������������������������������������������������apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/data/icons/��������������������������������0000775�0000000�0000000�00000000000�15066577064�0023346�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������de.wolfvollprecht.apostrophe.Source�����������������������������������������������������������������0000664�0000000�0000000�00000422442�15066577064�0032305�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�apostrophe-v3.4-c045f36e7e089134a0b2c62d85091037e5fcda4e/data/icons����������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:export-ydpi="96" inkscape:export-xdpi="96" inkscape:export-filename="Template.png" width="192" height="152" id="svg11300" sodipodi:version="0.32" inkscape:version="1.0beta2 (2b71d25d45, 2019-12-03)" sodipodi:docname="org.gnome.gitlab.somas.Apostrophe.Source.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" version="1.0" style="display:inline;enable-background:new" viewBox="0 0 192 152"> <title id="title4162">Adwaita Icon Template image/svg+xml GNOME Design Team Adwaita Icon Template