Skip to content
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

思源协议块超链接加入 focus 参数 #4221

Closed
jabobian opened this issue Mar 11, 2022 · 6 comments
Closed

思源协议块超链接加入 focus 参数 #4221

jabobian opened this issue Mar 11, 2022 · 6 comments
Assignees
Milestone

Comments

@jabobian
Copy link

jabobian commented Mar 11, 2022

在什么情况下你需要该特性? In what scenarios do you need this function?

在Supermemo等软件中转到思源笔记中的block,希望可以提供focus选项。没有这个选项时,光标所在位置不明朗,如果用脚本发送Alt->容易误操作。

为了简化Supermemo与思源之间的互动,除了将思源笔记页面复制到Supermemo中这种方式,另一个方式是将思源的块链接地址复制到Supermemo中,在Supermemo中学习时由脚本自动解析卡片中的内容(已经完成),并通过调用siyuan://xxxxxxx来刷新思源中的文档显示。这样好处是不用担心两个地方内容编辑后不同步。但是为了聚焦内容位置,希望进入聚焦模式,在uri后面增加focus?=1时,自动聚焦该block。对于记忆闪卡,还可以控制只聚焦显示"问题"block(也就是卡片的正面Front部分)。
这种方案下,Supermemo只是作为一个间隔时间管理软件,而内容一般都在思源笔记中。在思源笔记中,可以通过F4创建子卡片,也可以组建超级块作为子卡片。将这些块的信息发到Supermemo中建卡即可,不需要复制html。

同时提供 focus?=0,表示去掉该文本块或文档块的聚焦状态。
最好还能提供 focus?=2,表示聚焦,但切换页签离开一个文档页签之后,自动去掉该文本块的聚焦状态。

描述可能的最优解决方案 Describe the optimal solution

描述候选的解决方案 Describe the candidate solution

其他信息 Other information

@jabobian
Copy link
Author

这一机制也适用于Anki。短期内就可以为思源引入成熟的间隔学习机制。

@88250 88250 changed the title 希望增加参数Siyuan://xxxx/focus?=1; 思源协议块超链接加入 focus 参数 Mar 12, 2022
@88250
Copy link
Member

88250 commented Mar 12, 2022

siyuan://blocks/20220312004051-pdoy4az?focus=1,focus 参数为 1 表示以聚焦模式打开。

@88250 88250 added this to the 1.9.0 milestone Mar 12, 2022
88250 added a commit to siyuan-note/user-guide-zh_CN that referenced this issue Mar 12, 2022
88250 added a commit to siyuan-note/user-guide-zh_CHT that referenced this issue Mar 12, 2022
88250 added a commit to siyuan-note/user-guide-en_US that referenced this issue Mar 12, 2022
@jabobian
Copy link
Author

jabobian commented Jun 21, 2022

D大,现在单向能工作,能focus,但不能defocus,
defocus是用来显示上下文(类似于显示答案)。
能否增加 ?focus=0来defocus?
或者不带参数就是 defocus

@Vanessa219
Copy link
Member

不带 focus 的就不会缩放,除非已经打开过带缩放的该页签

@jabobian
Copy link
Author

感谢V大答复
focus是聚焦,对应 Alt+→
defocus是取消聚焦,聚焦到上层,对应 Alt+←.

我希望目的是通过外部调用siyuan://xxxx?focus=1链接来显示问题
然后通过外部调用siyuan://xxxx?focus=0链接来显示问题和答案。
就是把思源做成一个闪卡的编辑保存端和显示端。
不知道我这么解释是否表述到位。

@jabobian
Copy link
Author

jabobian commented Jun 23, 2022

Card 1: H1

Q:H2
A : H2

假设我用
H1和下面的H2分别表示卡片的全部(正面+背面)和正面,通过在 H2 处按下 Alt+→ 显示的卡片的正面,然后再按下 Alt+←,显示的是全部。
我们只需要知道卡片的正面(H2)的siyuan://地址,就可以显示答案,但是需要能取消 H2 的聚焦。现在只能通过发送热键来执行,体验不太好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants