-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
自订脚本可以增加更多例句(sentence)吗? #318
Comments
你新建两个栏位sentence1和sentence2,最后的目的是什么?是准备在卡片模版上摆放?
栏位最后的呈现,是要靠卡片模版体现的,那如果glossary里的例句,在不增加sentence1和2的栏位的前提下,也能显示,那就不需要增加栏位啦。
在ODH里,光改自定义脚本是不够的,他在连接到ankiconnect值卡的时候,只能传输glossary和sentence,因为所有信息都包含了,怎么用是后台模版的事情。
我这里举个例子,你有一点CSS基础的话很好理解,比如你在卡片反面想在glossary之外的地方显示例句。那么模版可以这么写
{{expression}}. <— its head word
{{sentence}}. <— it’s context sentence
——————
{{glossary}}. <— it’s glossary
<div class=‘example_sentence'>{{glossary}}</div>.
你观察一下脚本里的css定义,英语翻译在eng_trans这个class下面,中文翻译在chn_trans这个class下面
而例句在 ul 和li的排列下
所以你写一个css 在卡片模版的样式区域
.example_sentence .eng_trans {
display:none;
}
.example_sentence .chn_trans {
display:none;
}
那么就把glossary里,但是套在.example_sentence这个div里的中文英文翻译隐藏了,只留下了例句,可以起到单独开一个栏位的效果
… 2023年9月14日 20:07,Yi-Wei ***@***.***> 写道:
词典本身带的例句,除了放在glossary里,我也想把例句放到 sentence1 和 sentence2 的欄位
就像下面的图片那样。
目前是用手动的方式做这件事,在想有没有办法透过自订脚本完成这件事
<https://user-images.githubusercontent.com/22759975/267967339-5f7b946a-3603-488a-81a1-addfe737943b.png>
—
Reply to this email directly, view it on GitHub <#318 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEZ7BZB374ENDOWQGNYVARDX2LXOVANCNFSM6AAAAAA4X2FQCE>.
You are receiving this because you commented.
|
有两个目的
所以最后的呈现就是 如果只有1这个需求的话,觉得好酷,没想到css还能这样玩 另一个思路可能是,把text转成audio的方式,也放在脚本上 |
考慮到有些字典提供的例句太簡短,現階段還是手動新增好了 |
感谢之前的回复!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
开发者好,这是我遇过最好用的学英文道具了
我使用的模板是ODH,除了原本的sentence外
还新增了sentence1、sentence2
希望能透过自订脚本的方式,将单字的例句放入sentence1 和 sentence2
例如查到的单字如下,字典提供了两个例句
greeting,問候;招呼;迎接
他們開會前簡短地互相致意。
他點頭致意。
想将
They briskly exchanged greetings before starting the session.
放入sentence1He nodded his head in greeting.
放入sentence2请问这是有办法做到的吗?
The text was updated successfully, but these errors were encountered: