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

51 | 52 |

53 | 54 | 55 | ## Documentation 56 | 57 | See [Tutorial](https://github.com/debanjandhar12/Obsidian-Anki-Sync/blob/main/docs/Tutorial.md) for basics. 58 | 59 | For detailed documentation on blocks see: 60 | 61 | [basicblock](https://github.com/debanjandhar12/Obsidian-Anki-Sync/blob/main/docs/basicblock.md) [replaceblock](https://github.com/debanjandhar12/Obsidian-Anki-Sync/blob/main/docs/replaceblock.md) [clozeblock](https://github.com/debanjandhar12/Obsidian-Anki-Sync/blob/main/docs/clozeblock.md) 62 | 63 | ## FAQ 64 | 65 |
66 | Why yet another plugin for obsidian to anki sync? 67 | The existing two plugins have a major limitation to implement my workflow 💢. It had no way of creating clozes inside math and code blocks.
68 | This plugin was made with the aim of creating a way to do so. 69 |
70 | 71 |
72 | How does auto deletation work? 73 | First, each card in anki is marked as "created by plugin from this vault" and "not created by plugin from this vault". A card is marked as "created by plugin" if it contains the name of vault as tag, as well as ObsidianAnkiSync tag, as well as the type of note of the card must be of type ObsidianAnkiSyncModel.
74 | Now, if a card is marked "created by plugin from this vault" but it is not available in the vault, then the card is deleted. 75 |
76 | 77 |
78 | Can i delete or modify the auto-generated oid attribute? 79 | 80 | No! Please dont do that.
The plugin uses the oid to track the cards in anki. 81 | Deleting it will cause the plugin to delete the old card and create a new one in Anki. This means that the scheduling information for the card gets deleted if you remove or modify oid. 82 |
83 | 84 |
85 | Where is the auto anki backup taken before every sync stored? 86 | In Windows 11, it is stored at:
87 | C:\Users\{WindowsUserName}\AppData\Roaming\Anki2\{AnkiProfileName} 88 |

89 | NB: The backup files are stored in a per-deck basis with name ObsidianAnkiSync-Backup-${timestamp}_${deck}.apkg 90 |
91 | 92 |
93 | Do the auto anki backup also store scheduling information? 94 | Yes. 95 |
96 | 97 |
98 | I found a bug. What to do? 99 | Please create a issue here 100 |
101 | 102 | ## Support 103 | Loved the tool? Please consider donating 💸 to help it improve! You can also help by spreading the word.
104 |

105 | Buy Me A Coffee 106 |

107 | This project is tested with BrowserStack. 108 | -------------------------------------------------------------------------------- /docs/Tutorial.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | Obsidian Anki Sync uses HTML (or, if you prefer to say XML) like syntax to make flashcards. 4 | 5 | If you know HTML, you would recall, html code consists of elements. Similarly, we have blocks. 6 | 7 | We can declare them as: 8 | 9 | ```markdown 10 | 11 | What is formula for sin theta?:: 12 | $$\frac{Opposite}{Hypotenuse}$$ 13 | ![Triangle](https://i.pinimg.com/originals/0d/79/3a/0d793a88f6c69aa8efd54a1012722c12.gif) 14 | 15 | ``` 16 | 17 | This would generate this card: 18 | 19 | ![Cards](./images/Tut1.jpg) 20 | 21 | Easy as that! 😀 22 | 23 | ## Attributes on a block basis 24 | 25 | Each such block can have attributes or options that override the default behavior. 26 | 27 | For example, by default the cards will be generated in `Default::ObsidianAnkiSync` deck, but but using the deck attribute we can override it to something else. For this example, we are going to override it to deck `Math`. 28 | 29 | ```markdown 30 | 31 | What is formula for sin theta?:: 32 | $$\frac{Opposite}{Hypotenuse}$$ 33 | ![Triangle](https://i.pinimg.com/originals/0d/79/3a/0d793a88f6c69aa8efd54a1012722c12.gif) 34 | 35 | ``` 36 | 37 | This would create the same card but in deck `Math`. 38 | 39 | There are many other attributes like **extra** for specifying extra field etc.. 40 | 41 | ## Attributes on a file basis 42 | 43 | Some attributes like deck can be specified in file basis by using YAML frontmatter. 44 | 45 | ```markdown 46 | --- 47 | deck: Math 48 | --- 49 | 50 | What is formula for sin theta?:: 51 | $$\frac{Opposite}{Hypotenuse}$$ 52 | ![Triangle](https://i.pinimg.com/originals/0d/79/3a/0d793a88f6c69aa8efd54a1012722c12.gif) 53 | 54 | ``` 55 | 56 | This would create two cards in same deck `Math` due to deck property specified on a file basis. 57 | 58 | Also, it will have an extra field as specified and there will be a reverse card created unlike above two examples due to extra and reverse attributes specified on a block basis. 59 | 60 | The new card will look like: 61 | 62 | ![Cards](./images/Tut2.jpg) 63 | 64 | # Different Blocks in Obsidian Anki Sync 65 | 66 | ## basicblock 67 | 68 | It is used make forward and reversed cards. 69 | 70 | Several examples already shown above. 71 | 72 | ## clozeblock 73 | 74 | It is used make cloze cards. It suports Anki's cloze card syntax and highlights. 75 | 76 | ```markdown 77 | 78 | The capital of Japan is {{c1:: Tokyo}} 79 | 80 | ``` 81 | or 82 | ```markdown 83 | 84 | The capital of Japan is ==Tokyo== 85 | 86 | ``` 87 | Any one of the above code would generate this card in anki: 88 | 89 | ![Cards](./images/Tut4.jpg) 90 | 91 | ## replaceblock 92 | 93 | This is a special block that creates clozes by replacing the specified text. 94 | 95 | ```markdown 96 | 97 | 98 | 99 | $$\sin \theta = \frac{Opposite}{Hypotenuse}$$ 100 | 101 | ``` 102 | 103 | This would generate the cards: 104 | 105 | ![Cards](./images/Tut3.jpg) 106 | -------------------------------------------------------------------------------- /docs/basicblock.md: -------------------------------------------------------------------------------- 1 | # basicblock 2 | 3 | It is used make forward and reversed cards. 4 | 5 | See [Tutorial](/docs/Tutorial.md) for examples. 6 | 7 | ## Attributes 8 | 9 | | Attributes | Default | Can be overridden | 10 | | :--------: | :-------------------------: | :--------------------------------: | 11 | | oid | AutoGenerated | **Please do not modify** | 12 | | forward | True | On Block Basis | 13 | | reverse | False | On Block Basis | 14 | | extra | "" | On Block Basis | 15 | | deck | "Default::ObsidianAnkiSync" | On File Basis,
On Block Basis | 16 | 17 | -------------------------------------------------------------------------------- /docs/clozeblock.md: -------------------------------------------------------------------------------- 1 | # replaceblock 2 | 3 | It is used make cloze cards. It suports Anki's cloze card syntax and highlights. 4 | 5 | See [Tutorial](/docs/Tutorial.md) for examples. 6 | 7 | ## Attributes 8 | 9 | | Attributes | Default | Can be overridden | 10 | | :--------: | :-------------------------: | :-------------------------------: | 11 | | oid | AutoGenerated | **Please do not modify** | 12 | | extra | "" | On Block Basis | 13 | | deck | "Default::ObsidianAnkiSync" | On File Basis,
On BlockBasis | 14 | 15 | -------------------------------------------------------------------------------- /docs/images/Tut0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/Tut0.jpg -------------------------------------------------------------------------------- /docs/images/Tut1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/Tut1.jpg -------------------------------------------------------------------------------- /docs/images/Tut2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/Tut2.jpg -------------------------------------------------------------------------------- /docs/images/Tut3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/Tut3.jpg -------------------------------------------------------------------------------- /docs/images/Tut4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/Tut4.jpg -------------------------------------------------------------------------------- /docs/images/Tut5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/Tut5.jpg -------------------------------------------------------------------------------- /docs/images/permission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/permission.png -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_1_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_1_1.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_1_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_1_2.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_2_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_2_1.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_2_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_2_2.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_3_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_3_11.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_3_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_3_12.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_3_21.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_3_21.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_3_22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_3_22.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_4_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_4_1.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_4_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_4_2.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_5_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_5_1.jpg -------------------------------------------------------------------------------- /docs/images/src_imgs/Tut_5_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/debanjandhar12/Obsidian-Anki-Sync/85bc344a82cc9e71312e4cb64f59f22f688cd07e/docs/images/src_imgs/Tut_5_2.jpg -------------------------------------------------------------------------------- /docs/replaceblock.md: -------------------------------------------------------------------------------- 1 | # replaceblock 2 | 3 | It is alternative way to make cloze cards. This is useful to make cards inside math and code. 4 | 5 | See [Tutorial](/docs/Tutorial.md) for examples. 6 | 7 | ## Attributes 8 | 9 | | Attributes | Default | Can be overridden | 10 | | :--------: | :-------------------------: | :-------------------------------: | 11 | | oid | AutoGenerated | **Please do not modify** | 12 | | extra | "" | On Block Basis | 13 | | deck | "Default:: ObsidianAnkiSync" | On File Basis,
On BlockBasis | 14 | 15 | This block requires some children replace statements. The replace statement supports the following attributes: 16 | | Attributes | Default | Description | 17 | | :--------: | :-------------------------: | :-------------------------------: | 18 | | id | 1 | Specifies id of card to replace in| 19 | | text | "" | Specifies what text to replace | 20 | | regex | "" | Specifies what regex to replace. Use either this or text | 21 | | n | "All" | Specifies which # match to replace| 22 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "ObsidianAnkiSync", 3 | "name": "Anki Sync", 4 | "version": "1.0.0", 5 | "description": "Obsidian plugin to make flashcards and sync them to Anki.", 6 | "author": "debanjandhar12", 7 | "authorUrl": "https://github.com/debanjandhar12", 8 | "isDesktopOnly": true 9 | } 10 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Obsidian-Anki-Sync", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "@types/xmldom": "^0.1.30", 9 | "byte-base64": "^1.1.0", 10 | "nanoid": "^3.1.23", 11 | "obsidian": "^0.12.11", 12 | "remarkable": "^2.0.1", 13 | "ts-md5": "^1.2.7", 14 | "xmldom": "^0.6.0" 15 | }, 16 | "devDependencies": { 17 | "@rollup/plugin-commonjs": "^20.0.0", 18 | "@rollup/plugin-node-resolve": "^13.0.4", 19 | "@rollup/plugin-typescript": "^8.2.5", 20 | "@types/node": "^14.14.2", 21 | "require-text": "^0.0.1", 22 | "rollup": "^2.32.1", 23 | "rollup-plugin-copy": "^3.4.0", 24 | "rollup-plugin-node-polyfills": "^0.2.1", 25 | "rollup-plugin-string": "^3.0.0", 26 | "tslib": "^2.0.3", 27 | "typescript": "^4.4.3" 28 | } 29 | }, 30 | "node_modules/@nodelib/fs.scandir": { 31 | "version": "2.1.4", 32 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", 33 | "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", 34 | "dev": true, 35 | "dependencies": { 36 | "@nodelib/fs.stat": "2.0.4", 37 | "run-parallel": "^1.1.9" 38 | }, 39 | "engines": { 40 | "node": ">= 8" 41 | } 42 | }, 43 | "node_modules/@nodelib/fs.stat": { 44 | "version": "2.0.4", 45 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", 46 | "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", 47 | "dev": true, 48 | "engines": { 49 | "node": ">= 8" 50 | } 51 | }, 52 | "node_modules/@nodelib/fs.walk": { 53 | "version": "1.2.6", 54 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", 55 | "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", 56 | "dev": true, 57 | "dependencies": { 58 | "@nodelib/fs.scandir": "2.1.4", 59 | "fastq": "^1.6.0" 60 | }, 61 | "engines": { 62 | "node": ">= 8" 63 | } 64 | }, 65 | "node_modules/@rollup/plugin-commonjs": { 66 | "version": "20.0.0", 67 | "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-20.0.0.tgz", 68 | "integrity": "sha512-5K0g5W2Ol8hAcTHqcTBHiA7M58tfmYi1o9KxeJuuRNpGaTa5iLjcyemBitCBcKXaHamOBBEH2dGom6v6Unmqjg==", 69 | "dev": true, 70 | "dependencies": { 71 | "@rollup/pluginutils": "^3.1.0", 72 | "commondir": "^1.0.1", 73 | "estree-walker": "^2.0.1", 74 | "glob": "^7.1.6", 75 | "is-reference": "^1.2.1", 76 | "magic-string": "^0.25.7", 77 | "resolve": "^1.17.0" 78 | }, 79 | "engines": { 80 | "node": ">= 8.0.0" 81 | }, 82 | "peerDependencies": { 83 | "rollup": "^2.38.3" 84 | } 85 | }, 86 | "node_modules/@rollup/plugin-node-resolve": { 87 | "version": "13.0.4", 88 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz", 89 | "integrity": "sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w==", 90 | "dev": true, 91 | "dependencies": { 92 | "@rollup/pluginutils": "^3.1.0", 93 | "@types/resolve": "1.17.1", 94 | "builtin-modules": "^3.1.0", 95 | "deepmerge": "^4.2.2", 96 | "is-module": "^1.0.0", 97 | "resolve": "^1.19.0" 98 | }, 99 | "engines": { 100 | "node": ">= 10.0.0" 101 | }, 102 | "peerDependencies": { 103 | "rollup": "^2.42.0" 104 | } 105 | }, 106 | "node_modules/@rollup/plugin-typescript": { 107 | "version": "8.2.5", 108 | "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.2.5.tgz", 109 | "integrity": "sha512-QL/LvDol/PAGB2O0S7/+q2HpSUNodpw7z6nGn9BfoVCPOZ0r4EALrojFU29Bkoi2Hr2jgTocTejJ5GGWZfOxbQ==", 110 | "dev": true, 111 | "dependencies": { 112 | "@rollup/pluginutils": "^3.1.0", 113 | "resolve": "^1.17.0" 114 | }, 115 | "engines": { 116 | "node": ">=8.0.0" 117 | }, 118 | "peerDependencies": { 119 | "rollup": "^2.14.0", 120 | "tslib": "*", 121 | "typescript": ">=3.7.0" 122 | } 123 | }, 124 | "node_modules/@rollup/pluginutils": { 125 | "version": "3.1.0", 126 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 127 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 128 | "dev": true, 129 | "dependencies": { 130 | "@types/estree": "0.0.39", 131 | "estree-walker": "^1.0.1", 132 | "picomatch": "^2.2.2" 133 | }, 134 | "engines": { 135 | "node": ">= 8.0.0" 136 | }, 137 | "peerDependencies": { 138 | "rollup": "^1.20.0||^2.0.0" 139 | } 140 | }, 141 | "node_modules/@rollup/pluginutils/node_modules/@types/estree": { 142 | "version": "0.0.39", 143 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 144 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 145 | "dev": true 146 | }, 147 | "node_modules/@rollup/pluginutils/node_modules/estree-walker": { 148 | "version": "1.0.1", 149 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 150 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 151 | "dev": true 152 | }, 153 | "node_modules/@types/codemirror": { 154 | "version": "0.0.108", 155 | "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.108.tgz", 156 | "integrity": "sha512-3FGFcus0P7C2UOGCNUVENqObEb4SFk+S8Dnxq7K6aIsLVs/vDtlangl3PEO0ykaKXyK56swVF6Nho7VsA44uhw==", 157 | "dependencies": { 158 | "@types/tern": "*" 159 | } 160 | }, 161 | "node_modules/@types/estree": { 162 | "version": "0.0.47", 163 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", 164 | "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==" 165 | }, 166 | "node_modules/@types/fs-extra": { 167 | "version": "8.1.1", 168 | "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.1.tgz", 169 | "integrity": "sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==", 170 | "dev": true, 171 | "dependencies": { 172 | "@types/node": "*" 173 | } 174 | }, 175 | "node_modules/@types/glob": { 176 | "version": "7.1.3", 177 | "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", 178 | "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", 179 | "dev": true, 180 | "dependencies": { 181 | "@types/minimatch": "*", 182 | "@types/node": "*" 183 | } 184 | }, 185 | "node_modules/@types/minimatch": { 186 | "version": "3.0.4", 187 | "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", 188 | "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", 189 | "dev": true 190 | }, 191 | "node_modules/@types/node": { 192 | "version": "14.17.0", 193 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.0.tgz", 194 | "integrity": "sha512-w8VZUN/f7SSbvVReb9SWp6cJFevxb4/nkG65yLAya//98WgocKm5PLDAtSs5CtJJJM+kHmJjO/6mmYW4MHShZA==", 195 | "dev": true 196 | }, 197 | "node_modules/@types/resolve": { 198 | "version": "1.17.1", 199 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 200 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 201 | "dev": true, 202 | "dependencies": { 203 | "@types/node": "*" 204 | } 205 | }, 206 | "node_modules/@types/tern": { 207 | "version": "0.23.4", 208 | "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz", 209 | "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==", 210 | "dependencies": { 211 | "@types/estree": "*" 212 | } 213 | }, 214 | "node_modules/@types/xmldom": { 215 | "version": "0.1.30", 216 | "resolved": "https://registry.npmjs.org/@types/xmldom/-/xmldom-0.1.30.tgz", 217 | "integrity": "sha512-edqgAFXMEtVvaBZ3YnhamvmrHjoYpuxETmnb0lbTZmf/dXpAsO9ZKotUO4K2rn2SIZBDFCMOuA7fOe0H6dRZcA==" 218 | }, 219 | "node_modules/array-union": { 220 | "version": "2.1.0", 221 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", 222 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", 223 | "dev": true, 224 | "engines": { 225 | "node": ">=8" 226 | } 227 | }, 228 | "node_modules/autolinker": { 229 | "version": "3.14.3", 230 | "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.14.3.tgz", 231 | "integrity": "sha512-t81i2bCpS+s+5FIhatoww9DmpjhbdiimuU9ATEuLxtZMQ7jLv9fyFn7SWNG8IkEfD4AmYyirL1ss9k1aqVWRvg==", 232 | "dependencies": { 233 | "tslib": "^1.9.3" 234 | } 235 | }, 236 | "node_modules/autolinker/node_modules/tslib": { 237 | "version": "1.14.1", 238 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 239 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" 240 | }, 241 | "node_modules/balanced-match": { 242 | "version": "1.0.2", 243 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 244 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 245 | "dev": true 246 | }, 247 | "node_modules/brace-expansion": { 248 | "version": "1.1.11", 249 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 250 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 251 | "dev": true, 252 | "dependencies": { 253 | "balanced-match": "^1.0.0", 254 | "concat-map": "0.0.1" 255 | } 256 | }, 257 | "node_modules/braces": { 258 | "version": "3.0.2", 259 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 260 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 261 | "dev": true, 262 | "dependencies": { 263 | "fill-range": "^7.0.1" 264 | }, 265 | "engines": { 266 | "node": ">=8" 267 | } 268 | }, 269 | "node_modules/builtin-modules": { 270 | "version": "3.2.0", 271 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", 272 | "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", 273 | "dev": true, 274 | "engines": { 275 | "node": ">=6" 276 | }, 277 | "funding": { 278 | "url": "https://github.com/sponsors/sindresorhus" 279 | } 280 | }, 281 | "node_modules/byte-base64": { 282 | "version": "1.1.0", 283 | "resolved": "https://registry.npmjs.org/byte-base64/-/byte-base64-1.1.0.tgz", 284 | "integrity": "sha512-56cXelkJrVMdCY9V/3RfDxTh4VfMFCQ5km7B7GkIGfo4bcPL9aACyJLB0Ms3Ezu5rsHmLB2suis96z4fLM03DA==" 285 | }, 286 | "node_modules/colorette": { 287 | "version": "1.2.2", 288 | "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", 289 | "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", 290 | "dev": true 291 | }, 292 | "node_modules/commondir": { 293 | "version": "1.0.1", 294 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", 295 | "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", 296 | "dev": true 297 | }, 298 | "node_modules/concat-map": { 299 | "version": "0.0.1", 300 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 301 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 302 | "dev": true 303 | }, 304 | "node_modules/deepmerge": { 305 | "version": "4.2.2", 306 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 307 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 308 | "dev": true, 309 | "engines": { 310 | "node": ">=0.10.0" 311 | } 312 | }, 313 | "node_modules/dir-glob": { 314 | "version": "3.0.1", 315 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", 316 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", 317 | "dev": true, 318 | "dependencies": { 319 | "path-type": "^4.0.0" 320 | }, 321 | "engines": { 322 | "node": ">=8" 323 | } 324 | }, 325 | "node_modules/estree-walker": { 326 | "version": "2.0.2", 327 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", 328 | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", 329 | "dev": true 330 | }, 331 | "node_modules/fast-glob": { 332 | "version": "3.2.5", 333 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", 334 | "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", 335 | "dev": true, 336 | "dependencies": { 337 | "@nodelib/fs.stat": "^2.0.2", 338 | "@nodelib/fs.walk": "^1.2.3", 339 | "glob-parent": "^5.1.0", 340 | "merge2": "^1.3.0", 341 | "micromatch": "^4.0.2", 342 | "picomatch": "^2.2.1" 343 | }, 344 | "engines": { 345 | "node": ">=8" 346 | } 347 | }, 348 | "node_modules/fastq": { 349 | "version": "1.11.0", 350 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", 351 | "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", 352 | "dev": true, 353 | "dependencies": { 354 | "reusify": "^1.0.4" 355 | } 356 | }, 357 | "node_modules/fill-range": { 358 | "version": "7.0.1", 359 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 360 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 361 | "dev": true, 362 | "dependencies": { 363 | "to-regex-range": "^5.0.1" 364 | }, 365 | "engines": { 366 | "node": ">=8" 367 | } 368 | }, 369 | "node_modules/fs-extra": { 370 | "version": "8.1.0", 371 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", 372 | "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", 373 | "dev": true, 374 | "dependencies": { 375 | "graceful-fs": "^4.2.0", 376 | "jsonfile": "^4.0.0", 377 | "universalify": "^0.1.0" 378 | }, 379 | "engines": { 380 | "node": ">=6 <7 || >=8" 381 | } 382 | }, 383 | "node_modules/fs.realpath": { 384 | "version": "1.0.0", 385 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 386 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 387 | "dev": true 388 | }, 389 | "node_modules/fsevents": { 390 | "version": "2.3.2", 391 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 392 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 393 | "dev": true, 394 | "hasInstallScript": true, 395 | "optional": true, 396 | "os": [ 397 | "darwin" 398 | ], 399 | "engines": { 400 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 401 | } 402 | }, 403 | "node_modules/function-bind": { 404 | "version": "1.1.1", 405 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 406 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 407 | "dev": true 408 | }, 409 | "node_modules/glob": { 410 | "version": "7.1.7", 411 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 412 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 413 | "dev": true, 414 | "dependencies": { 415 | "fs.realpath": "^1.0.0", 416 | "inflight": "^1.0.4", 417 | "inherits": "2", 418 | "minimatch": "^3.0.4", 419 | "once": "^1.3.0", 420 | "path-is-absolute": "^1.0.0" 421 | }, 422 | "engines": { 423 | "node": "*" 424 | }, 425 | "funding": { 426 | "url": "https://github.com/sponsors/isaacs" 427 | } 428 | }, 429 | "node_modules/glob-parent": { 430 | "version": "5.1.2", 431 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 432 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 433 | "dev": true, 434 | "dependencies": { 435 | "is-glob": "^4.0.1" 436 | }, 437 | "engines": { 438 | "node": ">= 6" 439 | } 440 | }, 441 | "node_modules/globby": { 442 | "version": "10.0.1", 443 | "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", 444 | "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", 445 | "dev": true, 446 | "dependencies": { 447 | "@types/glob": "^7.1.1", 448 | "array-union": "^2.1.0", 449 | "dir-glob": "^3.0.1", 450 | "fast-glob": "^3.0.3", 451 | "glob": "^7.1.3", 452 | "ignore": "^5.1.1", 453 | "merge2": "^1.2.3", 454 | "slash": "^3.0.0" 455 | }, 456 | "engines": { 457 | "node": ">=8" 458 | } 459 | }, 460 | "node_modules/graceful-fs": { 461 | "version": "4.2.6", 462 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", 463 | "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", 464 | "dev": true 465 | }, 466 | "node_modules/has": { 467 | "version": "1.0.3", 468 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 469 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 470 | "dev": true, 471 | "dependencies": { 472 | "function-bind": "^1.1.1" 473 | }, 474 | "engines": { 475 | "node": ">= 0.4.0" 476 | } 477 | }, 478 | "node_modules/ignore": { 479 | "version": "5.1.8", 480 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", 481 | "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", 482 | "dev": true, 483 | "engines": { 484 | "node": ">= 4" 485 | } 486 | }, 487 | "node_modules/inflight": { 488 | "version": "1.0.6", 489 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 490 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 491 | "dev": true, 492 | "dependencies": { 493 | "once": "^1.3.0", 494 | "wrappy": "1" 495 | } 496 | }, 497 | "node_modules/inherits": { 498 | "version": "2.0.4", 499 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 500 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 501 | "dev": true 502 | }, 503 | "node_modules/is-core-module": { 504 | "version": "2.6.0", 505 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", 506 | "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", 507 | "dev": true, 508 | "dependencies": { 509 | "has": "^1.0.3" 510 | }, 511 | "funding": { 512 | "url": "https://github.com/sponsors/ljharb" 513 | } 514 | }, 515 | "node_modules/is-extglob": { 516 | "version": "2.1.1", 517 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 518 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 519 | "dev": true, 520 | "engines": { 521 | "node": ">=0.10.0" 522 | } 523 | }, 524 | "node_modules/is-glob": { 525 | "version": "4.0.1", 526 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 527 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 528 | "dev": true, 529 | "dependencies": { 530 | "is-extglob": "^2.1.1" 531 | }, 532 | "engines": { 533 | "node": ">=0.10.0" 534 | } 535 | }, 536 | "node_modules/is-module": { 537 | "version": "1.0.0", 538 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 539 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", 540 | "dev": true 541 | }, 542 | "node_modules/is-number": { 543 | "version": "7.0.0", 544 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 545 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 546 | "dev": true, 547 | "engines": { 548 | "node": ">=0.12.0" 549 | } 550 | }, 551 | "node_modules/is-plain-object": { 552 | "version": "3.0.1", 553 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", 554 | "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==", 555 | "dev": true, 556 | "engines": { 557 | "node": ">=0.10.0" 558 | } 559 | }, 560 | "node_modules/is-reference": { 561 | "version": "1.2.1", 562 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", 563 | "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", 564 | "dev": true, 565 | "dependencies": { 566 | "@types/estree": "*" 567 | } 568 | }, 569 | "node_modules/jsonfile": { 570 | "version": "4.0.0", 571 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", 572 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", 573 | "dev": true, 574 | "optionalDependencies": { 575 | "graceful-fs": "^4.1.6" 576 | } 577 | }, 578 | "node_modules/magic-string": { 579 | "version": "0.25.7", 580 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", 581 | "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", 582 | "dev": true, 583 | "dependencies": { 584 | "sourcemap-codec": "^1.4.4" 585 | } 586 | }, 587 | "node_modules/merge2": { 588 | "version": "1.4.1", 589 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", 590 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", 591 | "dev": true, 592 | "engines": { 593 | "node": ">= 8" 594 | } 595 | }, 596 | "node_modules/micromatch": { 597 | "version": "4.0.4", 598 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", 599 | "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", 600 | "dev": true, 601 | "dependencies": { 602 | "braces": "^3.0.1", 603 | "picomatch": "^2.2.3" 604 | }, 605 | "engines": { 606 | "node": ">=8.6" 607 | } 608 | }, 609 | "node_modules/minimatch": { 610 | "version": "3.0.4", 611 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 612 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 613 | "dev": true, 614 | "dependencies": { 615 | "brace-expansion": "^1.1.7" 616 | }, 617 | "engines": { 618 | "node": "*" 619 | } 620 | }, 621 | "node_modules/moment": { 622 | "version": "2.29.1", 623 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", 624 | "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==", 625 | "engines": { 626 | "node": "*" 627 | } 628 | }, 629 | "node_modules/nanoid": { 630 | "version": "3.1.23", 631 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", 632 | "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", 633 | "bin": { 634 | "nanoid": "bin/nanoid.cjs" 635 | }, 636 | "engines": { 637 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 638 | } 639 | }, 640 | "node_modules/obsidian": { 641 | "version": "0.12.11", 642 | "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-0.12.11.tgz", 643 | "integrity": "sha512-Kv4m1n4nfd17FzpqHZfqFS2YZAyY+cxAUM7/5jqh1bmbPlmKoNd1XJZC7o9KvkXfTCxALiXfGRdrjHB+GUFAEA==", 644 | "dependencies": { 645 | "@types/codemirror": "0.0.108", 646 | "moment": "2.29.1" 647 | } 648 | }, 649 | "node_modules/once": { 650 | "version": "1.4.0", 651 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 652 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 653 | "dev": true, 654 | "dependencies": { 655 | "wrappy": "1" 656 | } 657 | }, 658 | "node_modules/path-is-absolute": { 659 | "version": "1.0.1", 660 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 661 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 662 | "dev": true, 663 | "engines": { 664 | "node": ">=0.10.0" 665 | } 666 | }, 667 | "node_modules/path-parse": { 668 | "version": "1.0.7", 669 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 670 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 671 | "dev": true 672 | }, 673 | "node_modules/path-type": { 674 | "version": "4.0.0", 675 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", 676 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", 677 | "dev": true, 678 | "engines": { 679 | "node": ">=8" 680 | } 681 | }, 682 | "node_modules/picomatch": { 683 | "version": "2.2.3", 684 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", 685 | "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", 686 | "dev": true, 687 | "engines": { 688 | "node": ">=8.6" 689 | }, 690 | "funding": { 691 | "url": "https://github.com/sponsors/jonschlinkert" 692 | } 693 | }, 694 | "node_modules/queue-microtask": { 695 | "version": "1.2.3", 696 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 697 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 698 | "dev": true, 699 | "funding": [ 700 | { 701 | "type": "github", 702 | "url": "https://github.com/sponsors/feross" 703 | }, 704 | { 705 | "type": "patreon", 706 | "url": "https://www.patreon.com/feross" 707 | }, 708 | { 709 | "type": "consulting", 710 | "url": "https://feross.org/support" 711 | } 712 | ] 713 | }, 714 | "node_modules/remarkable": { 715 | "version": "2.0.1", 716 | "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", 717 | "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", 718 | "dependencies": { 719 | "argparse": "^1.0.10", 720 | "autolinker": "^3.11.0" 721 | }, 722 | "bin": { 723 | "remarkable": "bin/remarkable.js" 724 | }, 725 | "engines": { 726 | "node": ">= 6.0.0" 727 | } 728 | }, 729 | "node_modules/remarkable/node_modules/argparse": { 730 | "version": "1.0.10", 731 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 732 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 733 | "dependencies": { 734 | "sprintf-js": "~1.0.2" 735 | } 736 | }, 737 | "node_modules/require-text": { 738 | "version": "0.0.1", 739 | "resolved": "https://registry.npmjs.org/require-text/-/require-text-0.0.1.tgz", 740 | "integrity": "sha1-zeej5EO3HBTh7A1c78/NQY3/1m4=", 741 | "dev": true 742 | }, 743 | "node_modules/resolve": { 744 | "version": "1.20.0", 745 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", 746 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", 747 | "dev": true, 748 | "dependencies": { 749 | "is-core-module": "^2.2.0", 750 | "path-parse": "^1.0.6" 751 | }, 752 | "funding": { 753 | "url": "https://github.com/sponsors/ljharb" 754 | } 755 | }, 756 | "node_modules/reusify": { 757 | "version": "1.0.4", 758 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 759 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 760 | "dev": true, 761 | "engines": { 762 | "iojs": ">=1.0.0", 763 | "node": ">=0.10.0" 764 | } 765 | }, 766 | "node_modules/rollup": { 767 | "version": "2.48.0", 768 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.48.0.tgz", 769 | "integrity": "sha512-wl9ZSSSsi5579oscSDYSzGn092tCS076YB+TQrzsGuSfYyJeep8eEWj0eaRjuC5McuMNmcnR8icBqiE/FWNB1A==", 770 | "dev": true, 771 | "bin": { 772 | "rollup": "dist/bin/rollup" 773 | }, 774 | "engines": { 775 | "node": ">=10.0.0" 776 | }, 777 | "optionalDependencies": { 778 | "fsevents": "~2.3.1" 779 | } 780 | }, 781 | "node_modules/rollup-plugin-copy": { 782 | "version": "3.4.0", 783 | "resolved": "https://registry.npmjs.org/rollup-plugin-copy/-/rollup-plugin-copy-3.4.0.tgz", 784 | "integrity": "sha512-rGUmYYsYsceRJRqLVlE9FivJMxJ7X6jDlP79fmFkL8sJs7VVMSVyA2yfyL+PGyO/vJs4A87hwhgVfz61njI+uQ==", 785 | "dev": true, 786 | "dependencies": { 787 | "@types/fs-extra": "^8.0.1", 788 | "colorette": "^1.1.0", 789 | "fs-extra": "^8.1.0", 790 | "globby": "10.0.1", 791 | "is-plain-object": "^3.0.0" 792 | }, 793 | "engines": { 794 | "node": ">=8.3" 795 | } 796 | }, 797 | "node_modules/rollup-plugin-inject": { 798 | "version": "3.0.2", 799 | "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", 800 | "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", 801 | "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.", 802 | "dev": true, 803 | "dependencies": { 804 | "estree-walker": "^0.6.1", 805 | "magic-string": "^0.25.3", 806 | "rollup-pluginutils": "^2.8.1" 807 | } 808 | }, 809 | "node_modules/rollup-plugin-inject/node_modules/estree-walker": { 810 | "version": "0.6.1", 811 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 812 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 813 | "dev": true 814 | }, 815 | "node_modules/rollup-plugin-node-polyfills": { 816 | "version": "0.2.1", 817 | "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", 818 | "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", 819 | "dev": true, 820 | "dependencies": { 821 | "rollup-plugin-inject": "^3.0.0" 822 | } 823 | }, 824 | "node_modules/rollup-plugin-string": { 825 | "version": "3.0.0", 826 | "resolved": "https://registry.npmjs.org/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz", 827 | "integrity": "sha512-vqyzgn9QefAgeKi+Y4A7jETeIAU1zQmS6VotH6bzm/zmUQEnYkpIGRaOBPY41oiWYV4JyBoGAaBjYMYuv+6wVw==", 828 | "dev": true, 829 | "dependencies": { 830 | "rollup-pluginutils": "^2.4.1" 831 | } 832 | }, 833 | "node_modules/rollup-pluginutils": { 834 | "version": "2.8.2", 835 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", 836 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", 837 | "dev": true, 838 | "dependencies": { 839 | "estree-walker": "^0.6.1" 840 | } 841 | }, 842 | "node_modules/rollup-pluginutils/node_modules/estree-walker": { 843 | "version": "0.6.1", 844 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 845 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 846 | "dev": true 847 | }, 848 | "node_modules/run-parallel": { 849 | "version": "1.2.0", 850 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 851 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 852 | "dev": true, 853 | "funding": [ 854 | { 855 | "type": "github", 856 | "url": "https://github.com/sponsors/feross" 857 | }, 858 | { 859 | "type": "patreon", 860 | "url": "https://www.patreon.com/feross" 861 | }, 862 | { 863 | "type": "consulting", 864 | "url": "https://feross.org/support" 865 | } 866 | ], 867 | "dependencies": { 868 | "queue-microtask": "^1.2.2" 869 | } 870 | }, 871 | "node_modules/slash": { 872 | "version": "3.0.0", 873 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", 874 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", 875 | "dev": true, 876 | "engines": { 877 | "node": ">=8" 878 | } 879 | }, 880 | "node_modules/sourcemap-codec": { 881 | "version": "1.4.8", 882 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 883 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", 884 | "dev": true 885 | }, 886 | "node_modules/sprintf-js": { 887 | "version": "1.0.3", 888 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 889 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" 890 | }, 891 | "node_modules/to-regex-range": { 892 | "version": "5.0.1", 893 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 894 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 895 | "dev": true, 896 | "dependencies": { 897 | "is-number": "^7.0.0" 898 | }, 899 | "engines": { 900 | "node": ">=8.0" 901 | } 902 | }, 903 | "node_modules/ts-md5": { 904 | "version": "1.2.7", 905 | "resolved": "https://registry.npmjs.org/ts-md5/-/ts-md5-1.2.7.tgz", 906 | "integrity": "sha512-emODogvKGWi1KO1l9c6YxLMBn6CEH3VrH5mVPIyOtxBG52BvV4jP3GWz6bOZCz61nLgBc3ffQYE4+EHfCD+V7w==" 907 | }, 908 | "node_modules/tslib": { 909 | "version": "2.2.0", 910 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", 911 | "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", 912 | "dev": true 913 | }, 914 | "node_modules/typescript": { 915 | "version": "4.4.3", 916 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", 917 | "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", 918 | "dev": true, 919 | "bin": { 920 | "tsc": "bin/tsc", 921 | "tsserver": "bin/tsserver" 922 | }, 923 | "engines": { 924 | "node": ">=4.2.0" 925 | } 926 | }, 927 | "node_modules/universalify": { 928 | "version": "0.1.2", 929 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 930 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", 931 | "dev": true, 932 | "engines": { 933 | "node": ">= 4.0.0" 934 | } 935 | }, 936 | "node_modules/wrappy": { 937 | "version": "1.0.2", 938 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 939 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 940 | "dev": true 941 | }, 942 | "node_modules/xmldom": { 943 | "version": "0.6.0", 944 | "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz", 945 | "integrity": "sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==", 946 | "engines": { 947 | "node": ">=10.0.0" 948 | } 949 | } 950 | }, 951 | "dependencies": { 952 | "@nodelib/fs.scandir": { 953 | "version": "2.1.4", 954 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", 955 | "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", 956 | "dev": true, 957 | "requires": { 958 | "@nodelib/fs.stat": "2.0.4", 959 | "run-parallel": "^1.1.9" 960 | } 961 | }, 962 | "@nodelib/fs.stat": { 963 | "version": "2.0.4", 964 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", 965 | "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", 966 | "dev": true 967 | }, 968 | "@nodelib/fs.walk": { 969 | "version": "1.2.6", 970 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", 971 | "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", 972 | "dev": true, 973 | "requires": { 974 | "@nodelib/fs.scandir": "2.1.4", 975 | "fastq": "^1.6.0" 976 | } 977 | }, 978 | "@rollup/plugin-commonjs": { 979 | "version": "20.0.0", 980 | "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-20.0.0.tgz", 981 | "integrity": "sha512-5K0g5W2Ol8hAcTHqcTBHiA7M58tfmYi1o9KxeJuuRNpGaTa5iLjcyemBitCBcKXaHamOBBEH2dGom6v6Unmqjg==", 982 | "dev": true, 983 | "requires": { 984 | "@rollup/pluginutils": "^3.1.0", 985 | "commondir": "^1.0.1", 986 | "estree-walker": "^2.0.1", 987 | "glob": "^7.1.6", 988 | "is-reference": "^1.2.1", 989 | "magic-string": "^0.25.7", 990 | "resolve": "^1.17.0" 991 | } 992 | }, 993 | "@rollup/plugin-node-resolve": { 994 | "version": "13.0.4", 995 | "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz", 996 | "integrity": "sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w==", 997 | "dev": true, 998 | "requires": { 999 | "@rollup/pluginutils": "^3.1.0", 1000 | "@types/resolve": "1.17.1", 1001 | "builtin-modules": "^3.1.0", 1002 | "deepmerge": "^4.2.2", 1003 | "is-module": "^1.0.0", 1004 | "resolve": "^1.19.0" 1005 | } 1006 | }, 1007 | "@rollup/plugin-typescript": { 1008 | "version": "8.2.5", 1009 | "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.2.5.tgz", 1010 | "integrity": "sha512-QL/LvDol/PAGB2O0S7/+q2HpSUNodpw7z6nGn9BfoVCPOZ0r4EALrojFU29Bkoi2Hr2jgTocTejJ5GGWZfOxbQ==", 1011 | "dev": true, 1012 | "requires": { 1013 | "@rollup/pluginutils": "^3.1.0", 1014 | "resolve": "^1.17.0" 1015 | } 1016 | }, 1017 | "@rollup/pluginutils": { 1018 | "version": "3.1.0", 1019 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", 1020 | "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", 1021 | "dev": true, 1022 | "requires": { 1023 | "@types/estree": "0.0.39", 1024 | "estree-walker": "^1.0.1", 1025 | "picomatch": "^2.2.2" 1026 | }, 1027 | "dependencies": { 1028 | "@types/estree": { 1029 | "version": "0.0.39", 1030 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", 1031 | "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", 1032 | "dev": true 1033 | }, 1034 | "estree-walker": { 1035 | "version": "1.0.1", 1036 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", 1037 | "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", 1038 | "dev": true 1039 | } 1040 | } 1041 | }, 1042 | "@types/codemirror": { 1043 | "version": "0.0.108", 1044 | "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.108.tgz", 1045 | "integrity": "sha512-3FGFcus0P7C2UOGCNUVENqObEb4SFk+S8Dnxq7K6aIsLVs/vDtlangl3PEO0ykaKXyK56swVF6Nho7VsA44uhw==", 1046 | "requires": { 1047 | "@types/tern": "*" 1048 | } 1049 | }, 1050 | "@types/estree": { 1051 | "version": "0.0.47", 1052 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.47.tgz", 1053 | "integrity": "sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==" 1054 | }, 1055 | "@types/fs-extra": { 1056 | "version": "8.1.1", 1057 | "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-8.1.1.tgz", 1058 | "integrity": "sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w==", 1059 | "dev": true, 1060 | "requires": { 1061 | "@types/node": "*" 1062 | } 1063 | }, 1064 | "@types/glob": { 1065 | "version": "7.1.3", 1066 | "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", 1067 | "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", 1068 | "dev": true, 1069 | "requires": { 1070 | "@types/minimatch": "*", 1071 | "@types/node": "*" 1072 | } 1073 | }, 1074 | "@types/minimatch": { 1075 | "version": "3.0.4", 1076 | "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", 1077 | "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", 1078 | "dev": true 1079 | }, 1080 | "@types/node": { 1081 | "version": "14.17.0", 1082 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.0.tgz", 1083 | "integrity": "sha512-w8VZUN/f7SSbvVReb9SWp6cJFevxb4/nkG65yLAya//98WgocKm5PLDAtSs5CtJJJM+kHmJjO/6mmYW4MHShZA==", 1084 | "dev": true 1085 | }, 1086 | "@types/resolve": { 1087 | "version": "1.17.1", 1088 | "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", 1089 | "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", 1090 | "dev": true, 1091 | "requires": { 1092 | "@types/node": "*" 1093 | } 1094 | }, 1095 | "@types/tern": { 1096 | "version": "0.23.4", 1097 | "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz", 1098 | "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==", 1099 | "requires": { 1100 | "@types/estree": "*" 1101 | } 1102 | }, 1103 | "@types/xmldom": { 1104 | "version": "0.1.30", 1105 | "resolved": "https://registry.npmjs.org/@types/xmldom/-/xmldom-0.1.30.tgz", 1106 | "integrity": "sha512-edqgAFXMEtVvaBZ3YnhamvmrHjoYpuxETmnb0lbTZmf/dXpAsO9ZKotUO4K2rn2SIZBDFCMOuA7fOe0H6dRZcA==" 1107 | }, 1108 | "array-union": { 1109 | "version": "2.1.0", 1110 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", 1111 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", 1112 | "dev": true 1113 | }, 1114 | "autolinker": { 1115 | "version": "3.14.3", 1116 | "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.14.3.tgz", 1117 | "integrity": "sha512-t81i2bCpS+s+5FIhatoww9DmpjhbdiimuU9ATEuLxtZMQ7jLv9fyFn7SWNG8IkEfD4AmYyirL1ss9k1aqVWRvg==", 1118 | "requires": { 1119 | "tslib": "^1.9.3" 1120 | }, 1121 | "dependencies": { 1122 | "tslib": { 1123 | "version": "1.14.1", 1124 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 1125 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" 1126 | } 1127 | } 1128 | }, 1129 | "balanced-match": { 1130 | "version": "1.0.2", 1131 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1132 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1133 | "dev": true 1134 | }, 1135 | "brace-expansion": { 1136 | "version": "1.1.11", 1137 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1138 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1139 | "dev": true, 1140 | "requires": { 1141 | "balanced-match": "^1.0.0", 1142 | "concat-map": "0.0.1" 1143 | } 1144 | }, 1145 | "braces": { 1146 | "version": "3.0.2", 1147 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 1148 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 1149 | "dev": true, 1150 | "requires": { 1151 | "fill-range": "^7.0.1" 1152 | } 1153 | }, 1154 | "builtin-modules": { 1155 | "version": "3.2.0", 1156 | "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", 1157 | "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", 1158 | "dev": true 1159 | }, 1160 | "byte-base64": { 1161 | "version": "1.1.0", 1162 | "resolved": "https://registry.npmjs.org/byte-base64/-/byte-base64-1.1.0.tgz", 1163 | "integrity": "sha512-56cXelkJrVMdCY9V/3RfDxTh4VfMFCQ5km7B7GkIGfo4bcPL9aACyJLB0Ms3Ezu5rsHmLB2suis96z4fLM03DA==" 1164 | }, 1165 | "colorette": { 1166 | "version": "1.2.2", 1167 | "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", 1168 | "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", 1169 | "dev": true 1170 | }, 1171 | "commondir": { 1172 | "version": "1.0.1", 1173 | "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", 1174 | "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", 1175 | "dev": true 1176 | }, 1177 | "concat-map": { 1178 | "version": "0.0.1", 1179 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1180 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 1181 | "dev": true 1182 | }, 1183 | "deepmerge": { 1184 | "version": "4.2.2", 1185 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", 1186 | "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", 1187 | "dev": true 1188 | }, 1189 | "dir-glob": { 1190 | "version": "3.0.1", 1191 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", 1192 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", 1193 | "dev": true, 1194 | "requires": { 1195 | "path-type": "^4.0.0" 1196 | } 1197 | }, 1198 | "estree-walker": { 1199 | "version": "2.0.2", 1200 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", 1201 | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", 1202 | "dev": true 1203 | }, 1204 | "fast-glob": { 1205 | "version": "3.2.5", 1206 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", 1207 | "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", 1208 | "dev": true, 1209 | "requires": { 1210 | "@nodelib/fs.stat": "^2.0.2", 1211 | "@nodelib/fs.walk": "^1.2.3", 1212 | "glob-parent": "^5.1.0", 1213 | "merge2": "^1.3.0", 1214 | "micromatch": "^4.0.2", 1215 | "picomatch": "^2.2.1" 1216 | } 1217 | }, 1218 | "fastq": { 1219 | "version": "1.11.0", 1220 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", 1221 | "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", 1222 | "dev": true, 1223 | "requires": { 1224 | "reusify": "^1.0.4" 1225 | } 1226 | }, 1227 | "fill-range": { 1228 | "version": "7.0.1", 1229 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 1230 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 1231 | "dev": true, 1232 | "requires": { 1233 | "to-regex-range": "^5.0.1" 1234 | } 1235 | }, 1236 | "fs-extra": { 1237 | "version": "8.1.0", 1238 | "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", 1239 | "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", 1240 | "dev": true, 1241 | "requires": { 1242 | "graceful-fs": "^4.2.0", 1243 | "jsonfile": "^4.0.0", 1244 | "universalify": "^0.1.0" 1245 | } 1246 | }, 1247 | "fs.realpath": { 1248 | "version": "1.0.0", 1249 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1250 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 1251 | "dev": true 1252 | }, 1253 | "fsevents": { 1254 | "version": "2.3.2", 1255 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1256 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1257 | "dev": true, 1258 | "optional": true 1259 | }, 1260 | "function-bind": { 1261 | "version": "1.1.1", 1262 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 1263 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 1264 | "dev": true 1265 | }, 1266 | "glob": { 1267 | "version": "7.1.7", 1268 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 1269 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 1270 | "dev": true, 1271 | "requires": { 1272 | "fs.realpath": "^1.0.0", 1273 | "inflight": "^1.0.4", 1274 | "inherits": "2", 1275 | "minimatch": "^3.0.4", 1276 | "once": "^1.3.0", 1277 | "path-is-absolute": "^1.0.0" 1278 | } 1279 | }, 1280 | "glob-parent": { 1281 | "version": "5.1.2", 1282 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1283 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1284 | "dev": true, 1285 | "requires": { 1286 | "is-glob": "^4.0.1" 1287 | } 1288 | }, 1289 | "globby": { 1290 | "version": "10.0.1", 1291 | "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", 1292 | "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", 1293 | "dev": true, 1294 | "requires": { 1295 | "@types/glob": "^7.1.1", 1296 | "array-union": "^2.1.0", 1297 | "dir-glob": "^3.0.1", 1298 | "fast-glob": "^3.0.3", 1299 | "glob": "^7.1.3", 1300 | "ignore": "^5.1.1", 1301 | "merge2": "^1.2.3", 1302 | "slash": "^3.0.0" 1303 | } 1304 | }, 1305 | "graceful-fs": { 1306 | "version": "4.2.6", 1307 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", 1308 | "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", 1309 | "dev": true 1310 | }, 1311 | "has": { 1312 | "version": "1.0.3", 1313 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 1314 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 1315 | "dev": true, 1316 | "requires": { 1317 | "function-bind": "^1.1.1" 1318 | } 1319 | }, 1320 | "ignore": { 1321 | "version": "5.1.8", 1322 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", 1323 | "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", 1324 | "dev": true 1325 | }, 1326 | "inflight": { 1327 | "version": "1.0.6", 1328 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1329 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1330 | "dev": true, 1331 | "requires": { 1332 | "once": "^1.3.0", 1333 | "wrappy": "1" 1334 | } 1335 | }, 1336 | "inherits": { 1337 | "version": "2.0.4", 1338 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1339 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1340 | "dev": true 1341 | }, 1342 | "is-core-module": { 1343 | "version": "2.6.0", 1344 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", 1345 | "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", 1346 | "dev": true, 1347 | "requires": { 1348 | "has": "^1.0.3" 1349 | } 1350 | }, 1351 | "is-extglob": { 1352 | "version": "2.1.1", 1353 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1354 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 1355 | "dev": true 1356 | }, 1357 | "is-glob": { 1358 | "version": "4.0.1", 1359 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 1360 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 1361 | "dev": true, 1362 | "requires": { 1363 | "is-extglob": "^2.1.1" 1364 | } 1365 | }, 1366 | "is-module": { 1367 | "version": "1.0.0", 1368 | "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", 1369 | "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", 1370 | "dev": true 1371 | }, 1372 | "is-number": { 1373 | "version": "7.0.0", 1374 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1375 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1376 | "dev": true 1377 | }, 1378 | "is-plain-object": { 1379 | "version": "3.0.1", 1380 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.1.tgz", 1381 | "integrity": "sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==", 1382 | "dev": true 1383 | }, 1384 | "is-reference": { 1385 | "version": "1.2.1", 1386 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", 1387 | "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", 1388 | "dev": true, 1389 | "requires": { 1390 | "@types/estree": "*" 1391 | } 1392 | }, 1393 | "jsonfile": { 1394 | "version": "4.0.0", 1395 | "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", 1396 | "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", 1397 | "dev": true, 1398 | "requires": { 1399 | "graceful-fs": "^4.1.6" 1400 | } 1401 | }, 1402 | "magic-string": { 1403 | "version": "0.25.7", 1404 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", 1405 | "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", 1406 | "dev": true, 1407 | "requires": { 1408 | "sourcemap-codec": "^1.4.4" 1409 | } 1410 | }, 1411 | "merge2": { 1412 | "version": "1.4.1", 1413 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", 1414 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", 1415 | "dev": true 1416 | }, 1417 | "micromatch": { 1418 | "version": "4.0.4", 1419 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", 1420 | "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", 1421 | "dev": true, 1422 | "requires": { 1423 | "braces": "^3.0.1", 1424 | "picomatch": "^2.2.3" 1425 | } 1426 | }, 1427 | "minimatch": { 1428 | "version": "3.0.4", 1429 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1430 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1431 | "dev": true, 1432 | "requires": { 1433 | "brace-expansion": "^1.1.7" 1434 | } 1435 | }, 1436 | "moment": { 1437 | "version": "2.29.1", 1438 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", 1439 | "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" 1440 | }, 1441 | "nanoid": { 1442 | "version": "3.1.23", 1443 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", 1444 | "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==" 1445 | }, 1446 | "obsidian": { 1447 | "version": "0.12.11", 1448 | "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-0.12.11.tgz", 1449 | "integrity": "sha512-Kv4m1n4nfd17FzpqHZfqFS2YZAyY+cxAUM7/5jqh1bmbPlmKoNd1XJZC7o9KvkXfTCxALiXfGRdrjHB+GUFAEA==", 1450 | "requires": { 1451 | "@types/codemirror": "0.0.108", 1452 | "moment": "2.29.1" 1453 | } 1454 | }, 1455 | "once": { 1456 | "version": "1.4.0", 1457 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1458 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1459 | "dev": true, 1460 | "requires": { 1461 | "wrappy": "1" 1462 | } 1463 | }, 1464 | "path-is-absolute": { 1465 | "version": "1.0.1", 1466 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1467 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1468 | "dev": true 1469 | }, 1470 | "path-parse": { 1471 | "version": "1.0.7", 1472 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", 1473 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", 1474 | "dev": true 1475 | }, 1476 | "path-type": { 1477 | "version": "4.0.0", 1478 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", 1479 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", 1480 | "dev": true 1481 | }, 1482 | "picomatch": { 1483 | "version": "2.2.3", 1484 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", 1485 | "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", 1486 | "dev": true 1487 | }, 1488 | "queue-microtask": { 1489 | "version": "1.2.3", 1490 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 1491 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 1492 | "dev": true 1493 | }, 1494 | "remarkable": { 1495 | "version": "2.0.1", 1496 | "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", 1497 | "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", 1498 | "requires": { 1499 | "argparse": "^1.0.10", 1500 | "autolinker": "^3.11.0" 1501 | }, 1502 | "dependencies": { 1503 | "argparse": { 1504 | "version": "1.0.10", 1505 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 1506 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 1507 | "requires": { 1508 | "sprintf-js": "~1.0.2" 1509 | } 1510 | } 1511 | } 1512 | }, 1513 | "require-text": { 1514 | "version": "0.0.1", 1515 | "resolved": "https://registry.npmjs.org/require-text/-/require-text-0.0.1.tgz", 1516 | "integrity": "sha1-zeej5EO3HBTh7A1c78/NQY3/1m4=", 1517 | "dev": true 1518 | }, 1519 | "resolve": { 1520 | "version": "1.20.0", 1521 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", 1522 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", 1523 | "dev": true, 1524 | "requires": { 1525 | "is-core-module": "^2.2.0", 1526 | "path-parse": "^1.0.6" 1527 | } 1528 | }, 1529 | "reusify": { 1530 | "version": "1.0.4", 1531 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 1532 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 1533 | "dev": true 1534 | }, 1535 | "rollup": { 1536 | "version": "2.48.0", 1537 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.48.0.tgz", 1538 | "integrity": "sha512-wl9ZSSSsi5579oscSDYSzGn092tCS076YB+TQrzsGuSfYyJeep8eEWj0eaRjuC5McuMNmcnR8icBqiE/FWNB1A==", 1539 | "dev": true, 1540 | "requires": { 1541 | "fsevents": "~2.3.1" 1542 | } 1543 | }, 1544 | "rollup-plugin-copy": { 1545 | "version": "3.4.0", 1546 | "resolved": "https://registry.npmjs.org/rollup-plugin-copy/-/rollup-plugin-copy-3.4.0.tgz", 1547 | "integrity": "sha512-rGUmYYsYsceRJRqLVlE9FivJMxJ7X6jDlP79fmFkL8sJs7VVMSVyA2yfyL+PGyO/vJs4A87hwhgVfz61njI+uQ==", 1548 | "dev": true, 1549 | "requires": { 1550 | "@types/fs-extra": "^8.0.1", 1551 | "colorette": "^1.1.0", 1552 | "fs-extra": "^8.1.0", 1553 | "globby": "10.0.1", 1554 | "is-plain-object": "^3.0.0" 1555 | } 1556 | }, 1557 | "rollup-plugin-inject": { 1558 | "version": "3.0.2", 1559 | "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", 1560 | "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", 1561 | "dev": true, 1562 | "requires": { 1563 | "estree-walker": "^0.6.1", 1564 | "magic-string": "^0.25.3", 1565 | "rollup-pluginutils": "^2.8.1" 1566 | }, 1567 | "dependencies": { 1568 | "estree-walker": { 1569 | "version": "0.6.1", 1570 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 1571 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 1572 | "dev": true 1573 | } 1574 | } 1575 | }, 1576 | "rollup-plugin-node-polyfills": { 1577 | "version": "0.2.1", 1578 | "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", 1579 | "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", 1580 | "dev": true, 1581 | "requires": { 1582 | "rollup-plugin-inject": "^3.0.0" 1583 | } 1584 | }, 1585 | "rollup-plugin-string": { 1586 | "version": "3.0.0", 1587 | "resolved": "https://registry.npmjs.org/rollup-plugin-string/-/rollup-plugin-string-3.0.0.tgz", 1588 | "integrity": "sha512-vqyzgn9QefAgeKi+Y4A7jETeIAU1zQmS6VotH6bzm/zmUQEnYkpIGRaOBPY41oiWYV4JyBoGAaBjYMYuv+6wVw==", 1589 | "dev": true, 1590 | "requires": { 1591 | "rollup-pluginutils": "^2.4.1" 1592 | } 1593 | }, 1594 | "rollup-pluginutils": { 1595 | "version": "2.8.2", 1596 | "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", 1597 | "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", 1598 | "dev": true, 1599 | "requires": { 1600 | "estree-walker": "^0.6.1" 1601 | }, 1602 | "dependencies": { 1603 | "estree-walker": { 1604 | "version": "0.6.1", 1605 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", 1606 | "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", 1607 | "dev": true 1608 | } 1609 | } 1610 | }, 1611 | "run-parallel": { 1612 | "version": "1.2.0", 1613 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 1614 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 1615 | "dev": true, 1616 | "requires": { 1617 | "queue-microtask": "^1.2.2" 1618 | } 1619 | }, 1620 | "slash": { 1621 | "version": "3.0.0", 1622 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", 1623 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", 1624 | "dev": true 1625 | }, 1626 | "sourcemap-codec": { 1627 | "version": "1.4.8", 1628 | "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", 1629 | "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", 1630 | "dev": true 1631 | }, 1632 | "sprintf-js": { 1633 | "version": "1.0.3", 1634 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1635 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" 1636 | }, 1637 | "to-regex-range": { 1638 | "version": "5.0.1", 1639 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1640 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1641 | "dev": true, 1642 | "requires": { 1643 | "is-number": "^7.0.0" 1644 | } 1645 | }, 1646 | "ts-md5": { 1647 | "version": "1.2.7", 1648 | "resolved": "https://registry.npmjs.org/ts-md5/-/ts-md5-1.2.7.tgz", 1649 | "integrity": "sha512-emODogvKGWi1KO1l9c6YxLMBn6CEH3VrH5mVPIyOtxBG52BvV4jP3GWz6bOZCz61nLgBc3ffQYE4+EHfCD+V7w==" 1650 | }, 1651 | "tslib": { 1652 | "version": "2.2.0", 1653 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", 1654 | "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", 1655 | "dev": true 1656 | }, 1657 | "typescript": { 1658 | "version": "4.4.3", 1659 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", 1660 | "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", 1661 | "dev": true 1662 | }, 1663 | "universalify": { 1664 | "version": "0.1.2", 1665 | "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", 1666 | "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", 1667 | "dev": true 1668 | }, 1669 | "wrappy": { 1670 | "version": "1.0.2", 1671 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1672 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1673 | "dev": true 1674 | }, 1675 | "xmldom": { 1676 | "version": "0.6.0", 1677 | "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.6.0.tgz", 1678 | "integrity": "sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg==" 1679 | } 1680 | } 1681 | } 1682 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "rollup --config rollup.config.js -w", 5 | "build": "rollup --config rollup.config.js --environment BUILD:production" 6 | }, 7 | "devDependencies": { 8 | "@rollup/plugin-commonjs": "^20.0.0", 9 | "@rollup/plugin-node-resolve": "^13.0.4", 10 | "@rollup/plugin-typescript": "^8.2.5", 11 | "rollup-plugin-copy": "^3.4.0", 12 | "@types/node": "^14.14.2", 13 | "rollup": "^2.32.1", 14 | "rollup-plugin-node-polyfills": "^0.2.1", 15 | "rollup-plugin-string": "^3.0.0", 16 | "tslib": "^2.0.3", 17 | "typescript": "^4.4.3", 18 | "require-text": "^0.0.1" 19 | }, 20 | "dependencies": { 21 | "byte-base64": "^1.1.0", 22 | "ts-md5": "^1.2.7", 23 | "remarkable": "^2.0.1", 24 | "obsidian": "^0.12.11", 25 | "nanoid": "^3.1.23", 26 | "xmldom": "^0.6.0", 27 | "@types/xmldom": "^0.1.30" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /rollup.config.js: -------------------------------------------------------------------------------- 1 | import { nodeResolve } from '@rollup/plugin-node-resolve' 2 | import commonjs from '@rollup/plugin-commonjs'; 3 | import typescript from '@rollup/plugin-typescript'; 4 | import { string } from "rollup-plugin-string"; 5 | import copy from 'rollup-plugin-copy' 6 | 7 | const isProd = (process.env.BUILD === 'production'); 8 | 9 | 10 | export default { 11 | input: './src/main.ts', 12 | output: { 13 | dir: './out/', 14 | sourcemap: 'inline', 15 | sourcemapExcludeSources: isProd, 16 | format: 'cjs', 17 | exports: 'default', 18 | }, 19 | plugins: [nodeResolve(), commonjs(), typescript(), string({ include: "**/*.html" }), copy({ targets: [{ src: './manifest.json', dest: 'out' }] })], 20 | external: ["obsidian", "path"] 21 | }; 22 | -------------------------------------------------------------------------------- /src/AnkiConnect.ts: -------------------------------------------------------------------------------- 1 | const ANKI_PORT = 8765; 2 | 3 | // Read https://github.com/FooSoft/anki-connect#supported-actions 4 | 5 | export function invoke(action: string, params = {}): any { 6 | return new Promise((resolve, reject) => { 7 | const xhr = new XMLHttpRequest() 8 | xhr.addEventListener('error', () => reject('failed to issue request')); 9 | xhr.addEventListener('load', () => { 10 | try { 11 | const response = JSON.parse(xhr.responseText); 12 | if (Object.getOwnPropertyNames(response).length != 2) { 13 | throw 'response has an unexpected number of fields'; 14 | } 15 | if (!response.hasOwnProperty('error')) { 16 | throw 'response is missing required error field'; 17 | } 18 | if (!response.hasOwnProperty('result')) { 19 | throw 'response is missing required result field'; 20 | } 21 | if (response.error) { 22 | throw response.error; 23 | } 24 | resolve(response.result); 25 | } catch (e) { 26 | reject(e); 27 | } 28 | }); 29 | 30 | xhr.open('POST', 'http://127.0.0.1:' + ANKI_PORT.toString()); 31 | xhr.send(JSON.stringify({ action, version: 6, params })); 32 | }) 33 | } 34 | 35 | export async function requestPermission(): Promise { 36 | let r = await invoke("requestPermission", {}); 37 | if (r.permission != "granted") { 38 | return new Promise((resolve, reject) => {throw 'Permission to access anki was denied';}); 39 | } 40 | return r; 41 | } 42 | 43 | export async function createDeck(deckName: string): Promise { 44 | return await invoke("createDeck", { "deck": deckName }); 45 | } 46 | 47 | 48 | export async function addNote(oid: string, deckName: string, modelName: string, fields, tags: string[]): Promise { 49 | let r; // Bug Fix: Await doesnt work proerly without this 50 | r = await createDeck(deckName); // Create Deck with name if it does not exists 51 | 52 | // Some versions of Anki doesnt allow to add notes without cloze 53 | // The trick below adds an empty note with a cloze block, and then overwites it to overcome the above problem. 54 | let ankiId = await invoke("addNote", { "note": { "modelName": modelName, "deckName": deckName, "fields": { ...fields, "Text": "{{c1:: placeholder}}" }, "tags": tags, "options": { "allowDuplicate": true } } }); 55 | r = updateNote(ankiId, deckName, modelName, fields, tags); 56 | return ankiId; 57 | } 58 | 59 | // Update existing note (NB: Note must exists) 60 | export async function updateNote(ankiId: number, deckName: string, modelName: string, fields, tags: string[]): Promise { 61 | let noteinfo = (await invoke("notesInfo", { "notes": [ankiId] }))[0]; 62 | console.debug(noteinfo); 63 | let cards = noteinfo.cards; 64 | let r = await invoke("changeDeck", { "cards": cards, "deck": deckName }); // Move cards made by note to new deck and create new deck if deck not created 65 | 66 | // Remove all old tags and add new ones 67 | for (let tag of noteinfo.tags) 68 | r = await invoke("removeTags", { "notes": [ankiId], "tags": tag }); 69 | for (let tag of tags) 70 | r = await invoke("addTags", { "notes": [ankiId], "tags": tag }); 71 | r = await invoke("clearUnusedTags", {}); 72 | 73 | return await invoke("updateNoteFields", { "note": { id: ankiId, "deckName": deckName, "modelName": modelName, "fields": fields } }); 74 | } 75 | 76 | export async function deteteNote(ankiId: number): Promise { 77 | return await invoke("deleteNotes", { notes: [ankiId] }); 78 | } 79 | 80 | export async function removeEmptyNotes(): Promise { 81 | return await invoke("removeEmptyNotes", {}); 82 | } 83 | 84 | export async function query(q: string): Promise { 85 | return await invoke("findNotes", { "query": q }); 86 | } 87 | 88 | export async function createBackup(): Promise { 89 | let timestamp = Date.now(); 90 | let decknames = await invoke("deckNames", {}); 91 | for (let deck of decknames) { 92 | if (deck.includes("::") == false) { // if is not a subdeck then only create backup 93 | console.log(`Created backup with name ObsidianAnkiSync-Backup-${timestamp}_${deck}.apkg`); 94 | await invoke("exportPackage", { "deck": deck, "path": `../ObsidianAnkiSync-Backup-${timestamp}_${deck}.apkg`, "includeSched": true }); 95 | } 96 | } 97 | return; 98 | } 99 | 100 | // Create a model with given name if it does not exists 101 | export async function createModel(modelName: string, fields: string[], frontTemplate: string, backTemplate: string): Promise { 102 | let models = await invoke("modelNames", {}); 103 | if (!models.includes(modelName)) { 104 | await invoke("createModel", { 105 | "modelName": modelName, "inOrderFields": fields, "css": "", "isCloze": true, 106 | "cardTemplates": [ 107 | { 108 | "Name": "Card", 109 | "Front": frontTemplate, 110 | "Back": backTemplate 111 | } 112 | ] 113 | }); 114 | console.log("Created Model"); 115 | } 116 | 117 | try { 118 | await invoke("updateModelTemplates", { 119 | "model": { 120 | "name": modelName, 121 | "templates": { 122 | 'Card': { 123 | "Front": frontTemplate, 124 | "Back": backTemplate 125 | } 126 | } 127 | } 128 | });} 129 | // Solves #1 by failing silenty, #1 was caused by AnkiConnect calling old Anki API but apprarenty even if it gives error, it works correctly. 130 | catch (e) {if(e == "save() takes from 1 to 2 positional arguments but 3 were given") console.error(e); else throw e;}; 131 | } 132 | 133 | export async function storeMediaFileByPath(filename: string, path: string): Promise { 134 | return await invoke('storeMediaFile', { 135 | filename: filename, 136 | path: path 137 | } 138 | ) 139 | } -------------------------------------------------------------------------------- /src/ErrorSolution.ts: -------------------------------------------------------------------------------- 1 | export function findErrorSolution(e) : string { 2 | switch(e) { 3 | case "failed to issue request": 4 | return "Please ensure Anki is open in background with AnkiConnect installed properly. \nSee https://github.com/debanjandhar12/Obsidian-Anki-Sync#installation for more information."; 5 | case "Permission to access anki was denied": 6 | return "Please give permission to access anki by clicking Yes when promted or ensuring AnkiConnect config is correct. Otherwise see https://github.com/debanjandhar12/Obsidian-Anki-Sync#installation for more information."; 7 | case "collection is not available": 8 | return "Please select an Anki Profile."; 9 | default: 10 | return "Failed to find solution. Please create an issue at plugin's github reprository."; 11 | } 12 | } -------------------------------------------------------------------------------- /src/ObsidianAnkiSyncSettings.ts: -------------------------------------------------------------------------------- 1 | import { App, PluginSettingTab, Setting } from 'obsidian'; 2 | 3 | export class ObsidianAnkiSyncSettings extends PluginSettingTab { 4 | plugin: any; 5 | 6 | constructor(app: App, plugin: any) { 7 | super(app, plugin); 8 | this.plugin = plugin; 9 | } 10 | display(): void { 11 | let {containerEl} = this; 12 | 13 | containerEl.empty(); 14 | 15 | // Settings Section 16 | containerEl.createEl('h2', {text: 'Obsidian Anki Sync Settings'}); 17 | 18 | new Setting(containerEl) 19 | .setName('Backup Decks before sync (BETA)') 20 | .setDesc( 21 | `If enabled, the plugin takes backup of all the anki decks before syncing is done. 22 | NB: Taking backup may increase syncing time significantly.`, 23 | ) 24 | .addToggle((toggle) => 25 | toggle.setValue(this.plugin.settings.backup).onChange((value) => { 26 | this.plugin.settings.backup = value; 27 | this.plugin.saveData(this.plugin.settings); 28 | }), 29 | ); 30 | 31 | new Setting(containerEl) 32 | .setName('Show Breadcrumbs in Anki Cards') 33 | .setDesc( 34 | `If enabled, breadcrumbs would be shown in the cards created in Anki 35 | (syncing needed before change takes place).`, 36 | ) 37 | .addToggle((toggle) => 38 | toggle.setValue(this.plugin.settings.breadcrumb).onChange((value) => { 39 | this.plugin.settings.breadcrumb = value; 40 | this.plugin.saveData(this.plugin.settings); 41 | }), 42 | ); 43 | 44 | new Setting(this.containerEl) 45 | .setName("Template folder location") 46 | .setDesc("All files of this folder will be ignored while syncing to anki.") 47 | .addText((textbox) => 48 | textbox.setValue(this.plugin.settings.templatefolder).setPlaceholder("Example: folder1/folder2").onChange((value) => { 49 | this.plugin.settings.templatefolder = value; 50 | this.plugin.saveData(this.plugin.settings); 51 | }) 52 | ); 53 | 54 | // Help Sections 55 | containerEl.createEl('h3', {text: 'Help'}); 56 | let div = containerEl.createEl('div', {}); 57 | 58 | div.appendText("Installation Instructions: "); 59 | const INSTALLATION_LINK = document.createElement('a'); 60 | INSTALLATION_LINK.appendChild(document.createTextNode("debanjandhar12/Obsidian-Anki-Sync")); 61 | INSTALLATION_LINK.href = "https://github.com/debanjandhar12/Obsidian-Anki-Sync#installation"; 62 | div.appendChild(INSTALLATION_LINK); 63 | 64 | div.appendChild(document.createElement("br")); 65 | div.appendText("Documentation: "); 66 | const DOCUMENTATION_LINK = document.createElement('a'); 67 | DOCUMENTATION_LINK.appendChild(document.createTextNode("debanjandhar12/Obsidian-Anki-Sync/blob/main/docs/Tutorial.md")); 68 | DOCUMENTATION_LINK.href = "https://github.com/debanjandhar12/Obsidian-Anki-Sync/blob/main/docs/Tutorial.md"; 69 | div.appendChild(DOCUMENTATION_LINK); 70 | 71 | // Support Section 72 | containerEl.createEl('h3', {text: 'Support Development'}); 73 | div = containerEl.createEl('div', {}); 74 | const supportText = document.createElement('p'); 75 | supportText.appendText( 76 | `If this plugin adds value for you and you would like to support continued development, 77 | please Star the repository in Github:`); 78 | div.appendChild(supportText); 79 | const GITHUBSTAR_ICON: string = `Star ObsidianAnkiSync`; 80 | div.appendChild(this.createButton("https://github.com/debanjandhar12/Obsidian-Anki-Sync", GITHUBSTAR_ICON)); 81 | const GITHUBSPONSOR_ICON: string = `Sponsor ObsidianAnkiSync`; 82 | //div.appendChild(this.createButton("https://github.com/debanjandhar12/Obsidian-Anki-Sync", GITHUBSPONSOR_ICON)); 83 | } 84 | 85 | createButton(link: string, svg: string): HTMLElement { 86 | const a = document.createElement('a'); 87 | a.setAttribute('href', link); 88 | const blob = new Blob([svg], {type: 'image/svg+xml'}); 89 | const url = URL.createObjectURL(blob); 90 | const img = document.createElement('img'); 91 | img.src = url; 92 | img.height = 38; 93 | a.appendChild(img); 94 | return a; 95 | }; 96 | } -------------------------------------------------------------------------------- /src/basicblock.ts: -------------------------------------------------------------------------------- 1 | import { Block } from "./block"; 2 | import { MetadataCache, TFile, Vault } from 'obsidian'; 3 | import { getAttribInCommentLine } from './utils'; 4 | import { Remarkable } from 'remarkable'; 5 | import * as AnkiConnect from './AnkiConnect'; 6 | import { customAlphabet } from "nanoid"; 7 | import path from "path"; 8 | 9 | export class BasicBlock extends Block { 10 | original: string; 11 | 12 | constructor(vault: Vault, metadataCache: MetadataCache, file: TFile, original: string) { 13 | super(vault, metadataCache, file); 14 | this.original = original; 15 | } 16 | 17 | async addInAnki(): Promise { 18 | const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 21); 19 | let oid = this.getOId() || "Obs" + nanoid(); 20 | let text = this.toAnkiNoteContent(); 21 | console.debug(oid, text); 22 | let extra = Block.md_to_html(this.getAttrib("extra") || ""); 23 | console.debug(extra); 24 | let deck = this.getAttrib("deck") || this.getDocYAMLProp("deck") || "Default::ObsidianAnkiSync"; 25 | console.debug(deck); 26 | let uri = encodeURI(`obsidian://vault/${this.vault.getName()}/${this.file.path}`); 27 | let uri_html = `
${this.vault.getName()} > ${this.file.path.replaceAll("\/", " > ")}`; 28 | console.debug(uri_html); 29 | let yamlTags = this.getDocYAMLProp("tags"); 30 | if (yamlTags == null) yamlTags = []; 31 | if (Array.isArray(yamlTags)) yamlTags = yamlTags.toString(); 32 | yamlTags = yamlTags.split(/[ ,]+/); 33 | let tags = [...yamlTags, this.vault.getName().replace(/\s/g, "_"), 'ObsidianAnkiSync', 'replaceblock']; 34 | console.debug(tags); 35 | let res = await AnkiConnect.addNote(oid, deck, "ObsidianAnkiSyncModel", { "oid": oid, "Text": text, "Extra": extra, "Breadcrumb": uri_html }, tags); 36 | return oid; 37 | } 38 | 39 | async updateInAnki(): Promise { 40 | let oid = this.getOId(); 41 | let text = this.toAnkiNoteContent(); 42 | console.debug(oid, text); 43 | let extra = Block.md_to_html(this.getAttrib("extra") || ""); 44 | console.debug(extra); 45 | let deck = this.getAttrib("deck") || this.getDocYAMLProp("deck") || "Default::ObsidianAnkiSync"; 46 | console.debug(deck); 47 | let uri = encodeURI(`obsidian://vault/${this.vault.getName()}/${this.file.path}`); 48 | let uri_html = `${this.vault.getName()} > ${this.file.path.replaceAll("\/", " > ")}`; 49 | console.debug(uri_html); 50 | let yamlTags = this.getDocYAMLProp("tags"); 51 | if (yamlTags == null) yamlTags = []; 52 | if (Array.isArray(yamlTags)) yamlTags = yamlTags.toString(); 53 | yamlTags = yamlTags.split(/[ ,]+/); 54 | let tags = [...yamlTags, this.vault.getName().replace(/\s/g, "_"), 'ObsidianAnkiSync', 'replaceblock']; 55 | console.debug(tags); 56 | return await AnkiConnect.updateNote(await this.getAnkiId(), deck, "ObsidianAnkiSyncModel", { "oid": oid, "Text": text, "Extra": extra, "Breadcrumb": BasicBlock.settings.breadcrumb ? uri_html : "" }, tags); 57 | } 58 | 59 | toAnkiNoteContent(): string { 60 | let anki_content = this.original; 61 | 62 | // Remove All Comments 63 | const CommentsRegExp: RegExp = //gi // https://regexr.com/66vg3 64 | anki_content = anki_content.replaceAll(CommentsRegExp, ""); 65 | 66 | // Add the clozes braces to make front and back cards 67 | const frontCardRegex: RegExp = /(.|\n)*?(?=::)/i // https://regexr.com/5tr6r 68 | const backCardRegex: RegExp = /(?<=::)(.|\n)*/i // https://regexr.com/5tr7v 69 | let forward = (this.getAttrib("forward") == "" || this.getAttrib("forward") == "forward" || this.getAttrib("forward") == null || (String(this.getAttrib("forward")).toLowerCase() == "true")); 70 | let reverse = (this.getAttrib("reverse") != "" && this.getAttrib("reverse") != null && ((String(this.getAttrib("reverse")).toLowerCase() == "true") || (String(this.getAttrib("reverse")).toLowerCase() == "reverse"))); 71 | if (forward) 72 | anki_content = anki_content.replace(backCardRegex, function (match) { 73 | return `{{c1:: ${match} }}`; 74 | }); 75 | if (reverse) 76 | anki_content = anki_content.replace(frontCardRegex, function (match) { 77 | return `{{c2:: ${match} }}`; 78 | }); 79 | 80 | // Convert md to html 81 | anki_content = Block.md_to_html(anki_content) 82 | 83 | return anki_content; 84 | } 85 | } 86 | 87 | export async function parseBasicBlockInFile(vault: Vault, metadataCache: MetadataCache, file: TFile, fileContent: string): Promise { 88 | var res: BasicBlock[] = []; 89 | const BasicBLockRegExp: RegExp = /(\n|.)*?/gi // https://regexr.com/5tace 90 | let matches = [...fileContent.matchAll(BasicBLockRegExp)]; 91 | matches.forEach((match) => { 92 | var block: BasicBlock = new BasicBlock(vault, metadataCache, file, match[0]) // , match.index, match[0].length 93 | res.push(block); 94 | }); 95 | return res; 96 | } -------------------------------------------------------------------------------- /src/block.ts: -------------------------------------------------------------------------------- 1 | import { MetadataCache, TFile, Vault } from 'obsidian'; 2 | import { getAttribInCommentLine, insertAttrib } from './utils'; 3 | import * as AnkiConnect from './AnkiConnect'; 4 | import { Remarkable } from 'remarkable'; 5 | 6 | export abstract class Block { 7 | vault: Vault; 8 | metadataCache: MetadataCache; 9 | static settings: any; 10 | file: TFile; 11 | abstract original: string; 12 | 13 | constructor(vault: Vault, metadataCache: MetadataCache, file: TFile) { 14 | this.vault = vault; 15 | this.metadataCache = metadataCache; 16 | this.file = file; 17 | } 18 | 19 | abstract addInAnki(): Promise; 20 | abstract updateInAnki(): Promise; 21 | abstract toAnkiNoteContent(): string; 22 | 23 | getDocYAMLProp(key: string) { 24 | let fileCache = this.metadataCache.getFileCache(this.file).frontmatter; 25 | return fileCache ? fileCache[key] : null; 26 | } 27 | 28 | getAttrib(attrib: string) { 29 | const CommentsRegExp: RegExp = //gi // https://regexr.com/66vg3 30 | let match = this.original.match(CommentsRegExp); 31 | return getAttribInCommentLine(match[0], attrib); 32 | } 33 | 34 | getOId(): string { 35 | let oid: string = this.getAttrib("oid"); 36 | return oid; 37 | } 38 | 39 | async updateOIdinObsidian(oid: string): Promise { 40 | const BlockStartCommentRegExp: RegExp = //gi // https://regexr.com/5tq8f 41 | let modified = this.original.replace(BlockStartCommentRegExp, function (match): string { 42 | return insertAttrib(match, 'oid', oid); 43 | }); 44 | modified = modified.replaceAll("$", "$$$$"); // Bug Fix: https://stackoverflow.com/questions/9423722/string-replace-weird-behavior-when-using-dollar-sign-as-replacement 45 | 46 | // Read and modify the file with addition of id in obsidian 47 | let fileContent = await this.vault.cachedRead(this.file); 48 | fileContent = fileContent.replace(this.original, modified); 49 | this.vault.modify(this.file, fileContent); 50 | } 51 | 52 | async getAnkiId(): Promise { 53 | let ankiId: number = NaN; 54 | if (this.getOId() != "" && this.getOId() != null) 55 | ankiId = parseInt((await AnkiConnect.query(`oid:${this.getOId()} note:ObsidianAnkiSyncModel`))[0]); 56 | return ankiId; 57 | } 58 | 59 | static md_to_html(md): string { 60 | let html = md; 61 | // Fix Latex format of md to anki's html format 62 | const MdInlineMathRegExp: RegExp = /(? originalLinkValidator(url) || encodeURI(url).match(dataLinkRegex)|| (encodeURI(url).match(isImage) && !encodeURI(url).match(isWebURL)); 84 | const originalImageRender = remark.renderer.rules.image; 85 | remark.renderer.rules.image = (...a) => { 86 | if((encodeURI(a[0][a[1]].src).match(isImage) && !encodeURI(a[0][a[1]].src).match(isWebURL))) { // Image is relative to vault 87 | try { 88 | // @ts-expect-error 89 | let imgPath = path.join(this.vault.adapter.basePath,this.metadataCache.getFirstLinkpathDest(a[0][a[1]].src, this.file.path).path); 90 | AnkiConnect.storeMediaFileByPath(encodeURIComponent(a[0][a[1]].src), imgPath); // Flatten and save 91 | } 92 | catch {} 93 | a[0][a[1]].src = encodeURIComponent(a[0][a[1]].src); // Flatten image and convert to markdown. 94 | } 95 | return originalImageRender(...a); 96 | }; 97 | html = remark.render(html); 98 | return html; 99 | } 100 | } -------------------------------------------------------------------------------- /src/clozeblock.ts: -------------------------------------------------------------------------------- 1 | import { Block } from "./block"; 2 | import { MetadataCache, TFile, Vault } from 'obsidian'; 3 | import { getAttribInCommentLine } from './utils'; 4 | import * as AnkiConnect from './AnkiConnect'; 5 | import { customAlphabet } from "nanoid"; 6 | import path from "path"; 7 | 8 | export class ClozeBlock extends Block { 9 | original: string; 10 | 11 | constructor(vault: Vault, metadataCache: MetadataCache, file: TFile, original: string) { 12 | super(vault, metadataCache, file); 13 | this.original = original; 14 | } 15 | 16 | async addInAnki(): Promise { 17 | const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 21); 18 | let oid = this.getOId() || "Obs" + nanoid(); 19 | let text = this.toAnkiNoteContent(); 20 | console.debug(oid, text); 21 | let extra = Block.md_to_html(this.getAttrib("extra") || ""); 22 | console.debug(extra); 23 | let deck = this.getAttrib("deck") || this.getDocYAMLProp("deck") || "Default::ObsidianAnkiSync"; 24 | console.debug(deck); 25 | let uri = encodeURI(`obsidian://vault/${this.vault.getName()}/${this.file.path}`); 26 | let uri_html = `${this.vault.getName()} > ${this.file.path.replaceAll("\/", " > ")}`; 27 | console.debug(uri_html); 28 | let yamlTags = this.getDocYAMLProp("tags"); 29 | if (yamlTags == null) yamlTags = []; 30 | if (Array.isArray(yamlTags)) yamlTags = yamlTags.toString(); 31 | yamlTags = yamlTags.split(/[ ,]+/); 32 | let tags = [...yamlTags, this.vault.getName().replace(/\s/g, "_"), 'ObsidianAnkiSync', 'replaceblock']; 33 | console.debug(tags); 34 | let res = await AnkiConnect.addNote(oid, deck, "ObsidianAnkiSyncModel", { "oid": oid, "Text": text, "Extra": extra, "Breadcrumb": uri_html }, tags); 35 | return oid; 36 | } 37 | 38 | async updateInAnki(): Promise { 39 | let oid = this.getOId(); 40 | let text = this.toAnkiNoteContent(); 41 | console.debug(oid, text); 42 | let extra = Block.md_to_html(this.getAttrib("extra") || ""); 43 | console.debug(extra); 44 | let deck = this.getAttrib("deck") || this.getDocYAMLProp("deck") || "Default::ObsidianAnkiSync"; 45 | console.debug(deck); 46 | let uri = encodeURI(`obsidian://vault/${this.vault.getName()}/${this.file.path}`); 47 | let uri_html = `${this.vault.getName()} > ${this.file.path.replaceAll("\/", " > ")}`; 48 | console.debug(uri_html); 49 | let yamlTags = this.getDocYAMLProp("tags"); 50 | if (yamlTags == null) yamlTags = []; 51 | if (Array.isArray(yamlTags)) yamlTags = yamlTags.toString(); 52 | yamlTags = yamlTags.split(/[ ,]+/); 53 | let tags = [...yamlTags, this.vault.getName().replace(/\s/g, "_"), 'ObsidianAnkiSync', 'clozeblock']; 54 | console.debug(tags); 55 | return await AnkiConnect.updateNote(await this.getAnkiId(), deck, "ObsidianAnkiSyncModel", { "oid": oid, "Text": text, "Extra": extra, "Breadcrumb": ClozeBlock.settings.breadcrumb ? uri_html : "" }, tags); 56 | } 57 | 58 | toAnkiNoteContent(): string { 59 | let anki_content = this.original; 60 | 61 | // Remove All Comments 62 | const CommentsRegExp: RegExp = //gi // https://regexr.com/66vg3 63 | anki_content = anki_content.replaceAll(CommentsRegExp, ""); 64 | 65 | // Add the clozes braces for highlights 66 | let replaceId = 0; 67 | for (const match of anki_content.matchAll(/{{c(\d)::(.|\n)*?}}/g)) { // Get last replaceid used by user in anki cloze syntax 68 | replaceId = Math.max(replaceId, parseInt(match[1])); 69 | } 70 | anki_content = anki_content.replace(/(? { 82 | var res: ClozeBlock[] = []; 83 | const ClozeBlockRegExp: RegExp = /(\n|.)*?/gi // https://regexr.com/5tace 84 | let matches = [...fileContent.matchAll(ClozeBlockRegExp)]; 85 | matches.forEach((match) => { 86 | var block: ClozeBlock = new ClozeBlock(vault, metadataCache, file, match[0]) // , match.index, match[0].length 87 | res.push(block); 88 | }); 89 | return res; 90 | } -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { App, Notice, Plugin, addIcon, TFile } from 'obsidian'; 2 | 3 | import * as AnkiConnect from './AnkiConnect'; 4 | import { AnkiCardTemplates } from './templates/AnkiCardTemplates'; 5 | import { findErrorSolution } from "./ErrorSolution"; 6 | 7 | import { ObsidianAnkiSyncSettings } from "./ObsidianAnkiSyncSettings"; 8 | import { isPathChildOf } from './utils' 9 | 10 | import { Block } from './Block'; 11 | import { parseReplaceBlockInFile, ReplaceBlock } from './replaceblock'; 12 | import { BasicBlock, parseBasicBlockInFile } from './basicblock'; 13 | import { ClozeBlock, parseClozeBlockInFile } from './clozeblock'; 14 | 15 | export default class ObsidianAnkiSyncPlugin extends Plugin { 16 | settings: any; 17 | 18 | async onload() { 19 | console.log('Loading ObsidianAnkiSync'); 20 | 21 | // Load Seetings & Add SettingsTab 22 | await this.loadSettings(); 23 | this.addSettingTab(new ObsidianAnkiSyncSettings(this.app, this)); 24 | 25 | // Add ribbon for syncing obsidian to anki 26 | const ANKI_ICON: string = `` 27 | addIcon('anki', ANKI_ICON); 28 | this.addRibbonIcon('anki', 'Start Obsidian Anki Sync', () => { 29 | this.syncObsidianToAnkiWrapper(); 30 | }); 31 | 32 | // Add command for syncing obsidian to anki 33 | this.addCommand({ 34 | id: 'start-obsidian-anki-sync', 35 | name: 'Start Obsidian Anki Sync', 36 | callback: () => { 37 | this.syncObsidianToAnkiWrapper(); 38 | } 39 | }); 40 | } 41 | 42 | onunload() { 43 | console.log('Unloading ObsidianAnkiSync'); 44 | } 45 | 46 | async loadSettings() { 47 | this.settings = Object.assign({}, { "backup": false, "breadcrumb": true, "templatefolder": "" }, await this.loadData()); 48 | } 49 | 50 | async saveSettings() { 51 | await this.saveData(this.settings); 52 | } 53 | 54 | syncing: boolean = false; 55 | syncObsidianToAnkiWrapper() { // Wrapper function for error handling 56 | if (this.syncing == true) { console.log(`Syncing already in process...`); return; } // Prevent the user from accidentally start the sync twice 57 | this.syncing = true; 58 | this.syncObsidianToAnki().catch(e => { 59 | console.error(e); 60 | new Notice(`Sync Failed. \nError Message:\n${e} \nPossible Solution:\n${findErrorSolution(e)}`, 12000); 61 | }).finally(() => { 62 | this.syncing = false; 63 | }); 64 | } 65 | 66 | async syncObsidianToAnki() { 67 | new Notice(`Starting Obsidian to Anki Sync for vault ${this.app.vault.getName()}...`); // ${this.app.appId} can be used aswell 68 | console.log(`Sync Started`); 69 | 70 | // -- Copy Settings over to block processors -- 71 | ReplaceBlock.settings = this.settings; 72 | BasicBlock.settings = this.settings; 73 | ClozeBlock.settings = this.settings; 74 | console.log("Plugin Settings:", this.settings) 75 | 76 | // -- Request Access -- 77 | await AnkiConnect.requestPermission(); 78 | 79 | // -- Create backup of Anki -- 80 | try { if (this.settings.backup) await AnkiConnect.createBackup(); } catch (e) { console.error(e); } 81 | 82 | // -- Create models if it doesn't exists -- 83 | await AnkiConnect.createModel("ObsidianAnkiSyncModel", ["oid", "Text", "Extra", "Breadcrumb", "Config", "Tobedefinedlater", "Tobedefinedlater2"], AnkiCardTemplates.frontTemplate, AnkiCardTemplates.backTemplate); 84 | 85 | // -- Recognize all different kinds of blocks and collect them -- 86 | var allBlocks: Block[] = []; 87 | for (var file of this.app.vault.getMarkdownFiles().filter((file) => {return !isPathChildOf(file.path, this.settings.templatefolder)})) { 88 | let fileContent = await this.app.vault.cachedRead(file); 89 | allBlocks = allBlocks.concat(await parseReplaceBlockInFile(this.app.vault, this.app.metadataCache, file, fileContent)); 90 | allBlocks = allBlocks.concat(await parseBasicBlockInFile(this.app.vault, this.app.metadataCache, file, fileContent)); 91 | allBlocks = allBlocks.concat(await parseClozeBlockInFile(this.app.vault, this.app.metadataCache, file, fileContent)); 92 | } 93 | console.log("Recognized Blocks:", allBlocks); 94 | 95 | // -- Declare some variables to keep track of different operations performed -- 96 | let created, updated, deleted, failedCreated, failedUpdated, failedDeleted: number; 97 | created = updated = deleted = failedCreated = failedUpdated = failedDeleted = 0; 98 | 99 | // -- Create or update notes in anki for all collected blocks -- 100 | for (var block of allBlocks) { 101 | let blockOId: string = await block.getOId(); 102 | let blockAnkiId: number = await block.getAnkiId(); 103 | if (blockOId == null || blockOId == "") { 104 | let new_blockOId; 105 | try { 106 | new_blockOId = await block.addInAnki(); 107 | console.log(`Added note with new oId ${new_blockOId}`); 108 | created++; 109 | } catch (e) { console.error(e); failedCreated++; } 110 | await block.updateOIdinObsidian(new_blockOId); 111 | } 112 | else if (blockAnkiId == null || isNaN(blockAnkiId)) { 113 | try { 114 | await block.addInAnki(); 115 | console.log(`Added note with old oId ${blockOId} since it's respective anki note was not found`); 116 | created++; 117 | } catch (e) { console.error(e); failedCreated++; } 118 | } 119 | else { 120 | try { 121 | await block.updateInAnki(); 122 | console.log(`Updated note with oId ${blockOId} and ankiId ${blockAnkiId}`); 123 | updated++; 124 | } catch (e) { console.error(e); failedUpdated++; } 125 | } 126 | } 127 | 128 | // -- Delete the deleted cards -- 129 | // Get all blocks again from obsidian 130 | allBlocks = []; 131 | for (var file of this.app.vault.getMarkdownFiles().filter((file) => {return !isPathChildOf(file.path, this.settings.templatefolder)})) { 132 | let fileContent = await this.app.vault.cachedRead(file); 133 | allBlocks = allBlocks.concat(await parseReplaceBlockInFile(this.app.vault, this.app.metadataCache, file, fileContent)); 134 | allBlocks = allBlocks.concat(await parseBasicBlockInFile(this.app.vault, this.app.metadataCache, file, fileContent)); 135 | allBlocks = allBlocks.concat(await parseClozeBlockInFile(this.app.vault, this.app.metadataCache, file, fileContent)); 136 | } 137 | // Get the anki ids of blocks 138 | let blockIds: number[] = []; 139 | for (var block of allBlocks) 140 | blockIds.push(await block.getAnkiId()); 141 | console.log("Recognized Block's AnkiId:", blockIds); 142 | // Get Anki Notes and their ids 143 | await AnkiConnect.invoke("reloadCollection", {}); 144 | let q = await AnkiConnect.query(`tag:${this.app.vault.getName().replace(/\s/g, "_")} note:ObsidianAnkiSyncModel tag:ObsidianAnkiSync`) 145 | let ankiIds: number[] = q.map(i => parseInt(i)); 146 | console.log("Anki Notes created by App:", ankiIds); 147 | // Delete anki notes created by app which are no longer in obsidian vault 148 | for (var ankiId of ankiIds) { 149 | if (!blockIds.includes(ankiId)) { 150 | try { 151 | await AnkiConnect.deteteNote(ankiId); 152 | console.log(`Deleted note with ankiId ${ankiId}`); 153 | deleted++; 154 | } catch (e) { console.error(e); failedDeleted++; } 155 | } 156 | } 157 | 158 | // -- Update Anki and show summery -- 159 | await AnkiConnect.invoke("removeEmptyNotes", {}); 160 | await AnkiConnect.invoke("reloadCollection", {}); 161 | let summery = `Sync Completed! \nCreated Blocks: ${created} Updated Blocks: ${updated} Deleted Blocks: ${deleted}\n`; 162 | if (failedCreated > 0) summery += `Failed Created Blocks: ${failedCreated}`; 163 | if (failedUpdated > 0) summery += `Failed Updated Blocks: ${failedUpdated}`; 164 | if (failedDeleted > 0) summery += `Failed Deleted Blocks: ${failedDeleted}`; 165 | if (failedCreated > 0 || failedUpdated > 0 || failedDeleted > 0) summery += `\nPlease create an issue at plugin's github reprository.`; 166 | new Notice(summery, 4000); 167 | console.log(summery); 168 | } 169 | } -------------------------------------------------------------------------------- /src/replaceblock.ts: -------------------------------------------------------------------------------- 1 | import { Block } from "./block"; 2 | import { MetadataCache, TFile, Vault } from 'obsidian'; 3 | import { getAttribInCommentLine, regexPraser } from './utils'; 4 | import { Remarkable } from 'remarkable'; 5 | import * as AnkiConnect from './AnkiConnect'; 6 | import { customAlphabet } from "nanoid"; 7 | import path from "path"; 8 | 9 | export class ReplaceBlock extends Block { 10 | original: string; 11 | 12 | constructor(vault: Vault, metadataCache: MetadataCache, file: TFile, original: string) { 13 | super(vault, metadataCache, file); 14 | this.original = original; 15 | } 16 | 17 | async addInAnki(): Promise { 18 | const nanoid = customAlphabet('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 17); 19 | let oid = this.getOId() || "Obs" + nanoid(); 20 | let text = this.toAnkiNoteContent(); 21 | console.debug(oid, text); 22 | let extra = Block.md_to_html(this.getAttrib("extra") || ""); 23 | console.debug(extra); 24 | let deck = this.getAttrib("deck") || this.getDocYAMLProp("deck") || "Default::ObsidianAnkiSync"; 25 | console.debug(deck); 26 | let uri = encodeURI(`obsidian://vault/${this.vault.getName()}/${this.file.path}`); 27 | let uri_html = `${this.vault.getName()} > ${this.file.path.replaceAll("\/", " > ")}`; 28 | console.debug(uri_html); 29 | let yamlTags = this.getDocYAMLProp("tags"); 30 | if (yamlTags == null) yamlTags = []; 31 | if (Array.isArray(yamlTags)) yamlTags = yamlTags.toString(); 32 | yamlTags = yamlTags.split(/[ ,]+/); 33 | let tags = [...yamlTags, this.vault.getName().replace(/\s/g, "_"), 'ObsidianAnkiSync', 'replaceblock']; 34 | console.debug(tags); 35 | let res = await AnkiConnect.addNote(oid, deck, "ObsidianAnkiSyncModel", { "oid": oid, "Text": text, "Extra": extra, "Breadcrumb": uri_html, "Config": JSON.stringify({}), "Tobedefinedlater": "Tobedefinedlater", "Tobedefinedlater2": "Tobedefinedlater2" }, tags); 36 | return oid; 37 | } 38 | 39 | async updateInAnki(): Promise { 40 | let oid = this.getOId(); 41 | let text = this.toAnkiNoteContent(); 42 | console.debug(oid, text); 43 | let extra = Block.md_to_html(this.getAttrib("extra") || ""); 44 | console.debug(extra); 45 | let deck = this.getAttrib("deck") || this.getDocYAMLProp("deck") || "Default::ObsidianAnkiSync"; 46 | console.debug(deck); 47 | let uri = encodeURI(`obsidian://vault/${this.vault.getName()}/${this.file.path}`); 48 | let uri_html = `${this.vault.getName()} > ${this.file.path.replaceAll("\/", " > ")}`; 49 | console.debug(uri_html); 50 | let yamlTags = this.getDocYAMLProp("tags"); 51 | if (yamlTags == null) yamlTags = []; 52 | if (Array.isArray(yamlTags)) yamlTags = yamlTags.toString(); 53 | yamlTags = yamlTags.split(/[ ,]+/); 54 | let tags = [...yamlTags, this.vault.getName().replace(/\s/g, "_"), 'ObsidianAnkiSync', 'replaceblock']; 55 | console.debug(tags); 56 | return await AnkiConnect.updateNote(await this.getAnkiId(), deck, "ObsidianAnkiSyncModel", { "oid": oid, "Text": text, "Extra": extra, "Breadcrumb": ReplaceBlock.settings.breadcrumb ? uri_html : "" }, tags); 57 | } 58 | 59 | toAnkiNoteContent(): string { 60 | let anki_content = this.original; 61 | 62 | // Remove All Comments 63 | const CommentsRegExp: RegExp = //gi // https://regexr.com/66vg3 64 | anki_content = anki_content.replaceAll(CommentsRegExp, ""); 65 | 66 | // Add the clozes braces to replace texts 67 | const ReplaceStatementRegExp: RegExp = //gi // https://regexr.com/66vg0 68 | let matches = [...this.original.matchAll(ReplaceStatementRegExp)]; 69 | matches.forEach((match) => { 70 | console.debug(match[0]); 71 | let replaceId = getAttribInCommentLine(match[0], "id") || 1; 72 | let replaceText = getAttribInCommentLine(match[0], "text") || regexPraser(getAttribInCommentLine(match[0], "regex")) || regexPraser("/$^/g"); 73 | let n = getAttribInCommentLine(match[0], "n") || "All"; 74 | if (n == "All") { 75 | anki_content = anki_content.replaceAll(replaceText, function (match) { 76 | return `{{c${replaceId}:: ${match} }}`; 77 | }); 78 | } 79 | else { 80 | let i = 0; 81 | anki_content = anki_content.replace(replaceText, function (match) { // https://stackoverflow.com/questions/10584748/find-and-replace-nth-occurrence-of-bracketed-expression-in-string/10585234 82 | return (i++ == n) ? `{{c${replaceId}:: ${match} }}` : match; 83 | }); 84 | } 85 | }); 86 | 87 | // Convert md to html 88 | anki_content = Block.md_to_html(anki_content) 89 | 90 | return anki_content; 91 | } 92 | } 93 | 94 | export async function parseReplaceBlockInFile(vault: Vault, metadataCache: MetadataCache, file: TFile, fileContent: string): Promise { 95 | var res: ReplaceBlock[] = []; 96 | const ReplaceBlockRegExp: RegExp = /(\n|.)*?/gi // https://regexr.com/5tace 97 | let matches = [...fileContent.matchAll(ReplaceBlockRegExp)]; 98 | matches.forEach((match) => { 99 | var block: ReplaceBlock = new ReplaceBlock(vault, metadataCache, file, match[0]) // , match.index, match[0].length 100 | res.push(block); 101 | }); 102 | return res; 103 | } -------------------------------------------------------------------------------- /src/templates/AnkiCardTemplates.ts: -------------------------------------------------------------------------------- 1 | // @ts-expect-error 2 | import frontTemplate from "./front_template.html"; 3 | // @ts-expect-error 4 | import backTemplate from "./back_template.html"; 5 | export class AnkiCardTemplates { 6 | static frontTemplate = frontTemplate; 7 | static backTemplate = backTemplate; 8 | }; -------------------------------------------------------------------------------- /src/templates/back_template.html: -------------------------------------------------------------------------------- 1 | 2 | {{Breadcrumb}} 3 | 4 | 5 | {{cloze:Text}} 6 | 7 |
8 | {{Extra}} 9 |
10 | 57 | 58 | 59 | 65 | 66 | -------------------------------------------------------------------------------- /src/templates/front_template.html: -------------------------------------------------------------------------------- 1 | 2 | {{Breadcrumb}} 3 | 4 | 5 | {{cloze:Text}} 6 | 7 | 54 | 55 | 56 | 62 | 63 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | import { DOMParser } from 'xmldom' 2 | 3 | export function getAttribInCommentLine(comment: String, attribute: string): any { 4 | const CommentsRegExp: RegExp = //gi // https://regexr.com/66vg3 5 | let matches = [...comment.matchAll(CommentsRegExp)]; 6 | let parser = new DOMParser({ 7 | locator: {}, 8 | errorHandler: { warning: function (w) { }, 9 | error: function (e) { }, 10 | fatalError: function (e) { console.error(e) } } 11 | }); 12 | let xmlStatement = parser.parseFromString("<" + matches[0][1].trim() + " />", "text/xml"); 13 | return xmlStatement.documentElement.getAttribute(attribute); 14 | } 15 | 16 | export function insertAttrib(comment: String, attribute: String, value: any) { 17 | const BlockStartCommentPartRegExp: RegExp = /