'Access Anki history from SQLite3 file

I want to perform some data analysis of my own on my Anki history.

I found out that my history should be contained in ~/.local/share/Anki2/User 1/collection.anki2.
The file info says that this file is of type SQLite3 database (application/vnd.sqlite3).

How can I open this file? (Could be with Python or with some dedicated software)

PS: I am clueless about database-related stuff



Solution 1:[1]

You can open collection.anki2 with sqlite3(CLI) or sqlitebrowser(GUI)

For example, the database from the apkg archive

user@debian:~/Documents/anki$ sqlite3 collection.anki2
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite> .tables
cards   col     graves  notes   revlog
sqlite> .exit

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rony Macfly