Giter Site home page Giter Site logo

blargian / ankiadder Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 20.58 MB

An application to automatically add cards to Anki for learning the Russian language.

HTML 0.73% JavaScript 36.15% SCSS 4.40% Python 58.72%
anki automation language-learning python russian-language tkinter vocabulary-learning

ankiadder's Introduction

ankiadder's People

Contributors

blargian avatar

Stargazers

 avatar

Watchers

 avatar

ankiadder's Issues

save to db after editing a field

image

At the moment the user is able to edit fields of the table however nothing happens after clicking away. The desired behaviour is that the word is saved to the database once clicking away.

'bool' object has no attribute 'setId'

другая_элис.xlsx

When using the following file to process, error is encountered:

File "C:\Users\Lenovo Legion 7\Documents\Projects\AnkiAdder\python_app\src\WordHandler.py", line 22, in processWords
processed_word.setId(asyncio.run(storeWordData(self.db,processed_word)))
AttributeError: 'bool' object has no attribute 'setId'

Investigate further and write a bug fix.

Dynamic loading needed

Currently the program works such that after selecting the excel file to read, the data is processed before displaying the table. This leaves the user guessing what is happening. It would be nice if the loading took place dynamically such that the user sees the table growing and/or a progress bar to see how far along with processing the program is.

words need to get added as table rows

Currently the words are fetched and stored in the data base and a blank table with headers is displayed.

Objective:
After a word is stored and added to the internal words member of WordHandler in the following code, the wordHandler class needs to somehow inform the Table class that a new word has been added and then add it visually to the table :

def processWords(self, words):
        cleanedWords = preProcess(words)
        lemmatizedWords = preProcessLematizer(words)

        for preprocessed_word in lemmatizedWords:
            processed_word = findWord(self.db,preprocessed_word)
            processed_word.setId(asyncio.run(storeWordData(self.db,processed_word)))
            self.setWord(processed_word)
        pass

It might be worth investigating the observable design pattern such that whenever a word is added, layout gets notified and it can then call a method on wordHandler which fetches the latest added word. Once it has this it already has access to the table instance which will have a method added on to add a new row to the table from some data.

Seperation of code needed

Everything is in one script at the moment, making the code kind of messy and hard to read. There should be more seperation to the code by using classes.

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.