1
0

vault backup: 2025-12-09 22:35:53
All checks were successful
Deploy Quartz site to GitHub Pages / build (push) Successful in 1m17s

This commit is contained in:
2025-12-09 22:35:53 +01:00
parent 9e3b6b2cd3
commit 313fef0b98
24 changed files with 3894 additions and 612 deletions

View File

@@ -6,7 +6,6 @@
{ {
"id": "7b7a63dd0bab0bc6", "id": "7b7a63dd0bab0bc6",
"type": "tabs", "type": "tabs",
"dimension": 42.71402550091074,
"children": [ "children": [
{ {
"id": "e37d77cee0dbc12f", "id": "e37d77cee0dbc12f",
@@ -14,44 +13,13 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Biokemi/Gamla tentor/2022-12-19/15.md", "file": "Biokemi/Gamla tentor/2024-05-15/11.md",
"mode": "source", "mode": "source",
"source": false, "source": false,
"backlinks": false "backlinks": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "15" "title": "11"
}
}
]
},
{
"id": "3cef6f98eadac6fe",
"type": "tabs",
"dimension": 57.28597449908926,
"children": [
{
"id": "6db31929fa149558",
"type": "leaf",
"state": {
"type": "pdf",
"state": {
"file": "Biokemi/Gamla tentor/2022-12-19/2022-12-19-0097-TUX.pdf"
},
"icon": "lucide-file-text",
"title": "2022-12-19-0097-TUX"
}
},
{
"id": "900bf1e2891b66ac",
"type": "leaf",
"state": {
"type": "pdf",
"state": {
"file": "Biokemi/Gamla tentor/2022-12-19/2022-12-19-0119-FAE.pdf"
},
"icon": "lucide-file-text",
"title": "2022-12-19-0119-FAE"
} }
} }
] ]
@@ -86,22 +54,23 @@
"state": { "state": {
"type": "search", "type": "search",
"state": { "state": {
"query": "\"svar markerat i\"", "query": "angivet file:/[0-9][0-9].md/",
"matchingCase": true, "matchingCase": true,
"explainSearch": false, "explainSearch": false,
"collapseAll": false, "collapseAll": false,
"extraContext": true, "extraContext": true,
"sortOrder": "alphabetical" "sortOrder": "byModifiedTime"
}, },
"icon": "lucide-search", "icon": "lucide-search",
"title": "Search" "title": "Search"
} }
} }
] ],
"currentTab": 1
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 276.50390243530273 "width": 435.50390243530273
}, },
"right": { "right": {
"id": "0948c66181b40af9", "id": "0948c66181b40af9",
@@ -194,7 +163,8 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 550.5 "width": 200,
"collapsed": true
}, },
"left-ribbon": { "left-ribbon": {
"hiddenItems": { "hiddenItems": {
@@ -210,40 +180,41 @@
"templates:Insert template": false "templates:Insert template": false
} }
}, },
"active": "ef51d026ab2efaae", "active": "e37d77cee0dbc12f",
"lastOpenFiles": [ "lastOpenFiles": [
"Biokemi/Gamla tentor/2022-12-19/6.md", "Biokemi/Gamla tentor/2024-05-15/28.md",
"Biokemi/Gamla tentor/2024-05-15/12.md",
"Biokemi/Gamla tentor/2024-05-15/26.md",
"Biokemi/Gamla tentor/2024-05-15/20.md",
"Biokemi/Gamla tentor/2024-08-01/31.md",
"Biokemi/Gamla tentor/2024-05-15/34.md",
"Biokemi/Gamla tentor/2024-05-15/24.md",
"Biokemi/Gamla tentor/2024-08-01/32.md",
"Biokemi/Gamla tentor/2024-08-01/23.md",
"Biokemi/Gamla tentor/2024-08-01/17.md",
"Biokemi/Gamla tentor/2024-08-01/16.md",
"Biokemi/Gamla tentor/2024-08-01/20.md",
"Biokemi/Gamla tentor/2024-05-15/11.md",
"Biokemi/Gamla tentor/2024-08-01/27.md",
"Biokemi/Gamla tentor/2024-08-01/29.md",
"Biokemi/Gamla tentor/2024-08-01/12.md",
"Biokemi/Gamla tentor/2023-12-18/28.md",
"Biokemi/Gamla tentor/2024-05-15/10.md",
"Biokemi/Gamla tentor/2024-08-01/10.md",
"Biokemi/Gamla tentor/2024-05-15/29.md",
"Biokemi/Gamla tentor/2024-05-15/36.md",
"Biokemi/Gamla tentor/2024-05-15/2024-05-15-0068-GXS.md",
"Biokemi/Gamla tentor/2024-08-01/8.md",
"Biokemi/Gamla tentor/2024-05-15/3.md",
"Biokemi/Gamla tentor/2024-05-15/1.md",
"Biokemi/Gamla tentor/2024-08-01/2024-08-01-0089-ZGH.md",
"Biokemi/Gamla tentor/2022-12-19/2022-12-19-0097-TUX.pdf", "Biokemi/Gamla tentor/2022-12-19/2022-12-19-0097-TUX.pdf",
"Biokemi/Gamla tentor/2022-12-19/2022-12-19-0119-FAE.pdf", "Biokemi/Gamla tentor/2022-12-19/2022-12-19-0119-FAE.pdf",
"Biokemi/Gamla tentor/2022-12-19/1.md",
"Biokemi/Gamla tentor/2023-05-15/26.md",
"Biokemi/Gamla tentor/2023-05-15/2023-05-15-0134-FDC.pdf", "Biokemi/Gamla tentor/2023-05-15/2023-05-15-0134-FDC.pdf",
"Biokemi/Gamla tentor/2023-05-15/22.md",
"Biokemi/Gamla tentor/2023-05-15/15.md",
"Biokemi/Gamla tentor/2023-05-15/6.md",
"Biokemi/Gamla tentor/2023-05-15/4.md",
"Biokemi/Gamla tentor/2023-05-15/1.md",
"Biokemi/Gamla tentor/2023-12-18/22.md",
"Biokemi/Gamla tentor/2023-12-18/2023-12-18-0075-GXD.pdf", "Biokemi/Gamla tentor/2023-12-18/2023-12-18-0075-GXD.pdf",
"Biokemi/Gamla tentor/2023-12-18/2023-12-18-0114-EES.pdf", "Biokemi/Gamla tentor/2023-12-18/2023-12-18-0114-EES.pdf",
"Biokemi/Gamla tentor/2023-12-18/20.md",
"Biokemi/Gamla tentor/2023-12-18/21.md",
"Biokemi/Gamla tentor/2023-12-18/6.md",
"Biokemi/Gamla tentor/2023-12-18/5.md",
"Biokemi/Gamla tentor/2023-12-18/1.md",
"Biokemi/Gamla tentor/2023-12-18/2023-12-18-0028-LAD.pdf", "Biokemi/Gamla tentor/2023-12-18/2023-12-18-0028-LAD.pdf",
"Biokemi/Gamla tentor/2023-12-18/2023-12-18-0075-GXD.md",
"Biokemi/Gamla tentor/2024-01-27/35.md",
"Biokemi/Gamla tentor/2024-01-27/33.md",
"Biokemi/Gamla tentor/2024-01-27/32.md",
"Biokemi/Gamla tentor/2024-01-27/30.md",
"Biokemi/Gamla tentor/2024-01-27/2024-01-27-0096-APG.pdf", "Biokemi/Gamla tentor/2024-01-27/2024-01-27-0096-APG.pdf",
"Biokemi/Gamla tentor/2024-01-27/28.md",
"Biokemi/Gamla tentor/2024-01-27/27.md",
"Biokemi/Gamla tentor/2024-01-27/26.md",
"Biokemi/Gamla tentor/2024-01-27/24.md",
"Biokemi/Gamla tentor/2024-01-27/17.md",
"Biokemi/Gamla tentor/2024-01-27/16.md",
"Biokemi/Gamla tentor/2024-05-15/2024-05-15-0068-GXS.pdf", "Biokemi/Gamla tentor/2024-05-15/2024-05-15-0068-GXS.pdf",
"Biokemi/Gamla tentor/2024-05-15/2024-05-15-0020-EBK.pdf", "Biokemi/Gamla tentor/2024-05-15/2024-05-15-0020-EBK.pdf",
"Biokemi/Gamla tentor/2024-05-15/2024-05-15-0018-UAE.pdf", "Biokemi/Gamla tentor/2024-05-15/2024-05-15-0018-UAE.pdf",

View File

@@ -12,9 +12,6 @@ tags:
- C: Hememolekylen innehåller en magnesiumjon. - C: Hememolekylen innehåller en magnesiumjon.
- D: Cytokrom C innehåller heme. - D: Cytokrom C innehåller heme.
*(svar angivet i digitalt formulär)*
**Svar** **Svar**
```spoiler-block ```spoiler-block
A och D A och D

View File

@@ -16,8 +16,5 @@ Den vanligaste formen (konformationen) som DNA antar kallas B-DNA eller en Watso
**Svar** **Svar**
```spoiler-block ```spoiler-block
C och D
*(svar angivet i flervalsformulär)*
_Totalpoäng: 2_
``` ```

View File

@@ -16,8 +16,5 @@ Vid initiering av RNA polymeras II-beroende transkription samverkar flera basala
**Svar** **Svar**
```spoiler-block ```spoiler-block
A och D
*(svar angivet i flervalsformulär)*
_Totalpoäng: 2_
``` ```

View File

@@ -16,8 +16,5 @@ Lac-operonet kodar för genprodukter som behövs för att bryta ner laktos. Vilk
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och D
*(svar angivet i flervalsformulär)*
_Totalpoäng: 2_
``` ```

View File

@@ -18,8 +18,5 @@ Välj de två korrekta alternativen:
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och C
*(svar angivet i flervalsformulär)*
_Totalpoäng: 2_
``` ```

View File

@@ -11,22 +11,22 @@ Para ihop nedanstående metaboliter med en metabol väg där de ingår. Varje me
Metaboliter: Metaboliter:
- A: oxalacetat - fosfoenolpyruvat
- B: succinat - laktat
- C: laktat - oxalacetat
- D: fosfoenolpyruvat - succinat
Vägar: Vägar:
- A: citronsyracykeln - citronsyracykeln
- B: Coricykeln - Coricykeln
- C: glykolysen - glukoneogenes
- D: glukoneogenes - glykolysen
**Svar** **Svar**
```spoiler-block ```spoiler-block
- fosfoenolpyruvat: glykolysen
*(svar angivet i matchningsformulär)* - laktat: Coricykeln
- oxalacetat: glukoneogenes
_Totalpoäng: 2_ - succinat: citronsyracykeln
``` ```

View File

@@ -16,8 +16,5 @@ Vilka två av nedanstående enzymer katalyserar en reaktion där det sker en dek
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och C
*(svar angivet i flervalsformulär)*
_Totalpoäng: 2_
``` ```

View File

@@ -16,8 +16,5 @@ Vilka två av följande faktorer stimulerar glykogenes (syntes av glykogen) i en
**Svar** **Svar**
```spoiler-block ```spoiler-block
C och D
*(svar angivet i flervalsformulär)*
_Totalpoäng: 2_
``` ```

View File

@@ -18,7 +18,5 @@ Vilka två av följande påståenden relaterade till glykogenmetabolismen är ko
**Svar** **Svar**
```spoiler-block ```spoiler-block
*(svar angivet i flervalsformulär)* A och B
_Totalpoäng: 2_
``` ```

View File

@@ -16,8 +16,5 @@ Vilka två av följande påståenden stämmer för kolesterolets omsättning och
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och C
*(svar angivet i flervalsformulär)*
_Totalpoäng: 2_
``` ```

View File

@@ -9,17 +9,16 @@ tags:
I vilken ordning genomförs stegen nedan när en gen ska amplifieras med rekombinant DNA-teknologi? (2p) I vilken ordning genomförs stegen nedan när en gen ska amplifieras med rekombinant DNA-teknologi? (2p)
14: - amplifiering
- gelelektrofores
- A: plasmidrening - plasmidrening
- B: gelelektrofores - transformation
- C: transformation
- D: amplifiering
**Svar** **Svar**
```spoiler-block ```spoiler-block
*(svar angivet i drag-och-släpp-formulär)* 1. transformation
2. amplifiering
_Totalpoäng: 2_ 3. plasmidrening
4. gelelektrofores
``` ```

View File

@@ -16,8 +16,6 @@ Vilka två påståenden stämmer om RNA processning? (2p)
**Svar** **Svar**
```spoiler-block ```spoiler-block
A och B
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -17,8 +17,6 @@ sigma-faktorn stämmer? (2p)
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och C
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -18,8 +18,6 @@ Vilka två av nedanstående proteiner utför aktiv transport?
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och C
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -12,15 +12,18 @@ cellens plasmamembran. Starta med den som har lättast att passera. (2p)
Lättast → Svårast: Lättast → Svårast:
- A: Koldioxid - Etanol
- B: Leucin - Fruktos
- C: Etanol - Koldioxid
- D: Fruktos - Leucin
**Svar** **Svar**
```spoiler-block ```spoiler-block
*(svar angivet i dra-och-släpp-formulär)* 1. Koldioxid
2. Etanol
3. Fruktos
4. Leucin
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -16,8 +16,6 @@ Vilka två av nedanstående påståenden om enzymer är korrekta? (2p)
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och C
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 0 Totalpoäng: 0

View File

@@ -16,8 +16,6 @@ Vilka två av nedanstående påståenden stämmer för glukoneogenes? (2p)
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och C
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -12,20 +12,23 @@ användas en gång. (2p)
Metaboliter / vägar: Metaboliter / vägar:
- A: fosfoglyceratkinas - fosfofruktokinas 1
- B: fumaras - fosfoglyceratkinas
- C: laktatdehydrogenas - fumaras
- D: fosfofruktokinas 1 - laktatdehydrogenas
- A: glukoneogenes - citronsyracykeln
- B: citronsyracykeln - Coricykeln
- C: Coricykeln - glykolysen
- D: glykolysen - glukoneogenes
**Svar** **Svar**
```spoiler-block ```spoiler-block
*(svar angivet i dra-och-släpp-formulär)* - fosfofruktokinas 1: glykoneogenesen
- fosfoglyceratkinas: glykolysen
- fumaras: citronsyracykeln
- laktatdehydrogenas: Coricykeln
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -16,8 +16,6 @@ Vilka två av nedanstående komponenter deltar i elektrontransportkedjan? (2p)
**Svar** **Svar**
```spoiler-block ```spoiler-block
A och D
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -18,8 +18,6 @@ Vilka två av följande påståenden relaterade till nukleotidnedbrytning är ko
**Svar** **Svar**
```spoiler-block ```spoiler-block
B och D
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -18,8 +18,6 @@ Vilka två av följande påståenden relaterade till pentosfosfatvägen är korr
**Svar** **Svar**
```spoiler-block ```spoiler-block
A och C
*(svar angivet i flervalsformulär)*
``` ```
Totalpoäng: 2 Totalpoäng: 2

View File

@@ -1,9 +1,12 @@
# python
#!/usr/bin/env python3 #!/usr/bin/env python3
import re import re
import csv import csv
import argparse import argparse
from pathlib import Path from pathlib import Path
from markdown import markdown
FRONTMATTER_RE = re.compile(r"^---\s*\n(.*?)\n---\s*\n", re.S) FRONTMATTER_RE = re.compile(r"^---\s*\n(.*?)\n---\s*\n", re.S)
FENCE_RE = re.compile(r"^```([^\n]*)\n(.*?)\n```", re.S | re.M) FENCE_RE = re.compile(r"^```([^\n]*)\n(.*?)\n```", re.S | re.M)
DATE_DIR_RE = re.compile(r"\d{4}-\d{2}-\d{2}") DATE_DIR_RE = re.compile(r"\d{4}-\d{2}-\d{2}")
@@ -17,7 +20,7 @@ def find_date(path: Path):
def parse_frontmatter(text: str): def parse_frontmatter(text: str):
m = FRONTMATTER_RE.match(text) m = FRONTMATTER_RE.match(text)
if not m: if not m:
return {}, text return {"tags": [], "date": ""}, text
fm_raw = m.group(1) fm_raw = m.group(1)
rest = text[m.end():] rest = text[m.end():]
tags = [] tags = []
@@ -36,10 +39,21 @@ def parse_frontmatter(text: str):
break break
# also try single-line tags: tags: [a, b] # also try single-line tags: tags: [a, b]
if not tags: if not tags:
m2 = re.search(r"tags\s*:\s*\[([^\]]+)\]", fm_raw) # handle single-line tags like: tags: [a, b]
if m2: idx = fm_raw.find("tags:")
tags = [t.strip() for t in m2.group(1).split(",")] if idx != -1:
return {"tags": tags}, rest # look for first '[' and ']' after the 'tags:' token on the same or next line
br_start = fm_raw.find("[", idx)
br_end = fm_raw.find("]", br_start + 1) if br_start != -1 else -1
if br_start != -1 and br_end != -1:
inner = fm_raw[br_start+1:br_end]
tags = [t.strip().strip('"\'') for t in inner.split(",") if t.strip()]
# parse date from frontmatter if present
date_val = ""
mdate = re.search(r"^date\s*:\s*(.+)$", fm_raw, re.M)
if mdate:
date_val = mdate.group(1).strip().strip('"\'')
return {"tags": tags, "date": date_val}, rest
def extract_question_answer(body: str): def extract_question_answer(body: str):
# find first fenced block (prefer spoiler) # find first fenced block (prefer spoiler)
@@ -64,29 +78,41 @@ def extract_question_answer(body: str):
def main(root: Path, out: Path): def main(root: Path, out: Path):
rows = [] rows = []
for md in root.rglob("*.md"): for md in root.rglob("*.md"):
rel = md.relative_to(root) # process each markdown file
date = find_date(md.parent) if len(md.stem) > 2:
qnum = md.stem continue
text = md.read_text(encoding="utf-8") text = md.read_text(encoding="utf-8")
fm, body = parse_frontmatter(text) fm, body = parse_frontmatter(text)
date = fm.get("date") or find_date(md.parent)
qnum = md.stem
tags = fm.get("tags", []) tags = fm.get("tags", [])
# choose first tag that's not biokemi or provfråga # choose first tag that's not biokemi or provfråga
category = "" category = ""
for t in tags: for t in tags:
if t.lower() not in ("biokemi", "provfråga"): if t and t.lower() not in ("biokemi", "provfråga"):
category = t category = t
break break
question, answer = extract_question_answer(body) question, answer = extract_question_answer(body)
# normalize whitespace # keep original markdown (preserve line breaks) so markdown can render properly
question = re.sub(r"\s+", " ", question).strip() question_md = question.strip()
answer = re.sub(r"\s+", " ", answer).strip() answer_md = answer.strip()
details = f"{category}; {date} {qnum} {answer}"
rows.append((question, details)) # Render question and answer markdown to HTML. Enable common extensions.
# write CSV with semicolon delimiter and quoting question_html = markdown(question_md, extensions=["fenced_code", "tables"])
answer_html = markdown(answer_md, extensions=["fenced_code", "tables"])
# metadata as simple HTML paragraphs so CSV consumer can display it
meta_html = f"<p>kategory: {category}</p><p>prov: {date}</p><p>fråga: {qnum}</p>"
# second column contains the rendered answer followed by metadata HTML
details = answer_html + "\n\n" + meta_html
rows.append((question_html, details, category))
# write CSV with semicolon delimiter
out.parent.mkdir(parents=True, exist_ok=True) out.parent.mkdir(parents=True, exist_ok=True)
with out.open("w", encoding="utf-8", newline="") as f: with out.open("w", encoding="utf-8", newline="") as f:
writer = csv.writer(f) writer = csv.writer(f, delimiter=";", quoting=csv.QUOTE_ALL)
writer.writerow(["question", "details"]) #writer.writerow(["fråga", "svar", "kategori"])
for r in rows: for r in rows:
writer.writerow(r) writer.writerow(r)

File diff suppressed because it is too large Load Diff