vault backup: 2025-11-20 07:57:06
This commit is contained in:
14
content/.obsidian/workspace.json
vendored
14
content/.obsidian/workspace.json
vendored
@@ -6,7 +6,7 @@
|
|||||||
{
|
{
|
||||||
"id": "3f6b32748450846e",
|
"id": "3f6b32748450846e",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"dimension": 53.4257748776509,
|
"dimension": 74.86818980667839,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "5cd07fc76098d003",
|
"id": "5cd07fc76098d003",
|
||||||
@@ -28,12 +28,12 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Biokemi/!Template/Lärandemål.md",
|
"file": "Studieteknik/Export all to anki.md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
},
|
},
|
||||||
"icon": "lucide-file",
|
"icon": "lucide-file",
|
||||||
"title": "Lärandemål"
|
"title": "Export all to anki"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
{
|
{
|
||||||
"id": "2f45996db37e6ccd",
|
"id": "2f45996db37e6ccd",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"dimension": 46.574225122349105,
|
"dimension": 25.13181019332162,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "e53ce881144526f0",
|
"id": "e53ce881144526f0",
|
||||||
@@ -203,8 +203,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"direction": "horizontal",
|
"direction": "horizontal",
|
||||||
"width": 200,
|
"width": 200
|
||||||
"collapsed": true
|
|
||||||
},
|
},
|
||||||
"left-ribbon": {
|
"left-ribbon": {
|
||||||
"hiddenItems": {
|
"hiddenItems": {
|
||||||
@@ -220,6 +219,8 @@
|
|||||||
},
|
},
|
||||||
"active": "06be19e869ba432d",
|
"active": "06be19e869ba432d",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"Biokemi/!Template/Lärandemål.md",
|
||||||
|
"Studieteknik/Export all to anki.md",
|
||||||
"Biokemi/!Template/Provfrågor.md",
|
"Biokemi/!Template/Provfrågor.md",
|
||||||
"Biokemi/Cellulära processer/RNA syntes/Anteckningar.md",
|
"Biokemi/Cellulära processer/RNA syntes/Anteckningar.md",
|
||||||
"Biokemi/Cellulära processer/Translation",
|
"Biokemi/Cellulära processer/Translation",
|
||||||
@@ -238,7 +239,6 @@
|
|||||||
"Biokemi/Cellulära processer/Initiering och terminering av DNA replikation/Instuderingsfrågor.md",
|
"Biokemi/Cellulära processer/Initiering och terminering av DNA replikation/Instuderingsfrågor.md",
|
||||||
"Biokemi/Cellulära processer/Initiering och terminering av DNA replikation/Lärandemål.md",
|
"Biokemi/Cellulära processer/Initiering och terminering av DNA replikation/Lärandemål.md",
|
||||||
"Biokemi/Cellulära processer/Initiering och terminering av DNA replikation/Provfrågor.md",
|
"Biokemi/Cellulära processer/Initiering och terminering av DNA replikation/Provfrågor.md",
|
||||||
"Biokemi/!Template/Lärandemål.md",
|
|
||||||
"Biokemi/!Template/Instuderingsfrågor.md",
|
"Biokemi/!Template/Instuderingsfrågor.md",
|
||||||
"Biokemi/!Template/Anteckningar.md",
|
"Biokemi/!Template/Anteckningar.md",
|
||||||
"Biokemi/!Template",
|
"Biokemi/!Template",
|
||||||
|
|||||||
24
content/Studieteknik/Export all to anki.md
Normal file
24
content/Studieteknik/Export all to anki.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
```
|
||||||
|
#!/Users/johandahlin/Library/Application Support/AnkiProgramFiles/.venv/bin/python
|
||||||
|
from anki.collection import Collection
|
||||||
|
c = Collection("/Users/johandahlin/Library/Application Support/Anki2/User 1/collection.anki2")
|
||||||
|
for deck_name in c.decks.all_names():
|
||||||
|
if not deck_name.startswith("Biokemi::Johan D"):
|
||||||
|
continue
|
||||||
|
deck_name = deck_name.replace("Johan D::", "")
|
||||||
|
deck_name = deck_name.replace("::", "_")
|
||||||
|
deck_id = c.decks.id_for_name(d)
|
||||||
|
c.export_anki_package(
|
||||||
|
out_path=f"/tmp/{deck_name}.apkg",
|
||||||
|
options=ExportAnkiPackageOptions(with_media=True),
|
||||||
|
limit=DeckIdLimit(deck_id),
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
TODO
|
||||||
|
- Update script to run rsync to moln
|
||||||
|
- Update Caddyfile to [serve static files](https://caddyserver.com/docs/caddyfile/directives/file_server), perhaps with index
|
||||||
|
- Generate obsidian page with links to anki that can be downloaded
|
||||||
|
- how do we insert dynamic content?
|
||||||
|
- low prio: run it automatically (do we want to?)
|
||||||
Reference in New Issue
Block a user