added mybib from PhD

This commit is contained in:
robin 2026-05-08 13:30:06 +01:00
parent 8f297047bd
commit 9228f19a3a
4 changed files with 1709 additions and 4 deletions

View File

@ -1,7 +1,7 @@
---
# Quaternions
---
---
These are four dimensional numbers useful for rotation. Unlike matrices quaternions do not cause problems when rotating i.e. when the determinant is very small. Like complex number rotation, they simply wrap around.

View File

@ -1 +1,4 @@
![[PXL_20241017_144621074.jpg_compressed.jpeg]]
![UNDER_DESK](PXL_20241017_144621074.jpg_compressed.jpeg)

76
make_missing_pages.py Executable file
View File

@ -0,0 +1,76 @@
#!/usr/bin/env python3
import os
import re
from pathlib import Path
VAULT_PATH = os.path.expanduser("~/gdrive/your_vault_here")
vault = Path(VAULT_PATH)
wiki_link_re = re.compile(r"\[\[([^\]|#]+)")
markdown_link_re = re.compile(r"\[[^\]]+\]\(([^)#]+)")
existing_pages = {}
for md in vault.rglob("*.md"):
existing_pages[md.stem.lower()] = md
created = []
for md in vault.rglob("*.md"):
try:
text = md.read_text(encoding="utf-8")
except Exception as e:
print(f"Could not read {md}: {e}")
continue
links = []
# [[Page]] or [[Page|alias]]
links.extend(wiki_link_re.findall(text))
# [title](Page.md)
links.extend(markdown_link_re.findall(text))
for link in links:
link = link.strip()
if not link:
continue
# Ignore web/email/anchor links
if link.startswith(("http://", "https://", "mailto:", "#")):
continue
# Strip anchor sections
link = link.split("#", 1)[0]
# Remove .md if already present
if link.lower().endswith(".md"):
link = link[:-3]
target = vault / f"{link}.md"
# Obsidian-style loose match by page name
if Path(link).name.lower() in existing_pages:
continue
if target.exists():
continue
target.parent.mkdir(parents=True, exist_ok=True)
title = Path(link).name
dummy_text = f"# {title}\n"
try:
target.write_text(dummy_text, encoding="utf-8")
existing_pages[target.stem.lower()] = target
created.append(target)
print(f"Created: {target}")
except Exception as e:
print(f"Failed to create {target}: {e}")
print()
print(f"Done. Created {len(created)} missing pages.")

1626
mybib.bib Normal file

File diff suppressed because it is too large Load Diff