diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index f3c3a52c8..eef7b8cc5 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -5,28 +5,22 @@ on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
- strategy:
- max-parallel: 4
- matrix:
- python-version: [3.6, 3.7]
-
steps:
- - uses: actions/checkout@v1
- - name: Set up Python ${{ matrix.python-version }}
+ - uses: actions/checkout@v2
+ - name: Set up python
uses: actions/setup-python@v1
with:
- python-version: ${{ matrix.python-version }}
- - name: Set up Node
+ python-version: '3.6'
+ - name: Set up protoc
+ uses: Arduino/actions/setup-protoc@master
+ - name: Set up node
uses: actions/setup-node@v1
with:
node-version: 12
- - name: Set up Protoc
- uses: Arduino/actions/setup-protoc@master
- name: Run checks
run: |
+ # add requirements
sudo apt install portaudio19-dev
- python${{ matrix.python-version }} -m venv ~/pyenv
- . ~/pyenv/bin/activate
- pip install -r requirements.qt
- pip install --upgrade setuptools pip
- make check RUSTARGS=""
+ export UNOPT=1
+ ./check
+ ./bundle
diff --git a/.gitignore b/.gitignore
index 9c3b0c91f..48fe9de45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,20 +6,7 @@
.build
.coverage
.DS_Store
+build
+pyenv
.mypy_cache
-.pytype
__pycache__
-anki/buildhash.py
-anki/backend_pb2.*
-aqt/forms
-locale
-rs/ankirs/src/backend_proto.rs
-rs/target
-tools/runanki.system
-ts/node_modules
-web/deckbrowser.js
-web/editor.js
-web/overview.js
-web/reviewer-bottom.js
-web/reviewer.js
-web/webview.js
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 25ba190b1..000000000
--- a/LICENSE
+++ /dev/null
@@ -1,692 +0,0 @@
-Anki is licensed under the GNU Affero General Public License, version 3 or
-later. A full copy of the version 3 license is included below.
-
-You are free to make changes to Anki and distribute those changes under the
-terms of the AGPL listed below. If you would like to contribute changes back
-to the official distribution, I ask that you license your code under the BSD
-three-clause (no advertising) license, as portions of this code are also used
-in the closed-source AnkiWeb. Before sending a patch or pull request for the
-first time, please post a private ticket on our support site that states you
-are happy to license all contributions you submit to the Anki project under
-the three-clause BSD license.
-
-Please see LICENSE.logo for the copyright and license of Anki's logo.
-
-The following included source code items use a license other than AGPL3:
-
- * Anki's translations: A mix of BSD and public domain.
- * Qt's bundled translations: LGPL3.
- * The anki/template/ folder is based off pystache: MIT.
- * The SuperMemo importer: GPL3.
- * The Pauker importer: BSD-3.
- * mpv.py: MIT.
- * statsbg.py: CC BY-SA 3.0.
- * winpaths.py: MIT.
- * MathJax: Apache 2.
- * jQuery and jQuery-UI: MIT.
- * browsersel.js: CC BY 2.5.
- * plot.js: MIT.
-
-The AGPL3 license follows.
-
- GNU AFFERO GENERAL PUBLIC LICENSE
- Version 3, 19 November 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
- A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate. Many developers of free software are heartened and
-encouraged by the resulting cooperation. However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
- The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community. It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server. Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
- An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals. This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU Affero General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Remote Network Interaction; Use with the GNU General Public License.
-
- Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software. This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-.
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 08932c71b..000000000
--- a/Makefile
+++ /dev/null
@@ -1,237 +0,0 @@
-PREFIX := /usr
-SHELL := bash
-.SHELLFLAGS := -eu -o pipefail -c
-.DELETE_ON_ERROR:
-MAKEFLAGS += --warn-undefined-variables
-MAKEFLAGS += --no-builtin-rules
-RUNARGS :=
-.SUFFIXES:
-BLACKARGS := -t py36 anki aqt tests
-RUSTARGS := --release --strip
-ISORTARGS := anki aqt tests
-
-$(shell mkdir -p .build)
-
-# Installing
-######################
-
-.PHONY: all install uninstall
-
-all:
- @echo "You can run Anki from this folder with 'make run'."
-
-install:
- rm -rf ${DESTDIR}${PREFIX}/share/anki
- mkdir -p ${DESTDIR}${PREFIX}/share/anki
- cp -av anki aqt web ${DESTDIR}${PREFIX}/share/anki/
- -cp -av locale ${DESTDIR}${PREFIX}/share/anki/
- sed -e 's:@PREFIX@:${PREFIX}:' tools/runanki.system.in > tools/runanki.system
- install -m 0755 -D tools/runanki.system ${DESTDIR}${PREFIX}/bin/anki
- install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/pixmaps anki.xpm anki.png
- install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/applications anki.desktop
- install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/man/man1 anki.1
- install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/doc/anki README.contributing README.development README.md LICENSE LICENSE.logo
- -xdg-mime install anki.xml --novendor
- -xdg-mime default anki.desktop application/x-anki
- -xdg-mime default anki.desktop application/x-apkg
- @echo
- @echo "To finish the installation, you will need to copy the _ankirs module"
- @echo "from the venv into your system Python folder, and install all the "
- @echo "necessary dependencies."
-
-uninstall:
- rm -rf ${DESTDIR}${PREFIX}/share/anki
- rm -rf ${DESTDIR}${PREFIX}/bin/anki
- rm -rf ${DESTDIR}${PREFIX}/share/pixmaps/anki.xpm
- rm -rf ${DESTDIR}${PREFIX}/share/pixmaps/anki.png
- rm -rf ${DESTDIR}${PREFIX}/share/applications/anki.desktop
- rm -rf ${DESTDIR}${PREFIX}/share/man/man1/anki.1
- -xdg-mime uninstall ${DESTDIR}${PREFIX}/share/mime/packages/anki.xml
- @echo
- @echo "Uninstall complete."
-
-# Prerequisites
-######################
-
-RUNREQS := .build/py-run-deps .build/ts-deps
-
-# Python prerequisites
-######################
-
-.build/py-run-deps: requirements.txt
- pip install -r $<
- @touch $@
-
-.build/py-check-reqs: requirements.check .build/py-run-deps
- pip install -r $<
- ./tools/typecheck-setup.sh
- @touch $@
-
-# TS prerequisites
-######################
-
-.build/ts-deps: ts/package.json
- (cd ts && npm i)
- @touch $@
-
-# Rust prerequisites
-######################
-
-.build/rust-deps: .build/py-run-deps
- pip install maturin
- @touch $@
-
-RUST_TOOLCHAIN := $(shell cat rs/rust-toolchain)
-
-.build/rs-fmt-deps:
- rustup component add rustfmt-preview --toolchain $(RUST_TOOLCHAIN)
- @touch $@
-
-.build/rs-clippy-deps:
- rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
- @touch $@
-
-# Protobuf
-######################
-
-PROTODEPS := $(wildcard proto/*.proto)
-
-# Typescript source
-######################
-
-TSDEPS := $(wildcard ts/src/*.ts)
-JSDEPS := $(patsubst ts/src/%.ts, web/%.js, $(TSDEPS))
-
-# Rust source
-######################
-
-RSDEPS := $(shell find rs -type f | egrep -v 'target|/\.|proto.rs')
-
-# Building
-######################
-
-BUILDDEPS := .build/ui .build/js .build/rs .build/py-proto
-
-.build/ui: $(RUNREQS) $(shell find designer -type f)
- ./tools/build_ui.sh
- @touch $@
-
-.build/js: .build/ts-deps $(TSDEPS)
- (cd ts && npm run build)
- @touch $@
-
-.build/rs: .build/rust-deps $(RUNREQS) $(RSDEPS) $(PROTODEPS)
- (cd rs/pymod && maturin develop $(RUSTARGS))
- @touch $@
-
-.build/py-proto: $(RUNREQS) $(PROTODEPS)
- protoc --proto_path=proto --python_out=anki --mypy_out=anki proto/backend.proto
- @touch $@
-
-.PHONY: build clean
-
-build: $(BUILDDEPS)
-
-.PHONY: clean
-clean:
- rm -rf .build
- rm -rf $(JSDEPS)
- rm -rf rs/target
-
-# Running
-######################
-
-.PHONY: run
-run: build
- ./runanki ${RUNARGS}
-
-# Checking
-######################
-
-.PHONY: check
-check: build rs-test rs-fmt rs-clippy py-mypy py-test py-fmt py-imports py-lint ts-fmt
-
-.PHONY: fix
-fix: fix-py-fmt fix-py-imports fix-rs-fmt fix-ts-fmt
-
-# Checking python
-######################
-
-PYCHECKDEPS := $(BUILDDEPS) .build/py-check-reqs $(shell find anki aqt -name '*.py' | grep -v buildhash.py)
-PYTESTDEPS := $(wildcard tests/*.py)
-
-.build/py-mypy: $(PYCHECKDEPS)
- mypy anki aqt
- @touch $@
-
-.build/py-test: $(PYCHECKDEPS) $(PYTESTDEPS)
- ./tools/tests.sh
- @touch $@
-
-.build/py-lint: $(PYCHECKDEPS)
- pylint -j 0 --rcfile=.pylintrc -f colorized --extension-pkg-whitelist=PyQt5,_ankirs anki aqt
- @touch $@
-
-.build/py-imports: $(PYCHECKDEPS) $(PYTESTDEPS)
- isort $(ISORTARGS) --check # if this fails, run 'make fix-py-imports'
- @touch $@
-
-.build/py-fmt: $(PYCHECKDEPS) $(PYTESTDEPS)
- black --check $(BLACKARGS) # if this fails, run 'make fix-py-fmt'
- @touch $@
-
-.PHONY: py-mypy py-test py-lint py-imports py-fmt
-py-mypy: .build/py-mypy
-py-test: .build/py-test
-py-lint: .build/py-lint
-py-imports: .build/py-imports
-py-fmt: .build/py-fmt
-
-.PHONY: fix-py-imports fix-py-fmt
-
-fix-py-imports:
- isort $(ISORTARGS)
-
-fix-py-fmt:
- black $(BLACKARGS) anki aqt
-
-# Checking rust
-######################
-
-.build/rs-test: $(RSDEPS)
- (cd rs/ankirs && cargo test)
- @touch $@
-
-.build/rs-fmt: .build/rs-fmt-deps $(RSDEPS)
- (cd rs && cargo fmt -- --check) # if this fails, run 'make fix-rs-fmt'
- @touch $@
-
-.build/rs-clippy: .build/rs-clippy-deps $(RSDEPS)
- (cd rs && cargo clippy -- -D warnings)
- @touch $@
-
-.PHONY: rs-test rs-fmt fix-rs-fmt rs-clippy
-
-rs-test: .build/rs-test
-rs-fmt: .build/rs-fmt
-rs-clippy: .build/rs-clippy
-
-fix-rs-fmt:
- (cd rs && cargo fmt)
-
-
-# Checking typescript
-######################
-
-TSCHECKDEPS := $(BUILDDEPS) $(TSDEPS)
-
-.build/ts-fmt: $(TSCHECKDEPS)
- (cd ts && npm run check-pretty) # if this fails, run 'make fix-ts-fmt'
- @touch $@
-
-.PHONY: fix-ts-fmt ts-fmt
-ts-fmt: .build/ts-fmt
-
-fix-ts-fmt:
- (cd ts && npm run pretty)
-
diff --git a/README.contributing b/README.contributing
deleted file mode 100644
index d21eac182..000000000
--- a/README.contributing
+++ /dev/null
@@ -1,112 +0,0 @@
-Contributing Code
-==================
-
-For info on contributing things other than code, such as translations, decks
-and add-ons, please see http://ankisrs.net/docs/manual.html#contributing
-
-The goal of Anki 2.1.x is to bring Anki up to date with Python 3 and Qt 5,
-while maintaining compatibility with Anki 2.0.x. Some users will be stuck on
-Anki 2.0 for a while due to unported add-ons or old hardware, so it's
-important that 2.1 doesn't make breaking changes to the file format.
-
-Also of consideration is that the Anki code is indirectly used by the mobile
-clients, which try their best to keep as close to the Anki code as possible so
-that future updates can be ported more easily. Refactoring code makes it
-harder for the mobile clients to track changes, so refactoring should be
-limited to times when it is necessary to address an important issue.
-
-Before sending a pull request or a patch, please check the following to
-increase your chances of the changes being accepted.
-
-Primarily Bugfixes
--------------------
-
-Small patches that fix a specific problem and don't affect other functionality
-are likely to be merged if they meet the other requirements below. Larger
-changes are less likely to be accepted for 2.1.x - if in doubt, please ask
-before you begin work on them so your work does not go to waste.
-
-Examples of changes that are unlikely to be accepted:
-
-- Altering existing code unnecessarily. Your code may be more elegant than
- what already exists, but it takes time for us to review the changes, may
- harbour unnoticed bugs, and makes maintaining the mobile clients more
- difficult.
-- Adding code that is not used within Anki but is only for the benefit of
- add-ons - such code is difficult to test and maintain.
-- Adding code that addresses niche issues - they are better handled in an
- add-on.
-
-Type hints
------------
-
-Type hints have recently been added to parts of the codebase, mainly using
-automated tools. Patches that improve the type hints are welcome, but
-pragmatism is advised. Anki's codebase is old and of varying quality, and
-there are parts that are difficult to type properly. Don't feel the need to
-avoid 'Any' when a proper type is impractical.
-
-When adding type signatures, please avoid refactoring the code, as this is
-liable to break add-ons or introduce regressions.
-
-When running 'make check', Anki uses mypy to typecheck the code. Mypy is fast,
-but not very good at type inference, so it is mostly useful for checking code
-that has type signatures. It is able to read the bundled Qt stubs, and works
-across the whole Anki codebase.
-
-The Qt stubs are not perfect, so you'll find when doing things like connecting
-signals, you may have to add the following to the end of a line to silence
-the spurious errors.
-
- # type: ignore
-
-In cases where you have two modules that reference each other, you can't simply
-import the types from each module into the other one, as it can cause a cyclic
-import. An example of how to work around this can be seen at
-https://github.com/dae/anki/commit/ed0b3d337458d7161811547932b6476f2d4bc887
-
-Tests Must Pass
-----------------
-
-Please make sure 'make check' completes successfully before submitting code.
-You can do this automatically by adding the following into .git/hooks/pre-push
-and making it executable.
-
-#!/bin/bash
-set -e
-make check
-
-If your change is to anki/ and not covered by the existing unit tests, please
-consider adding a unit test at the same time.
-
-Code Style
-------------------
-
-You are welcome to use snake_case variable names and functions in newly
-introduced code, but please avoid renaming existing variables and functions
-that use camelCaps.
-
-If your code isn't formatted correctly, 'make check' will report problems.
-You can fix the formatting automatically with 'make fixpyfmt'.
-
-Do One Thing
--------------
-
-A patch or pull request should be the minimum necessary to address one issue.
-Please don't make a pull request for a bunch of unrelated changes, as they are
-difficult to review and will be rejected - split them up into separate
-requests instead.
-
-License
--------
-
-As mentioned in the LICENSE file, we are only able to accept non-trivial
-patches or pull requests from people who have sent us a private message
-indicating that they license their changes under the BSD license.
-
-Add-ons
-========
-
-If you'd like to make more extensive changes, please consider writing an
-add-on instead, as add-ons have none of these restrictions and can implement
-whatever functionality in whatever style you wish.
diff --git a/README.development b/README.development
deleted file mode 100644
index 23d3df732..000000000
--- a/README.development
+++ /dev/null
@@ -1,73 +0,0 @@
-Running from source
---------------------
-
-For non-developers who want to try this development code, the easiest way is
-to use a binary package - please see:
-
-https://anki.tenderapp.com/discussions/beta-testing
-
-You are welcome to run Anki from source instead, but it is expected that you
-can sort out all dependencies and issues by yourself - we are not able to
-provide support for problems you encounter when running from source.
-
-To start, make sure you have the following installed:
-
- - Python 3.6+
- - Qt 5.9.x or 5.11.x+
- - portaudio
- - mpv
- - lame
- - npm
- - your platform's C compiler, eg gcc, Xcode or Visual Studio 2017.
- - GNU make
- - protoc v3 (https://github.com/protocolbuffers/protobuf/releases)
- - rustup (https://rustup.rs/)
- - pip 19+
-
-Next, build a Python virtual environment and activate it:
-
-$ python3 -m venv ~/pyenv
-$ . ~/pyenv/bin/activate
-
-If the distro you are using has PyQt5 installed, make sure you have the PyQt5
-WebEngine module and development tools (eg pyqt5-dev-tools) installed as well.
-When you use your distro's PyQt5, you have to use the --system-site-packages
-option when setting up the virtual environment to give it access to the system
-site-packages dir.
-
-Otherwise, run:
-
-$ pip install -r requirements.qt
-
-Then to run the development version:
-
-$ make run
-
-If you get any errors please return to the top and check the requirements
-again, and make sure you don't have another version of Anki installed.
-
-If you want to use a language other than English, copy the locale/ folder
-from a source tarball into the root of the repo.
-
-To run the unit tests and checks:
-
-$ make check
-
-Before contributing code, please read README.contributing.
-
-If you'd like to contribute translations, please see the translations section
-of http://ankisrs.net/docs/manual.html#_contributing
-
-Mac users
-----------
-
-You can use homebrew to install some dependencies:
-
-$ brew install python mpv lame portaudio protobuf npm rustup-init
-
-Windows users
---------------
-
-The build process uses a GNU makefile, so you'll either need to run
-GNU make via WSL (https://docs.microsoft.com/en-us/windows/wsl/install-win10)
-or Cygwin, or manually execute the build steps.
diff --git a/README.md b/README.md
index 12bc8a71f..fb00b97b8 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1 @@
-Anki
--------------------------------------
-
-This is the development branch of Anki.
-
-For stable builds, please see https://apps.ankiweb.net.
-
-For non-developers who want to try this development code,
-the easiest way is to use a binary package - please see
-https://anki.tenderapp.com/discussions/beta-testing
-
-To run from source, please see README.development.
-
-If you are interested in contributing changes to Anki, please
-see README.contributing before you begin work.
-
-
+[update coming soon]
diff --git a/anki-qt/.github/workflows/checks.yml b/anki-qt/.github/workflows/checks.yml
new file mode 100644
index 000000000..2254f8fee
--- /dev/null
+++ b/anki-qt/.github/workflows/checks.yml
@@ -0,0 +1,40 @@
+name: Checks
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up python
+ uses: actions/setup-python@v1
+ with:
+ python-version: '3.6'
+ - name: Set up protoc
+ uses: Arduino/actions/setup-protoc@master
+ - name: Set up node
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12
+ - name: Run checks
+ run: |
+ # add requirements
+ sudo apt install portaudio19-dev
+ python3.6 -m venv ~/pyenv
+ . ~/pyenv/bin/activate
+ pip install --upgrade pip setuptools
+ pip install -r requirements.qt
+ cd ..
+ for p in proto lib-rust lib-rspy lib-python; do git clone --depth 1 https://github.com/ankitects/anki-$p.git; done
+ (cd anki-lib-rspy && make develop build BUILDFLAGS="")
+ (cd anki-lib-python && make develop build)
+ # check module
+ cd anki-qt
+ make check build
+ # make sure wheel works
+ deactivate
+ cd ..
+ pip install -r anki-qt/requirements.qt
+ pip install build/*.whl
+ python -c 'import aqt'
diff --git a/anki-qt/.gitignore b/anki-qt/.gitignore
new file mode 100644
index 000000000..8c4b83451
--- /dev/null
+++ b/anki-qt/.gitignore
@@ -0,0 +1,24 @@
+*.mo
+*.pyc
+*\#
+*~
+.*.swp
+.build
+.coverage
+.DS_Store
+.mypy_cache
+.pytype
+__pycache__
+aqt/forms
+tools/runanki.system
+ts/node_modules
+aqt_data/locale
+aqt_data/web/deckbrowser.js
+aqt_data/web/editor.js
+aqt_data/web/overview.js
+aqt_data/web/reviewer-bottom.js
+aqt_data/web/reviewer.js
+aqt_data/web/webview.js
+dist
+aqt.egg-info
+build
diff --git a/.isort.cfg b/anki-qt/.isort.cfg
similarity index 100%
rename from .isort.cfg
rename to anki-qt/.isort.cfg
diff --git a/.pylintrc b/anki-qt/.pylintrc
similarity index 100%
rename from .pylintrc
rename to anki-qt/.pylintrc
diff --git a/anki-qt/LICENSE b/anki-qt/LICENSE
new file mode 100644
index 000000000..aee95d61e
--- /dev/null
+++ b/anki-qt/LICENSE
@@ -0,0 +1,14 @@
+Anki is licensed under the GNU Affero General Public License, version 3 or
+later, with portions contributed by Anki users licensed under the BSD-3
+license: https://github.com/ankitects/anki-contributors
+
+Please see LICENSE.logo for the copyright and license of Anki's logo.
+
+The following included source code items use a license other than AGPL3:
+
+ * mpv.py: MIT.
+ * winpaths.py: MIT.
+ * MathJax: Apache 2.
+ * jQuery and jQuery-UI: MIT.
+ * browsersel.js: CC BY 2.5.
+ * plot.js: MIT.
diff --git a/LICENSE.logo b/anki-qt/LICENSE.logo
similarity index 100%
rename from LICENSE.logo
rename to anki-qt/LICENSE.logo
diff --git a/anki-qt/Makefile b/anki-qt/Makefile
new file mode 100644
index 000000000..858026394
--- /dev/null
+++ b/anki-qt/Makefile
@@ -0,0 +1,105 @@
+PREFIX := /usr
+SHELL := bash
+.SHELLFLAGS := -eu -o pipefail -c
+.DELETE_ON_ERROR:
+MAKEFLAGS += --warn-undefined-variables
+MAKEFLAGS += --no-builtin-rules
+.SUFFIXES:
+
+BLACKARGS := -t py36 aqt tests --exclude=aqt/forms
+ISORTARGS := aqt tests
+
+$(shell mkdir -p .build ../build)
+
+PHONY: all
+all: check
+
+.build/run-deps: setup.py
+ pip install -e .
+ @touch $@
+
+.build/dev-deps: requirements.dev
+ pip install -r requirements.dev
+ @touch $@
+
+.build/ui: $(shell find designer -type f)
+ ./tools/build_ui.sh
+ @touch $@
+
+TSDEPS := $(wildcard ts/src/*.ts)
+
+.build/js: $(TSDEPS)
+ (cd ts && npm i && npm run build)
+ @touch $@
+
+BUILD_STEPS := .build/run-deps .build/dev-deps .build/js .build/ui
+
+# Checking
+######################
+
+.PHONY: check
+check: $(BUILD_STEPS) .build/mypy .build/test .build/fmt .build/imports .build/lint .build/ts-fmt
+
+.PHONY: fix
+fix: $(BUILD_STEPS)
+ isort $(ISORTARGS)
+ black $(BLACKARGS)
+ (cd ts && npm run pretty)
+
+.PHONY: clean
+clean:
+ rm -rf .build aqt.egg-info build dist
+
+# Checking Typescript
+######################
+
+JSDEPS := $(patsubst ts/src/%.ts, web/%.js, $(TSDEPS))
+
+.build/ts-fmt: $(TSDEPS)
+ (cd ts && npm i && npm run check-pretty)
+ @touch $@
+
+# Checking python
+######################
+
+LIBPY := ../lib-python
+
+CHECKDEPS := $(shell find aqt tests -name '*.py')
+
+.build/mypy: $(CHECKDEPS) .build/qt-stubs
+ MYPYPATH=$(LIBPY) mypy aqt
+ @touch $@
+
+.build/test: $(CHECKDEPS)
+ python -m nose2 --plugin=nose2.plugins.mp -N 16
+ @touch $@
+
+.build/lint: $(CHECKDEPS)
+ pylint -j 0 --rcfile=.pylintrc -f colorized --extension-pkg-whitelist=PyQt5,ankirspy aqt
+ @touch $@
+
+.build/imports: $(CHECKDEPS)
+ isort $(ISORTARGS) --check
+ @touch $@
+
+.build/fmt: $(CHECKDEPS)
+ black --check $(BLACKARGS)
+ @touch $@
+
+.build/qt-stubs:
+ ./tools/typecheck-setup.sh
+ @touch $@
+
+# Building
+######################
+
+# we only want the wheel when building, but passing -f wheel to poetry
+# breaks the inclusion of files listed in pyproject.toml
+.PHONY: build
+build: $(BUILD_STEPS)
+ rm -rf dist
+ python setup.py bdist_wheel
+ rsync -a dist/*.whl ../build/
+
+.PHONY: develop
+develop: $(BUILD_STEPS)
diff --git a/anki-qt/README.md b/anki-qt/README.md
new file mode 100644
index 000000000..cd55d758e
--- /dev/null
+++ b/anki-qt/README.md
@@ -0,0 +1,3 @@
+Anki's Qt GUI code.
+
+Please see https://github.com/ankitects/anki-desktop
diff --git a/anki.1 b/anki-qt/anki.1
similarity index 100%
rename from anki.1
rename to anki-qt/anki.1
diff --git a/anki.desktop b/anki-qt/anki.desktop
similarity index 100%
rename from anki.desktop
rename to anki-qt/anki.desktop
diff --git a/anki.png b/anki-qt/anki.png
similarity index 100%
rename from anki.png
rename to anki-qt/anki.png
diff --git a/anki.xml b/anki-qt/anki.xml
similarity index 100%
rename from anki.xml
rename to anki-qt/anki.xml
diff --git a/anki.xpm b/anki-qt/anki.xpm
similarity index 100%
rename from anki.xpm
rename to anki-qt/anki.xpm
diff --git a/aqt/__init__.py b/anki-qt/aqt/__init__.py
similarity index 97%
rename from aqt/__init__.py
rename to anki-qt/aqt/__init__.py
index f55769f60..fc7ca5995 100644
--- a/aqt/__init__.py
+++ b/anki-qt/aqt/__init__.py
@@ -15,9 +15,9 @@ from typing import Any, Optional
import anki.lang
from anki import version as _version
from anki.consts import HELP_SITE
-from anki.lang import langDir
from anki.utils import checksum, isLin, isMac
from aqt.qt import *
+from aqt.utils import locale_dir
appVersion = _version
appWebsite = "http://ankisrs.net/"
@@ -129,23 +129,21 @@ dialogs = DialogManager()
# Qt requires its translator to be installed before any GUI widgets are
# loaded, and we need the Qt language to match the gettext language or
# translated shortcuts will not work.
+#
+# The Qt translator needs to be retained to work.
-_gtrans: Optional[Any] = None
_qtrans: Optional[QTranslator] = None
def setupLang(
pm: ProfileManager, app: QApplication, force: Optional[str] = None
) -> None:
- global _gtrans, _qtrans
+ global _qtrans
try:
locale.setlocale(locale.LC_ALL, "")
except:
pass
lang = force or pm.meta["defaultLang"]
- dir = langDir()
- # gettext
- _gtrans = gettext.translation("anki", dir, languages=[lang], fallback=True)
def fn__(arg):
print("accessing _ without importing from anki.lang will break in the future")
@@ -165,14 +163,15 @@ def setupLang(
builtins.__dict__["_"] = fn__
builtins.__dict__["ngettext"] = fn_ngettext
- anki.lang.setLang(lang, local=False)
+ ldir = locale_dir()
+ anki.lang.setLang(lang, ldir, local=False)
if lang in ("he", "ar", "fa"):
app.setLayoutDirection(Qt.RightToLeft)
else:
app.setLayoutDirection(Qt.LeftToRight)
# qt
_qtrans = QTranslator()
- if _qtrans.load("qt_" + lang, dir):
+ if _qtrans.load("qt_" + lang, ldir):
app.installTranslator(_qtrans)
diff --git a/aqt/about.py b/anki-qt/aqt/about.py
similarity index 100%
rename from aqt/about.py
rename to anki-qt/aqt/about.py
diff --git a/aqt/addcards.py b/anki-qt/aqt/addcards.py
similarity index 99%
rename from aqt/addcards.py
rename to anki-qt/aqt/addcards.py
index 03d6f594c..1fe3bda08 100644
--- a/aqt/addcards.py
+++ b/anki-qt/aqt/addcards.py
@@ -10,10 +10,10 @@ import aqt.modelchooser
from anki.hooks import addHook, remHook, runHook
from anki.lang import _
from anki.notes import Note
-from anki.sound import clearAudioQueue
from anki.utils import htmlToTextLine, isMac
from aqt import AnkiQt
from aqt.qt import *
+from aqt.sound import clearAudioQueue
from aqt.utils import (
addCloseShortcut,
askUser,
diff --git a/aqt/addons.py b/anki-qt/aqt/addons.py
similarity index 100%
rename from aqt/addons.py
rename to anki-qt/aqt/addons.py
diff --git a/aqt/browser.py b/anki-qt/aqt/browser.py
similarity index 99%
rename from aqt/browser.py
rename to anki-qt/aqt/browser.py
index 28a082906..944c63dd8 100644
--- a/aqt/browser.py
+++ b/anki-qt/aqt/browser.py
@@ -17,7 +17,6 @@ from anki.collection import _Collection
from anki.consts import *
from anki.hooks import addHook, remHook, runFilter, runHook
from anki.lang import _, ngettext
-from anki.sound import allSounds, clearAudioQueue, play
from anki.utils import (
bodyClass,
fmtTimeSpan,
@@ -29,6 +28,7 @@ from anki.utils import (
)
from aqt import AnkiQt
from aqt.qt import *
+from aqt.sound import allSounds, clearAudioQueue, play
from aqt.utils import (
MenuList,
SubMenu,
diff --git a/aqt/clayout.py b/anki-qt/aqt/clayout.py
similarity index 99%
rename from aqt/clayout.py
rename to anki-qt/aqt/clayout.py
index 44e1709c4..9b44c0d69 100644
--- a/aqt/clayout.py
+++ b/anki-qt/aqt/clayout.py
@@ -10,9 +10,9 @@ import aqt
from anki.consts import *
from anki.hooks import runFilter
from anki.lang import _, ngettext
-from anki.sound import clearAudioQueue, playFromText
from anki.utils import bodyClass, isMac, isWin, joinFields
from aqt.qt import *
+from aqt.sound import clearAudioQueue, playFromText
from aqt.utils import (
askUser,
downArrow,
diff --git a/aqt/customstudy.py b/anki-qt/aqt/customstudy.py
similarity index 100%
rename from aqt/customstudy.py
rename to anki-qt/aqt/customstudy.py
diff --git a/aqt/deckbrowser.py b/anki-qt/aqt/deckbrowser.py
similarity index 99%
rename from aqt/deckbrowser.py
rename to anki-qt/aqt/deckbrowser.py
index 5419f92e1..8944bc9da 100644
--- a/aqt/deckbrowser.py
+++ b/anki-qt/aqt/deckbrowser.py
@@ -8,9 +8,9 @@ import aqt
from anki.errors import DeckRenameError
from anki.hooks import runHook
from anki.lang import _, ngettext
-from anki.sound import clearAudioQueue
from anki.utils import fmtTimeSpan, ids2str
from aqt.qt import *
+from aqt.sound import clearAudioQueue
from aqt.utils import askUser, getOnlyText, openHelp, openLink, shortcut, showWarning
diff --git a/aqt/deckchooser.py b/anki-qt/aqt/deckchooser.py
similarity index 100%
rename from aqt/deckchooser.py
rename to anki-qt/aqt/deckchooser.py
diff --git a/aqt/deckconf.py b/anki-qt/aqt/deckconf.py
similarity index 100%
rename from aqt/deckconf.py
rename to anki-qt/aqt/deckconf.py
diff --git a/aqt/downloader.py b/anki-qt/aqt/downloader.py
similarity index 100%
rename from aqt/downloader.py
rename to anki-qt/aqt/downloader.py
diff --git a/aqt/dyndeckconf.py b/anki-qt/aqt/dyndeckconf.py
similarity index 100%
rename from aqt/dyndeckconf.py
rename to anki-qt/aqt/dyndeckconf.py
diff --git a/aqt/editcurrent.py b/anki-qt/aqt/editcurrent.py
similarity index 100%
rename from aqt/editcurrent.py
rename to anki-qt/aqt/editcurrent.py
diff --git a/aqt/editor.py b/anki-qt/aqt/editor.py
similarity index 99%
rename from aqt/editor.py
rename to anki-qt/aqt/editor.py
index a89dd0948..5a64b4c70 100644
--- a/aqt/editor.py
+++ b/anki-qt/aqt/editor.py
@@ -17,8 +17,8 @@ from typing import Callable, List, Optional, Tuple
import requests
from bs4 import BeautifulSoup
-import anki.sound
import aqt
+import aqt.sound
from anki.hooks import addHook, runFilter, runHook
from anki.lang import _
from anki.sync import AnkiRequestsClient
@@ -700,8 +700,8 @@ to a cloze type first, via Edit>Change Note Type."""
name = urllib.parse.quote(fname.encode("utf8"))
return '
' % name
else:
- anki.sound.clearAudioQueue()
- anki.sound.play(fname)
+ aqt.sound.clearAudioQueue()
+ aqt.sound.play(fname)
return "[sound:%s]" % fname
def urlToFile(self, url):
diff --git a/aqt/errors.py b/anki-qt/aqt/errors.py
similarity index 100%
rename from aqt/errors.py
rename to anki-qt/aqt/errors.py
diff --git a/aqt/exporting.py b/anki-qt/aqt/exporting.py
similarity index 100%
rename from aqt/exporting.py
rename to anki-qt/aqt/exporting.py
diff --git a/aqt/fields.py b/anki-qt/aqt/fields.py
similarity index 100%
rename from aqt/fields.py
rename to anki-qt/aqt/fields.py
diff --git a/aqt/importing.py b/anki-qt/aqt/importing.py
similarity index 99%
rename from aqt/importing.py
rename to anki-qt/aqt/importing.py
index 49f3255ac..756b0db91 100644
--- a/aqt/importing.py
+++ b/anki-qt/aqt/importing.py
@@ -199,7 +199,7 @@ you can enter it here. Use \\t to represent tab."""
elif "invalidTempFolder" in err:
msg += self.mw.errorHandler.tempFolderMsg()
else:
- msg += str(traceback.format_exc(), "ascii", "replace")
+ msg += traceback.format_exc()
showText(msg)
return
finally:
diff --git a/aqt/main.py b/anki-qt/aqt/main.py
similarity index 99%
rename from aqt/main.py
rename to anki-qt/aqt/main.py
index 4c968091d..2ae1039e7 100644
--- a/aqt/main.py
+++ b/anki-qt/aqt/main.py
@@ -15,11 +15,11 @@ from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
from send2trash import send2trash
-import anki.mpv
-import anki.sound
import aqt
import aqt.mediasrv
+import aqt.mpv
import aqt.progress
+import aqt.sound
import aqt.stats
import aqt.toolbar
import aqt.webview
@@ -378,7 +378,7 @@ close the profile or restart Anki."""
def cleanupAndExit(self) -> None:
self.errorHandler.unload()
self.mediaServer.shutdown()
- anki.sound.cleanupMPV()
+ aqt.sound.cleanupMPV()
self.app.exit(0)
# Sound/video
@@ -388,10 +388,10 @@ close the profile or restart Anki."""
if isWin:
return
try:
- anki.sound.setupMPV()
+ aqt.sound.setupMPV()
except FileNotFoundError:
print("mpv not found, reverting to mplayer")
- except anki.mpv.MPVProcessError:
+ except aqt.mpv.MPVProcessError:
print("mpv too old, reverting to mplayer")
# Collection load/unload
diff --git a/aqt/mediasrv.py b/anki-qt/aqt/mediasrv.py
similarity index 96%
rename from aqt/mediasrv.py
rename to anki-qt/aqt/mediasrv.py
index b68eea1e4..84d15d221 100644
--- a/aqt/mediasrv.py
+++ b/anki-qt/aqt/mediasrv.py
@@ -12,13 +12,12 @@ from typing import Optional
from anki.collection import _Collection
from anki.utils import devMode
from aqt.qt import *
+from aqt.utils import aqt_data_folder
-# locate web folder in source/binary distribution
def _getExportFolder():
- # running from source?
- srcFolder = os.path.join(os.path.dirname(__file__), "..")
- webInSrcFolder = os.path.abspath(os.path.join(srcFolder, "web"))
+ data_folder = aqt_data_folder()
+ webInSrcFolder = os.path.abspath(os.path.join(data_folder, "web"))
if os.path.exists(webInSrcFolder):
return webInSrcFolder
elif isMac:
diff --git a/aqt/modelchooser.py b/anki-qt/aqt/modelchooser.py
similarity index 100%
rename from aqt/modelchooser.py
rename to anki-qt/aqt/modelchooser.py
diff --git a/aqt/models.py b/anki-qt/aqt/models.py
similarity index 100%
rename from aqt/models.py
rename to anki-qt/aqt/models.py
diff --git a/anki/mpv.py b/anki-qt/aqt/mpv.py
similarity index 99%
rename from anki/mpv.py
rename to anki-qt/aqt/mpv.py
index 55fe93ce4..c70da9a59 100644
--- a/anki/mpv.py
+++ b/anki-qt/aqt/mpv.py
@@ -587,3 +587,7 @@ class MPV(MPVBase):
"""Set the value of property `name`.
"""
return self.command("set_property", name, value)
+
+
+# alias this module for backwards compat
+sys.modules["anki.mpv"] = sys.modules["aqt.mpv"]
diff --git a/aqt/overview.py b/anki-qt/aqt/overview.py
similarity index 99%
rename from aqt/overview.py
rename to anki-qt/aqt/overview.py
index a677721de..80f5fb69c 100644
--- a/aqt/overview.py
+++ b/anki-qt/aqt/overview.py
@@ -4,7 +4,7 @@
import aqt
from anki.lang import _
-from anki.sound import clearAudioQueue
+from aqt.sound import clearAudioQueue
from aqt.utils import askUserDialog, openLink, shortcut, tooltip
diff --git a/aqt/pinnedmodules.py b/anki-qt/aqt/pinnedmodules.py
similarity index 100%
rename from aqt/pinnedmodules.py
rename to anki-qt/aqt/pinnedmodules.py
diff --git a/aqt/preferences.py b/anki-qt/aqt/preferences.py
similarity index 100%
rename from aqt/preferences.py
rename to anki-qt/aqt/preferences.py
diff --git a/aqt/profiles.py b/anki-qt/aqt/profiles.py
similarity index 98%
rename from aqt/profiles.py
rename to anki-qt/aqt/profiles.py
index 1b3f7e619..da404e657 100644
--- a/aqt/profiles.py
+++ b/anki-qt/aqt/profiles.py
@@ -16,14 +16,14 @@ from typing import Any, Dict
from send2trash import send2trash
import anki.lang
-import anki.sound
import aqt.forms
+import aqt.sound
from anki.db import DB
from anki.lang import _
from anki.utils import intTime, isMac, isWin
from aqt import appHelpSite
from aqt.qt import *
-from aqt.utils import showWarning
+from aqt.utils import locale_dir, showWarning
metaConf = dict(
ver=0,
@@ -74,7 +74,7 @@ class ProfileManager:
# instantiate base folder
self._setBaseFolder(base)
- anki.sound.setMpvConfigBase(self.base)
+ aqt.sound.setMpvConfigBase(self.base)
def setupMeta(self) -> LoadMetaResult:
# load metadata
@@ -444,7 +444,7 @@ please see:
sql = "update profiles set data = ? where name = ?"
self.db.execute(sql, self._pickle(self.meta), "_global")
self.db.commit()
- anki.lang.setLang(code, local=False)
+ anki.lang.setLang(code, locale_dir(), local=False)
# OpenGL
######################################################################
diff --git a/aqt/progress.py b/anki-qt/aqt/progress.py
similarity index 100%
rename from aqt/progress.py
rename to anki-qt/aqt/progress.py
diff --git a/aqt/qt.py b/anki-qt/aqt/qt.py
similarity index 100%
rename from aqt/qt.py
rename to anki-qt/aqt/qt.py
diff --git a/aqt/reviewer.py b/anki-qt/aqt/reviewer.py
similarity index 99%
rename from aqt/reviewer.py
rename to anki-qt/aqt/reviewer.py
index 0f2449516..0e2fa774b 100644
--- a/aqt/reviewer.py
+++ b/anki-qt/aqt/reviewer.py
@@ -14,11 +14,10 @@ import aqt
from anki.cards import Card
from anki.hooks import addHook, runFilter, runHook
from anki.lang import _, ngettext
-from anki.sound import clearAudioQueue, play, playFromText
from anki.utils import bodyClass, stripHTML
from aqt import AnkiQt
from aqt.qt import *
-from aqt.sound import getAudio
+from aqt.sound import clearAudioQueue, getAudio, play, playFromText
from aqt.utils import (
askUserDialog,
downArrow,
diff --git a/anki/sound.py b/anki-qt/aqt/sound.py
similarity index 89%
rename from anki/sound.py
rename to anki-qt/aqt/sound.py
index 75f11a91a..7f233c54c 100644
--- a/anki/sound.py
+++ b/anki-qt/aqt/sound.py
@@ -5,7 +5,6 @@ import atexit
import html
import os
import random
-import re
import subprocess
import sys
import threading
@@ -14,14 +13,57 @@ from typing import Any, Callable, Dict, List, Optional, Tuple
from anki.hooks import addHook, runHook
from anki.lang import _
-from anki.mpv import MPV, MPVBase
+from anki.sound import allSounds
from anki.utils import isLin, isMac, isWin, tmpdir
+from aqt.mpv import MPV, MPVBase
+from aqt.qt import *
+from aqt.utils import restoreGeom, saveGeom, showWarning
+
+
+def getAudio(parent, encode=True):
+ "Record and return filename"
+ # record first
+ if not Recorder:
+ showWarning("pyaudio not installed")
+ return
+
+ r = Recorder()
+ mb = QMessageBox(parent)
+ restoreGeom(mb, "audioRecorder")
+ mb.setWindowTitle("Anki")
+ mb.setIconPixmap(QPixmap(":/icons/media-record.png"))
+ but = QPushButton(_("Save"))
+ mb.addButton(but, QMessageBox.AcceptRole)
+ but.setDefault(True)
+ but = QPushButton(_("Cancel"))
+ mb.addButton(but, QMessageBox.RejectRole)
+ mb.setEscapeButton(but)
+ t = time.time()
+ r.start()
+ time.sleep(r.startupDelay)
+ QApplication.instance().processEvents()
+ while not mb.clickedButton():
+ txt = _("Recording...
Time: %0.1f")
+ mb.setText(txt % (time.time() - t))
+ mb.show()
+ QApplication.instance().processEvents()
+ if mb.clickedButton() == mb.escapeButton():
+ r.stop()
+ r.cleanup()
+ return
+ saveGeom(mb, "audioRecorder")
+ # ensure at least a second captured
+ while time.time() - t < 1:
+ time.sleep(0.1)
+ r.stop()
+ # process
+ r.postprocess(encode)
+ return r.file()
+
# Shared utils
##########################################################################
-_soundReg = r"\[sound:(.*?)\]"
-
def playFromText(text) -> None:
for match in allSounds(text):
@@ -30,18 +72,6 @@ def playFromText(text) -> None:
play(match)
-def allSounds(text) -> List:
- return re.findall(_soundReg, text)
-
-
-def stripSounds(text) -> str:
- return re.sub(_soundReg, "", text)
-
-
-def hasSound(text) -> bool:
- return re.search(_soundReg, text) is not None
-
-
# Packaged commands
##########################################################################
@@ -471,3 +501,10 @@ def clearAudioQueue() -> None:
Recorder = PyAudioRecorder
+if not Recorder:
+ print("pyaudio not installed")
+
+# add everything from this module into anki.sound for backwards compat
+_exports = [i for i in locals().items() if not i[0].startswith("__")]
+for (k, v) in _exports:
+ sys.modules["anki.sound"].__dict__[k] = v
diff --git a/aqt/stats.py b/anki-qt/aqt/stats.py
similarity index 100%
rename from aqt/stats.py
rename to anki-qt/aqt/stats.py
diff --git a/aqt/studydeck.py b/anki-qt/aqt/studydeck.py
similarity index 100%
rename from aqt/studydeck.py
rename to anki-qt/aqt/studydeck.py
diff --git a/aqt/sync.py b/anki-qt/aqt/sync.py
similarity index 100%
rename from aqt/sync.py
rename to anki-qt/aqt/sync.py
diff --git a/aqt/tagedit.py b/anki-qt/aqt/tagedit.py
similarity index 100%
rename from aqt/tagedit.py
rename to anki-qt/aqt/tagedit.py
diff --git a/aqt/taglimit.py b/anki-qt/aqt/taglimit.py
similarity index 100%
rename from aqt/taglimit.py
rename to anki-qt/aqt/taglimit.py
diff --git a/aqt/toolbar.py b/anki-qt/aqt/toolbar.py
similarity index 100%
rename from aqt/toolbar.py
rename to anki-qt/aqt/toolbar.py
diff --git a/aqt/update.py b/anki-qt/aqt/update.py
similarity index 100%
rename from aqt/update.py
rename to anki-qt/aqt/update.py
diff --git a/aqt/utils.py b/anki-qt/aqt/utils.py
similarity index 98%
rename from aqt/utils.py
rename to anki-qt/aqt/utils.py
index 395e88258..cca97d8b0 100644
--- a/aqt/utils.py
+++ b/anki-qt/aqt/utils.py
@@ -14,6 +14,19 @@ from anki.utils import invalidFilename, isMac, isWin, noBundledLibs, versionWith
from aqt.qt import *
+def aqt_data_folder() -> str:
+ # wheel install?
+ dir = os.path.join(sys.prefix, "aqt_data")
+ if not os.path.exists(dir) or not os.listdir(dir):
+ # running in place?
+ dir = os.path.join(os.path.dirname(__file__), "..", "aqt_data")
+ return dir
+
+
+def locale_dir() -> str:
+ return os.path.join(aqt_data_folder(), "locale")
+
+
def openHelp(section):
link = aqt.appHelpSite
if section:
diff --git a/aqt/webview.py b/anki-qt/aqt/webview.py
similarity index 100%
rename from aqt/webview.py
rename to anki-qt/aqt/webview.py
diff --git a/aqt/winpaths.py b/anki-qt/aqt/winpaths.py
similarity index 100%
rename from aqt/winpaths.py
rename to anki-qt/aqt/winpaths.py
diff --git a/web/browsersel.js b/anki-qt/aqt_data/web/browsersel.js
similarity index 100%
rename from web/browsersel.js
rename to anki-qt/aqt_data/web/browsersel.js
diff --git a/web/deckbrowser.css b/anki-qt/aqt_data/web/deckbrowser.css
similarity index 100%
rename from web/deckbrowser.css
rename to anki-qt/aqt_data/web/deckbrowser.css
diff --git a/web/editor.css b/anki-qt/aqt_data/web/editor.css
similarity index 100%
rename from web/editor.css
rename to anki-qt/aqt_data/web/editor.css
diff --git a/web/imgs/anki-logo-thin.png b/anki-qt/aqt_data/web/imgs/anki-logo-thin.png
similarity index 100%
rename from web/imgs/anki-logo-thin.png
rename to anki-qt/aqt_data/web/imgs/anki-logo-thin.png
diff --git a/web/imgs/gears.svg b/anki-qt/aqt_data/web/imgs/gears.svg
similarity index 100%
rename from web/imgs/gears.svg
rename to anki-qt/aqt_data/web/imgs/gears.svg
diff --git a/web/imgs/media-record.png b/anki-qt/aqt_data/web/imgs/media-record.png
similarity index 100%
rename from web/imgs/media-record.png
rename to anki-qt/aqt_data/web/imgs/media-record.png
diff --git a/web/imgs/more.png b/anki-qt/aqt_data/web/imgs/more.png
similarity index 100%
rename from web/imgs/more.png
rename to anki-qt/aqt_data/web/imgs/more.png
diff --git a/web/imgs/paperclip.png b/anki-qt/aqt_data/web/imgs/paperclip.png
similarity index 100%
rename from web/imgs/paperclip.png
rename to anki-qt/aqt_data/web/imgs/paperclip.png
diff --git a/web/imgs/text_bold.png b/anki-qt/aqt_data/web/imgs/text_bold.png
similarity index 100%
rename from web/imgs/text_bold.png
rename to anki-qt/aqt_data/web/imgs/text_bold.png
diff --git a/web/imgs/text_clear.png b/anki-qt/aqt_data/web/imgs/text_clear.png
similarity index 100%
rename from web/imgs/text_clear.png
rename to anki-qt/aqt_data/web/imgs/text_clear.png
diff --git a/web/imgs/text_cloze.png b/anki-qt/aqt_data/web/imgs/text_cloze.png
similarity index 100%
rename from web/imgs/text_cloze.png
rename to anki-qt/aqt_data/web/imgs/text_cloze.png
diff --git a/web/imgs/text_italic.png b/anki-qt/aqt_data/web/imgs/text_italic.png
similarity index 100%
rename from web/imgs/text_italic.png
rename to anki-qt/aqt_data/web/imgs/text_italic.png
diff --git a/web/imgs/text_sub.png b/anki-qt/aqt_data/web/imgs/text_sub.png
similarity index 100%
rename from web/imgs/text_sub.png
rename to anki-qt/aqt_data/web/imgs/text_sub.png
diff --git a/web/imgs/text_super.png b/anki-qt/aqt_data/web/imgs/text_super.png
similarity index 100%
rename from web/imgs/text_super.png
rename to anki-qt/aqt_data/web/imgs/text_super.png
diff --git a/web/imgs/text_under.png b/anki-qt/aqt_data/web/imgs/text_under.png
similarity index 100%
rename from web/imgs/text_under.png
rename to anki-qt/aqt_data/web/imgs/text_under.png
diff --git a/web/jquery-ui.js b/anki-qt/aqt_data/web/jquery-ui.js
similarity index 100%
rename from web/jquery-ui.js
rename to anki-qt/aqt_data/web/jquery-ui.js
diff --git a/web/jquery.js b/anki-qt/aqt_data/web/jquery.js
similarity index 100%
rename from web/jquery.js
rename to anki-qt/aqt_data/web/jquery.js
diff --git a/web/mathjax/MathJax.js b/anki-qt/aqt_data/web/mathjax/MathJax.js
similarity index 100%
rename from web/mathjax/MathJax.js
rename to anki-qt/aqt_data/web/mathjax/MathJax.js
diff --git a/web/mathjax/conf.js b/anki-qt/aqt_data/web/mathjax/conf.js
similarity index 100%
rename from web/mathjax/conf.js
rename to anki-qt/aqt_data/web/mathjax/conf.js
diff --git a/web/mathjax/extensions/FontWarnings.js b/anki-qt/aqt_data/web/mathjax/extensions/FontWarnings.js
similarity index 100%
rename from web/mathjax/extensions/FontWarnings.js
rename to anki-qt/aqt_data/web/mathjax/extensions/FontWarnings.js
diff --git a/web/mathjax/extensions/HTML-CSS/handle-floats.js b/anki-qt/aqt_data/web/mathjax/extensions/HTML-CSS/handle-floats.js
similarity index 100%
rename from web/mathjax/extensions/HTML-CSS/handle-floats.js
rename to anki-qt/aqt_data/web/mathjax/extensions/HTML-CSS/handle-floats.js
diff --git a/web/mathjax/extensions/HelpDialog.js b/anki-qt/aqt_data/web/mathjax/extensions/HelpDialog.js
similarity index 100%
rename from web/mathjax/extensions/HelpDialog.js
rename to anki-qt/aqt_data/web/mathjax/extensions/HelpDialog.js
diff --git a/web/mathjax/extensions/MatchWebFonts.js b/anki-qt/aqt_data/web/mathjax/extensions/MatchWebFonts.js
similarity index 100%
rename from web/mathjax/extensions/MatchWebFonts.js
rename to anki-qt/aqt_data/web/mathjax/extensions/MatchWebFonts.js
diff --git a/web/mathjax/extensions/MathEvents.js b/anki-qt/aqt_data/web/mathjax/extensions/MathEvents.js
similarity index 100%
rename from web/mathjax/extensions/MathEvents.js
rename to anki-qt/aqt_data/web/mathjax/extensions/MathEvents.js
diff --git a/web/mathjax/extensions/MathMenu.js b/anki-qt/aqt_data/web/mathjax/extensions/MathMenu.js
similarity index 100%
rename from web/mathjax/extensions/MathMenu.js
rename to anki-qt/aqt_data/web/mathjax/extensions/MathMenu.js
diff --git a/web/mathjax/extensions/MathZoom.js b/anki-qt/aqt_data/web/mathjax/extensions/MathZoom.js
similarity index 100%
rename from web/mathjax/extensions/MathZoom.js
rename to anki-qt/aqt_data/web/mathjax/extensions/MathZoom.js
diff --git a/web/mathjax/extensions/Safe.js b/anki-qt/aqt_data/web/mathjax/extensions/Safe.js
similarity index 100%
rename from web/mathjax/extensions/Safe.js
rename to anki-qt/aqt_data/web/mathjax/extensions/Safe.js
diff --git a/web/mathjax/extensions/TeX/AMScd.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/AMScd.js
similarity index 100%
rename from web/mathjax/extensions/TeX/AMScd.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/AMScd.js
diff --git a/web/mathjax/extensions/TeX/AMSmath.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/AMSmath.js
similarity index 100%
rename from web/mathjax/extensions/TeX/AMSmath.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/AMSmath.js
diff --git a/web/mathjax/extensions/TeX/AMSsymbols.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/AMSsymbols.js
similarity index 100%
rename from web/mathjax/extensions/TeX/AMSsymbols.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/AMSsymbols.js
diff --git a/web/mathjax/extensions/TeX/HTML.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/HTML.js
similarity index 100%
rename from web/mathjax/extensions/TeX/HTML.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/HTML.js
diff --git a/web/mathjax/extensions/TeX/action.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/action.js
similarity index 100%
rename from web/mathjax/extensions/TeX/action.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/action.js
diff --git a/web/mathjax/extensions/TeX/autobold.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/autobold.js
similarity index 100%
rename from web/mathjax/extensions/TeX/autobold.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/autobold.js
diff --git a/web/mathjax/extensions/TeX/autoload-all.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/autoload-all.js
similarity index 100%
rename from web/mathjax/extensions/TeX/autoload-all.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/autoload-all.js
diff --git a/web/mathjax/extensions/TeX/bbox.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/bbox.js
similarity index 100%
rename from web/mathjax/extensions/TeX/bbox.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/bbox.js
diff --git a/web/mathjax/extensions/TeX/begingroup.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/begingroup.js
similarity index 100%
rename from web/mathjax/extensions/TeX/begingroup.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/begingroup.js
diff --git a/web/mathjax/extensions/TeX/boldsymbol.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/boldsymbol.js
similarity index 100%
rename from web/mathjax/extensions/TeX/boldsymbol.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/boldsymbol.js
diff --git a/web/mathjax/extensions/TeX/cancel.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/cancel.js
similarity index 100%
rename from web/mathjax/extensions/TeX/cancel.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/cancel.js
diff --git a/web/mathjax/extensions/TeX/color.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/color.js
similarity index 100%
rename from web/mathjax/extensions/TeX/color.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/color.js
diff --git a/web/mathjax/extensions/TeX/enclose.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/enclose.js
similarity index 100%
rename from web/mathjax/extensions/TeX/enclose.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/enclose.js
diff --git a/web/mathjax/extensions/TeX/extpfeil.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/extpfeil.js
similarity index 100%
rename from web/mathjax/extensions/TeX/extpfeil.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/extpfeil.js
diff --git a/web/mathjax/extensions/TeX/mathchoice.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/mathchoice.js
similarity index 100%
rename from web/mathjax/extensions/TeX/mathchoice.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/mathchoice.js
diff --git a/web/mathjax/extensions/TeX/mediawiki-texvc.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/mediawiki-texvc.js
similarity index 100%
rename from web/mathjax/extensions/TeX/mediawiki-texvc.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/mediawiki-texvc.js
diff --git a/web/mathjax/extensions/TeX/mhchem.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/mhchem.js
similarity index 100%
rename from web/mathjax/extensions/TeX/mhchem.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/mhchem.js
diff --git a/web/mathjax/extensions/TeX/mhchem3/mhchem.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/mhchem3/mhchem.js
similarity index 100%
rename from web/mathjax/extensions/TeX/mhchem3/mhchem.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/mhchem3/mhchem.js
diff --git a/web/mathjax/extensions/TeX/newcommand.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/newcommand.js
similarity index 100%
rename from web/mathjax/extensions/TeX/newcommand.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/newcommand.js
diff --git a/web/mathjax/extensions/TeX/noErrors.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/noErrors.js
similarity index 100%
rename from web/mathjax/extensions/TeX/noErrors.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/noErrors.js
diff --git a/web/mathjax/extensions/TeX/noUndefined.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/noUndefined.js
similarity index 100%
rename from web/mathjax/extensions/TeX/noUndefined.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/noUndefined.js
diff --git a/web/mathjax/extensions/TeX/unicode.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/unicode.js
similarity index 100%
rename from web/mathjax/extensions/TeX/unicode.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/unicode.js
diff --git a/web/mathjax/extensions/TeX/verb.js b/anki-qt/aqt_data/web/mathjax/extensions/TeX/verb.js
similarity index 100%
rename from web/mathjax/extensions/TeX/verb.js
rename to anki-qt/aqt_data/web/mathjax/extensions/TeX/verb.js
diff --git a/web/mathjax/extensions/asciimath2jax.js b/anki-qt/aqt_data/web/mathjax/extensions/asciimath2jax.js
similarity index 100%
rename from web/mathjax/extensions/asciimath2jax.js
rename to anki-qt/aqt_data/web/mathjax/extensions/asciimath2jax.js
diff --git a/web/mathjax/extensions/fast-preview.js b/anki-qt/aqt_data/web/mathjax/extensions/fast-preview.js
similarity index 100%
rename from web/mathjax/extensions/fast-preview.js
rename to anki-qt/aqt_data/web/mathjax/extensions/fast-preview.js
diff --git a/web/mathjax/extensions/jsMath2jax.js b/anki-qt/aqt_data/web/mathjax/extensions/jsMath2jax.js
similarity index 100%
rename from web/mathjax/extensions/jsMath2jax.js
rename to anki-qt/aqt_data/web/mathjax/extensions/jsMath2jax.js
diff --git a/web/mathjax/extensions/mhchem.js b/anki-qt/aqt_data/web/mathjax/extensions/mhchem.js
similarity index 100%
rename from web/mathjax/extensions/mhchem.js
rename to anki-qt/aqt_data/web/mathjax/extensions/mhchem.js
diff --git a/web/mathjax/extensions/mml2jax.js b/anki-qt/aqt_data/web/mathjax/extensions/mml2jax.js
similarity index 100%
rename from web/mathjax/extensions/mml2jax.js
rename to anki-qt/aqt_data/web/mathjax/extensions/mml2jax.js
diff --git a/web/mathjax/extensions/tex2jax.js b/anki-qt/aqt_data/web/mathjax/extensions/tex2jax.js
similarity index 100%
rename from web/mathjax/extensions/tex2jax.js
rename to anki-qt/aqt_data/web/mathjax/extensions/tex2jax.js
diff --git a/web/mathjax/extensions/toMathML.js b/anki-qt/aqt_data/web/mathjax/extensions/toMathML.js
similarity index 100%
rename from web/mathjax/extensions/toMathML.js
rename to anki-qt/aqt_data/web/mathjax/extensions/toMathML.js
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff
diff --git a/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff b/anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff
similarity index 100%
rename from web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff
rename to anki-qt/aqt_data/web/mathjax/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff
diff --git a/web/mathjax/jax/element/mml/jax.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/jax.js
similarity index 100%
rename from web/mathjax/jax/element/mml/jax.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/jax.js
diff --git a/web/mathjax/jax/element/mml/optable/Arrows.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/Arrows.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/Arrows.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/Arrows.js
diff --git a/web/mathjax/jax/element/mml/optable/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/BasicLatin.js
diff --git a/web/mathjax/jax/element/mml/optable/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/CombDiacritMarks.js
diff --git a/web/mathjax/jax/element/mml/optable/CombDiactForSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/CombDiactForSymbols.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/CombDiactForSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/CombDiactForSymbols.js
diff --git a/web/mathjax/jax/element/mml/optable/Dingbats.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/Dingbats.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/Dingbats.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/Dingbats.js
diff --git a/web/mathjax/jax/element/mml/optable/GeneralPunctuation.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/GeneralPunctuation.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/GeneralPunctuation.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/GeneralPunctuation.js
diff --git a/web/mathjax/jax/element/mml/optable/GeometricShapes.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/GeometricShapes.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/GeometricShapes.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/GeometricShapes.js
diff --git a/web/mathjax/jax/element/mml/optable/GreekAndCoptic.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/GreekAndCoptic.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/GreekAndCoptic.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/GreekAndCoptic.js
diff --git a/web/mathjax/jax/element/mml/optable/Latin1Supplement.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/Latin1Supplement.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/Latin1Supplement.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/Latin1Supplement.js
diff --git a/web/mathjax/jax/element/mml/optable/LetterlikeSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/LetterlikeSymbols.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/LetterlikeSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/LetterlikeSymbols.js
diff --git a/web/mathjax/jax/element/mml/optable/MathOperators.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MathOperators.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/MathOperators.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MathOperators.js
diff --git a/web/mathjax/jax/element/mml/optable/MiscMathSymbolsA.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscMathSymbolsA.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/MiscMathSymbolsA.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscMathSymbolsA.js
diff --git a/web/mathjax/jax/element/mml/optable/MiscMathSymbolsB.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscMathSymbolsB.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/MiscMathSymbolsB.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscMathSymbolsB.js
diff --git a/web/mathjax/jax/element/mml/optable/MiscSymbolsAndArrows.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscSymbolsAndArrows.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/MiscSymbolsAndArrows.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscSymbolsAndArrows.js
diff --git a/web/mathjax/jax/element/mml/optable/MiscTechnical.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscTechnical.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/MiscTechnical.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/MiscTechnical.js
diff --git a/web/mathjax/jax/element/mml/optable/SpacingModLetters.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SpacingModLetters.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/SpacingModLetters.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SpacingModLetters.js
diff --git a/web/mathjax/jax/element/mml/optable/SuppMathOperators.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SuppMathOperators.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/SuppMathOperators.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SuppMathOperators.js
diff --git a/web/mathjax/jax/element/mml/optable/SupplementalArrowsA.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SupplementalArrowsA.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/SupplementalArrowsA.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SupplementalArrowsA.js
diff --git a/web/mathjax/jax/element/mml/optable/SupplementalArrowsB.js b/anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SupplementalArrowsB.js
similarity index 100%
rename from web/mathjax/jax/element/mml/optable/SupplementalArrowsB.js
rename to anki-qt/aqt_data/web/mathjax/jax/element/mml/optable/SupplementalArrowsB.js
diff --git a/web/mathjax/jax/input/AsciiMath/config.js b/anki-qt/aqt_data/web/mathjax/jax/input/AsciiMath/config.js
similarity index 100%
rename from web/mathjax/jax/input/AsciiMath/config.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/AsciiMath/config.js
diff --git a/web/mathjax/jax/input/AsciiMath/jax.js b/anki-qt/aqt_data/web/mathjax/jax/input/AsciiMath/jax.js
similarity index 100%
rename from web/mathjax/jax/input/AsciiMath/jax.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/AsciiMath/jax.js
diff --git a/web/mathjax/jax/input/MathML/config.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/config.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/config.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/config.js
diff --git a/web/mathjax/jax/input/MathML/entities/a.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/a.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/a.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/a.js
diff --git a/web/mathjax/jax/input/MathML/entities/b.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/b.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/b.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/b.js
diff --git a/web/mathjax/jax/input/MathML/entities/c.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/c.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/c.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/c.js
diff --git a/web/mathjax/jax/input/MathML/entities/d.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/d.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/d.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/d.js
diff --git a/web/mathjax/jax/input/MathML/entities/e.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/e.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/e.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/e.js
diff --git a/web/mathjax/jax/input/MathML/entities/f.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/f.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/f.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/f.js
diff --git a/web/mathjax/jax/input/MathML/entities/fr.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/fr.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/fr.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/fr.js
diff --git a/web/mathjax/jax/input/MathML/entities/g.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/g.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/g.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/g.js
diff --git a/web/mathjax/jax/input/MathML/entities/h.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/h.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/h.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/h.js
diff --git a/web/mathjax/jax/input/MathML/entities/i.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/i.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/i.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/i.js
diff --git a/web/mathjax/jax/input/MathML/entities/j.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/j.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/j.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/j.js
diff --git a/web/mathjax/jax/input/MathML/entities/k.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/k.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/k.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/k.js
diff --git a/web/mathjax/jax/input/MathML/entities/l.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/l.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/l.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/l.js
diff --git a/web/mathjax/jax/input/MathML/entities/m.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/m.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/m.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/m.js
diff --git a/web/mathjax/jax/input/MathML/entities/n.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/n.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/n.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/n.js
diff --git a/web/mathjax/jax/input/MathML/entities/o.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/o.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/o.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/o.js
diff --git a/web/mathjax/jax/input/MathML/entities/opf.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/opf.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/opf.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/opf.js
diff --git a/web/mathjax/jax/input/MathML/entities/p.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/p.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/p.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/p.js
diff --git a/web/mathjax/jax/input/MathML/entities/q.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/q.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/q.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/q.js
diff --git a/web/mathjax/jax/input/MathML/entities/r.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/r.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/r.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/r.js
diff --git a/web/mathjax/jax/input/MathML/entities/s.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/s.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/s.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/s.js
diff --git a/web/mathjax/jax/input/MathML/entities/scr.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/scr.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/scr.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/scr.js
diff --git a/web/mathjax/jax/input/MathML/entities/t.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/t.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/t.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/t.js
diff --git a/web/mathjax/jax/input/MathML/entities/u.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/u.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/u.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/u.js
diff --git a/web/mathjax/jax/input/MathML/entities/v.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/v.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/v.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/v.js
diff --git a/web/mathjax/jax/input/MathML/entities/w.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/w.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/w.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/w.js
diff --git a/web/mathjax/jax/input/MathML/entities/x.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/x.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/x.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/x.js
diff --git a/web/mathjax/jax/input/MathML/entities/y.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/y.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/y.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/y.js
diff --git a/web/mathjax/jax/input/MathML/entities/z.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/z.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/entities/z.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/entities/z.js
diff --git a/web/mathjax/jax/input/MathML/jax.js b/anki-qt/aqt_data/web/mathjax/jax/input/MathML/jax.js
similarity index 100%
rename from web/mathjax/jax/input/MathML/jax.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/MathML/jax.js
diff --git a/web/mathjax/jax/input/TeX/config.js b/anki-qt/aqt_data/web/mathjax/jax/input/TeX/config.js
similarity index 100%
rename from web/mathjax/jax/input/TeX/config.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/TeX/config.js
diff --git a/web/mathjax/jax/input/TeX/jax.js b/anki-qt/aqt_data/web/mathjax/jax/input/TeX/jax.js
similarity index 100%
rename from web/mathjax/jax/input/TeX/jax.js
rename to anki-qt/aqt_data/web/mathjax/jax/input/TeX/jax.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/annotation-xml.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/maction.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/maction.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/maction.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/maction.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/menclose.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/menclose.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/menclose.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/menclose.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/mglyph.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/mglyph.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/mglyph.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/mglyph.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/mmultiscripts.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/ms.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/ms.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/ms.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/ms.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/mtable.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/mtable.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/mtable.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/mtable.js
diff --git a/web/mathjax/jax/output/CommonHTML/autoload/multiline.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/multiline.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/autoload/multiline.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/autoload/multiline.js
diff --git a/web/mathjax/jax/output/CommonHTML/config.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/config.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/config.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/config.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/AMS-Regular.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Caligraphic-Bold.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Bold.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Fraktur-Regular.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Main-Bold.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Math-BoldItalic.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Bold.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Italic.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/SansSerif-Regular.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Script-Regular.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/Typewriter-Regular.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata-extra.js
diff --git a/web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/fonts/TeX/fontdata.js
diff --git a/web/mathjax/jax/output/CommonHTML/jax.js b/anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/jax.js
similarity index 100%
rename from web/mathjax/jax/output/CommonHTML/jax.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/CommonHTML/jax.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/annotation-xml.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/annotation-xml.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/annotation-xml.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/annotation-xml.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/maction.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/maction.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/maction.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/maction.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/menclose.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/menclose.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/menclose.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/menclose.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/mglyph.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/mglyph.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/mglyph.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/mglyph.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/mmultiscripts.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/mmultiscripts.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/mmultiscripts.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/mmultiscripts.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/ms.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/ms.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/ms.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/ms.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/mtable.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/mtable.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/mtable.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/mtable.js
diff --git a/web/mathjax/jax/output/HTML-CSS/autoload/multiline.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/multiline.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/autoload/multiline.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/autoload/multiline.js
diff --git a/web/mathjax/jax/output/HTML-CSS/config.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/config.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/config.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/config.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/BasicLatin.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Other.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Other.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Other.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Other.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/PUA.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/PUA.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/PUA.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/PUA.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/BasicLatin.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Other.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Other.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Other.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Other.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/PUA.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/PUA.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/PUA.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/PUA.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Arrows.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Arrows.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Arrows.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Arrows.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiactForSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiactForSymbols.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiactForSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiactForSymbols.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeometricShapes.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeometricShapes.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeometricShapes.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeometricShapes.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Latin1Supplement.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Latin1Supplement.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Latin1Supplement.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Latin1Supplement.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedA.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedA.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedA.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedA.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedB.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedB.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedB.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedB.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LetterlikeSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LetterlikeSymbols.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LetterlikeSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LetterlikeSymbols.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MathOperators.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MathOperators.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MathOperators.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MathOperators.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscMathSymbolsA.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscMathSymbolsA.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscMathSymbolsA.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscMathSymbolsA.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscSymbols.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscSymbols.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscTechnical.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscTechnical.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscTechnical.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscTechnical.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SpacingModLetters.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SpacingModLetters.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SpacingModLetters.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SpacingModLetters.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SuppMathOperators.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SuppMathOperators.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SuppMathOperators.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SuppMathOperators.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SupplementalArrowsA.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SupplementalArrowsA.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SupplementalArrowsA.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SupplementalArrowsA.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GeneralPunctuation.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GeneralPunctuation.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GeneralPunctuation.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GeneralPunctuation.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Latin1Supplement.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Latin1Supplement.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Latin1Supplement.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Latin1Supplement.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LetterlikeSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LetterlikeSymbols.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LetterlikeSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LetterlikeSymbols.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeometricShapes.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeometricShapes.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeometricShapes.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeometricShapes.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscSymbols.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscSymbols.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscSymbols.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscSymbols.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SpacingModLetters.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SpacingModLetters.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SpacingModLetters.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SpacingModLetters.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/BasicLatin.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Other.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Other.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Other.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Other.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Other.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Other.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Other.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Other.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/BasicLatin.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Other.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Other.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Other.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Other.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/BasicLatin.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Other.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Other.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Other.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Other.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/BasicLatin.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/BasicLatin.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/BasicLatin.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/BasicLatin.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/CombDiacritMarks.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/CombDiacritMarks.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/CombDiacritMarks.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/CombDiacritMarks.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Other.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Other.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Other.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Other.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinChrome/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinChrome/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinChrome/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinChrome/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata-extra.js
diff --git a/web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/fonts/TeX/fontdata.js
diff --git a/web/mathjax/jax/output/HTML-CSS/imageFonts.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/imageFonts.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/imageFonts.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/imageFonts.js
diff --git a/web/mathjax/jax/output/HTML-CSS/jax.js b/anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/jax.js
similarity index 100%
rename from web/mathjax/jax/output/HTML-CSS/jax.js
rename to anki-qt/aqt_data/web/mathjax/jax/output/HTML-CSS/jax.js
diff --git a/web/overview.css b/anki-qt/aqt_data/web/overview.css
similarity index 100%
rename from web/overview.css
rename to anki-qt/aqt_data/web/overview.css
diff --git a/web/plot.js b/anki-qt/aqt_data/web/plot.js
similarity index 100%
rename from web/plot.js
rename to anki-qt/aqt_data/web/plot.js
diff --git a/web/reviewer-bottom.css b/anki-qt/aqt_data/web/reviewer-bottom.css
similarity index 100%
rename from web/reviewer-bottom.css
rename to anki-qt/aqt_data/web/reviewer-bottom.css
diff --git a/web/reviewer.css b/anki-qt/aqt_data/web/reviewer.css
similarity index 100%
rename from web/reviewer.css
rename to anki-qt/aqt_data/web/reviewer.css
diff --git a/web/toolbar-bottom.css b/anki-qt/aqt_data/web/toolbar-bottom.css
similarity index 100%
rename from web/toolbar-bottom.css
rename to anki-qt/aqt_data/web/toolbar-bottom.css
diff --git a/web/toolbar.css b/anki-qt/aqt_data/web/toolbar.css
similarity index 100%
rename from web/toolbar.css
rename to anki-qt/aqt_data/web/toolbar.css
diff --git a/web/webview.css b/anki-qt/aqt_data/web/webview.css
similarity index 100%
rename from web/webview.css
rename to anki-qt/aqt_data/web/webview.css
diff --git a/designer/about.ui b/anki-qt/designer/about.ui
similarity index 100%
rename from designer/about.ui
rename to anki-qt/designer/about.ui
diff --git a/designer/addcards.ui b/anki-qt/designer/addcards.ui
similarity index 100%
rename from designer/addcards.ui
rename to anki-qt/designer/addcards.ui
diff --git a/designer/addfield.ui b/anki-qt/designer/addfield.ui
similarity index 100%
rename from designer/addfield.ui
rename to anki-qt/designer/addfield.ui
diff --git a/designer/addmodel.ui b/anki-qt/designer/addmodel.ui
similarity index 100%
rename from designer/addmodel.ui
rename to anki-qt/designer/addmodel.ui
diff --git a/designer/addonconf.ui b/anki-qt/designer/addonconf.ui
similarity index 100%
rename from designer/addonconf.ui
rename to anki-qt/designer/addonconf.ui
diff --git a/designer/addons.ui b/anki-qt/designer/addons.ui
similarity index 100%
rename from designer/addons.ui
rename to anki-qt/designer/addons.ui
diff --git a/designer/browser.ui b/anki-qt/designer/browser.ui
similarity index 100%
rename from designer/browser.ui
rename to anki-qt/designer/browser.ui
diff --git a/designer/browserdisp.ui b/anki-qt/designer/browserdisp.ui
similarity index 100%
rename from designer/browserdisp.ui
rename to anki-qt/designer/browserdisp.ui
diff --git a/designer/browseropts.ui b/anki-qt/designer/browseropts.ui
similarity index 100%
rename from designer/browseropts.ui
rename to anki-qt/designer/browseropts.ui
diff --git a/designer/changemap.ui b/anki-qt/designer/changemap.ui
similarity index 100%
rename from designer/changemap.ui
rename to anki-qt/designer/changemap.ui
diff --git a/designer/changemodel.ui b/anki-qt/designer/changemodel.ui
similarity index 100%
rename from designer/changemodel.ui
rename to anki-qt/designer/changemodel.ui
diff --git a/designer/clayout_top.ui b/anki-qt/designer/clayout_top.ui
similarity index 100%
rename from designer/clayout_top.ui
rename to anki-qt/designer/clayout_top.ui
diff --git a/designer/customstudy.ui b/anki-qt/designer/customstudy.ui
similarity index 100%
rename from designer/customstudy.ui
rename to anki-qt/designer/customstudy.ui
diff --git a/designer/dconf.ui b/anki-qt/designer/dconf.ui
similarity index 100%
rename from designer/dconf.ui
rename to anki-qt/designer/dconf.ui
diff --git a/designer/debug.ui b/anki-qt/designer/debug.ui
similarity index 100%
rename from designer/debug.ui
rename to anki-qt/designer/debug.ui
diff --git a/designer/dyndconf.ui b/anki-qt/designer/dyndconf.ui
similarity index 100%
rename from designer/dyndconf.ui
rename to anki-qt/designer/dyndconf.ui
diff --git a/designer/editaddon.ui b/anki-qt/designer/editaddon.ui
similarity index 100%
rename from designer/editaddon.ui
rename to anki-qt/designer/editaddon.ui
diff --git a/designer/editcurrent.ui b/anki-qt/designer/editcurrent.ui
similarity index 100%
rename from designer/editcurrent.ui
rename to anki-qt/designer/editcurrent.ui
diff --git a/designer/edithtml.ui b/anki-qt/designer/edithtml.ui
similarity index 100%
rename from designer/edithtml.ui
rename to anki-qt/designer/edithtml.ui
diff --git a/designer/exporting.ui b/anki-qt/designer/exporting.ui
similarity index 100%
rename from designer/exporting.ui
rename to anki-qt/designer/exporting.ui
diff --git a/designer/fields.ui b/anki-qt/designer/fields.ui
similarity index 100%
rename from designer/fields.ui
rename to anki-qt/designer/fields.ui
diff --git a/designer/finddupes.ui b/anki-qt/designer/finddupes.ui
similarity index 100%
rename from designer/finddupes.ui
rename to anki-qt/designer/finddupes.ui
diff --git a/designer/findreplace.ui b/anki-qt/designer/findreplace.ui
similarity index 100%
rename from designer/findreplace.ui
rename to anki-qt/designer/findreplace.ui
diff --git a/designer/getaddons.ui b/anki-qt/designer/getaddons.ui
similarity index 100%
rename from designer/getaddons.ui
rename to anki-qt/designer/getaddons.ui
diff --git a/designer/icons.qrc b/anki-qt/designer/icons.qrc
similarity index 100%
rename from designer/icons.qrc
rename to anki-qt/designer/icons.qrc
diff --git a/designer/icons/anki.png b/anki-qt/designer/icons/anki.png
similarity index 100%
rename from designer/icons/anki.png
rename to anki-qt/designer/icons/anki.png
diff --git a/designer/icons/collection.svg b/anki-qt/designer/icons/collection.svg
similarity index 100%
rename from designer/icons/collection.svg
rename to anki-qt/designer/icons/collection.svg
diff --git a/designer/icons/deck.svg b/anki-qt/designer/icons/deck.svg
similarity index 100%
rename from designer/icons/deck.svg
rename to anki-qt/designer/icons/deck.svg
diff --git a/designer/icons/heart.svg b/anki-qt/designer/icons/heart.svg
similarity index 100%
rename from designer/icons/heart.svg
rename to anki-qt/designer/icons/heart.svg
diff --git a/anki-qt/designer/icons/media-record.png b/anki-qt/designer/icons/media-record.png
new file mode 120000
index 000000000..ff781d925
--- /dev/null
+++ b/anki-qt/designer/icons/media-record.png
@@ -0,0 +1 @@
+../../aqt_data/web/imgs/media-record.png
\ No newline at end of file
diff --git a/designer/icons/notetype.svg b/anki-qt/designer/icons/notetype.svg
similarity index 100%
rename from designer/icons/notetype.svg
rename to anki-qt/designer/icons/notetype.svg
diff --git a/designer/icons/tag.svg b/anki-qt/designer/icons/tag.svg
similarity index 100%
rename from designer/icons/tag.svg
rename to anki-qt/designer/icons/tag.svg
diff --git a/designer/importing.ui b/anki-qt/designer/importing.ui
similarity index 100%
rename from designer/importing.ui
rename to anki-qt/designer/importing.ui
diff --git a/designer/main.ui b/anki-qt/designer/main.ui
similarity index 100%
rename from designer/main.ui
rename to anki-qt/designer/main.ui
diff --git a/designer/modelopts.ui b/anki-qt/designer/modelopts.ui
similarity index 100%
rename from designer/modelopts.ui
rename to anki-qt/designer/modelopts.ui
diff --git a/designer/models.ui b/anki-qt/designer/models.ui
similarity index 100%
rename from designer/models.ui
rename to anki-qt/designer/models.ui
diff --git a/designer/preferences.ui b/anki-qt/designer/preferences.ui
similarity index 100%
rename from designer/preferences.ui
rename to anki-qt/designer/preferences.ui
diff --git a/designer/preview.ui b/anki-qt/designer/preview.ui
similarity index 100%
rename from designer/preview.ui
rename to anki-qt/designer/preview.ui
diff --git a/designer/profiles.ui b/anki-qt/designer/profiles.ui
similarity index 100%
rename from designer/profiles.ui
rename to anki-qt/designer/profiles.ui
diff --git a/designer/progress.ui b/anki-qt/designer/progress.ui
similarity index 100%
rename from designer/progress.ui
rename to anki-qt/designer/progress.ui
diff --git a/designer/reposition.ui b/anki-qt/designer/reposition.ui
similarity index 100%
rename from designer/reposition.ui
rename to anki-qt/designer/reposition.ui
diff --git a/designer/reschedule.ui b/anki-qt/designer/reschedule.ui
similarity index 100%
rename from designer/reschedule.ui
rename to anki-qt/designer/reschedule.ui
diff --git a/designer/setgroup.ui b/anki-qt/designer/setgroup.ui
similarity index 100%
rename from designer/setgroup.ui
rename to anki-qt/designer/setgroup.ui
diff --git a/designer/setlang.ui b/anki-qt/designer/setlang.ui
similarity index 100%
rename from designer/setlang.ui
rename to anki-qt/designer/setlang.ui
diff --git a/designer/stats.ui b/anki-qt/designer/stats.ui
similarity index 100%
rename from designer/stats.ui
rename to anki-qt/designer/stats.ui
diff --git a/designer/studydeck.ui b/anki-qt/designer/studydeck.ui
similarity index 100%
rename from designer/studydeck.ui
rename to anki-qt/designer/studydeck.ui
diff --git a/designer/taglimit.ui b/anki-qt/designer/taglimit.ui
similarity index 100%
rename from designer/taglimit.ui
rename to anki-qt/designer/taglimit.ui
diff --git a/designer/template.ui b/anki-qt/designer/template.ui
similarity index 100%
rename from designer/template.ui
rename to anki-qt/designer/template.ui
diff --git a/mypy.ini b/anki-qt/mypy.ini
similarity index 92%
rename from mypy.ini
rename to anki-qt/mypy.ini
index 91e7b46c6..9ea29f88e 100644
--- a/mypy.ini
+++ b/anki-qt/mypy.ini
@@ -34,5 +34,7 @@ ignore_missing_imports = True
ignore_missing_imports = True
[mypy-jsonschema.*]
ignore_missing_imports = True
-[mypy-_ankirs]
+[mypy-ankirspy]
+ignore_missing_imports = True
+[mypy-PyQt5.sip]
ignore_missing_imports = True
diff --git a/anki-qt/pkgkey.asc b/anki-qt/pkgkey.asc
new file mode 100644
index 000000000..5cebf024f
--- /dev/null
+++ b/anki-qt/pkgkey.asc
@@ -0,0 +1,72 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFueX68BEAClpx+Szt1cSTWJTCTpn9E+tGhYUKVpj1O4KGAj7qYKs651LPOA
+en1Ng0MoK4Avq4zW3PpXxtp14q+CBpEP3AE3omJkKD42cmBvxqdMNiWnFZUbRal8
+L7LrkVFVV/C1Cq7pJR5xAORc2GCKKTE6Ybqdqj2lQKwZEJpM+GQPQqSUQjWpmO2n
+YQ8OSftr58Nqm5N2j2i2BHvchpOUtoN4L5qlYtkPBFltBDVOKglnQE4N9pZjBX76
+D2Q4/6khfIx1kJ3xt8b30cPlDMATdnB6bDUr17vsofhPIY1N07ztyDLl2PyeeqVa
+IrJEh9XvhwnN5RqM10PZDSEDVGLk4Mkbu5dwsbvXbdMrLbAaWoBDEmloVmM+rw+t
+g76ldYu2FIxIVHDdgqJWSw5+JTQk+GlAwxAve3yluxvWrxKR1kG66XB8rX0G47Qd
+DLmnj9PISi5rRJzQXTrIG93aKKBqz6vMS1n9V3BhEKSzJ2zH6Nhog/SIwFqfSvNL
++vJLmjPlOdVL4cBSa7EltOGevkeU5DCTV0PNz78TpBMTaduKxFyFfepyxkYrFrjR
+hKR2HLFD0jecw36UoCETJm5/VbYE312qqWJxuuvsWtaU2I6SRv8rTRJ7prlo5zI1
+6pfUk3QCt1zDZC3v3NszhYIhLBIVv72iVo3DEbuqOyjGJnF1IOUv6XRvbwARAQAB
+tCFBbmtpIFNpZ25hdHVyZXMgPGdwZ0Bhbmtpd2ViLm5ldD6JAk4EEwEKADgWIQSB
+TqTpDDSvOacS3nA/VWai0WiZ+wUCW55frwIbAQULCQgHAwUVCgkICwUWAgMBAAIe
+AQIXgAAKCRA/VWai0WiZ+yM6EACLvzNwwgXVE6KA9NA+Xn9z/5CEy894gNUXBdyP
+x2peUZmvqZYJsWrq1EdwvyNPVnfxerzRPzzO1/+UFs9lyrVJBOIXRe790xUDEAOt
+d67eIHk0/mwR8HA4EzBM3VhK90DzfdVl8CGjn7QMcgXZk8qp9ogSh4qoPq9slXjs
+Ay8pdDKBQthR3jFoAX8tX8x3vrQPBFIA1xRX0Pr9w6CTR7lto0HTP1o4weB2AFVM
+cshUnPWv7UkJsKDgsS0JpK46AS1y0z8TgGqZxPiXyiSw+r+uBOu5243ujfFKHfsR
+26h23BO+9niHKIMkThTlYweUj0pqqcS9dZ1RBFFtW5/0+c/WA7Jg59XELg34jbvr
+DJjW0kXkvH3TP0rxDNlzQivh48PTHovng/m0Ah6XoW6APBK04xTOPPsW8mILolwi
+PYcd3frQx2gYCKiUDgXhn/0pHy35Qf2UMCpWMljNF3uaoeBDmRjmhaUDnldDWeYo
+pg48bwe4utKeJK9mIl1tg24jOiZPWB7Yg5UOSa9qG9Z8O/Vvgmi9z4ujp4g37jUZ
+PGAlsEagVUAenVbNpS07X2KtGuP3CKc1akN9I4YArH604lB6rJYVl7c1mZw6YZf1
+lDuFs+sorr+Qh6ivBvhCOZwC+cAfUHXm0Td6mBsnnCJl3Pe0w49x2ODdabjyM/d+
+19lNz4hdBBMRCgAdFiEErE89EK5NqyDOk9jPuclDRDSScSsFAlufSloACgkQuclD
+RDSScStmmgCfZBxtwxhNHKDdSVbMUlFmPq3Ww5gAn1A0OzZEPJkj+gdq0bWbEePA
+Na/+iQEzBBMBCgAdFiEE5As5X+DAzGQR/QaHdD/TCLkKzHEFAlufSu4ACgkQdD/T
+CLkKzHH2HwgAj9jcRBL3Rsu4r7ZifbAPOlB/zQLos5Hmt70DzheWpU6hMcxkgnAs
+CB3gutZAQ36yKgBzOFWDfo5X3ivhAm23VXkFKswgHmA1DLypmFPh2rm/Sh3G9khr
+oogQmwErZRLNJ7QY9Q3sIxaSvZArWSRaysSaVG9CiSq+N4yXnhETS8uieWV9k+qk
+Rs1eaJCjOYPgaxQXXL18RgkzuDKuSqmWW0AvmVNaAsX27diAxqcVysGyoJIqA4Dw
+VaMJU+hSZZSryKTLWHZpGMMLLjt5oLyW3y1HvopVAuGRrAXLzqgvLv/WSXHWfSrL
+l+VeP2jDU3mF43BtjGRMrVgAf0DGH1zg57kCDQRbnmAYARAAsvvWoYPy13YFqOsR
+sgaJ1sW6hyGGOjhlHcfcc++CgYwowQ8jn0ZkYdcDs+zbJI8+BUCdVgO8kpJFVlmC
+vpBeO0bKoqc63W6NIG7qrhgDoODO3J3CV4LJm5ipj9tcuXCW2o7GzrgJMaps8NQK
+aUywSwZcV15aERrw9viHEPUHHAQkKBANv/cJ+YWD1SOZyI978yER0/qdby8cnLp+
+vwzRo+OB3ubZL3iFKKd716eSOJQOO1XbxsfF9RagFmGn8lq4tii9nU9c7BS3ajC3
+FJNNsNphe7DezAeV7IZZrmcSTl+h3n045yRJjisxqG74dSqJ8aIkuQvCTRn8MhIL
+ulgX3W0Bl4xLkRDhskIOdO8d2h8nOzoNJ2yDrJp1JHEG6G3J3ZsQ1H1uhVCwvFAM
+SMBo0kfnBfgsu7qyb3Lu5wOJ4Kh8+DZlgUnV8k/Gy21nvqjHCB4to/XSt5ZxWyBs
+myZTxbA3w4zmkKhIdXBXEHT1+giM2n/xA7vnAUHYdGcRUza3fKXZFoBe3sOp2f6y
+iF0kkO75Vkbshew8LymowU7eioiNLjIhVeOw0ICJVdHTreAFvkPo5e1N3z7Bov1E
+fqLZA1p7sUJ68sNrIo3UNeADsy5YfTsSB/2zxHi1WEbhcGA2fICJfhNCOjrFKTqR
+Sb+9EdKZj3Yl5fVRaMwYtqC2IKMAEQEAAYkEbAQYAQoAIBYhBIFOpOkMNK85pxLe
+cD9VZqLRaJn7BQJbnmAYAhsCAkAJED9VZqLRaJn7wXQgBBkBCgAdFiEEHKk0tAuE
+9EgxbOL8wKNRl5s347kFAlueYBgACgkQwKNRl5s347lE/A/+Mxd1Cf8aRkE8Pq8m
+qAnMPNsuA0TpBxP7NMqi9VLpcQNU8fP5b2/7GPcz/bBsryGqQ0PxF/unHJh7Ei7V
+GM6lYKkboWQNRC8jgRgwGxmoRMQZHocKojPlAPqJ9RiiGM6Hj6QP1oyYGp596osP
+HW2FF8fNnoFFaghRVJmpNBnkUlRZhJDoJQmzQlSnbZlnphGMe4J6Eioj1dwoDPow
+aBOXdWbo7j6VXvVjz3WpQ1InHuYEW3/rkuuTaxsiyq0/Kn1MT6G1uDrg9BczUDSF
+txRoVzE3oR6gp+XfVSyfGQOeSXIi9pAENM0nsxLDf2mTqDFZGpP2Ja9T8RPJB2mh
+wdfIfHWQu8+Yywmmbb/BA4ebF0zlGx7NWTc12NYqe+bMlHvZSacm6PVkg6ob6DtD
+PAZbYg8oqzi7Mz4m3Z5lTRrTP5bul2Mx18XZH0gnKPHkFuSgSTh+0zVQi/OL8gED
+63dbH+AHavua4ORhPXaOvcyGCzqoOMY3NXkYegB0lfj5uv71DzJWniabDfwMAC7T
+O2rnhPk+iss2dCIpTFI6EqFL0BgFXpAV07nTCVyAYkrXnwlBusqc1TdZt8cVGoww
+lD284T9WhDsuFST7iDpZWW4LyqsPlW/TMkHFtHfYnR+Ta1SgFCE3CVNhiym9x+BD
+T51zPo1vfCMlz7yXCXTRaZ5eRJb3Bw/8DF5LwrFDMMuzHaEJCQGue9N4+ls+zc6J
+EzKZNToerXWrn4S+dvu/1ZMscb8g9Cq5CqJ5ZxOgu0nitbskbrY9UvfVBUIRBfdV
+m8c3ZO7LES5glVxF3zc1wouCwbTBFMb+sufukeGyIs62crDS6jwhIoKUPZcLOv9o
+HVHo2pjymwy8lKqI3TH+uyCl8xxVmUTfSonmJXmZU00AOc3fVI6E7pmniqXywgHF
+xSHTg3OiAzpd19jR611rX1shHvh1NFjTj4eeOduOCSbyempFJIIYf2uBxF5Q0uJ6
+YK1/bKWIxdJG/qsxTW1duE1Jf+uHs2LTMwNp7HgSQhVHywPK4uJnL6aZFOjLYXBP
+8V9qJpBTQJfepCCuWZaeL6FV98cldKh3Eb6nEQbZVTN54RGDPYUH+diveZZVtbgD
+kfRcIp1XBi092REpDGyrA5FA2UQA2dj4aNu+ml1QLdb0GxECAdRoXpIpYHDxOv4s
+QXQZMF1O0bJmvUHaorqRD50K8L2B43yLspINbcv4+fuSHkq0mRaGQw6AVZiG9yO+
+LYosc0PWkifPjGAsAZieN/Cm0oYnzkn2LOD3ugR0OivAvocPVPEO2xOlMV5hTUOv
+ebKxn40Zl7dNp/ZWjP3EMEXYB6K+Ol9uLXc5msvT8bw98xlCYMnuj0r3EBxcLN+T
+8ZZrlhWMCzg=
+=clm/
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/anki-qt/requirements.dev b/anki-qt/requirements.dev
new file mode 100644
index 000000000..932a8957f
--- /dev/null
+++ b/anki-qt/requirements.dev
@@ -0,0 +1 @@
+mock
diff --git a/requirements.qt b/anki-qt/requirements.qt
similarity index 100%
rename from requirements.qt
rename to anki-qt/requirements.qt
diff --git a/runanki b/anki-qt/runanki
similarity index 100%
rename from runanki
rename to anki-qt/runanki
diff --git a/anki-qt/setup.py b/anki-qt/setup.py
new file mode 100644
index 000000000..4a3e68d71
--- /dev/null
+++ b/anki-qt/setup.py
@@ -0,0 +1,39 @@
+import setuptools, sys, os
+
+with open("README.md", "r") as fh:
+ long_description = fh.read()
+
+platform_reqs = []
+if sys.platform == "win32":
+ platform_reqs.append("psutil")
+
+def package_files(directory):
+ entries = []
+ for (path, directories, filenames) in os.walk(directory):
+ entries.append((path, [os.path.join(path, f) for f in filenames]))
+ return entries
+
+extra_files = package_files('aqt_data')
+
+setuptools.setup(
+ name="aqt",
+ version="0.1.0",
+ author="Ankitects Pty Ltd",
+ description="Anki's Qt GUI code",
+ long_description=long_description,
+ long_description_content_type="text/markdown",
+ url="https://apps.ankiweb.net",
+ packages=setuptools.find_packages(".", exclude=["tests"]),
+ data_files=extra_files,
+ classifiers=[
+ ],
+ python_requires='>=3.6',
+ install_requires=[
+ 'beautifulsoup4',
+ 'requests',
+ 'send2trash',
+ 'pyaudio',
+ 'markdown',
+ 'jsonschema'
+ ] + platform_reqs
+)
diff --git a/tests/__init__.py b/anki-qt/tests/__init__.py
similarity index 100%
rename from tests/__init__.py
rename to anki-qt/tests/__init__.py
diff --git a/tests/test_addons.py b/anki-qt/tests/test_addons.py
similarity index 100%
rename from tests/test_addons.py
rename to anki-qt/tests/test_addons.py
diff --git a/tools/anki-wait.bat b/anki-qt/tools/anki-wait.bat
similarity index 92%
rename from tools/anki-wait.bat
rename to anki-qt/tools/anki-wait.bat
index 52ac810b1..0b4f3af5c 100644
--- a/tools/anki-wait.bat
+++ b/anki-qt/tools/anki-wait.bat
@@ -1,4 +1,4 @@
-cd ..
-set PYTHONPATH=../lib
-python anki
-pause
+cd ..
+set PYTHONPATH=../lib
+python anki
+pause
diff --git a/tools/build_ui.sh b/anki-qt/tools/build_ui.sh
similarity index 100%
rename from tools/build_ui.sh
rename to anki-qt/tools/build_ui.sh
diff --git a/tools/runanki.system.in b/anki-qt/tools/runanki.system.in
similarity index 100%
rename from tools/runanki.system.in
rename to anki-qt/tools/runanki.system.in
diff --git a/tools/stubs/PyQt5/QtBluetooth.pyi b/anki-qt/tools/stubs/PyQt5/QtBluetooth.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtBluetooth.pyi
rename to anki-qt/tools/stubs/PyQt5/QtBluetooth.pyi
diff --git a/tools/stubs/PyQt5/QtCore.pyi b/anki-qt/tools/stubs/PyQt5/QtCore.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtCore.pyi
rename to anki-qt/tools/stubs/PyQt5/QtCore.pyi
diff --git a/tools/stubs/PyQt5/QtDBus.pyi b/anki-qt/tools/stubs/PyQt5/QtDBus.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtDBus.pyi
rename to anki-qt/tools/stubs/PyQt5/QtDBus.pyi
diff --git a/tools/stubs/PyQt5/QtDesigner.pyi b/anki-qt/tools/stubs/PyQt5/QtDesigner.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtDesigner.pyi
rename to anki-qt/tools/stubs/PyQt5/QtDesigner.pyi
diff --git a/tools/stubs/PyQt5/QtGui.pyi b/anki-qt/tools/stubs/PyQt5/QtGui.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtGui.pyi
rename to anki-qt/tools/stubs/PyQt5/QtGui.pyi
diff --git a/tools/stubs/PyQt5/QtHelp.pyi b/anki-qt/tools/stubs/PyQt5/QtHelp.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtHelp.pyi
rename to anki-qt/tools/stubs/PyQt5/QtHelp.pyi
diff --git a/tools/stubs/PyQt5/QtLocation.pyi b/anki-qt/tools/stubs/PyQt5/QtLocation.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtLocation.pyi
rename to anki-qt/tools/stubs/PyQt5/QtLocation.pyi
diff --git a/tools/stubs/PyQt5/QtMacExtras.pyi b/anki-qt/tools/stubs/PyQt5/QtMacExtras.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtMacExtras.pyi
rename to anki-qt/tools/stubs/PyQt5/QtMacExtras.pyi
diff --git a/tools/stubs/PyQt5/QtMultimedia.pyi b/anki-qt/tools/stubs/PyQt5/QtMultimedia.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtMultimedia.pyi
rename to anki-qt/tools/stubs/PyQt5/QtMultimedia.pyi
diff --git a/tools/stubs/PyQt5/QtMultimediaWidgets.pyi b/anki-qt/tools/stubs/PyQt5/QtMultimediaWidgets.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtMultimediaWidgets.pyi
rename to anki-qt/tools/stubs/PyQt5/QtMultimediaWidgets.pyi
diff --git a/tools/stubs/PyQt5/QtNetwork.pyi b/anki-qt/tools/stubs/PyQt5/QtNetwork.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtNetwork.pyi
rename to anki-qt/tools/stubs/PyQt5/QtNetwork.pyi
diff --git a/tools/stubs/PyQt5/QtNfc.pyi b/anki-qt/tools/stubs/PyQt5/QtNfc.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtNfc.pyi
rename to anki-qt/tools/stubs/PyQt5/QtNfc.pyi
diff --git a/tools/stubs/PyQt5/QtOpenGL.pyi b/anki-qt/tools/stubs/PyQt5/QtOpenGL.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtOpenGL.pyi
rename to anki-qt/tools/stubs/PyQt5/QtOpenGL.pyi
diff --git a/tools/stubs/PyQt5/QtPositioning.pyi b/anki-qt/tools/stubs/PyQt5/QtPositioning.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtPositioning.pyi
rename to anki-qt/tools/stubs/PyQt5/QtPositioning.pyi
diff --git a/tools/stubs/PyQt5/QtPrintSupport.pyi b/anki-qt/tools/stubs/PyQt5/QtPrintSupport.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtPrintSupport.pyi
rename to anki-qt/tools/stubs/PyQt5/QtPrintSupport.pyi
diff --git a/tools/stubs/PyQt5/QtQml.pyi b/anki-qt/tools/stubs/PyQt5/QtQml.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtQml.pyi
rename to anki-qt/tools/stubs/PyQt5/QtQml.pyi
diff --git a/tools/stubs/PyQt5/QtQuick.pyi b/anki-qt/tools/stubs/PyQt5/QtQuick.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtQuick.pyi
rename to anki-qt/tools/stubs/PyQt5/QtQuick.pyi
diff --git a/tools/stubs/PyQt5/QtQuickWidgets.pyi b/anki-qt/tools/stubs/PyQt5/QtQuickWidgets.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtQuickWidgets.pyi
rename to anki-qt/tools/stubs/PyQt5/QtQuickWidgets.pyi
diff --git a/tools/stubs/PyQt5/QtRemoteObjects.pyi b/anki-qt/tools/stubs/PyQt5/QtRemoteObjects.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtRemoteObjects.pyi
rename to anki-qt/tools/stubs/PyQt5/QtRemoteObjects.pyi
diff --git a/tools/stubs/PyQt5/QtSensors.pyi b/anki-qt/tools/stubs/PyQt5/QtSensors.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtSensors.pyi
rename to anki-qt/tools/stubs/PyQt5/QtSensors.pyi
diff --git a/tools/stubs/PyQt5/QtSerialPort.pyi b/anki-qt/tools/stubs/PyQt5/QtSerialPort.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtSerialPort.pyi
rename to anki-qt/tools/stubs/PyQt5/QtSerialPort.pyi
diff --git a/tools/stubs/PyQt5/QtSql.pyi b/anki-qt/tools/stubs/PyQt5/QtSql.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtSql.pyi
rename to anki-qt/tools/stubs/PyQt5/QtSql.pyi
diff --git a/tools/stubs/PyQt5/QtSvg.pyi b/anki-qt/tools/stubs/PyQt5/QtSvg.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtSvg.pyi
rename to anki-qt/tools/stubs/PyQt5/QtSvg.pyi
diff --git a/tools/stubs/PyQt5/QtTest.pyi b/anki-qt/tools/stubs/PyQt5/QtTest.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtTest.pyi
rename to anki-qt/tools/stubs/PyQt5/QtTest.pyi
diff --git a/tools/stubs/PyQt5/QtWebChannel.pyi b/anki-qt/tools/stubs/PyQt5/QtWebChannel.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtWebChannel.pyi
rename to anki-qt/tools/stubs/PyQt5/QtWebChannel.pyi
diff --git a/tools/stubs/PyQt5/QtWebSockets.pyi b/anki-qt/tools/stubs/PyQt5/QtWebSockets.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtWebSockets.pyi
rename to anki-qt/tools/stubs/PyQt5/QtWebSockets.pyi
diff --git a/tools/stubs/PyQt5/QtWidgets.pyi b/anki-qt/tools/stubs/PyQt5/QtWidgets.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtWidgets.pyi
rename to anki-qt/tools/stubs/PyQt5/QtWidgets.pyi
diff --git a/tools/stubs/PyQt5/QtXml.pyi b/anki-qt/tools/stubs/PyQt5/QtXml.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtXml.pyi
rename to anki-qt/tools/stubs/PyQt5/QtXml.pyi
diff --git a/tools/stubs/PyQt5/QtXmlPatterns.pyi b/anki-qt/tools/stubs/PyQt5/QtXmlPatterns.pyi
similarity index 100%
rename from tools/stubs/PyQt5/QtXmlPatterns.pyi
rename to anki-qt/tools/stubs/PyQt5/QtXmlPatterns.pyi
diff --git a/tools/stubs/PyQt5/py.typed b/anki-qt/tools/stubs/PyQt5/py.typed
similarity index 100%
rename from tools/stubs/PyQt5/py.typed
rename to anki-qt/tools/stubs/PyQt5/py.typed
diff --git a/tools/tests.sh b/anki-qt/tools/tests.sh
similarity index 100%
rename from tools/tests.sh
rename to anki-qt/tools/tests.sh
diff --git a/tools/typecheck-setup.sh b/anki-qt/tools/typecheck-setup.sh
similarity index 100%
rename from tools/typecheck-setup.sh
rename to anki-qt/tools/typecheck-setup.sh
diff --git a/ts/.prettierrc b/anki-qt/ts/.prettierrc
similarity index 100%
rename from ts/.prettierrc
rename to anki-qt/ts/.prettierrc
diff --git a/ts/package-lock.json b/anki-qt/ts/package-lock.json
similarity index 96%
rename from ts/package-lock.json
rename to anki-qt/ts/package-lock.json
index 0ced64501..3256a1878 100644
--- a/ts/package-lock.json
+++ b/anki-qt/ts/package-lock.json
@@ -10,7 +10,7 @@
"integrity": "sha512-Lz4BAJihoFw5nRzKvg4nawXPzutkv7wmfQ5121avptaSIXlDNJCUuxZxX/G+9EVidZGuO0UBlk+YjKbwRKJigg==",
"dev": true,
"requires": {
- "@types/sizzle": "2.3.2"
+ "@types/sizzle": "*"
}
},
"@types/jqueryui": {
@@ -19,7 +19,7 @@
"integrity": "sha512-bHE7BiG+5Sviy/eA9Npz5HHF3hv40XjaEbpYtSJPaNwuyxhSJ0qWlE8C5DgNMfobVOZ2aSTrM1iGDCGmvlbxOg==",
"dev": true,
"requires": {
- "@types/jquery": "3.3.31"
+ "@types/jquery": "*"
}
},
"@types/mathjax": {
diff --git a/ts/package.json b/anki-qt/ts/package.json
similarity index 100%
rename from ts/package.json
rename to anki-qt/ts/package.json
diff --git a/ts/src/deckbrowser.ts b/anki-qt/ts/src/deckbrowser.ts
similarity index 100%
rename from ts/src/deckbrowser.ts
rename to anki-qt/ts/src/deckbrowser.ts
diff --git a/ts/src/editor.ts b/anki-qt/ts/src/editor.ts
similarity index 100%
rename from ts/src/editor.ts
rename to anki-qt/ts/src/editor.ts
diff --git a/ts/src/overview.ts b/anki-qt/ts/src/overview.ts
similarity index 100%
rename from ts/src/overview.ts
rename to anki-qt/ts/src/overview.ts
diff --git a/ts/src/reviewer-bottom.ts b/anki-qt/ts/src/reviewer-bottom.ts
similarity index 100%
rename from ts/src/reviewer-bottom.ts
rename to anki-qt/ts/src/reviewer-bottom.ts
diff --git a/ts/src/reviewer.ts b/anki-qt/ts/src/reviewer.ts
similarity index 100%
rename from ts/src/reviewer.ts
rename to anki-qt/ts/src/reviewer.ts
diff --git a/ts/src/types/global.d.ts b/anki-qt/ts/src/types/global.d.ts
similarity index 100%
rename from ts/src/types/global.d.ts
rename to anki-qt/ts/src/types/global.d.ts
diff --git a/ts/src/webview.ts b/anki-qt/ts/src/webview.ts
similarity index 100%
rename from ts/src/webview.ts
rename to anki-qt/ts/src/webview.ts
diff --git a/ts/tsconfig.json b/anki-qt/ts/tsconfig.json
similarity index 94%
rename from ts/tsconfig.json
rename to anki-qt/ts/tsconfig.json
index 76f62f120..e24928bc6 100644
--- a/ts/tsconfig.json
+++ b/anki-qt/ts/tsconfig.json
@@ -7,7 +7,7 @@
"dom"
],
"rootDir": "src",
- "outDir": "../web",
+ "outDir": "../aqt_data/web",
"strict": true,
/* Enable all strict type-checking options. */
"noImplicitAny": false,
diff --git a/aqt/sound.py b/aqt/sound.py
deleted file mode 100644
index 083899076..000000000
--- a/aqt/sound.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright: Ankitects Pty Ltd and contributors
-# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-
-import time
-
-from anki.lang import _
-from anki.sound import Recorder
-from aqt.qt import *
-from aqt.utils import restoreGeom, saveGeom, showWarning
-
-if not Recorder:
- print("pyaudio not installed")
-
-
-def getAudio(parent, encode=True):
- "Record and return filename"
- # record first
- if not Recorder:
- showWarning("pyaudio not installed")
- return
-
- r = Recorder()
- mb = QMessageBox(parent)
- restoreGeom(mb, "audioRecorder")
- mb.setWindowTitle("Anki")
- mb.setIconPixmap(QPixmap(":/icons/media-record.png"))
- but = QPushButton(_("Save"))
- mb.addButton(but, QMessageBox.AcceptRole)
- but.setDefault(True)
- but = QPushButton(_("Cancel"))
- mb.addButton(but, QMessageBox.RejectRole)
- mb.setEscapeButton(but)
- t = time.time()
- r.start()
- time.sleep(r.startupDelay)
- QApplication.instance().processEvents()
- while not mb.clickedButton():
- txt = _("Recording...
Time: %0.1f")
- mb.setText(txt % (time.time() - t))
- mb.show()
- QApplication.instance().processEvents()
- if mb.clickedButton() == mb.escapeButton():
- r.stop()
- r.cleanup()
- return
- saveGeom(mb, "audioRecorder")
- # ensure at least a second captured
- while time.time() - t < 1:
- time.sleep(0.1)
- r.stop()
- # process
- r.postprocess(encode)
- return r.file()
diff --git a/bundle b/bundle
new file mode 100755
index 000000000..d3fac8e26
--- /dev/null
+++ b/bundle
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+. scripts.inc
+
+for dir in $DEVEL; do
+ echo $dir
+ (cd $dir && make build BUILDFLAGS="$BUILDFLAGS")
+done
diff --git a/check b/check
new file mode 100755
index 000000000..201be0dd9
--- /dev/null
+++ b/check
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+. scripts.inc
+
+# install prereqs before checking
+for dir in $DEVEL; do
+ echo $dir
+ (cd $dir && make develop BUILDFLAGS="$BUILDFLAGS")
+done
+
+for dir in $CHECKABLE; do
+ echo $dir
+ (cd $dir && make check)
+done
diff --git a/clean b/clean
new file mode 100755
index 000000000..57d05baa2
--- /dev/null
+++ b/clean
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+. scripts.inc
+
+for dir in $DEVEL; do
+ echo $dir
+ (cd $dir && make clean)
+done
diff --git a/designer/icons/media-record.png b/designer/icons/media-record.png
deleted file mode 120000
index 0e95c2bfd..000000000
--- a/designer/icons/media-record.png
+++ /dev/null
@@ -1 +0,0 @@
-../../web/imgs/media-record.png
\ No newline at end of file
diff --git a/fix b/fix
new file mode 100755
index 000000000..8aea5abf9
--- /dev/null
+++ b/fix
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+. scripts.inc
+
+for dir in $CHECKABLE; do
+ echo $dir
+ (cd $dir && make fix)
+done
diff --git a/lib-python/.github/workflows/checks.yml b/lib-python/.github/workflows/checks.yml
new file mode 100644
index 000000000..92f0e0571
--- /dev/null
+++ b/lib-python/.github/workflows/checks.yml
@@ -0,0 +1,32 @@
+name: Checks
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up python
+ uses: actions/setup-python@v1
+ with:
+ python-version: '3.6'
+ - name: Set up protoc
+ uses: Arduino/actions/setup-protoc@master
+ - name: Run checks
+ run: |
+ # add requirements
+ python3.6 -m venv ~/pyenv
+ . ~/pyenv/bin/activate
+ pip install --upgrade pip setuptools
+ cd ..
+ for p in proto lib-rust lib-rspy; do git clone --depth 1 https://github.com/ankitects/anki-$p.git; done
+ (cd anki-lib-rspy && make develop build BUILDFLAGS="")
+ # check module
+ cd anki-lib-python
+ make check build
+ # make sure wheel works
+ deactivate
+ cd ..
+ pip install build/*.whl
+ python -c 'import anki'
diff --git a/lib-python/.gitignore b/lib-python/.gitignore
new file mode 100644
index 000000000..9e2be6dab
--- /dev/null
+++ b/lib-python/.gitignore
@@ -0,0 +1,16 @@
+*.mo
+*.pyc
+*\#
+*~
+.*.swp
+.build
+.coverage
+.DS_Store
+.mypy_cache
+.pytype
+__pycache__
+anki.egg-info
+anki/backend_pb2.*
+anki/buildhash.py
+build
+dist
diff --git a/lib-python/.isort.cfg b/lib-python/.isort.cfg
new file mode 100644
index 000000000..6992ada53
--- /dev/null
+++ b/lib-python/.isort.cfg
@@ -0,0 +1,8 @@
+[settings]
+skip=aqt/forms,anki/backend_pb2.py,backend_pb2.pyi
+multi_line_output=3
+include_trailing_comma=True
+force_grid_wrap=0
+use_parentheses=True
+line_length=88
+ensure_newline_before_comments=true
diff --git a/lib-python/.pylintrc b/lib-python/.pylintrc
new file mode 100644
index 000000000..106398f9f
--- /dev/null
+++ b/lib-python/.pylintrc
@@ -0,0 +1,15 @@
+[MESSAGES CONTROL]
+disable=C,R,
+ fixme,
+ unused-wildcard-import,
+ attribute-defined-outside-init,
+ redefined-builtin,
+ wildcard-import,
+ broad-except,
+ bare-except,
+ unused-argument,
+ unused-variable,
+ redefined-outer-name,
+ global-statement,
+ protected-access,
+ arguments-differ,
diff --git a/lib-python/LICENSE b/lib-python/LICENSE
new file mode 100644
index 000000000..f3a3c9c66
--- /dev/null
+++ b/lib-python/LICENSE
@@ -0,0 +1,10 @@
+Anki is licensed under the GNU Affero General Public License, version 3 or
+later, with portions contributed by Anki users licensed under the BSD-3
+license: https://github.com/ankitects/anki-contributors.
+
+The following included source code items use a license other than AGPL3:
+
+ * The anki/template/ folder is based off pystache: MIT.
+ * The SuperMemo importer: GPL3.
+ * The Pauker importer: BSD-3.
+ * statsbg.py: CC BY-SA 3.0.
diff --git a/lib-python/Makefile b/lib-python/Makefile
new file mode 100644
index 000000000..afd5d4c87
--- /dev/null
+++ b/lib-python/Makefile
@@ -0,0 +1,87 @@
+PREFIX := /usr
+SHELL := bash
+.SHELLFLAGS := -eu -o pipefail -c
+.DELETE_ON_ERROR:
+MAKEFLAGS += --warn-undefined-variables
+MAKEFLAGS += --no-builtin-rules
+RUNARGS :=
+.SUFFIXES:
+BLACKARGS := -t py36 anki tests --exclude=backend_pb2
+ISORTARGS := anki tests
+
+$(shell mkdir -p .build ../build)
+
+PHONY: all
+all: check
+
+.build/run-deps: setup.py
+ pip install -e .
+ @touch $@
+
+.build/dev-deps: requirements.dev
+ pip install -r requirements.dev
+ @touch $@
+
+PROTODEPS := $(wildcard ../proto/*.proto)
+
+.build/py-proto: .build/dev-deps $(PROTODEPS)
+ protoc --proto_path=../proto --python_out=anki --mypy_out=anki $(PROTODEPS)
+ @touch $@
+
+BUILD_STEPS := .build/run-deps .build/dev-deps .build/py-proto
+
+# Checking
+######################
+
+.PHONY: check
+check: $(BUILD_STEPS) .build/mypy .build/test .build/fmt .build/imports .build/lint
+
+.PHONY: fix
+fix: $(BUILD_STEPS)
+ isort $(ISORTARGS)
+ black $(BLACKARGS)
+
+.PHONY: clean
+clean:
+ rm -rf .build anki.egg-info build dist
+
+# Checking python
+######################
+
+CHECKDEPS := $(shell find anki tests -name '*.py' | grep -v buildhash.py)
+
+.build/mypy: $(CHECKDEPS)
+ mypy anki
+ @touch $@
+
+.build/test: $(CHECKDEPS)
+ python -m nose2 --plugin=nose2.plugins.mp -N 16
+ @touch $@
+
+.build/lint: $(CHECKDEPS)
+ pylint -j 0 --rcfile=.pylintrc -f colorized --extension-pkg-whitelist=ankirspy anki
+ @touch $@
+
+.build/imports: $(CHECKDEPS)
+ isort $(ISORTARGS) --check
+ @touch $@
+
+.build/fmt: $(CHECKDEPS)
+ black --check $(BLACKARGS)
+ @touch $@
+
+# Building
+######################
+
+# we only want the wheel when building, but passing -f wheel to poetry
+# breaks the inclusion of files listed in pyproject.toml
+.PHONY: build
+build: $(BUILD_STEPS) $(CHECKDEPS)
+ rm -rf dist
+ echo "build='$$(git rev-parse --short HEAD)'" > anki/buildhash.py
+ python setup.py bdist_wheel
+ rsync -a dist/*.whl ../build/
+
+# prepare code for running in place
+.PHONY: develop
+develop: $(BUILD_STEPS)
diff --git a/lib-python/README.md b/lib-python/README.md
new file mode 100644
index 000000000..876402695
--- /dev/null
+++ b/lib-python/README.md
@@ -0,0 +1,3 @@
+Portions of Anki's backend written in Python.
+
+Please see https://github.com/ankitects/anki-desktop
diff --git a/anki/__init__.py b/lib-python/anki/__init__.py
similarity index 100%
rename from anki/__init__.py
rename to lib-python/anki/__init__.py
diff --git a/anki/backend.py b/lib-python/anki/backend.py
similarity index 96%
rename from anki/backend.py
rename to lib-python/anki/backend.py
index 945c1de8c..975956118 100644
--- a/anki/backend.py
+++ b/lib-python/anki/backend.py
@@ -2,7 +2,7 @@
from typing import Dict, List
-import _ankirs # pytype: disable=import-error
+import ankirspy # pytype: disable=import-error
import anki.backend_pb2 as pb
@@ -43,7 +43,7 @@ def proto_template_reqs_to_legacy(
class Backend:
def __init__(self, path: str):
- self._backend = _ankirs.Backend(path)
+ self._backend = ankirspy.Backend(path)
def _run_command(self, input: pb.BackendInput) -> pb.BackendOutput:
input_bytes = input.SerializeToString()
diff --git a/anki/cards.py b/lib-python/anki/cards.py
similarity index 100%
rename from anki/cards.py
rename to lib-python/anki/cards.py
diff --git a/anki/collection.py b/lib-python/anki/collection.py
similarity index 100%
rename from anki/collection.py
rename to lib-python/anki/collection.py
diff --git a/anki/consts.py b/lib-python/anki/consts.py
similarity index 100%
rename from anki/consts.py
rename to lib-python/anki/consts.py
diff --git a/anki/db.py b/lib-python/anki/db.py
similarity index 100%
rename from anki/db.py
rename to lib-python/anki/db.py
diff --git a/anki/decks.py b/lib-python/anki/decks.py
similarity index 100%
rename from anki/decks.py
rename to lib-python/anki/decks.py
diff --git a/anki/errors.py b/lib-python/anki/errors.py
similarity index 100%
rename from anki/errors.py
rename to lib-python/anki/errors.py
diff --git a/anki/exporting.py b/lib-python/anki/exporting.py
similarity index 100%
rename from anki/exporting.py
rename to lib-python/anki/exporting.py
diff --git a/anki/find.py b/lib-python/anki/find.py
similarity index 100%
rename from anki/find.py
rename to lib-python/anki/find.py
diff --git a/anki/hooks.py b/lib-python/anki/hooks.py
similarity index 100%
rename from anki/hooks.py
rename to lib-python/anki/hooks.py
diff --git a/anki/importing/__init__.py b/lib-python/anki/importing/__init__.py
similarity index 100%
rename from anki/importing/__init__.py
rename to lib-python/anki/importing/__init__.py
diff --git a/anki/importing/anki2.py b/lib-python/anki/importing/anki2.py
similarity index 100%
rename from anki/importing/anki2.py
rename to lib-python/anki/importing/anki2.py
diff --git a/anki/importing/apkg.py b/lib-python/anki/importing/apkg.py
similarity index 100%
rename from anki/importing/apkg.py
rename to lib-python/anki/importing/apkg.py
diff --git a/anki/importing/base.py b/lib-python/anki/importing/base.py
similarity index 100%
rename from anki/importing/base.py
rename to lib-python/anki/importing/base.py
diff --git a/anki/importing/csvfile.py b/lib-python/anki/importing/csvfile.py
similarity index 100%
rename from anki/importing/csvfile.py
rename to lib-python/anki/importing/csvfile.py
diff --git a/anki/importing/mnemo.py b/lib-python/anki/importing/mnemo.py
similarity index 100%
rename from anki/importing/mnemo.py
rename to lib-python/anki/importing/mnemo.py
diff --git a/anki/importing/noteimp.py b/lib-python/anki/importing/noteimp.py
similarity index 100%
rename from anki/importing/noteimp.py
rename to lib-python/anki/importing/noteimp.py
diff --git a/anki/importing/pauker.py b/lib-python/anki/importing/pauker.py
similarity index 100%
rename from anki/importing/pauker.py
rename to lib-python/anki/importing/pauker.py
diff --git a/anki/importing/supermemo_xml.py b/lib-python/anki/importing/supermemo_xml.py
similarity index 100%
rename from anki/importing/supermemo_xml.py
rename to lib-python/anki/importing/supermemo_xml.py
diff --git a/anki/lang.py b/lib-python/anki/lang.py
similarity index 86%
rename from anki/lang.py
rename to lib-python/anki/lang.py
index de01fd2c3..027d36e9c 100644
--- a/anki/lang.py
+++ b/lib-python/anki/lang.py
@@ -4,9 +4,7 @@
# Please leave the coding line in this file to prevent xgettext complaining.
import gettext
-import os
import re
-import sys
import threading
from typing import Any
@@ -131,24 +129,9 @@ def ngettext(single: str, plural: str, n: int) -> str:
return localTranslation().ngettext(single, plural, n)
-def langDir() -> str:
- from anki.utils import isMac
-
- filedir = os.path.dirname(os.path.abspath(__file__))
- if isMac:
- dir = os.path.abspath(filedir + "/../../Resources/locale")
- else:
- dir = os.path.join(filedir, "locale")
- if not os.path.isdir(dir):
- dir = os.path.join(os.path.dirname(sys.argv[0]), "locale")
- if not os.path.isdir(dir):
- dir = os.path.abspath(os.path.join(filedir, "..", "locale"))
- return dir
-
-
-def setLang(lang: str, local: bool = True) -> None:
+def setLang(lang: str, locale_dir: str, local: bool = True) -> None:
lang = mungeCode(lang)
- trans = gettext.translation("anki", langDir(), languages=[lang], fallback=True)
+ trans = gettext.translation("anki", locale_dir, languages=[lang], fallback=True)
if local:
threadLocal.currentLang = lang
threadLocal.currentTranslation = trans
@@ -180,4 +163,4 @@ def mungeCode(code: str) -> Any:
if not currentTranslation:
- setLang("en_US", local=False)
+ setLang("en_US", locale_dir="", local=False)
diff --git a/anki/latex.py b/lib-python/anki/latex.py
similarity index 100%
rename from anki/latex.py
rename to lib-python/anki/latex.py
diff --git a/anki/media.py b/lib-python/anki/media.py
similarity index 100%
rename from anki/media.py
rename to lib-python/anki/media.py
diff --git a/anki/models.py b/lib-python/anki/models.py
similarity index 100%
rename from anki/models.py
rename to lib-python/anki/models.py
diff --git a/anki/notes.py b/lib-python/anki/notes.py
similarity index 100%
rename from anki/notes.py
rename to lib-python/anki/notes.py
diff --git a/anki/sched.py b/lib-python/anki/sched.py
similarity index 100%
rename from anki/sched.py
rename to lib-python/anki/sched.py
diff --git a/anki/schedv2.py b/lib-python/anki/schedv2.py
similarity index 100%
rename from anki/schedv2.py
rename to lib-python/anki/schedv2.py
diff --git a/lib-python/anki/sound.py b/lib-python/anki/sound.py
new file mode 100644
index 000000000..1072c3c21
--- /dev/null
+++ b/lib-python/anki/sound.py
@@ -0,0 +1,22 @@
+# Copyright: Ankitects Pty Ltd and contributors
+# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
+
+import re
+from typing import List
+
+# Shared utils
+##########################################################################
+
+_soundReg = r"\[sound:(.*?)\]"
+
+
+def allSounds(text) -> List:
+ return re.findall(_soundReg, text)
+
+
+def stripSounds(text) -> str:
+ return re.sub(_soundReg, "", text)
+
+
+def hasSound(text) -> bool:
+ return re.search(_soundReg, text) is not None
diff --git a/anki/stats.py b/lib-python/anki/stats.py
similarity index 100%
rename from anki/stats.py
rename to lib-python/anki/stats.py
diff --git a/anki/statsbg.py b/lib-python/anki/statsbg.py
similarity index 100%
rename from anki/statsbg.py
rename to lib-python/anki/statsbg.py
diff --git a/anki/stdmodels.py b/lib-python/anki/stdmodels.py
similarity index 100%
rename from anki/stdmodels.py
rename to lib-python/anki/stdmodels.py
diff --git a/anki/storage.py b/lib-python/anki/storage.py
similarity index 100%
rename from anki/storage.py
rename to lib-python/anki/storage.py
diff --git a/anki/sync.py b/lib-python/anki/sync.py
similarity index 100%
rename from anki/sync.py
rename to lib-python/anki/sync.py
diff --git a/anki/tags.py b/lib-python/anki/tags.py
similarity index 100%
rename from anki/tags.py
rename to lib-python/anki/tags.py
diff --git a/anki/template/LICENSE b/lib-python/anki/template/LICENSE
similarity index 100%
rename from anki/template/LICENSE
rename to lib-python/anki/template/LICENSE
diff --git a/anki/template/README.anki b/lib-python/anki/template/README.anki
similarity index 100%
rename from anki/template/README.anki
rename to lib-python/anki/template/README.anki
diff --git a/anki/template/__init__.py b/lib-python/anki/template/__init__.py
similarity index 100%
rename from anki/template/__init__.py
rename to lib-python/anki/template/__init__.py
diff --git a/anki/template/furigana.py b/lib-python/anki/template/furigana.py
similarity index 100%
rename from anki/template/furigana.py
rename to lib-python/anki/template/furigana.py
diff --git a/anki/template/hint.py b/lib-python/anki/template/hint.py
similarity index 100%
rename from anki/template/hint.py
rename to lib-python/anki/template/hint.py
diff --git a/anki/template/template.py b/lib-python/anki/template/template.py
similarity index 100%
rename from anki/template/template.py
rename to lib-python/anki/template/template.py
diff --git a/anki/template/view.py b/lib-python/anki/template/view.py
similarity index 100%
rename from anki/template/view.py
rename to lib-python/anki/template/view.py
diff --git a/anki/types.py b/lib-python/anki/types.py
similarity index 100%
rename from anki/types.py
rename to lib-python/anki/types.py
diff --git a/anki/utils.py b/lib-python/anki/utils.py
similarity index 100%
rename from anki/utils.py
rename to lib-python/anki/utils.py
diff --git a/lib-python/mypy.ini b/lib-python/mypy.ini
new file mode 100644
index 000000000..b4909d4ae
--- /dev/null
+++ b/lib-python/mypy.ini
@@ -0,0 +1,28 @@
+[mypy]
+python_version = 3.6
+pretty = true
+no_strict_optional = true
+show_error_codes = true
+
+[mypy-win32file]
+ignore_missing_imports = True
+[mypy-win32pipe]
+ignore_missing_imports = True
+[mypy-pywintypes]
+ignore_missing_imports = True
+[mypy-winerror]
+ignore_missing_imports = True
+[mypy-distro]
+ignore_missing_imports = True
+[mypy-pyaudio]
+ignore_missing_imports = True
+[mypy-win32api]
+ignore_missing_imports = True
+[mypy-xml.dom]
+ignore_missing_imports = True
+[mypy-psutil]
+ignore_missing_imports = True
+[mypy-bs4]
+ignore_missing_imports = True
+[mypy-ankirspy]
+ignore_missing_imports = True
diff --git a/lib-python/requirements.dev b/lib-python/requirements.dev
new file mode 100644
index 000000000..b23c2314e
--- /dev/null
+++ b/lib-python/requirements.dev
@@ -0,0 +1,9 @@
+wheel
+mypy
+mypy_protobuf
+black
+nose2
+# fixme: when isort 5.0 is released, switch to pypi
+git+https://github.com/ankitects/isort#egg=isort
+# fixme: when pylint supports isort 5.0, switch to pypi
+git+https://github.com/ankitects/pylint#egg=pylint
diff --git a/lib-python/setup.py b/lib-python/setup.py
new file mode 100644
index 000000000..3fee2cdcb
--- /dev/null
+++ b/lib-python/setup.py
@@ -0,0 +1,30 @@
+import setuptools, sys
+
+with open("README.md", "r") as fh:
+ long_description = fh.read()
+
+platform_reqs = []
+if sys.platform == "win32":
+ platform_reqs.append("psutil")
+if sys.platform != "win32" and sys.platform != "darwin":
+ platform_reqs.append("distro")
+
+setuptools.setup(
+ name="anki",
+ version="0.1.0",
+ author="Ankitects Pty Ltd",
+ description="Anki's library code",
+ long_description=long_description,
+ long_description_content_type="text/markdown",
+ url="https://apps.ankiweb.net",
+ packages=setuptools.find_packages(".", exclude=["tests"]),
+ classifiers=[
+ ],
+ python_requires='>=3.6',
+ install_requires=[
+ 'beautifulsoup4',
+ 'requests',
+ 'decorator',
+ 'protobuf',
+ ] + platform_reqs
+)
diff --git a/lib-python/tests/__init__.py b/lib-python/tests/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/shared.py b/lib-python/tests/shared.py
similarity index 100%
rename from tests/shared.py
rename to lib-python/tests/shared.py
diff --git a/tests/support/anki12-broken.anki b/lib-python/tests/support/anki12-broken.anki
similarity index 100%
rename from tests/support/anki12-broken.anki
rename to lib-python/tests/support/anki12-broken.anki
diff --git a/tests/support/anki12-due.anki b/lib-python/tests/support/anki12-due.anki
similarity index 100%
rename from tests/support/anki12-due.anki
rename to lib-python/tests/support/anki12-due.anki
diff --git a/tests/support/anki12.anki b/lib-python/tests/support/anki12.anki
similarity index 100%
rename from tests/support/anki12.anki
rename to lib-python/tests/support/anki12.anki
diff --git a/tests/support/anki2-alpha.anki2 b/lib-python/tests/support/anki2-alpha.anki2
similarity index 100%
rename from tests/support/anki2-alpha.anki2
rename to lib-python/tests/support/anki2-alpha.anki2
diff --git a/tests/support/diffmodels1.anki b/lib-python/tests/support/diffmodels1.anki
similarity index 100%
rename from tests/support/diffmodels1.anki
rename to lib-python/tests/support/diffmodels1.anki
diff --git a/tests/support/diffmodels2-1.apkg b/lib-python/tests/support/diffmodels2-1.apkg
similarity index 100%
rename from tests/support/diffmodels2-1.apkg
rename to lib-python/tests/support/diffmodels2-1.apkg
diff --git a/tests/support/diffmodels2-2.apkg b/lib-python/tests/support/diffmodels2-2.apkg
similarity index 100%
rename from tests/support/diffmodels2-2.apkg
rename to lib-python/tests/support/diffmodels2-2.apkg
diff --git a/tests/support/diffmodels2.anki b/lib-python/tests/support/diffmodels2.anki
similarity index 100%
rename from tests/support/diffmodels2.anki
rename to lib-python/tests/support/diffmodels2.anki
diff --git a/tests/support/diffmodeltemplates-1.apkg b/lib-python/tests/support/diffmodeltemplates-1.apkg
similarity index 100%
rename from tests/support/diffmodeltemplates-1.apkg
rename to lib-python/tests/support/diffmodeltemplates-1.apkg
diff --git a/tests/support/diffmodeltemplates-2.apkg b/lib-python/tests/support/diffmodeltemplates-2.apkg
similarity index 100%
rename from tests/support/diffmodeltemplates-2.apkg
rename to lib-python/tests/support/diffmodeltemplates-2.apkg
diff --git a/tests/support/fake.png b/lib-python/tests/support/fake.png
similarity index 100%
rename from tests/support/fake.png
rename to lib-python/tests/support/fake.png
diff --git a/tests/support/invalid-ords.anki b/lib-python/tests/support/invalid-ords.anki
similarity index 100%
rename from tests/support/invalid-ords.anki
rename to lib-python/tests/support/invalid-ords.anki
diff --git a/tests/support/media.apkg b/lib-python/tests/support/media.apkg
similarity index 100%
rename from tests/support/media.apkg
rename to lib-python/tests/support/media.apkg
diff --git a/tests/support/mnemo.db b/lib-python/tests/support/mnemo.db
similarity index 100%
rename from tests/support/mnemo.db
rename to lib-python/tests/support/mnemo.db
diff --git a/tests/support/supermemo1.xml b/lib-python/tests/support/supermemo1.xml
similarity index 100%
rename from tests/support/supermemo1.xml
rename to lib-python/tests/support/supermemo1.xml
diff --git a/tests/support/suspended12.anki b/lib-python/tests/support/suspended12.anki
similarity index 100%
rename from tests/support/suspended12.anki
rename to lib-python/tests/support/suspended12.anki
diff --git a/tests/support/text-2fields.txt b/lib-python/tests/support/text-2fields.txt
similarity index 100%
rename from tests/support/text-2fields.txt
rename to lib-python/tests/support/text-2fields.txt
diff --git a/tests/support/text-tags.txt b/lib-python/tests/support/text-tags.txt
similarity index 100%
rename from tests/support/text-tags.txt
rename to lib-python/tests/support/text-tags.txt
diff --git a/tests/support/text-update.txt b/lib-python/tests/support/text-update.txt
similarity index 100%
rename from tests/support/text-update.txt
rename to lib-python/tests/support/text-update.txt
diff --git a/tests/support/update1.apkg b/lib-python/tests/support/update1.apkg
similarity index 100%
rename from tests/support/update1.apkg
rename to lib-python/tests/support/update1.apkg
diff --git a/tests/support/update2.apkg b/lib-python/tests/support/update2.apkg
similarity index 100%
rename from tests/support/update2.apkg
rename to lib-python/tests/support/update2.apkg
diff --git a/tests/test_cards.py b/lib-python/tests/test_cards.py
similarity index 100%
rename from tests/test_cards.py
rename to lib-python/tests/test_cards.py
diff --git a/tests/test_collection.py b/lib-python/tests/test_collection.py
similarity index 100%
rename from tests/test_collection.py
rename to lib-python/tests/test_collection.py
diff --git a/tests/test_decks.py b/lib-python/tests/test_decks.py
similarity index 100%
rename from tests/test_decks.py
rename to lib-python/tests/test_decks.py
diff --git a/tests/test_exporting.py b/lib-python/tests/test_exporting.py
similarity index 100%
rename from tests/test_exporting.py
rename to lib-python/tests/test_exporting.py
diff --git a/tests/test_find.py b/lib-python/tests/test_find.py
similarity index 100%
rename from tests/test_find.py
rename to lib-python/tests/test_find.py
diff --git a/tests/test_flags.py b/lib-python/tests/test_flags.py
similarity index 100%
rename from tests/test_flags.py
rename to lib-python/tests/test_flags.py
diff --git a/tests/test_importing.py b/lib-python/tests/test_importing.py
similarity index 100%
rename from tests/test_importing.py
rename to lib-python/tests/test_importing.py
diff --git a/tests/test_latex.py b/lib-python/tests/test_latex.py
similarity index 100%
rename from tests/test_latex.py
rename to lib-python/tests/test_latex.py
diff --git a/tests/test_media.py b/lib-python/tests/test_media.py
similarity index 100%
rename from tests/test_media.py
rename to lib-python/tests/test_media.py
diff --git a/tests/test_models.py b/lib-python/tests/test_models.py
similarity index 100%
rename from tests/test_models.py
rename to lib-python/tests/test_models.py
diff --git a/tests/test_schedv1.py b/lib-python/tests/test_schedv1.py
similarity index 100%
rename from tests/test_schedv1.py
rename to lib-python/tests/test_schedv1.py
diff --git a/tests/test_schedv2.py b/lib-python/tests/test_schedv2.py
similarity index 100%
rename from tests/test_schedv2.py
rename to lib-python/tests/test_schedv2.py
diff --git a/tests/test_stats.py b/lib-python/tests/test_stats.py
similarity index 100%
rename from tests/test_stats.py
rename to lib-python/tests/test_stats.py
diff --git a/tests/test_template.py b/lib-python/tests/test_template.py
similarity index 100%
rename from tests/test_template.py
rename to lib-python/tests/test_template.py
diff --git a/tests/test_undo.py b/lib-python/tests/test_undo.py
similarity index 100%
rename from tests/test_undo.py
rename to lib-python/tests/test_undo.py
diff --git a/tests/test_utils.py b/lib-python/tests/test_utils.py
similarity index 100%
rename from tests/test_utils.py
rename to lib-python/tests/test_utils.py
diff --git a/lib-rspy/.github/workflows/checks.yml b/lib-rspy/.github/workflows/checks.yml
new file mode 100644
index 000000000..46bdc9f9b
--- /dev/null
+++ b/lib-rspy/.github/workflows/checks.yml
@@ -0,0 +1,24 @@
+name: Checks
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ max-parallel: 4
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ - name: Set up protoc
+ uses: Arduino/actions/setup-protoc@master
+ - name: Set up python
+ uses: actions/setup-python@v1
+ with:
+ python-version: '3.6'
+ - name: Run checks
+ run: |
+ (cd .. && git clone https://github.com/ankitects/anki-proto.git)
+ (cd .. && git clone https://github.com/ankitects/anki-lib-rust.git)
+ make check BUILDFLAGS=""
diff --git a/lib-rspy/.gitignore b/lib-rspy/.gitignore
new file mode 100644
index 000000000..c8baed871
--- /dev/null
+++ b/lib-rspy/.gitignore
@@ -0,0 +1,3 @@
+.build
+target
+Cargo.lock
diff --git a/rs/pymod/Cargo.toml b/lib-rspy/Cargo.toml
similarity index 75%
rename from rs/pymod/Cargo.toml
rename to lib-rspy/Cargo.toml
index b09c3399a..18adb2406 100644
--- a/rs/pymod/Cargo.toml
+++ b/lib-rspy/Cargo.toml
@@ -1,16 +1,16 @@
[package]
-name = "pymod"
+name = "ankirspy"
version = "0.1.0"
edition = "2018"
authors = ["Ankitects Pty Ltd and contributors"]
[dependencies]
-ankirs = { path = "../ankirs" }
+anki = { path = "../lib-rust" }
[dependencies.pyo3]
version = "0.8.0"
features = ["extension-module"]
[lib]
-name = "_ankirs"
+name = "ankirspy"
crate-type = ["cdylib"]
diff --git a/lib-rspy/LICENSE b/lib-rspy/LICENSE
new file mode 100644
index 000000000..33d04e99d
--- /dev/null
+++ b/lib-rspy/LICENSE
@@ -0,0 +1 @@
+Licensed under the GNU AGPL 3 or later.
diff --git a/lib-rspy/Makefile b/lib-rspy/Makefile
new file mode 100644
index 000000000..f761cd000
--- /dev/null
+++ b/lib-rspy/Makefile
@@ -0,0 +1,44 @@
+SHELL := bash
+.SHELLFLAGS := -eu -o pipefail -c
+.DELETE_ON_ERROR:
+MAKEFLAGS += --warn-undefined-variables
+MAKEFLAGS += --no-builtin-rules
+
+$(shell mkdir -p .build ../build)
+
+OUTDIR := ../build
+BUILDFLAGS := --release --strip
+
+.PHONY: all develop build check fix clean
+
+all: develop
+
+develop: .build/tools
+ maturin develop $(BUILDFLAGS)
+
+build: .build/tools
+ rm -rf $(OUTDIR)/ankirspy*
+ maturin build -i $(shell which python3) -o $(OUTDIR) $(BUILDFLAGS)
+
+check: .build/check
+
+fix:
+ cargo fmt
+
+clean:
+ rm -rf .build target
+
+# nightly currently required for ignoring files in rustfmt.toml
+RUST_TOOLCHAIN := $(shell cat rust-toolchain)
+
+.build/tools: requirements.txt rust-toolchain
+ pip install -r requirements.txt
+ rustup toolchain install $(RUST_TOOLCHAIN)
+ rustup component add rustfmt-preview --toolchain $(RUST_TOOLCHAIN)
+ rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
+ @touch $@
+
+.build/check: build
+ cargo fmt -- --check
+ cargo clippy -- -D warnings
+ @touch $@
diff --git a/lib-rspy/README.md b/lib-rspy/README.md
new file mode 100644
index 000000000..09eae6595
--- /dev/null
+++ b/lib-rspy/README.md
@@ -0,0 +1,3 @@
+Python bindings for the Anki Rust code.
+
+Please see https://github.com/ankitects/anki-desktop
diff --git a/requirements.txt b/lib-rspy/requirements.txt
similarity index 52%
rename from requirements.txt
rename to lib-rspy/requirements.txt
index e9202b464..3203b816c 100644
--- a/requirements.txt
+++ b/lib-rspy/requirements.txt
@@ -1,17 +1,3 @@
-beautifulsoup4
-send2trash
-pyaudio
-requests
-decorator
-markdown
-jsonschema
-psutil; sys_platform == "win32"
-distro; sys_platform != "win32" and sys_platform != "darwin"
-typing
-protobuf
-mypy==0.750
-mypy_protobuf
# fixme: when maturin fixes 32 bit support, switch back to pypi
git+https://github.com/dae/maturin#egg=maturin; sys_platform == "linux" and platform_machine != "x86_64"
maturin; sys_platform != "linux" or platform_machine == "x86_64"
-
diff --git a/rs/rust-toolchain b/lib-rspy/rust-toolchain
similarity index 100%
rename from rs/rust-toolchain
rename to lib-rspy/rust-toolchain
diff --git a/rs/pymod/src/lib.rs b/lib-rspy/src/lib.rs
similarity index 85%
rename from rs/pymod/src/lib.rs
rename to lib-rspy/src/lib.rs
index 8956a38b8..92eb6b5db 100644
--- a/rs/pymod/src/lib.rs
+++ b/lib-rspy/src/lib.rs
@@ -1,4 +1,4 @@
-use ankirs::backend::Backend as RustBackend;
+use anki::backend::Backend as RustBackend;
use pyo3::prelude::*;
use pyo3::types::PyBytes;
@@ -26,7 +26,7 @@ impl Backend {
}
#[pymodule]
-fn _ankirs(_py: Python, m: &PyModule) -> PyResult<()> {
+fn ankirspy(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_class::()?;
Ok(())
diff --git a/lib-rust/.github/workflows/checks.yml b/lib-rust/.github/workflows/checks.yml
new file mode 100644
index 000000000..3b9239794
--- /dev/null
+++ b/lib-rust/.github/workflows/checks.yml
@@ -0,0 +1,19 @@
+name: Checks
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ max-parallel: 4
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v1
+ - name: Set up protoc
+ uses: Arduino/actions/setup-protoc@master
+ - name: Run checks
+ run: |
+ (cd .. && git clone https://github.com/ankitects/anki-proto.git)
+ make check
diff --git a/lib-rust/.gitignore b/lib-rust/.gitignore
new file mode 100644
index 000000000..57bd8324a
--- /dev/null
+++ b/lib-rust/.gitignore
@@ -0,0 +1,4 @@
+Cargo.lock
+src/backend_proto.rs
+.build
+target
diff --git a/rs/ankirs/Cargo.toml b/lib-rust/Cargo.toml
similarity index 83%
rename from rs/ankirs/Cargo.toml
rename to lib-rust/Cargo.toml
index 7e19fa2f0..0a426c0cb 100644
--- a/rs/ankirs/Cargo.toml
+++ b/lib-rust/Cargo.toml
@@ -1,8 +1,9 @@
[package]
-name = "ankirs"
+name = "anki"
version = "0.1.0"
edition = "2018"
authors = ["Ankitects Pty Ltd and contributors"]
+license = "AGPL-3.0-or-later"
[dependencies]
nom = "5.0.1"
@@ -13,3 +14,4 @@ chrono = "0.4.10"
[build-dependencies]
prost-build = "0.5.0"
+
diff --git a/lib-rust/LICENSE b/lib-rust/LICENSE
new file mode 100644
index 000000000..33d04e99d
--- /dev/null
+++ b/lib-rust/LICENSE
@@ -0,0 +1 @@
+Licensed under the GNU AGPL 3 or later.
diff --git a/lib-rust/Makefile b/lib-rust/Makefile
new file mode 100644
index 000000000..1cafeb946
--- /dev/null
+++ b/lib-rust/Makefile
@@ -0,0 +1,38 @@
+SHELL := bash
+.SHELLFLAGS := -eu -o pipefail -c
+.DELETE_ON_ERROR:
+MAKEFLAGS += --warn-undefined-variables
+MAKEFLAGS += --no-builtin-rules
+
+$(shell mkdir -p .build)
+
+.PHONY: all check fix clean
+
+all: check
+
+check: .build/check
+
+fix:
+ cargo fmt
+
+clean:
+ rm -rf .build target
+
+PROTO_SOURCE := $(wildcard ../proto/*.proto)
+RS_SOURCE := $(wildcard src/*)
+ALL_SOURCE := $(RS_SOURCE) $(PROTO_SOURCE)
+
+# nightly currently required for ignoring files in rustfmt.toml
+RUST_TOOLCHAIN := $(shell cat rust-toolchain)
+
+.build/rs-tools: rust-toolchain
+ rustup toolchain install $(RUST_TOOLCHAIN)
+ rustup component add rustfmt-preview --toolchain $(RUST_TOOLCHAIN)
+ rustup component add clippy-preview --toolchain $(RUST_TOOLCHAIN)
+ @touch $@
+
+.build/check: .build/rs-tools
+ cargo test
+ cargo fmt -- --check
+ cargo clippy -- -D warnings
+ @touch $@
diff --git a/lib-rust/README.md b/lib-rust/README.md
new file mode 100644
index 000000000..1df204eab
--- /dev/null
+++ b/lib-rust/README.md
@@ -0,0 +1,3 @@
+The portions of Anki written in Rust.
+
+Please see https://github.com/ankitects/anki-desktop
diff --git a/lib-rust/build.rs b/lib-rust/build.rs
new file mode 100644
index 000000000..4aa23232f
--- /dev/null
+++ b/lib-rust/build.rs
@@ -0,0 +1,8 @@
+use prost_build;
+
+fn main() {
+ // avoid default OUT_DIR for now, for code completion
+ std::env::set_var("OUT_DIR", "src");
+ println!("cargo:rerun-if-changed=../proto/backend.proto");
+ prost_build::compile_protos(&["../proto/backend.proto"], &["../proto"]).unwrap();
+}
diff --git a/lib-rust/rust-toolchain b/lib-rust/rust-toolchain
new file mode 100644
index 000000000..a9fe5202c
--- /dev/null
+++ b/lib-rust/rust-toolchain
@@ -0,0 +1 @@
+nightly-2019-12-15
diff --git a/rs/rustfmt.toml b/lib-rust/rustfmt.toml
similarity index 100%
rename from rs/rustfmt.toml
rename to lib-rust/rustfmt.toml
diff --git a/rs/ankirs/src/backend.rs b/lib-rust/src/backend.rs
similarity index 100%
rename from rs/ankirs/src/backend.rs
rename to lib-rust/src/backend.rs
diff --git a/rs/ankirs/src/err.rs b/lib-rust/src/err.rs
similarity index 100%
rename from rs/ankirs/src/err.rs
rename to lib-rust/src/err.rs
diff --git a/rs/ankirs/src/lib.rs b/lib-rust/src/lib.rs
similarity index 100%
rename from rs/ankirs/src/lib.rs
rename to lib-rust/src/lib.rs
diff --git a/rs/ankirs/src/sched.rs b/lib-rust/src/sched.rs
similarity index 100%
rename from rs/ankirs/src/sched.rs
rename to lib-rust/src/sched.rs
diff --git a/rs/ankirs/src/template.rs b/lib-rust/src/template.rs
similarity index 100%
rename from rs/ankirs/src/template.rs
rename to lib-rust/src/template.rs
diff --git a/proto/README.md b/proto/README.md
new file mode 100644
index 000000000..0bbb437ef
--- /dev/null
+++ b/proto/README.md
@@ -0,0 +1,4 @@
+Protobuf definition files used by Anki.
+
+LICENSE: GNU AGPL 3+.
+
diff --git a/pytype.conf b/pytype.conf
deleted file mode 100644
index c7e05b4ac..000000000
--- a/pytype.conf
+++ /dev/null
@@ -1,44 +0,0 @@
-# NOTE: All relative paths are relative to the location of this file.
-
-[pytype]
-
-# Space-separated list of files or directories to exclude.
-exclude =
- **/*_test.py
- **/test_*.py
-
-# Space-separated list of files or directories to process.
-inputs =
- anki
-
-# Keep going past errors to analyze as many files as possible.
-keep_going = False
-
-# Run N jobs in parallel.
-jobs = 8
-
-# All pytype output goes here.
-output = .pytype
-
-# Paths to source code directories, separated by ':'.
-pythonpath =
- .
-
-# Python version (major.minor) of the target code.
-#python_version = 3.7
-
-# Comma separated list of error names to ignore.
-disable =
- pyi-error
-
-# Don't report errors.
-report_errors = True
-
-# Experimental: Infer precise return types even for invalid function calls.
-precise_return = False
-
-# Experimental: solve unknown types to label with structural types.
-protocols = False
-
-# Experimental: Only load submodules that are explicitly imported.
-strict_import = False
diff --git a/requirements.check b/requirements.check
deleted file mode 100644
index 5faaf2fbc..000000000
--- a/requirements.check
+++ /dev/null
@@ -1,7 +0,0 @@
-nose2
-mock
-# fixme: when isort 5.0 is released, switch to pypi
-git+https://github.com/dae/isort#egg=isort
-# fixme: when pylint supports isort 5.0, switch to pypi
-git+https://github.com/dae/pylint#egg=pylint
-black
diff --git a/rs/Cargo.lock b/rs/Cargo.lock
deleted file mode 100644
index c9b7be63f..000000000
--- a/rs/Cargo.lock
+++ /dev/null
@@ -1,816 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-[[package]]
-name = "aho-corasick"
-version = "0.7.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "ankirs"
-version = "0.1.0"
-dependencies = [
- "bytes",
- "chrono",
- "failure",
- "nom",
- "prost",
- "prost-build",
-]
-
-[[package]]
-name = "arrayvec"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9"
-dependencies = [
- "nodrop",
-]
-
-[[package]]
-name = "autocfg"
-version = "0.1.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
-
-[[package]]
-name = "backtrace"
-version = "0.3.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea"
-dependencies = [
- "backtrace-sys",
- "cfg-if",
- "libc",
- "rustc-demangle",
-]
-
-[[package]]
-name = "backtrace-sys"
-version = "0.1.32"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491"
-dependencies = [
- "cc",
- "libc",
-]
-
-[[package]]
-name = "byteorder"
-version = "1.3.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5"
-
-[[package]]
-name = "bytes"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
-dependencies = [
- "byteorder",
- "iovec",
-]
-
-[[package]]
-name = "c2-chacha"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb"
-dependencies = [
- "ppv-lite86",
-]
-
-[[package]]
-name = "cc"
-version = "1.0.48"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76"
-
-[[package]]
-name = "cfg-if"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
-
-[[package]]
-name = "chrono"
-version = "0.4.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31850b4a4d6bae316f7a09e691c944c28299298837edc0a03f755618c23cbc01"
-dependencies = [
- "num-integer",
- "num-traits",
- "time",
-]
-
-[[package]]
-name = "ctor"
-version = "0.1.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd8ce37ad4184ab2ce004c33bf6379185d3b1c95801cab51026bd271bf68eedc"
-dependencies = [
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "either"
-version = "1.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
-
-[[package]]
-name = "failure"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9"
-dependencies = [
- "backtrace",
- "failure_derive",
-]
-
-[[package]]
-name = "failure_derive"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
- "synstructure",
-]
-
-[[package]]
-name = "fixedbitset"
-version = "0.1.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33"
-
-[[package]]
-name = "getrandom"
-version = "0.1.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407"
-dependencies = [
- "cfg-if",
- "libc",
- "wasi",
-]
-
-[[package]]
-name = "ghost"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a36606a68532b5640dc86bb1f33c64b45c4682aad4c50f3937b317ea387f3d6"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "heck"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
-dependencies = [
- "unicode-segmentation",
-]
-
-[[package]]
-name = "indoc"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f9553c1e16c114b8b77ebeb329e5f2876eed62a8d51178c8bc6bff0d65f98f8"
-dependencies = [
- "indoc-impl",
- "proc-macro-hack",
-]
-
-[[package]]
-name = "indoc-impl"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b714fc08d0961716390977cdff1536234415ac37b509e34e5a983def8340fb75"
-dependencies = [
- "proc-macro-hack",
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
- "unindent",
-]
-
-[[package]]
-name = "inventory"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4cece20baea71d9f3435e7bbe9adf4765f091c5fe404975f844006964a71299"
-dependencies = [
- "ctor",
- "ghost",
- "inventory-impl",
-]
-
-[[package]]
-name = "inventory-impl"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2869bf972e998977b1cb87e60df70341d48e48dca0823f534feb91ea44adaf9"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "iovec"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "itertools"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
-dependencies = [
- "either",
-]
-
-[[package]]
-name = "itoa"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
-
-[[package]]
-name = "lazy_static"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-
-[[package]]
-name = "lexical-core"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2304bccb228c4b020f3a4835d247df0a02a7c4686098d4167762cfbbe4c5cb14"
-dependencies = [
- "arrayvec",
- "cfg-if",
- "rustc_version",
- "ryu",
- "static_assertions",
-]
-
-[[package]]
-name = "libc"
-version = "0.2.66"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
-
-[[package]]
-name = "log"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "memchr"
-version = "2.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
-
-[[package]]
-name = "multimap"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2eb04b9f127583ed176e163fb9ec6f3e793b87e21deedd5734a69386a18a0151"
-
-[[package]]
-name = "nodrop"
-version = "0.1.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
-
-[[package]]
-name = "nom"
-version = "5.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c618b63422da4401283884e6668d39f819a106ef51f5f59b81add00075da35ca"
-dependencies = [
- "lexical-core",
- "memchr",
- "version_check 0.1.5",
-]
-
-[[package]]
-name = "num-integer"
-version = "0.1.41"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09"
-dependencies = [
- "autocfg",
- "num-traits",
-]
-
-[[package]]
-name = "num-traits"
-version = "0.2.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
-name = "paste"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "423a519e1c6e828f1e73b720f9d9ed2fa643dce8a7737fb43235ce0b41eeaa49"
-dependencies = [
- "paste-impl",
- "proc-macro-hack",
-]
-
-[[package]]
-name = "paste-impl"
-version = "0.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4214c9e912ef61bf42b81ba9a47e8aad1b2ffaf739ab162bf96d1e011f54e6c5"
-dependencies = [
- "proc-macro-hack",
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "petgraph"
-version = "0.4.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
-dependencies = [
- "fixedbitset",
-]
-
-[[package]]
-name = "ppv-lite86"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b"
-
-[[package]]
-name = "proc-macro-hack"
-version = "0.5.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "proc-macro2"
-version = "0.4.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
-dependencies = [
- "unicode-xid 0.1.0",
-]
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27"
-dependencies = [
- "unicode-xid 0.2.0",
-]
-
-[[package]]
-name = "prost"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96d14b1c185652833d24aaad41c5832b0be5616a590227c1fbff57c616754b23"
-dependencies = [
- "byteorder",
- "bytes",
- "prost-derive",
-]
-
-[[package]]
-name = "prost-build"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb788126ea840817128183f8f603dce02cb7aea25c2a0b764359d8e20010702e"
-dependencies = [
- "bytes",
- "heck",
- "itertools",
- "log",
- "multimap",
- "petgraph",
- "prost",
- "prost-types",
- "tempfile",
- "which",
-]
-
-[[package]]
-name = "prost-derive"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e7dc378b94ac374644181a2247cebf59a6ec1c88b49ac77f3a94b86b79d0e11"
-dependencies = [
- "failure",
- "itertools",
- "proc-macro2 0.4.30",
- "quote 0.6.13",
- "syn 0.15.44",
-]
-
-[[package]]
-name = "prost-types"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1de482a366941c8d56d19b650fac09ca08508f2a696119ee7513ad590c8bac6f"
-dependencies = [
- "bytes",
- "prost",
-]
-
-[[package]]
-name = "pymod"
-version = "0.1.0"
-dependencies = [
- "ankirs",
- "pyo3",
-]
-
-[[package]]
-name = "pyo3"
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f9df1468dddf8a59ec799cf3b930bb75ec09deabe875ba953e06c51d1077136"
-dependencies = [
- "indoc",
- "inventory",
- "lazy_static",
- "libc",
- "num-traits",
- "paste",
- "pyo3cls",
- "regex",
- "serde",
- "serde_json",
- "spin",
- "unindent",
- "version_check 0.9.1",
-]
-
-[[package]]
-name = "pyo3-derive-backend"
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f6e56fb3e97b344a8f87d036f94578399402c6b75949de6270cd07928f790b1"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "pyo3cls"
-version = "0.8.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97452dcdf5941627ebc5c06664a07821fc7fc88d7515f02178193a8ebe316468"
-dependencies = [
- "proc-macro2 1.0.6",
- "pyo3-derive-backend",
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "quote"
-version = "0.6.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
-dependencies = [
- "proc-macro2 0.4.30",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
-dependencies = [
- "proc-macro2 1.0.6",
-]
-
-[[package]]
-name = "rand"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412"
-dependencies = [
- "getrandom",
- "libc",
- "rand_chacha",
- "rand_core",
- "rand_hc",
-]
-
-[[package]]
-name = "rand_chacha"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853"
-dependencies = [
- "c2-chacha",
- "rand_core",
-]
-
-[[package]]
-name = "rand_core"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
-dependencies = [
- "getrandom",
-]
-
-[[package]]
-name = "rand_hc"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
-dependencies = [
- "rand_core",
-]
-
-[[package]]
-name = "redox_syscall"
-version = "0.1.56"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
-
-[[package]]
-name = "regex"
-version = "1.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
- "thread_local",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.6.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716"
-
-[[package]]
-name = "remove_dir_all"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e"
-dependencies = [
- "winapi",
-]
-
-[[package]]
-name = "rustc-demangle"
-version = "0.1.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"
-
-[[package]]
-name = "rustc_version"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
-dependencies = [
- "semver",
-]
-
-[[package]]
-name = "ryu"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
-
-[[package]]
-name = "semver"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
-dependencies = [
- "semver-parser",
-]
-
-[[package]]
-name = "semver-parser"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
-
-[[package]]
-name = "serde"
-version = "1.0.104"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
-dependencies = [
- "serde_derive",
-]
-
-[[package]]
-name = "serde_derive"
-version = "1.0.104"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
-]
-
-[[package]]
-name = "serde_json"
-version = "1.0.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7"
-dependencies = [
- "itoa",
- "ryu",
- "serde",
-]
-
-[[package]]
-name = "spin"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
-
-[[package]]
-name = "static_assertions"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3"
-
-[[package]]
-name = "syn"
-version = "0.15.44"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
-dependencies = [
- "proc-macro2 0.4.30",
- "quote 0.6.13",
- "unicode-xid 0.1.0",
-]
-
-[[package]]
-name = "syn"
-version = "1.0.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "unicode-xid 0.2.0",
-]
-
-[[package]]
-name = "synstructure"
-version = "0.12.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
-dependencies = [
- "proc-macro2 1.0.6",
- "quote 1.0.2",
- "syn 1.0.11",
- "unicode-xid 0.2.0",
-]
-
-[[package]]
-name = "tempfile"
-version = "3.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
-dependencies = [
- "cfg-if",
- "libc",
- "rand",
- "redox_syscall",
- "remove_dir_all",
- "winapi",
-]
-
-[[package]]
-name = "thread_local"
-version = "0.3.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
-dependencies = [
- "lazy_static",
-]
-
-[[package]]
-name = "time"
-version = "0.1.42"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
-dependencies = [
- "libc",
- "redox_syscall",
- "winapi",
-]
-
-[[package]]
-name = "unicode-segmentation"
-version = "1.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
-
-[[package]]
-name = "unicode-xid"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
-
-[[package]]
-name = "unicode-xid"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
-
-[[package]]
-name = "unindent"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63f18aa3b0e35fed5a0048f029558b1518095ffe2a0a31fb87c93dece93a4993"
-
-[[package]]
-name = "version_check"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
-
-[[package]]
-name = "version_check"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce"
-
-[[package]]
-name = "wasi"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
-
-[[package]]
-name = "which"
-version = "2.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164"
-dependencies = [
- "failure",
- "libc",
-]
-
-[[package]]
-name = "winapi"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
-dependencies = [
- "winapi-i686-pc-windows-gnu",
- "winapi-x86_64-pc-windows-gnu",
-]
-
-[[package]]
-name = "winapi-i686-pc-windows-gnu"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
-
-[[package]]
-name = "winapi-x86_64-pc-windows-gnu"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/rs/Cargo.toml b/rs/Cargo.toml
deleted file mode 100644
index 84ba7cfc3..000000000
--- a/rs/Cargo.toml
+++ /dev/null
@@ -1,6 +0,0 @@
-[workspace]
-members = ["ankirs", "pymod"]
-
-[profile.release]
-lto = true
-codegen-units = 1
diff --git a/rs/ankirs/build.rs b/rs/ankirs/build.rs
deleted file mode 100644
index 88ef4f590..000000000
--- a/rs/ankirs/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-use prost_build;
-
-fn main() {
- // avoid default OUT_DIR for now, for code completion
- std::env::set_var("OUT_DIR", "src");
- prost_build::compile_protos(&["../../proto/backend.proto"], &["../../proto/"]).unwrap();
-}
diff --git a/run b/run
new file mode 100755
index 000000000..00a8b682e
--- /dev/null
+++ b/run
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+. scripts.inc
+
+for dir in $DEVEL; do
+ echo $dir
+ (cd $dir && make develop BUILDFLAGS="$BUILDFLAGS")
+done
+
+anki-qt/runanki "$@"
diff --git a/scripts.inc b/scripts.inc
new file mode 100644
index 000000000..51fb162e0
--- /dev/null
+++ b/scripts.inc
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -e
+
+CHECKABLE="lib-rust lib-python anki-qt"
+DEVEL="lib-rspy lib-python anki-qt"
+
+if [ "$UNOPT" = "" ]; then
+ BUILDFLAGS="--release --strip"
+else
+ BUILDFLAGS=""
+fi
+
+# activate venv
+test -d pyenv || python -m venv pyenv
+. pyenv/bin/activate
+pip install --upgrade pip setuptools
+
+# add qt if missing
+python -c 'import PyQt5' 2>/dev/null || pip install -r anki-qt/requirements.qt