Trying to run AnkiConnect with Rainmeter
Posted: February 13th, 2020, 4:41 pm
I am trying to make a skin that would connect with Anki and display how many cards are due at a given moment. Maybe even (if I can) have a way to add cards directly from the desktop. From what I understand it should be possible with AnkiConnect (website here). The AnkiConnect website gives some example code in Python and JavaScript, so I guess my job is to translate that into lua but I'm kinda out of my depths here.
There are these two lines of Python code that I just straight up don't understand :
I also think I need to import a JSON module to be able to use the API, and I'm not sure how to do that with Rainmeter.
Any help would be massively appreciated, thanks in advance.
There are these two lines of Python code that I just straight up don't understand :
Code: Select all
requestJson = json.dumps(request(action, **params)).encode('utf-8')
response = json.load(urllib.request.urlopen(urllib.request.Request('http://localhost:8765', requestJson)))
Any help would be massively appreciated, thanks in advance.