├── LICENSE ├── LICENSE.meta ├── README ├── README.meta ├── buttons ├── action │ ├── exclude.tid │ ├── modal │ │ └── options.tid │ ├── options.tid │ ├── repeat.tid │ ├── search.tid │ ├── startstudy.tid │ ├── stopstudy.tid │ └── unfold.tid └── editortoolbar │ ├── cloze.tid │ ├── select.tid │ └── type.tid ├── files ├── LICENSE ├── fsrs.js.cjs.production.min.js └── tiddlywiki.files ├── filters ├── fsrs.js ├── fsrs.js.meta ├── sortrandom.js └── sortrandom.js.meta ├── home.tid ├── icon.tid ├── icons ├── cloze.tid ├── exclude.tid ├── select.tid ├── start.tid ├── stop.tid ├── type.tid └── unfold.tid ├── languages └── en-GB.multids ├── macros.tid ├── notify ├── congratulation.tid └── leech.tid ├── plugin.info ├── styles.tid ├── tiddlers ├── configs │ ├── deckslibrary.tid │ ├── edittemplatefields.multids │ ├── filters │ │ ├── cascade │ │ │ ├── caption.tid │ │ │ └── card.tid │ │ ├── decktiddler.tid │ │ └── decktiddler │ │ │ ├── deckdue.tid │ │ │ ├── decklearn.tid │ │ │ ├── decklist.tid │ │ │ └── decknew.tid │ ├── pluginlibrary.tid │ ├── shortcutinfo.multids │ ├── shortcuts.multids │ └── viewtoolbarbuttons.multids ├── decks.tid └── decks │ └── default.tid └── ui ├── buttons ├── exclude.tid └── unfold.tid ├── edittemplate └── field.tid └── viewtemplate ├── button.tid ├── deck.tid ├── front.tid ├── shortcut.tid ├── study.tid ├── subtitle ├── due.tid └── review.tid ├── tiddler.tid └── tr.tid /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must next, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2023 [Guang Li](https://github.com/oflg) 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE.meta: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/license 2 | type: text/plain -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Installation and usage tutorial is available at [[Tidme Manual|https://oflg.github.io/Tidme/manual/]]. 2 | 3 | 可在 [[墨屉手册|https://oflg.github.io/Tidme/manual/zh-Hans]] 查看安装使用教程。 -------------------------------------------------------------------------------- /README.meta: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/readme 2 | type: text/vnd.tiddlywiki 3 | -------------------------------------------------------------------------------- /buttons/action/exclude.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/exclude 2 | icon: $:/plugins/tidme/fsrs4tw/icons/exclude 3 | description: {{$:/language/tidme/exclude}} 4 | condition: [!is[blank]] 5 | button-classes: tmc-button-hide 6 | code-body: yes 7 | 8 | \define tv-action-refresh-policy() always 9 | 10 | 11 | <$action-sendmessage 12 | $message="tm-add-tag" 13 | $param="!" 14 | $timestamp={{$:/config/TimestampDisable}} 15 | /> 16 | <$list 17 | filter="[] :cascade[{$:/config/Tidme/Filters/decklist}] +[match]" 18 | variable="ignore" 19 | > 20 | {{$:/plugins/tidme/fsrs4tw/buttons/action/startstudy}} 21 | 22 | <$action-sendmessage 23 | $message="tm-close-tiddler" 24 | /> -------------------------------------------------------------------------------- /buttons/action/modal/options.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/modal/options 2 | footer:
<$button message="tm-close-tiddler" class="tmc-btn-dirty"><$action-deletetiddler $tiddler=<>/>{{$:/language/Buttons/Delete/Caption}}
<$button message="tm-close-tiddler"><$action-deletetiddler $tiddler="$:/temp/tidme/options"/>{{$:/language/Buttons/Cancel/Caption}} <$button message="tm-close-tiddler" class="tmc-btn-primary"><$action-createtiddler $basetitle=<> $template="$:/temp/tidme/options" $overwrite="yes"/>{{$:/language/Buttons/Save/Caption}}
3 | subtitle: {{$:/language/tidme/options}}: <$text text=<> /> 4 | code-body: yes 5 | 6 | \define inputfield(field) 7 | <$edit-text 8 | tiddler="$:/temp/tidme/options" 9 | tag="input" 10 | field=<<__field__>> 11 | placeholder={{{ [get<__field__>] ~[[$:/Deck/default]get<__field__>] }}} 12 | /> 13 | \end 14 | 15 | \define textfield(field) 16 | <$edit-text 17 | tiddler="$:/temp/tidme/options" 18 | tag="textarea" 19 | field=<<__field__>> 20 | placeholder={{{ [get<__field__>] ~[[$:/Deck/default]get<__field__>] }}} 21 | minHeight={{$:/themes/tiddlywiki/vanilla/metrics/lineheight}} 22 | /> 23 | \end 24 | 25 | \define inputfield-noph(field) 26 | <$edit-text 27 | tiddler="$:/temp/tidme/options" 28 | tag="input" 29 | field=<<__field__>> 30 | /> 31 | \end 32 | 33 | \define textfield-noph(field) 34 | <$edit-text 35 | tiddler="$:/temp/tidme/options" 36 | tag="textarea" 37 | field=<<__field__>> 38 | minHeight={{$:/themes/tiddlywiki/vanilla/metrics/lineheight}} 39 | /> 40 | \end 41 | 42 | \define studyorder() 43 | <$select 44 | tiddler="$:/temp/tidme/options" 45 | field="order" 46 | default={{$:/Deck/default!!order}} 47 | > 48 | 51 | 54 | 57 | 58 | \end 59 | 60 | \define leechthreshold() 61 |
{{$:/language/tidme/leechthreshold}}: ''<$text text={{{ [{$:/temp/tidme/options!!leech_threshold}else{$:/Deck/default!!leech_threshold}] }}}/>''
62 | <$range 63 | tiddler="$:/temp/tidme/options" 64 | field="leech_threshold" 65 | min="3" 66 | max="10" 67 | default={{{ [get[leech_threshold]] ~[{$:/Deck/default!!leech_threshold}] }}} 68 | increment="1" 69 | /> 70 | \end 71 | 72 | \define disablededit(field) 73 | <$edit-text tiddler="$:/temp/tidme/options" tag="textarea" field=<<__field__>> placeholder={{{ [get<__field__>] ~[[$:/Deck/default]get<__field__>] }}} minHeight={{$:/themes/tiddlywiki/vanilla/metrics/lineheight}} disabled={{{ [{$:/config/Tidme/Options/expert}match[yes]then[no]else[yes]] }}}/> 74 | \end 75 | 76 | |tc-max-width tc-edit-max-width|k 77 | |{{$:/language/tidme/caption}}|<>| 78 | |{{$:/language/tidme/cardfilter}}|<>
@@font-size:10px;{{$:/language/tidme/cardfiltertip}}@@| 79 | |{{$:/language/tidme/description}}|<>| 80 | 81 | <$reveal 82 | default={{$:/config/Tidme/Options/advanced}} 83 | type="nomatch" 84 | text="yes" 85 | animate="yes" 86 | > 87 |
88 | <$button 89 | set="$:/config/Tidme/Options/advanced" 90 | setTo="yes" 91 | class="tc-btn-invisible" 92 | > 93 | {{$:/core/images/unfold-button}} 94 | 95 |
96 | 97 | 98 | <$reveal 99 | default={{$:/config/Tidme/Options/advanced}} 100 | type="match" 101 | text="yes" 102 | animate="yes" 103 | > 104 | 105 |
106 | <$button 107 | set="$:/config/Tidme/Options/advanced" 108 | setTo="no" 109 | class="tc-btn-invisible" 110 | > 111 | {{$:/core/images/fold-button}} 112 | 113 |
114 | 115 | 116 | !! {{$:/language/tidme/advanced}} 117 | 118 | !!! {{$:/language/tidme/studyorder}} 119 | 120 | |tc-max-width tc-edit-max-width|k 121 | |{{$:/language/tidme/cardstate}}|<>| 122 | 123 | !!! {{$:/language/tidme/displayorderfilter}} 124 | 125 | |tc-max-width tc-edit-max-width|k 126 | |{{$:/language/tidme/due}}|<>| 127 | |{{$:/language/tidme/new}}|<>| 128 | 129 | !!! {{$:/language/tidme/cardtypefilter}} 130 | 131 | |tc-max-width tc-edit-max-width|k 132 | |{{$:/language/tidme/exclude}}|<>| 133 | |{{$:/language/tidme/unfold}}|<>| 134 | 135 | !!! {{$:/language/tidme/action}} 136 | 137 | |tc-max-width tc-edit-max-width|k 138 | |{{$:/language/tidme/exclude}}|<>| 139 | |{{$:/language/tidme/unfold}}|<>| 140 | |{{$:/language/tidme/leech}}|<>
<>| 141 | 142 | 143 | !! {{$:/language/tidme/expert}} 144 | 145 | <$checkbox tiddler="$:/config/Tidme/Options/expert" field="text" checked="yes" unchecked="no" default="no"> @@color:red;font-size:10px;{{$:/language/tidme/experttip}}@@ 146 | 147 | !!! {{$:/language/tidme/cardstatefilter}} 148 | 149 | |tc-max-width tc-edit-max-width|k 150 | |{{$:/language/tidme/learn}}|<>| 151 | |{{$:/language/tidme/due}}|<>| 152 | |{{$:/language/tidme/new}}|<>| 153 | 154 | !!! {{$:/language/tidme/param}} 155 | 156 | |tc-max-width tc-edit-max-width|k 157 | |{{$:/language/tidme/fsrsparam}}|<>| 158 | 159 | 160 | -------------------------------------------------------------------------------- /buttons/action/options.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/options 2 | tags: $:/tags/TidmeDeck/Action 3 | list-before: 4 | icon: $:/core/images/options-button 5 | modal: $:/plugins/tidme/fsrs4tw/buttons/action/modal/options 6 | description: {{$:/language/tidme/options}} 7 | condition: [!is[blank]!match[$:/Deck/default]] 8 | button-classes: tmc-button-hide 9 | code-body: yes 10 | 11 | <$action-createtiddler $basetitle="$:/temp/tidme/options" $template=<> $overwrite="yes"/> -------------------------------------------------------------------------------- /buttons/action/repeat.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/repeat 2 | condition: [!is[blank]] 3 | button-classes: tc-tiddlylink 4 | code-body: yes 5 | 6 | \define tv-action-refresh-policy() always 7 | 8 | <$let 9 | rating_origin=<> 10 | rating={{{ [match[Again]then] ~[match[Hard]then] ~[match[Good]then] ~[[Easy]] }}} 11 | color={{{ [match[Again]then[red]] ~[match[Hard]then[orange]] ~[match[Good]then[green]] ~[[dodgerblue]] }}} 12 | > 13 | <$let 14 | currentTiddler=<> 15 | card={{{ [jsonget[Rating],] :map[jsonextract[Cards],,[card]] }}} 16 | review_log={{{ [jsonget[Rating],] :map[jsonextract[Cards],,[review_log]] }}} 17 | > 18 | <$list 19 | filter="[jsonget[lapses]compare:number:gteq]" 20 | variable="ignore" 21 | > 22 | <> 23 | <$action-sendmessage 24 | $message="tm-notify" 25 | $param="$:/plugins/tidme/fsrs4tw/notify/leech" 26 | /> 27 | 28 | <$action-setmultiplefields 29 | $fields="[jsonindexes[]] =annotate-colour" 30 | $values="[jsonindexes[]] :map[jsonget] =[]" 31 | $timestamp={{$:/config/TimestampDisable}} 32 | /> 33 | <$action-setfield 34 | $tiddler={{{ [addsuffix[/log/]addsuffix] }}} 35 | $index={{{ [] }}} 36 | $value={{{ [] }}} 37 | $timestamp={{$:/config/TimestampDisable}} 38 | /> 39 | <$action-sendmessage 40 | $message="tm-close-tiddler" 41 | /> 42 | <$action-deletetiddler 43 | $filter="[all[shadows+tiddlers]prefix[$:/temp/tidme/]]" 44 | /> 45 |
46 |
47 | <$text 48 | text={{{ [jsonget[due]format:relativedate[]] }}} 49 | /> 50 |
51 |
lowercase[]] }$` style=`color:$(color)$;`> 52 | <$text 53 | text={{{ [lowercase[]addprefix[$:/language/tidme/]get[text]] }}} 54 | /> 55 |
56 |
57 | 58 | 59 | <$list 60 | filter="[] :cascade[{$:/config/Tidme/Filters/decklist}] +[match]" 61 | variable="ignore" 62 | > 63 | {{$:/plugins/tidme/fsrs4tw/buttons/action/startstudy}} 64 |
65 | <$text text={{$:/language/tidme/next}}/> 66 |
67 | -------------------------------------------------------------------------------- /buttons/action/search.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/search 2 | tags: $:/tags/TidmeDeck/Action 3 | icon: $:/core/images/advanced-search-button 4 | description: {{$:/language/tidme/exportdelete}} 5 | condition: [!is[blank]] 6 | button-classes: tmc-button-hide 7 | code-body: yes 8 | 9 | 12 | 13 | <$action-setfield 14 | $tiddler="$:/temp/advancedsearch" 15 | text=<> 16 | /> 17 | <$action-setfield 18 | $tiddler="$:/temp/advancedsearch/input" 19 | text=<> 20 | /> 21 | <$action-setfield 22 | $tiddler="$:/temp/advancedsearch/refresh" 23 | text="yes" 24 | /> 25 | <$action-setfield 26 | $tiddler="$:/state/tab--1498284803" 27 | text="$:/core/ui/AdvancedSearch/Filter" 28 | /> 29 | <$action-navigate 30 | $to="$:/AdvancedSearch" 31 | $scroll="yes" 32 | /> 33 | <$action-sendmessage 34 | $message="tm-focus-selector" 35 | $param=".tc-advanced-search input" 36 | /> -------------------------------------------------------------------------------- /buttons/action/startstudy.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/startstudy 2 | tags: $:/tags/TidmeDeck/Study 3 | icon: $:/plugins/tidme/fsrs4tw/icons/start 4 | custom-caption: yes 5 | caption: {{$:/language/tidme/startstudy}} 6 | description: {{$:/language/tidme/startstudy}} 7 | condition: [!is[blank]] 8 | button-classes: tmc-button-show 9 | code-body: yes 10 | 11 | <$let 12 | nextTiddler={{{ [subfilterfirst[]] }}} 13 | > 14 | <$action-setfield 15 | $tiddler={{{ [addsuffix[/study]] }}} 16 | list={{{ [format:titlelist[]] }}} 17 | /> 18 | <$reveal 19 | default=<> 20 | type="nomatch" 21 | text="" 22 | > 23 | <$action-setfield 24 | $tiddler={{{ [addprefix[$:/state/folded/]] }}} 25 | text={{{ [subfiltermatchthen[show]else[hide]] }}} 26 | /> 27 | <$action-navigate 28 | $to=<> 29 | $scroll="yes" 30 | /> 31 | <$action-sendmessage 32 | $message="tm-focus-selector" 33 | $param=`[data-tiddler-title="$(nextTiddler)$"] .tmc-hideinput input` 34 | preventScroll="true" 35 | /> 36 | 37 | <$reveal 38 | default=<> 39 | type="match" 40 | text="" 41 | > 42 | <$action-sendmessage 43 | $message="tm-confetti-launch" 44 | /> 45 | <$action-sendmessage 46 | $message="tm-confetti-launch" 47 | originY=0.6 48 | spread=70 49 | delay=300 50 | /> 51 | <$action-sendmessage 52 | $message="tm-confetti-launch" 53 | originY=0.55 54 | spread=30 55 | delay=600 56 | /> 57 | <$action-sendmessage 58 | $message="tm-notify" 59 | $param="$:/plugins/tidme/fsrs4tw/notify/congratulation" 60 | /> 61 | 62 | 63 | -------------------------------------------------------------------------------- /buttons/action/stopstudy.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/stopstudy 2 | tags: $:/tags/TidmeDeck/Study 3 | icon: $:/plugins/tidme/fsrs4tw/icons/stop 4 | caption: {{$:/language/tidme/stopstudy}} 5 | description: {{$:/language/tidme/stopstudy}} 6 | condition: [addsuffix[/study]has[title]] 7 | button-classes: tmc-button-show 8 | code-body: yes 9 | 10 | <$action-deletetiddler 11 | $tiddler={{{ [addsuffix[/study]] }}} 12 | /> 13 | <$action-deletetiddler 14 | $filter="[all[shadows+tiddlers]prefix[$:/temp/tidme/]]" 15 | /> -------------------------------------------------------------------------------- /buttons/action/unfold.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/buttons/action/unfold 2 | icon: $:/plugins/tidme/fsrs4tw/icons/unfold 3 | description: {{$:/language/tidme/unfold}} 4 | condition: [!is[blank]] 5 | button-classes: tmc-button-hide 6 | code-body: yes 7 | 8 | \define tv-action-refresh-policy() always 9 | 10 | 11 | <$action-sendmessage 12 | $message="tm-add-tag" 13 | $param="." 14 | $timestamp={{$:/config/TimestampDisable}} 15 | /> -------------------------------------------------------------------------------- /buttons/editortoolbar/cloze.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/language/tidme/cloze}} 2 | condition: [] 3 | description: {{$:/language/tidme/clozetip}} 4 | icon: $:/plugins/tidme/fsrs4tw/icons/cloze 5 | shortcuts: ((tidme-cloze)) 6 | tags: $:/tags/EditorToolbar 7 | title: $:/plugins/tidme/fsrs4tw/buttons/editortoolbar/cloze 8 | 9 | <$action-sendmessage 10 | $message="tm-edit-text-operation" 11 | $param="wrap-selection" 12 | prefix="< -------------------------------------------------------------------------------- /buttons/editortoolbar/select.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/language/tidme/select}} 2 | condition: [] 3 | description: {{$:/language/tidme/selecttip}} 4 | icon: $:/plugins/tidme/fsrs4tw/icons/select 5 | list-after: $:/plugins/tidme/fsrs4tw/buttons/editortoolbar/cloze 6 | shortcuts: ((tidme-select)) 7 | tags: $:/tags/EditorToolbar 8 | title: $:/plugins/tidme/fsrs4tw/buttons/editortoolbar/select 9 | list-after: $:/plugins/tidme/fsrs4tw/buttons/editortoolbar/cloze 10 | 11 | <$action-sendmessage 12 | $message="tm-edit-text-operation" 13 | $param="wrap-selection" 14 | prefix='< -------------------------------------------------------------------------------- /buttons/editortoolbar/type.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/language/tidme/type}} 2 | condition: [] 3 | description: {{$:/language/tidme/typetip}} 4 | icon: $:/plugins/tidme/fsrs4tw/icons/type 5 | shortcuts: ((tidme-type)) 6 | tags: $:/tags/EditorToolbar 7 | title: $:/plugins/tidme/fsrs4tw/buttons/editortoolbar/type 8 | list-before: $:/plugins/tidme/fsrs4tw/buttons/editortoolbar/cloze 9 | 10 | <$action-sendmessage 11 | $message="tm-edit-text-operation" 12 | $param="insert-text" 13 | text="<>" 14 | /> -------------------------------------------------------------------------------- /files/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 open-spaced-repetition-scheduler 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /files/fsrs.js.cjs.production.min.js: -------------------------------------------------------------------------------- 1 | "use strict";function t(){return(t=Object.assign?Object.assign.bind():function(t){for(var e=1;e0?new Date(t.getTime()+24*e*60*60*1e3):new Date(t.getTime()+6e5),this.good.due=new Date(t.getTime()+24*i*60*60*1e3),this.easy.due=new Date(t.getTime()+24*a*60*60*1e3)},i.record_log=function(t,e){var i;return(i={})[exports.Rating.Again]=new s(this.again,new a(exports.Rating.Again,this.again.scheduled_days,t.elapsed_days,e,t.state)),i[exports.Rating.Hard]=new s(this.hard,new a(exports.Rating.Hard,this.hard.scheduled_days,t.elapsed_days,e,t.state)),i[exports.Rating.Good]=new s(this.good,new a(exports.Rating.Good,this.good.scheduled_days,t.elapsed_days,e,t.state)),i[exports.Rating.Easy]=new s(this.easy,new a(exports.Rating.Easy,this.easy.scheduled_days,t.elapsed_days,e,t.state)),i},e}(),r=function(){this.request_retention=.9,this.maximum_interval=36500,this.w=[.4,.6,2.4,5.8,4.93,.94,.86,.01,1.49,.14,.94,2.18,.05,.34,1.26,.29,2.61]},o=function(){function e(){this.p=new r}var i=e.prototype;return i.repeat=function(e,i){(e=t({},e)).elapsed_days=e.state===exports.State.New?0:(i.getTime()-e.last_review.getTime())/864e5,e.last_review=i,e.reps+=1;var a=new n(e);if(a.update_state(e.state),e.state===exports.State.New){this.init_ds(a),a.again.due=new Date(i.getTime()+6e4),a.hard.due=new Date(i.getTime()+3e5),a.good.due=new Date(i.getTime()+6e5);var s=this.next_interval(a.easy.stability);a.easy.scheduled_days=s,a.easy.due=new Date(i.getTime()+24*s*60*60*1e3)}else if(e.state===exports.State.Learning||e.state===exports.State.Relearning){var r=this.next_interval(a.good.stability),o=Math.max(this.next_interval(a.easy.stability),r+1);a.schedule(i,0,r,o)}else if(e.state===exports.State.Review){var h=e.difficulty,d=e.stability,l=Math.pow(1+e.elapsed_days/(9*d),-1);this.next_ds(a,h,d,l);var p=this.next_interval(a.hard.stability),y=this.next_interval(a.good.stability);p=Math.min(p,y),y=Math.max(y,p+1);var g=Math.max(this.next_interval(a.easy.stability),y+1);a.schedule(i,p,y,g)}return a.record_log(e,i)},i.init_ds=function(t){t.again.difficulty=this.init_difficulty(exports.Rating.Again),t.again.stability=this.init_stability(exports.Rating.Again),t.hard.difficulty=this.init_difficulty(exports.Rating.Hard),t.hard.stability=this.init_stability(exports.Rating.Hard),t.good.difficulty=this.init_difficulty(exports.Rating.Good),t.good.stability=this.init_stability(exports.Rating.Good),t.easy.difficulty=this.init_difficulty(exports.Rating.Easy),t.easy.stability=this.init_stability(exports.Rating.Easy)},i.next_ds=function(t,e,i,a){t.again.difficulty=this.next_difficulty(e,exports.Rating.Again),t.again.stability=this.next_forget_stability(e,i,a),t.hard.difficulty=this.next_difficulty(e,exports.Rating.Hard),t.hard.stability=this.next_recall_stability(e,i,a,exports.Rating.Hard),t.good.difficulty=this.next_difficulty(e,exports.Rating.Good),t.good.stability=this.next_recall_stability(e,i,a,exports.Rating.Good),t.easy.difficulty=this.next_difficulty(e,exports.Rating.Easy),t.easy.stability=this.next_recall_stability(e,i,a,exports.Rating.Easy)},i.init_stability=function(t){return Math.max(this.p.w[t-1],.1)},i.init_difficulty=function(t){return Math.min(Math.max(this.p.w[4]-this.p.w[5]*(t-3),1),10)},i.next_interval=function(t){return Math.min(Math.max(Math.round(9*t*(1/this.p.request_retention-1)),1),this.p.maximum_interval)},i.next_difficulty=function(t,e){return Math.min(Math.max(this.mean_reversion(this.p.w[4],t-this.p.w[6]*(e-3)),1),10)},i.mean_reversion=function(t,e){return this.p.w[7]*t+(1-this.p.w[7])*e},i.next_recall_stability=function(t,e,i,a){var s=a===exports.Rating.Hard?this.p.w[15]:1,n=a===exports.Rating.Easy?this.p.w[16]:1;return e*(1+Math.exp(this.p.w[8])*(11-t)*Math.pow(e,-this.p.w[9])*(Math.exp((1-i)*this.p.w[10])-1)*s*n)},i.next_forget_stability=function(t,e,i){return this.p.w[11]*Math.pow(t,-this.p.w[12])*(Math.pow(e+1,this.p.w[13])-1)*Math.exp((1-i)*this.p.w[14])},e}();exports.Card=function(){this.due=new Date,this.stability=0,this.difficulty=0,this.elapsed_days=0,this.scheduled_days=0,this.reps=0,this.lapses=0,this.state=exports.State.New,this.last_review=new Date},exports.FSRS=o; 2 | //# sourceMappingURL=fsrs.js.cjs.production.min.js.map 3 | -------------------------------------------------------------------------------- /files/tiddlywiki.files: -------------------------------------------------------------------------------- 1 | { 2 | "tiddlers": [ 3 | { 4 | "file": "fsrs.js.cjs.production.min.js", 5 | "fields": { 6 | "type": "application/javascript", 7 | "title": "$:/plugins/tidme/fsrs4tw/fsrs/fsrs.js", 8 | "module-type": "library" 9 | } 10 | },{ 11 | "file": "LICENSE", 12 | "fields": { 13 | "type": "text/plain", 14 | "title": "$:/plugins/tidme/fsrs4tw/fsrs/license" 15 | } 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /filters/fsrs.js: -------------------------------------------------------------------------------- 1 | /*\ 2 | Use Free Spaced Repetition Scheduler: https://github.com/open-spaced-repetition/free-spaced-repetition-scheduler 3 | \*/ 4 | 5 | /* 6 | Export our filter function 7 | */ 8 | (function () { 9 | 10 | /*jslint node: true, browser: true */ 11 | /*global $tw: false */ 12 | "use strict"; 13 | 14 | var fsrsJs = require("$:/plugins/tidme/fsrs4tw/fsrs/fsrs.js"); 15 | 16 | /* 17 | Export our filter function 18 | */ 19 | exports.fsrs = function (source, operator, options) { 20 | var Fsrs = new fsrsJs.FSRS(); 21 | var Rating = fsrsJs.Rating; 22 | var State = fsrsJs.State; 23 | var results = []; 24 | source(function (tiddler, title) { 25 | 26 | if (operator.operand) { 27 | let p = operator.operand; 28 | try { 29 | p = JSON.parse(p); 30 | if (typeof p == 'object' && p) { 31 | if (Object.keys(Fsrs.p).every(key => Object.keys(p).includes(key)) && p.w.length == Fsrs.p.w.length) { 32 | Fsrs.p = p; 33 | } 34 | } 35 | } catch (e) { 36 | console.log(e); 37 | } 38 | } 39 | 40 | var Card = new fsrsJs.Card(); 41 | 42 | try { 43 | let tw_card = tiddler.fields; 44 | 45 | function tw2fsrsDate(obj) { 46 | for (let key in obj) { 47 | if (key === "due" || key === "last_review" || key === "review") { 48 | obj[key] = $tw.utils.parseDate(String(obj[key])); 49 | } else if (typeof obj[key] === "object") { 50 | tw2fsrsDate(obj[key]); 51 | } 52 | } 53 | return obj; 54 | } 55 | 56 | if (Object.keys(Card).every(key => Object.keys(tw_card).includes(key))) { 57 | let result = {}; 58 | for (let key of Object.keys(Card)) { 59 | result[key] = Number(tw_card[key]); 60 | } 61 | Card = tw2fsrsDate(result); 62 | } 63 | } catch (e) { 64 | console.log(e); 65 | } 66 | 67 | var cards = Fsrs.repeat(Card, new Date()); 68 | 69 | function fsrs2twDate(obj) { 70 | for (let key in obj) { 71 | if (key === "due" || key === "last_review" || key === "review") { 72 | obj[key] = $tw.utils.stringifyDate(obj[key]); 73 | } else if (typeof obj[key] === "object") { 74 | fsrs2twDate(obj[key]); 75 | } 76 | } 77 | return obj; 78 | } 79 | 80 | var result = { 81 | Rating: Rating, 82 | State: State, 83 | P: Fsrs.p, 84 | Cards: fsrs2twDate(cards) 85 | } 86 | 87 | results.push(JSON.stringify(result)); 88 | }); 89 | return results; 90 | }; 91 | })(); -------------------------------------------------------------------------------- /filters/fsrs.js.meta: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/fiters/fsrs.js 2 | type: application/javascript 3 | module-type: filteroperator -------------------------------------------------------------------------------- /filters/sortrandom.js: -------------------------------------------------------------------------------- 1 | /*\ 2 | Filter operator for return a random title in the list. 3 | \*/ 4 | (function () { 5 | 6 | /*jslint node: true, browser: true */ 7 | /*global $tw: false */ 8 | "use strict"; 9 | 10 | /* 11 | Export our filter function 12 | */ 13 | exports.sortrandom = function (source, operator, options) { 14 | var results = []; 15 | 16 | source(function (tiddler, title) { 17 | results.push(title); 18 | }); 19 | 20 | results = results.sort(function () { 21 | return Math.random() - 0.5; 22 | }); 23 | 24 | return results; 25 | }; 26 | 27 | })(); -------------------------------------------------------------------------------- /filters/sortrandom.js.meta: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/fiters/sortrandom.js 2 | type: application/javascript 3 | module-type: filteroperator -------------------------------------------------------------------------------- /home.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/plugins/tidme/fsrs4tw/icon}} {{$:/language/tidme/tidme}} 2 | description: {{$:/language/tidme/tidmetip}} 3 | tags: $:/tags/PageControls 4 | title: $:/plugins/tidme/fsrs4tw/home 5 | 6 | \whitespace trim 7 | \define tidme-home-button(class) 8 | \whitespace trim 9 | <$button 10 | to="$:/Decks" 11 | tooltip={{$:/language/tidme/tidme}} 12 | aria-label={{$:/language/tidme/tidme}} 13 | class="""$(tv-config-toolbar-class)$ $class$""" 14 | > 15 | <$list 16 | filter="[match[yes]]" 17 | > 18 | {{$:/plugins/tidme/fsrs4tw/icon}} 19 | 20 | <$list 21 | filter="[match[yes]]" 22 | > 23 | 24 | <$text 25 | text={{$:/language/tidme/tidme}} 26 | /> 27 | 28 | 29 | 30 | \end 31 | 32 | <$list filter="[list] +[field:title[$:/Decks]]" emptyMessage=<>> 33 | <> 34 | -------------------------------------------------------------------------------- /icon.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Image 2 | title: $:/plugins/tidme/fsrs4tw/icon 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /icons/cloze.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/icons/cloze 2 | tags: $:/tags/Image 3 | 4 | 11 | 12 | 23 | < 24 | 25 | 36 | C 37 | 38 | 39 | -------------------------------------------------------------------------------- /icons/exclude.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Image 2 | title: $:/plugins/tidme/fsrs4tw/icons/exclude 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/select.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/icons/select 2 | tags: $:/tags/Image 3 | 4 | 11 | 12 | 23 | < 24 | 25 | 36 | S 37 | 38 | 39 | -------------------------------------------------------------------------------- /icons/start.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Image 2 | title: $:/plugins/tidme/fsrs4tw/icons/start 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/stop.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Image 2 | title: $:/plugins/tidme/fsrs4tw/icons/stop 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icons/type.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/icons/type 2 | tags: $:/tags/Image 3 | 4 | 11 | 12 | 23 | < 24 | 25 | 36 | T 37 | 38 | 39 | -------------------------------------------------------------------------------- /icons/unfold.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Image 2 | title: $:/plugins/tidme/fsrs4tw/icons/unfold 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /languages/en-GB.multids: -------------------------------------------------------------------------------- 1 | title: $:/language/tidme/ 2 | 3 | tidme: Tidme 4 | tidmetip: Lifelong knowledge, deep in mind 5 | default: Default 6 | defaulttip:
This is a non-customisable default deck, which can be customised with ''{{$:/language/tidme/createdeck}}''.
7 | deck: Deck 8 | learn: Learn 9 | due: Due 10 | new: New 11 | options: Options 12 | caption: Caption 13 | cardfilter: Card [[filter|https://tiddlywiki.com/#Introduction%20to%20filter%20notation]] 14 | cardfiltertip: Filtering tiddlers as cards in this Deck. 15 | description: Description 16 | advanced: Advanced 17 | studyorder: Study Order 18 | cardstate: Card state 19 | displayorderfilter: Display Order Filter 20 | random: Rando 21 | cardtypefilter: Card Type Filter 22 | exclude: Exclude 23 | excludetip: Exclude this card and not study it again 24 | unfold: Unfold 25 | unfoldtip: Unfold this card when studying 26 | action: [[Action|https://tiddlywiki.com/#ActionWidgets]] 27 | leech: Leech 28 | leechthreshold: Threshold 29 | expert: Expert 30 | experttip: I have fully understood the implications of the following expert options and accept the potentially damaging consequences. 31 | cardstatefilter: Card [[State|https://github.com/open-spaced-repetition/fsrs.js#usage]] Filter 32 | param: Param 33 | fsrsparam: [[FSRS algorithm|https://github.com/open-spaced-repetition/fsrs.js#usage]] 34 | exportdelete: Export or delete 35 | getshared: Get Shared 36 | createdeck: Create Deck 37 | createdecktip: Creating a new deck using the default deck as a template 38 | importfile: Import File 39 | startstudy: Start Study 40 | next: Next 41 | again: Again 42 | hard: Hard 43 | good: Good 44 | easy: Easy 45 | stopstudy: Stop Study 46 | type: Type Question 47 | typetip: Insert edit of Type Question(see manual for usage) 48 | cloze: Cloze Question 49 | clozetip: Set the selected text as cloze of Cloze Question(see manual for usage) 50 | select: Select Question 51 | selecttip: Set the selected text as options of Select Question(see manual for usage) 52 | lastdue: Due 53 | lastreview: Review 54 | pluginlibrary: Tidme Plugin Library 55 | pluginlibrarytip: This plugin library can be used to install and update plugins related to Tidme. 56 | deckslibrary: Shared Decks Library 57 | deckslibrarytip: This plugin library can be used to install and update shared decks related to Tidme. -------------------------------------------------------------------------------- /macros.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/macros 2 | tags: $:/tags/Global 3 | 4 | \whitespace trim 5 | 6 | \widget $fsrs4tw.repeat(ratings:'') 7 |
count[]compare:number:gt[1]then[tmc-repeat-wrapper]else[tmc-repeat-wrapper-1]] }}}> 8 | <$let 9 | cards_json={{{ [fsrs

] }}} 10 | > 11 | <$list 12 | filter=<> 13 | variable="rating" 14 | > 15 | {{$:/plugins/tidme/fsrs4tw/buttons/action/repeat||$:/plugins/tidme/fsrs4tw/ui/ViewTemplate/button}} 16 | 17 | 18 |

19 | \end 20 | 21 | \define C(hide,id:"default",show:"...") 22 | <$let 23 | inputTiddler={{{ [[$:/temp/tidme/study/input/]addsuffix] }}} 24 | > 25 | <% if [get[text]match[show]] %> 26 | __$hide$__ 27 | <% else %> 28 | <$button 29 | class="tc-btn-invisible" 30 | > 31 | <$action-setfield 32 | $tiddler=<> 33 | $index=<<__id__>> 34 | $value={{{ [getindex<__id__>match[show]then[]else[show]] }}} 35 | /> 36 | <% if [getindex<__id__>match[show]] %> 37 | 38 | __$hide$__ 39 | <% else %> 40 | `[$show$]` 41 | <% endif %> 42 | 43 | <% endif %> 44 | 45 | \end 46 | 47 | \define T(field:"text") 48 | <$let 49 | inputTiddler={{{ [[$:/temp/tidme/study/input/]addsuffix] }}} 50 | > 51 | <% if [get[text]match[hide]] %> 52 | <$edit 53 | tiddler=<> 54 | placeholder={{$:/language/EditTemplate/Body/Placeholder}} 55 | minHeight={{$:/themes/tiddlywiki/vanilla/metrics/fontsize}} 56 | class="tc-edit-texteditor tc-edit-texteditor-body" 57 | > 58 | 59 | <% elseif [get[text]match[show]] %> 60 | <% if [get[text]] %> 61 | <$diff-text 62 | source={{{ [get[text]] }}} 63 | dest={{!!$field$}} 64 | /> 65 | <% endif %> 66 | <% endif %> 67 | 68 | \end 69 | 70 | \define S(option,answer:"") 71 | <$let 72 | inputTiddler={{{ [[$:/temp/tidme/study/input/]addsuffix] }}} 73 | > 74 | <$list 75 | filter="[<__option__>trim[]splitregexp[\n]]" 76 | variable="optioncontent" 77 | counter="optionid" 78 | > 79 |
80 | <$let 81 | selectid={{{ [<__answer__>split[]count[]match[1]then[id]else] }}} 82 | > 83 | <% if [get[text]match[show]] %> 84 | <$button 85 | disabled="yes" 86 | class="tc-btn-invisible" 87 | > 88 | <% if [<__answer__>split[]search-replace[A],[1]search-replace[B],[2]search-replace[C],[3]search-replace[D],[4]search-replace[E],[5]search-replace[F],[6]search-replace[G],[7]search-replace[H],[8]search-replace[I],[9]match] %> 89 | <% if [getindexmatch] %> 90 | {{$:/core/images/done-button}} 91 | <% else %> 92 | {{$:/core/images/warning}} 93 | <% endif %> 94 | <% else %> 95 | <% if [getindexmatch] %> 96 | {{$:/core/images/close-button}} 97 | <% else %> 98 | {{$:/core/images/blank}} 99 | <% endif %> 100 | <% endif %> 101 | <> 102 | <% else %> 103 | <% if [<__answer__>split[]count[]compare:number:lteq[1]] %> 104 | <$radio 105 | tiddler=<> 106 | index=<> 107 | value=<> 108 | default="" 109 | > 110 | <> 111 | 112 | <% else %> 113 | <$checkbox 114 | tiddler=<> 115 | index=<> 116 | checked=<> 117 | unchecked="" 118 | default="" 119 | > 120 | <> 121 | 122 | <% endif %> 123 | <% endif %> 124 | 125 | 126 | 127 | \end -------------------------------------------------------------------------------- /notify/congratulation.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/notify/congratulation 2 | 3 | !! Congratulations! 4 | 5 | !!! You have now finished studying this deck. 6 | 7 | If you wish to study outside of the regular schedule, you can use the Options feature. 8 | -------------------------------------------------------------------------------- /notify/leech.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/notify/leech 2 | 3 | !! Warning! 4 | 5 | !!! The card that was just rated Again reached Leech Count and triggered Leech Action. 6 | 7 | Please optimise its quality to learn better! 8 | -------------------------------------------------------------------------------- /plugin.info: -------------------------------------------------------------------------------- 1 | { 2 | "author": "oflg", 3 | "core-version": ">=5.3.2", 4 | "dependents": "$:/plugins/tiddlywiki/confetti $:/plugins/tiddlywiki/browser-sniff", 5 | "description": "TiddlyWiki-based memory programme using advanced FSRS algorithm", 6 | "list": "readme license", 7 | "name": "Tidme Core", 8 | "plugin-type": "plugin", 9 | "source": "https://github.com/oflg/Tidme", 10 | "title": "$:/plugins/tidme/fsrs4tw", 11 | "version": "1.5.6" 12 | } 13 | -------------------------------------------------------------------------------- /styles.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/Stylesheet 2 | title: $:/plugins/tidme/fsrs4tw/styles.css 3 | 4 | .tmc-thead{ 5 | display:flex; 6 | justify-content: space-between; 7 | align-items:center; 8 | font-weight: bold; 9 | border-bottom: 1px solid <>; 10 | padding-bottom:10px; 11 | } 12 | 13 | .tmc-tr{ 14 | display:flex; 15 | justify-content: space-between; 16 | align-items:center; 17 | padding:10px 0; 18 | } 19 | 20 | .tmc-tr .tmc-button-show{ 21 | margin: 0 3px !important; 22 | flex-shrink: 0; 23 | } 24 | 25 | .tmc-tr .tmc-button-hide{ 26 | opacity: 0; 27 | margin: 0 3px !important; 28 | flex-shrink: 0; 29 | } 30 | 31 | .tmc-tr:hover { 32 | background-color: <>; 33 | } 34 | 35 | .tmc-tr:hover .tmc-button-hide{ 36 | opacity: 1 !important; 37 | } 38 | 39 | .tmc-tr-deck{ 40 | flex:0 1 40%; 41 | display: flex; 42 | justify-content:flex-start; 43 | } 44 | 45 | 46 | .tmc-tr-study{ 47 | flex:0 1 15%; 48 | display: flex; 49 | justify-content:center; 50 | } 51 | 52 | .tmc-tr-action{ 53 | flex:0 1 15%; 54 | display: flex; 55 | justify-content:flex-end; 56 | } 57 | 58 | 59 | 60 | .tmc-btn-primary { 61 | background: <>; 62 | color: <>; 63 | fill: <>; 64 | } 65 | 66 | .tmc-btn-dirty { 67 | background: <>; 68 | color: <>; 69 | fill: <>; 70 | } 71 | 72 | .tmc-btn-dirty { 73 | background: <>; 74 | color: <>; 75 | fill: <>; 76 | } 77 | 78 | .tmc-repeat-wrapper{ 79 | display:flex; 80 | justify-content: space-between; 81 | flex-wrap: nowrap; 82 | align-items: flex-end; 83 | } 84 | 85 | .tmc-repeat-wrapper-1{ 86 | display:flex; 87 | justify-content:center; 88 | align-items: flex-end; 89 | } 90 | 91 | .tmc-decks-button-wrapper{ 92 | display:flex; 93 | justify-content: space-around; 94 | align-items: baseline; 95 | } 96 | 97 | .tmc-file-input-wrapper { 98 | position: relative; 99 | overflow: hidden; 100 | vertical-align: middle; 101 | } 102 | 103 | .tmc-file-input-wrapper input[type=file] { 104 | position: absolute; 105 | top: 0; 106 | left: 0; 107 | right: 0; 108 | bottom: 0; 109 | font-size: 999px; 110 | max-width: 100%; 111 | max-height: 100%; 112 | filter: alpha(opacity=0); 113 | opacity: 0; 114 | outline: none; 115 | background: white; 116 | cursor: pointer; 117 | display: inline-block; 118 | } 119 | 120 | .tmc-title-hide ~ .tc-tiddler-title .tc-title{ 121 | color: <> !important; 122 | font-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}} !important; 123 | } 124 | 125 | .tmc-title-hide ~ .tc-tiddler-title .tc-title .tc-system-title-prefix{ 126 | color: <> !important; 127 | font-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}} !important; 128 | } 129 | 130 | .tmc-hideinput input{ 131 | display: block; 132 | outline: none; 133 | border: none; 134 | width:100%; 135 | text-align:center; 136 | color:grey; 137 | font-size:9px; 138 | } 139 | 140 | .tmc-text-sg{ 141 | font-size:9px; 142 | color:grey; 143 | } -------------------------------------------------------------------------------- /tiddlers/configs/deckslibrary.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/language/tidme/deckslibrary}} 2 | tags: $:/tags/PluginLibrary 3 | title: $:/config/Tidme/Libraries/decks 4 | url: https://oflg.github.io/Tidme-decks/library/ 5 | 6 | {{$:/language/tidme/deckslibrarytip}} -------------------------------------------------------------------------------- /tiddlers/configs/edittemplatefields.multids: -------------------------------------------------------------------------------- 1 | title: $:/config/EditTemplateFields/Visibility/ 2 | 3 | difficulty: hide 4 | due: hide 5 | elapsed_days: hide 6 | lapses: hide 7 | last_review: hide 8 | reps: hide 9 | scheduled_days: hide 10 | stability: hide 11 | state: hide 12 | card: hide 13 | card_unfold: hide 14 | card_exclude: hide 15 | order: hide 16 | order_learn: hide 17 | order_new: hide 18 | order_due: hide 19 | leech_threshold: hide 20 | leech_action: hide 21 | state_learn: hide 22 | state_due: hide 23 | state_new: hide 24 | p: hide -------------------------------------------------------------------------------- /tiddlers/configs/filters/cascade/caption.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/FieldEditorFilter 2 | title: $:/config/Tidme/FieldEditorFilters/caption 3 | list-before: $:/config/FieldEditorFilters/default 4 | 5 | [!has:field[caption]then[$:/core/ui/EditTemplate/fieldEditor/default]] ~[match[caption]then[$:/plugins/tidme/fsrs4tw/ui/EditTemplate/field]] -------------------------------------------------------------------------------- /tiddlers/configs/filters/cascade/card.tid: -------------------------------------------------------------------------------- 1 | code-body: yes 2 | list-before: $:/config/StoryTiddlerTemplateFilters/default 3 | list-after: $:/config/StoryTiddlerTemplateFilters/draft 4 | tags: $:/tags/StoryTiddlerTemplateFilter 5 | title: $:/config/Tidme/StoryTiddlerTemplateFilters/card 6 | 7 | [subfilter{$:/config/Tidme/Filters/decktiddler}then[$:/plugins/tidme/fsrs4tw/ui/ViewTemplate/tiddler]] -------------------------------------------------------------------------------- /tiddlers/configs/filters/decktiddler.tid: -------------------------------------------------------------------------------- 1 | title: $:/config/Tidme/Filters/decktiddler 2 | 3 | [] :cascade[all[shadows+tiddlers]tag[$:/tags/TidmeFilter/DeckTiddler]!is[draft]get[text]] +[!is[blank]] -------------------------------------------------------------------------------- /tiddlers/configs/filters/decktiddler/deckdue.tid: -------------------------------------------------------------------------------- 1 | title: $:/config/Tidme/Filters/deckdue 2 | tags: $:/tags/TidmeFilter/DeckTiddler 3 | list-after: $:/config/Tidme/Filters/decklearn 4 | 5 | [all[shadows+tiddlers]removesuffix[/study]tag[$:/tags/TidmeDeck]] :filter[subfilter{!!card}!subfilter{!!card_exclude}subfilter{!!state_due}match<..currentTiddler>] -------------------------------------------------------------------------------- /tiddlers/configs/filters/decktiddler/decklearn.tid: -------------------------------------------------------------------------------- 1 | title: $:/config/Tidme/Filters/decklearn 2 | tags: $:/tags/TidmeFilter/DeckTiddler 3 | list-after: $:/config/Tidme/Filters/decklist 4 | 5 | [all[shadows+tiddlers]removesuffix[/study]tag[$:/tags/TidmeDeck]] :filter[subfilter{!!card}!subfilter{!!card_exclude}subfilter{!!state_learn}match<..currentTiddler>] -------------------------------------------------------------------------------- /tiddlers/configs/filters/decktiddler/decklist.tid: -------------------------------------------------------------------------------- 1 | title: $:/config/Tidme/Filters/decklist 2 | tags: $:/tags/TidmeFilter/DeckTiddler 3 | list-before: 4 | 5 | [listed[]removesuffix[/study]tag[$:/tags/TidmeDeck]!is[blank]] -------------------------------------------------------------------------------- /tiddlers/configs/filters/decktiddler/decknew.tid: -------------------------------------------------------------------------------- 1 | title: $:/config/Tidme/Filters/decknew 2 | tags: $:/tags/TidmeFilter/DeckTiddler 3 | list-after: $:/config/Tidme/Filters/deckdue 4 | 5 | [all[shadows+tiddlers]removesuffix[/study]tag[$:/tags/TidmeDeck]] :filter[subfilter{!!card}!subfilter{!!card_exclude}subfilter{!!state_new}match<..currentTiddler>] -------------------------------------------------------------------------------- /tiddlers/configs/pluginlibrary.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/language/tidme/pluginlibrary}} 2 | tags: $:/tags/PluginLibrary 3 | title: $:/config/Tidme/library 4 | url: https://oflg.github.io/Tidme/library/ 5 | 6 | {{$:/language/tidme/pluginlibrarytip}} -------------------------------------------------------------------------------- /tiddlers/configs/shortcutinfo.multids: -------------------------------------------------------------------------------- 1 | title: $:/config/ShortcutInfo/ 2 | 3 | tidme-stopstudy: {{$:/language/tidme/stopstudy}} 4 | tidme-fold: {{$:/language/Buttons/Fold/Hint}} 5 | tidme-again: {{$:/language/tidme/again}} 6 | tidme-hard: {{$:/language/tidme/hard}} 7 | tidme-good: {{$:/language/tidme/good}} 8 | tidme-easy: {{$:/language/tidme/easy}} 9 | tidme-next: {{$:/language/tidme/next}} 10 | tidme-exclude: {{$:/language/tidme/exclude}} 11 | tidme-unfold: {{$:/language/tidme/unfold}} 12 | tidme-type: {{$:/language/tidme/type}} 13 | tidme-cloze: {{$:/language/tidme/cloze}} 14 | tidme-select: {{$:/language/tidme/select}} -------------------------------------------------------------------------------- /tiddlers/configs/shortcuts.multids: -------------------------------------------------------------------------------- 1 | title: $:/config/shortcuts/ 2 | 3 | tidme-stopstudy: p 4 | tidme-fold: Space 5 | tidme-again: 1 6 | tidme-hard: 2 7 | tidme-good: 3 8 | tidme-easy: 4 9 | tidme-next: n 10 | tidme-exclude: e 11 | tidme-unfold: u 12 | tidme-type: alt-t 13 | tidme-cloze: alt-c 14 | tidme-select: alt-s -------------------------------------------------------------------------------- /tiddlers/configs/viewtoolbarbuttons.multids: -------------------------------------------------------------------------------- 1 | title: $:/config/ViewToolbarButtons/Visibility/$:/plugins/tidme/fsrs4tw/core/ui/Buttons/ 2 | 3 | exclude: hide 4 | unfold: hide -------------------------------------------------------------------------------- /tiddlers/decks.tid: -------------------------------------------------------------------------------- 1 | title: $:/Decks 2 | icon: $:/plugins/tidme/fsrs4tw/icon 3 | 4 |
5 |
6 | {{$:/language/tidme/deck}} 7 |
8 |
9 | {{$:/language/tidme/learn}} 10 |
11 |
12 | {{$:/language/tidme/due}} 13 |
14 |
15 | {{$:/language/tidme/new}} 16 |
17 |
18 | 19 |
20 |
21 | 22 | <> 23 | 24 |
25 | <$button 26 | message="tm-modal" 27 | param="$:/core/ui/ControlPanel/Modals/AddPlugins" 28 | tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} 29 | class="tc-btn-invisible tc-tiddlylink" 30 | > 31 | {{$:/language/tidme/getshared}} 32 | 33 | <$button 34 | class="tc-btn-invisible tc-tiddlylink" 35 | tooltip={{$:/language/tidme/createdecktip}} 36 | > 37 | <$action-createtiddler 38 | $basetitle="$:/Deck/new" 39 | $template="$:/Deck/default" 40 | caption="" 41 | description="" 42 | /> 43 | {{$:/language/tidme/createdeck}} 44 | 45 | <$button 46 | class="tc-btn-invisible tc-tiddlylink" 47 | > 48 |
49 | <$browse 50 | tooltip={{$:/language/Buttons/Import/Hint}} 51 | /> 52 | {{$:/language/tidme/importfile}} 53 |
54 | 55 |
-------------------------------------------------------------------------------- /tiddlers/decks/default.tid: -------------------------------------------------------------------------------- 1 | title: $:/Deck/default 2 | tags: $:/tags/TidmeDeck 3 | caption: {{$:/language/tidme/default}} 4 | description: {{$:/language/tidme/defaulttip}} 5 | card: [all[shadows+tiddlers]tag[?]] 6 | card_unfold: [tag[.]] 7 | card_exclude: [tag[!]] 8 | order: due-new 9 | order_learn: [sort[due]] 10 | order_new: [sortan[title]] 11 | order_due: [sort[due]] 12 | exclude_action: {{$:/plugins/tidme/fsrs4tw/buttons/action/exclude}} 13 | unfold_action: {{$:/plugins/tidme/fsrs4tw/buttons/action/unfold}} 14 | leech_threshold: 8 15 | leech_action: {{$:/plugins/tidme/fsrs4tw/buttons/action/exclude}} 16 | state_learn: [state[1]] [state[3]] :filter[{!!due}compare:date:lt] 17 | state_due: [state[2]has[due]] -[!days:due[1]] 18 | state_new: [!has[state]] [state[0]] 19 | p:{"request_retention":0.9,"maximum_interval":36500,"w":[0.4,0.6,2.4,5.8,4.93,0.94,0.86,0.01,1.49,0.14,0.94,2.18,0.05,0.34,1.26,0.29,2.61]} -------------------------------------------------------------------------------- /ui/buttons/exclude.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/plugins/tidme/fsrs4tw/icons/exclude}} {{$:/language/tidme/exclude}} 2 | description: {{$:/language/tidme/excludetip}} 3 | tags: $:/tags/ViewToolbar 4 | title: $:/plugins/tidme/fsrs4tw/core/ui/Buttons/exclude 5 | 6 | \whitespace trim 7 | 8 | <$list 9 | filter="[!is[blank]]" 10 | variable="studyTiddler" 11 | > 12 | <$fieldmangler> 13 | <$button 14 | tooltip={{$:/language/tidme/excludetip}} 15 | aria-label={{$:/language/tidme/exclude}} 16 | class=<> 17 | > 18 | <$let 19 | currentTiddler=<> 20 | > 21 | <> 22 | 23 | <$list 24 | filter="[match[yes]]" 25 | > 26 | {{$:/plugins/tidme/fsrs4tw/icons/exclude}} 27 | 28 | <$list 29 | filter="[match[yes]]" 30 | > 31 | 32 | <$text 33 | text={{$:/language/tidme/exclude}} 34 | /> 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ui/buttons/unfold.tid: -------------------------------------------------------------------------------- 1 | caption: {{$:/plugins/tidme/fsrs4tw/icons/unfold}} {{$:/language/tidme/unfold}} 2 | description: {{$:/language/tidme/unfoldtip}} 3 | tags: $:/tags/ViewToolbar 4 | title: $:/plugins/tidme/fsrs4tw/core/ui/Buttons/unfold 5 | 6 | \whitespace trim 7 | 8 | <$list 9 | filter="[!is[blank]]" 10 | variable="studyTiddler" 11 | > 12 | <$fieldmangler> 13 | <$button 14 | tooltip={{$:/language/tidme/unfoldtip}} 15 | aria-label={{$:/language/tidme/unfold}} 16 | class=<> 17 | > 18 | <$let 19 | currentTiddler=<> 20 | > 21 | <> 22 | 23 | <$list 24 | filter="[match[yes]]" 25 | > 26 | {{$:/plugins/tidme/fsrs4tw/icons/unfold}} 27 | 28 | <$list 29 | filter="[match[yes]]" 30 | > 31 | 32 | <$text 33 | text={{$:/language/tidme/unfold}} 34 | /> 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /ui/edittemplate/field.tid: -------------------------------------------------------------------------------- 1 | list-after: $:/core/ui/EditTemplate/title 2 | title: $:/plugins/tidme/fsrs4tw/ui/EditTemplate/field 3 | code-body: yes 4 | 5 | \define config-visibility-title() 6 | $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$ 7 | \end 8 | 9 | \define importFileActions() 10 | <$action-popup $state=<> $coords="(0,0,0,0)" $floating="yes"/> 11 | \end 12 | 13 | \whitespace trim 14 | <$let 15 | editPreviewStateTiddler={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[] }}} 16 | importTitle=<> 17 | importState=<> 18 | > 19 | <$dropzone 20 | importTitle=<> 21 | autoOpenOnImport="no" 22 | contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} 23 | class="tc-dropzone-editor" 24 | enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} 25 | filesOnly="yes" 26 | actions=<> 27 | > 28 |
29 |
get[text]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}> 30 | <$edit 31 | field="caption" 32 | tag="textarea" 33 | minHeight={{$:/themes/tiddlywiki/vanilla/metrics/lineheight}} 34 | class="tc-edit-texteditor tc-edit-texteditor-body" 35 | placeholder={{$:/language/tidme/captionplaceholder}} 36 | tabindex={{$:/config/EditTabIndex}} 37 | focus={{{ [{$:/config/AutoFocus}match[text]then[true]] ~[[false]] }}} 38 | cancelPopups="yes" 39 | fileDrop={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} 40 | > 41 | <$list 42 | filter="[has:field[caption]]" 43 | variable="ignore" 44 | > 45 | <$set 46 | name="targetTiddler" 47 | value=<> 48 | > 49 | <$list 50 | filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!is[draft]]" 51 | > 52 | <$reveal 53 | type="nomatch" 54 | state=<> 55 | text="hide" 56 | class="tc-text-editor-toolbar-item-wrapper" 57 | > 58 | <$transclude 59 | tiddler="$:/core/ui/EditTemplate/body/toolbar/button" 60 | mode="inline" 61 | /> 62 | 63 | 64 | <$list 65 | filter="[all[shadows+tiddlers]tag[$:/tags/EditorTools]!is[draft]]" 66 | > 67 | <$list 68 | filter={{!!condition}} 69 | variable="list-condition" 70 | > 71 | <$transclude/> 72 | 73 | 74 | 75 | 76 | 77 | <$list 78 | filter="[get[text]match[yes]]" 79 | variable="ignore" 80 | > 81 |
82 | <$transclude 83 | field="caption" 84 | /> 85 |
86 | 87 |
88 |
89 | 90 | -------------------------------------------------------------------------------- /ui/viewtemplate/button.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/button 2 | code-body: yes 3 | 4 | \define tidme-button-icon() 5 | <$list 6 | filter="[!match[yes]]" 7 | variable="no-custom-icon" 8 | > 9 | <$transclude 10 | tiddler={{!!icon}} 11 | /> 12 | 13 | \end 14 | 15 | \define tidme-button-caption() 16 | <$list 17 | filter="[!match[yes]]" 18 | variable="no-custom-caption" 19 | > 20 | <$wikify 21 | name="caption-text" 22 | text={{!!caption}} 23 | mode="inline" 24 | output="text" 25 | > 26 | <> 27 | 28 | 29 | \end 30 | 31 | \define tidme-button-tooltip() 32 | {{!!description}} <$macrocall 33 | $name="displayshortcuts" 34 | $output="text/plain" 35 | shortcuts={{!!key}} 36 | prefix="` - [" 37 | separator="] [" 38 | suffix="]`" 39 | /> 40 | \end 41 | 42 | \define tidme-button() 43 | <$list 44 | filter={{!!condition}} 45 | variable="list-condition" 46 | > 47 | <$wikify 48 | name="tooltip-text" 49 | text=<> 50 | mode="inline" 51 | output="text" 52 | > 53 | <$list 54 | filter="[all[current]!has[popup]!has[modal]]" 55 | variable="no-popup-modal" 56 | > 57 | <$set 58 | name=disabled 59 | filter={{!!condition-disabled}} 60 | > 61 | <$button 62 | class="tc-btn-invisible $(buttonClasses)$" 63 | tooltip=<> 64 | aria-label=<> 65 | actions={{!!actions}} 66 | disabled=<> 67 | > 68 | <> 69 | <> 70 | <$transclude 71 | tiddler=<> 72 | field="text" 73 | /> 74 | 75 | 76 | 77 | <$list 78 | filter="[all[current]has[popup]]" 79 | variable="popup" 80 | > 81 | <$set 82 | name="popup-state" 83 | value=<> 84 | > 85 | <$set 86 | name=disabled 87 | filter={{!!condition-disabled}} 88 | > 89 | <$button 90 | popup=<> 91 | class="tc-popup-keep tc-btn-invisible $(buttonClasses)$" 92 | selectedClass="tc-selected" 93 | tooltip=<> 94 | actions={{!!actions}} 95 | disabled=<> 96 | > 97 | <> 98 | <> 99 | <$transclude 100 | tiddler=<> 101 | field="text" 102 | /> 103 | 104 | 105 | <$reveal 106 | state=<> 107 | type="popup" 108 | position={{{ [{!!position}] ~[[below]] }}} 109 | animate="yes" 110 | tag="span" 111 | > 112 |
116 | <$transclude 117 | tiddler={{!!popup}} 118 | mode="inline" 119 | /> 120 |
121 | 122 | 123 | 124 | <$list 125 | filter="[all[current]has[modal]]" 126 | variable="modal" 127 | > 128 | <$set 129 | name=disabled 130 | filter={{!!condition-disabled}} 131 | > 132 | <$button 133 | class="tc-btn-invisible $(buttonClasses)$" 134 | tooltip=<> 135 | aria-label=<> 136 | actions={{!!actions}} 137 | disabled=<> 138 | > 139 | <> 140 | <> 141 | <$transclude 142 | tiddler=<> 143 | field="text" 144 | /> 145 | <$action-sendmessage $message="tm-modal" $param={{!!modal}} deckTiddler=<>/> 146 | 147 | 148 | 149 | 150 | 151 | \end 152 | 153 | \define tidme-button-outer() 154 | 155 | <$wikify 156 | name="buttonClasses" 157 | text={{!!button-classes}} 158 | mode="inline" 159 | output="text" 160 | > 161 | <> 162 | 163 | \end 164 | 165 | <> -------------------------------------------------------------------------------- /ui/viewtemplate/deck.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/deck 2 | tags: $:/tags/ViewTemplate 3 | list-before: $:/core/ui/ViewTemplate/body 4 | code-body: yes 5 | 6 | <$list 7 | filter="[tag[$:/tags/TidmeDeck]]" 8 | variable="deckTiddler" 9 | > 10 | <$reveal 11 | type="nomatch" 12 | stateTitle=<> 13 | text="hide" 14 | default="show" 15 | animate="yes" 16 | > 17 |
18 |
19 |

20 | <$wikify 21 | name="deckCaption" 22 | text={{{ [get[caption]] ~[split[/]last[]] }}} 23 | mode="inline" 24 | output="text" 25 | > 26 | <> 27 | 28 |

29 |
30 |
31 | <$text 32 | text={{{ [get[card]] }}} 33 | /> 34 |
35 |
36 | <$let 37 | filter_search=`[[$(deckTiddler)$]] [[$(deckTiddler)$]shadowsource[]] [subfilter{$(deckTiddler)$!!card}is[tiddler]] [[$(deckTiddler)$]shadowsource[]plugintiddlers[]is[tiddler]] +[!prefix[$:/plugins/tidme/]]` 38 | > 39 | <$list 40 | filter="[all[shadows+tiddlers]tag[$:/tags/TidmeDeck/Action]!is[draft]]" 41 | template="$:/plugins/tidme/fsrs4tw/ui/ViewTemplate/button" 42 | /> 43 | 44 |
45 |
46 | 47 |
{{!!description}}
48 | <$let 49 | filter_learn=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_learn}sort[due]]` 50 | filter_due=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_due}subfilter{$(deckTiddler)$!!order_due}]` 51 | filter_new=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_new}subfilter{$(deckTiddler)$!!order_new}]` 52 | filter_unfold=`[subfilter{$(deckTiddler)$!!card_unfold}]` 53 | filter_random=`[subfilter] [subfilter] +[sortrandom[]]` 54 | due-new=`$(filter_learn)$ $(filter_due)$ $(filter_new)$` 55 | new-due=`$(filter_learn)$ $(filter_new)$ $(filter_due)$` 56 | random=`$(filter_learn)$ [subfilter]` 57 | filter_queue=`${ [get[order]match[new-due]then] [get[order]match[random]then] ~[] }$` 58 | > 59 |
60 |
61 | 62 | Learn: 63 | <$count filter="[subfilter]"/> 64 | 65 | 66 | Due: 67 | <$count filter="[subfilter]"/> 68 | 69 | 70 | New: 71 | <$count filter="[subfilter]"/> 72 | 73 |
74 |
75 | <$list 76 | filter="[all[shadows+tiddlers]tag[$:/tags/TidmeDeck/Study]!is[draft]]" 77 | template="$:/plugins/tidme/fsrs4tw/ui/ViewTemplate/button" 78 | /> 79 |
80 |
81 | 82 | 83 | -------------------------------------------------------------------------------- /ui/viewtemplate/front.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/front 2 | tags: $:/tags/ViewTemplate 3 | list-after: $:/core/ui/ViewTemplate/title 4 | code-body: yes 5 | 6 | \whitespace trim 7 | 8 | <$list 9 | filter="[!is[blank]]" 10 | variable="studyTiddler" 11 | > 12 |
13 | <$reveal 14 | tag="div" 15 | type="nomatch" 16 | stateTitle=<> 17 | text="hide" 18 | default="show" 19 | animate="yes" 20 | > 21 | <$button 22 | tooltip={{$:/language/Buttons/Fold/Hint}} 23 | aria-label={{$:/language/Buttons/Fold/Caption}} 24 | class="tc-fold-banner" 25 | > 26 | <$action-sendmessage 27 | $message="tm-fold-tiddler" 28 | $param=<> 29 | foldedState=<> 30 | /> 31 | {{$:/core/images/chevron-up}} 32 | 33 | 34 |
35 | <$list 36 | filter="[has:field[reverse]]" 37 | variable="ignore" 38 | > 39 | <$reveal 40 | tag="div" 41 | type="nomatch" 42 | stateTitle=<> 43 | text="hide" 44 | default="show" 45 | > 46 | <$transclude mode="block" field="caption"/> 47 | 48 | <$reveal 49 | tag="div" 50 | type="match" 51 | stateTitle=<> 52 | text="hide" 53 | default="show" 54 | animate="yes" 55 | > 56 | <$transclude mode="block" field="text"/> 57 | 58 | 59 | <$list 60 | filter="[!has:field[reverse]]" 61 | variable="ignore" 62 | > 63 | <$transclude mode="block" field="caption"/> 64 | 65 | -------------------------------------------------------------------------------- /ui/viewtemplate/shortcut.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/shortcut 2 | tags: $:/tags/ViewTemplate 3 | list-before: $:/core/ui/ViewTemplate/title 4 | code-body: yes 5 | 6 | \define foldaction() 7 | <$action-setfield 8 | $tiddler={{{ [addprefix[$:/state/folded/]] }}} 9 | text={{{ [addprefix[$:/state/folded/]get[text]match[hide]then[show]else[hide]] }}} 10 | /> 11 | \end 12 | 13 | \define ratingaction(rating) 14 | <$let 15 | cards_json={{{ [fsrs

] }}} 16 | > 17 | <$list 18 | filter="$rating$" 19 | variable="rating" 20 | > 21 | <$transclude 22 | tiddler="$:/plugins/tidme/fsrs4tw/buttons/action/repeat" 23 | mode="inline" 24 | /> 25 | 26 | 27 | \end 28 | 29 | <$list 30 | filter="[!is[blank]]" 31 | variable="studyTiddler" 32 | > 33 | <$list 34 | filter="[has[caption]]" 35 | variable="ignore" 36 | > 37 |

38 | 39 | <$list 40 | filter="[!has[caption]has:field[reverse]addprefix[$:/state/folded/]get[text]match[hide]]" 41 | variable="ignore" 42 | > 43 |
44 | 45 | <$wikify 46 | name="deckCaption" 47 | text={{{ [get[caption]] ~[split[/]last[]] }}} 48 | mode="inline" 49 | output="text" 50 | > 51 |
52 | <$fieldmangler> 53 | <$list 54 | filter="[{$:/info/browser/is/mobile}!match[yes]]" 55 | variable="ignore" 56 | > 57 | <$keyboard key="((tidme-fold))" actions=<> > 58 | <$keyboard key="((tidme-again))" actions=<> > 59 | <$keyboard key="((tidme-hard))" actions=<> > 60 | <$keyboard key="((tidme-good))" actions=<> > 61 | <$keyboard key="((tidme-easy))" actions=<> > 62 | <$keyboard key="((tidme-next))" actions=<> > 63 | <$keyboard key="((tidme-exclude))" actions={{$:/plugins/tidme/fsrs4tw/buttons/action/exclude}}> 64 | <$keyboard key="((tidme-unfold))" actions={{$:/plugins/tidme/fsrs4tw/buttons/action/unfold}}> 65 | <$keyboard key="((tidme-stopstudy))" actions={{$:/plugins/tidme/fsrs4tw/buttons/action/stopstudy}}> 66 | <$edit-text 67 | tag="input" 68 | tiddler="$:/temp/tidme/study/input" 69 | field="shortcut" 70 | placeholder=<> 71 | focus={{{ [subfilter{$:/config/Tidme/Filters/decklist}matchthen[yes]] }}} 72 | /> 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | <$list 84 | filter="[{$:/info/browser/is/mobile}match[yes]]" 85 | variable="ignore" 86 | > 87 |
88 | <> 89 |
90 | 91 | 92 |
93 | 94 | -------------------------------------------------------------------------------- /ui/viewtemplate/study.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/study 2 | tags: $:/tags/ViewTemplate 3 | list-after: 4 | code-body: yes 5 | 6 | \whitespace trim 7 | 8 | \define foldaction() 9 | <$action-setfield 10 | $tiddler={{{ [addprefix[$:/state/folded/]] }}} 11 | text={{{ [addprefix[$:/state/folded/]get[text]match[hide]then[show]else[hide]] }}} 12 | /> 13 | \end 14 | 15 | <$list 16 | filter="[!is[blank]]" 17 | variable="studyTiddler" 18 | > 19 |
20 |
21 | matchthen[text-decoration: underline;]] }$`><$count filter="[subfilter]"/> 22 | + 23 | matchthen[text-decoration: underline;]] }$`><$count filter="[subfilter]"/> 24 | + 25 | matchthen[text-decoration: underline;]] }$`><$count filter="[subfilter]"/> 26 |
27 |
28 | <$reveal 29 | tag="div" 30 | type="nomatch" 31 | stateTitle=<> 32 | text="hide" 33 | default="show" 34 | animate="yes" 35 | > 36 | <$fieldmangler> 37 | <$fsrs4tw.repeat ratings="Again Hard Good Easy"> 38 | 39 | 40 | -------------------------------------------------------------------------------- /ui/viewtemplate/subtitle/due.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/ViewTemplate/Subtitle 2 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/subtitle/due 3 | list-after: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/subtitle/review 4 | code-body: yes 5 | 6 | <$list 7 | filter="[has[due]]" 8 | > 9 | {{$:/language/tidme/lastdue}}: <$view field="due" format="relativedate"/> 10 | -------------------------------------------------------------------------------- /ui/viewtemplate/subtitle/review.tid: -------------------------------------------------------------------------------- 1 | tags: $:/tags/ViewTemplate/Subtitle 2 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/subtitle/review 3 | code-body: yes 4 | 5 | <$list 6 | filter="[has[last_review]]" 7 | > 8 | {{$:/language/tidme/lastreview}}: <$view field="last_review" format="relativedate"/> 9 | -------------------------------------------------------------------------------- /ui/viewtemplate/tiddler.tid: -------------------------------------------------------------------------------- 1 | code-body: yes 2 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/tiddler 3 | 4 | \whitespace trim 5 | 6 | <$let 7 | studyTiddler=<> 8 | deckTiddler={{{ [subfilter{$:/config/Tidme/Filters/decktiddler}first[]] }}} 9 | p={{{ [get[p]else{$:/Deck/default!!p}] }}} 10 | exclude_action={{{ [get[exclude_action]else{$:/Deck/default!!exclude_action}] }}} 11 | unfold_action={{{ [get[unfold_action]else{$:/Deck/default!!unfold_action}] }}} 12 | leech_threshold={{{ [get[leech_threshold]else{$:/Deck/default!!leech_threshold}] }}} 13 | leech_action={{{ [get[leech_action]else{$:/Deck/default!!leech_action}] }}} 14 | filter_learn=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_learn}sort[due]]` 15 | filter_due=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_due}subfilter{$(deckTiddler)$!!order_due}]` 16 | filter_new=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_new}subfilter{$(deckTiddler)$!!order_new}]` 17 | filter_unfold=`[subfilter{$(deckTiddler)$!!card_unfold}]` 18 | filter_random=`[subfilter] [subfilter] +[sortrandom[]]` 19 | due-new=`$(filter_learn)$ $(filter_due)$ $(filter_new)$` 20 | new-due=`$(filter_learn)$ $(filter_new)$ $(filter_due)$` 21 | random=`$(filter_learn)$ [subfilter]` 22 | filter_queue=`${ [get[order]match[new-due]then] [get[order]match[random]then] ~[] }$` 23 | > 24 | <$transclude 25 | tiddler={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/StoryTiddlerTemplateFilter]![$:/config/Tidme/StoryTiddlerTemplateFilters/card]!is[draft]get[text]] :and[has[title]else[$:/core/ui/ViewTemplate]] }}} 26 | /> 27 | 28 | -------------------------------------------------------------------------------- /ui/viewtemplate/tr.tid: -------------------------------------------------------------------------------- 1 | title: $:/plugins/tidme/fsrs4tw/ui/ViewTemplate/tr 2 | code-body: yes 3 | 4 | <$let 5 | deckTiddler=<> 6 | filter_learn=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_learn}sort[due]]` 7 | filter_due=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_due}subfilter{$(deckTiddler)$!!order_due}]` 8 | filter_new=`[subfilter{$(deckTiddler)$!!card}!subfilter{$(deckTiddler)$!!card_exclude}subfilter{$(deckTiddler)$!!state_new}subfilter{$(deckTiddler)$!!order_new}]` 9 | filter_unfold=`[subfilter{$(deckTiddler)$!!card_unfold}]` 10 | filter_random=`[subfilter] [subfilter] +[sortrandom[]]` 11 | due-new=`$(filter_learn)$ $(filter_due)$ $(filter_new)$` 12 | new-due=`$(filter_learn)$ $(filter_new)$ $(filter_due)$` 13 | random=`$(filter_learn)$ [subfilter]` 14 | filter_queue=`${ [get[order]match[new-due]then] [get[order]match[random]then] ~[] }$` 15 | > 16 |
17 |
18 | <$link 19 | tooltip=<> 20 | > 21 | <$wikify 22 | name="deckCaption" 23 | text={{{ [get[caption]] ~[split[/]last[]] }}} 24 | mode="inline" 25 | output="text" 26 | > 27 | <> 28 | 29 | 30 | <$let 31 | custom-caption="yes" 32 | > 33 | <$list 34 | filter="[all[shadows+tiddlers]tag[$:/tags/TidmeDeck/Study]!is[draft]]" 35 | template="$:/plugins/tidme/fsrs4tw/ui/ViewTemplate/button" 36 | /> 37 | 38 |
39 |
40 | <$let 41 | filter_search=<> 42 | > 43 | <$button 44 | actions={{$:/plugins/tidme/fsrs4tw/buttons/action/search}} 45 | class="tc-btn-invisible tc-tiddlylink" 46 | style="color:red;" 47 | > 48 | <$count filter="[subfilter]"/> 49 | 50 | 51 |
52 |
53 | <$let 54 | filter_search=<> 55 | > 56 | <$button 57 | actions={{$:/plugins/tidme/fsrs4tw/buttons/action/search}} 58 | class="tc-btn-invisible tc-tiddlylink" 59 | style="color:green;" 60 | > 61 | <$count filter="[subfilter]"/> 62 | 63 | 64 |
65 |
66 | <$let 67 | filter_search=<> 68 | > 69 | <$button 70 | actions={{$:/plugins/tidme/fsrs4tw/buttons/action/search}} 71 | class="tc-btn-invisible tc-tiddlylink" 72 | style="color:blue;" 73 | > 74 | <$count filter="[subfilter]"/> 75 | 76 | 77 |
78 |
79 | <$let 80 | filter_search=`[[$(deckTiddler)$]] [[$(deckTiddler)$]shadowsource[]] [subfilter{$(deckTiddler)$!!card}is[tiddler]] [[$(deckTiddler)$]shadowsource[]plugintiddlers[]is[tiddler]] +[!prefix[$:/plugins/tidme/]]` 81 | > 82 | <$list 83 | filter="[all[shadows+tiddlers]tag[$:/tags/TidmeDeck/Action]!is[draft]]" 84 | template="$:/plugins/tidme/fsrs4tw/ui/ViewTemplate/button" 85 | /> 86 | 87 |
88 |
89 | --------------------------------------------------------------------------------