Giter Club home page Giter Club logo

ankiin's Introduction

Hi there 👋 I'm Clouder

I am an undergraduate at HIT(sz) who enjoys tech & life.
I major in Computer Science.
I had been a competitive programmer for 2 years in high school.
I've participated in ICPC and got a Silver Medal.
I've participated in CUMCU and got National First Prize.
I enjoy real life programming.
I’m keen on developing and being a change maker.

You can visit my portfolio to know more about me.

Clouder's GitHub stats

你好 👋 我是 Clouder

我是一名热爱科技和生活的哈工深计算机与科学专业本科生。
我高中曾经是一名算法竞赛生(OIer)。
曾参加 ICPC 获银牌、参加数模国赛获国一。
我热爱开发,乐于改变世界。

你可以访问我的个人介绍以了解更多相关信息。

ankiin's People

Contributors

clouder0 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

daocalendar

ankiin's Issues

Genanki Integration

genanki is a python lib to generate Anki apkg files directly. No need to run Anki in the background anymore.

Choices NoteType Option Field Format Update

Originally, the choices option field use <div>B something.</div> to make a new line.
In the old versions, Anki will treat this kind of syntax as new lines and recognize it as an option.

    options = options[0] + \
        list2str(options[1:], "<div>", "</div>", keepsuffix=True)

However, in Anki 2.1.41 and later versions:

<br> tags will now be used by default instead of the previous <div> tags, which solves some issues with multiple lines in cloze deletions and MathJax (thanks to Henrik).

Now both <br> and <div> are supported thus I will still stick to the old method for backward compatibility.
However, after the new version is universally adapted, I'd change it to <br> for better consistency.

Subscript in Math Formula

Describe the bug

$\ce{K_3[Fe(CN)_6]_3}$ is formatted as \(\ce{K<em>3[Fe(CN)</em>6]_3}\) .

To Reproduce

from helper.formatHelper import formatText

text = "$\ce{K_3[Fe(CN)_6]_3}$"

print(formatText(text))

Expected behavior

It should be rendered as \(\ce{K_3[Fe(CN)_6]_3}\) to adapt to LaTeX syntax.

Change Alignment to Center

image

In the past, I set the alignment to left for proper list display style. However, I've found a method to set center-left alignment, so I'll switch back to center.

It is notable that Choices will also be center-aligned.

To avoid a collision, the names of Note Types would be changed.

Dynamic Note Updating

When importing a file for the second time, try to overwrite the duplicates rather than add another note.
This requires a method to recognize the original note.
Maybe an ID should be added to the markdown file, but it would pollute the text.
So I'd rather create an ID for a file and insert it into the ending of the file. Then add a property for cards generated by the file.
Each time a file is imported, do an O(n^2) fuzzy match to see which note belongs to which block, and updating notes would be rather easy.

I'd like to know your opinions about this function.

Support Config For Math Brackets Replaceing

$ dollars

For now, it would probably crash AnkiLink as it would assume that the text includes a math formula but fail to find the right bracket.

This function should be configurable.

Inline Config

Embed config in markdown files so that anyone with the file can import without extra params.
A useful function when collaborating with others.
There should be file-level config, subtitle-level config, and block-level config.

This function may require parsing markdown syntax into a tree.

A test case to clarify what I want.

!!!Deck=Test!!!  

!!!Tag=TestTag!!! #set tag to TestTag

Example Q  
Example A

## SubTitle

!!!Deck=Test2!!! #overwrite deck

!!!Tag=tag2!!! #overwrite tag

Something like that...
hmm..
!!!Tag:+tag2!!! #add tag for block

This is a block.  
No tag2 for this.

### SubSubTitle

Inherit parent config.

## Another SubTitle

Now Deck is Test and Tag is TestTag.  

Create Note Model When Importing

call the function once the process starts.
Create anki note type in the script automatically when started for the first time rather than import a test deck manually.

This has been deprecated as it requires that Anki is opened during initializing.
Now the model is created when a related exception occurred.

Default Tag Is Removed

The tags are missing when exporting to an APKG file.
This may have something to do with Genanki I guess.

Multiple Line Question & Answer Note Type

Support Multiple Line Questions in a more elegant way.

For now, you have to use <br> inline HTML for multiple line questions.

Question1 <br> Question2  
Answer.

I'd like to add a built-in note type for multiple-line questions.

!Question1  
!Question2  
Answer  
Answer2

Maybe a ! prefix would be used.

Directly Exporting Methods

Since Deck is assigned in AnkiLink, the configuration in AnkiIn doesn't work.
Add a direct export method to support this config.

Block Skipping

Sometimes a block shouldn't be recognized as a note.
Add syntax for block skipping.

Cloze Numbering

support numbering clozes, an example:

Cloze1 is **[1]something** and Cloze2 is **[1]something** like that.

Cloze1 is {{c1::something}} and Cloze2 is {{c1::something}} like that.

Switch to TOML based config system

That's a pretty big shift.

Now we expose the whole config module to the user, indicating that you can change any config as you like.

Configs are in TOML format.

This would solve #21 #11

Write to Local Database

Similar to import notes via Anki connect, but don't require its running.
It may be complicated to implement and is not a promised feature. I'd look further on it in the future.

Fix `_` in Math Formula

Test Case:

判断:向 $\ce{ZnS}$ 和 $\ce{NaS}$ 的悬浊液中滴加 $\ce{CuSO4}$ 溶液,有黑色沉淀生成,说明   $\ce{K_{sp}(CuS) < K_{sp}(ZnS)}$.
错误,考虑 $\ce{NaS}$ 使 $\ce{S^{2-}}$ 过量。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.