From 56652858bc43aca3e6c48a6334e352d444bd3f90 Mon Sep 17 00:00:00 2001 From: Zaine Arch Date: Sat, 17 Jan 2026 10:06:07 +0000 Subject: [PATCH] Cleaned and fixed the org link broken export error --- 20260111204228-rss_articles.org | 1 + all-files.json | 5 -- all-files.org | 1 - book-notes/Head First Design Patterns.org | 60 ----------------------- index.org | 1 + lisp/build.el | 12 +---- search-index.py | 5 +- 7 files changed, 7 insertions(+), 78 deletions(-) delete mode 100644 book-notes/Head First Design Patterns.org diff --git a/20260111204228-rss_articles.org b/20260111204228-rss_articles.org index 5ab4cdb..c422ab3 100644 --- a/20260111204228-rss_articles.org +++ b/20260111204228-rss_articles.org @@ -2,6 +2,7 @@ :ID: 3a8274ef-f2fe-486d-9caf-0c56982b9917 :END: #+title: RSS Articles +#+filetags: :research:articles: * [[https://blog.pragmaticengineer.com/downdetector-and-the-real-cost-of-no-upstream-dependencies/][Downdetector and the real cost of no upstream dependencies]] :PROPERTIES: diff --git a/all-files.json b/all-files.json index 17b2206..1bab8f4 100644 --- a/all-files.json +++ b/all-files.json @@ -244,11 +244,6 @@ "title": "haskell_notes", "url": "/20241212013207-haskell_notes.html" }, - { - "id": "dc9ece84-0b14-4afd-b25a-786cf1618996", - "title": "HFDP", - "url": "/Head First Design Patterns.html" - }, { "id": "086ca3ca-39ec-4d37-b56d-b6d9f51e6873", "title": "how-to-solve-leetcode", diff --git a/all-files.org b/all-files.org index a09dc03..4e9a946 100644 --- a/all-files.org +++ b/all-files.org @@ -67,7 +67,6 @@ This file is auto-generated. Do not edit manually. * H - [[id:347d2663-515b-4d9a-9ee9-7706ee86a845][haskell_notes]] -- [[id:dc9ece84-0b14-4afd-b25a-786cf1618996][HFDP]] - [[id:086ca3ca-39ec-4d37-b56d-b6d9f51e6873][how-to-solve-leetcode]] * I diff --git a/book-notes/Head First Design Patterns.org b/book-notes/Head First Design Patterns.org deleted file mode 100644 index 86bf401..0000000 --- a/book-notes/Head First Design Patterns.org +++ /dev/null @@ -1,60 +0,0 @@ -#+title: HFDP - -* Head First Design Patterns -:PROPERTIES: -:NOTER_DOCUMENT: ../../../pdfs/bootcamp/Head First Design Patterns.pdf -:ID: dc9ece84-0b14-4afd-b25a-786cf1618996 -:END: - -** Chapter 1 -:PROPERTIES: -:NOTER_PAGE: 36 -:END: -*** Structural: -The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it. - -- Encapsulate what varies - -- Favor composition over inheritance - -- Program to interfaces, not implementations - -** Chapter 2 -:PROPERTIES: -:NOTER_PAGE: 82 -:END: -*** Observer: -The Observer Pattern defines a one-to-many dependency between objects so that when -one object changes state, all of its dependents are notified and updated automatically. - -Subjects, or as we also know them, Observables, update Observers using a common -interface - -Observers are loosely coupled in that the Observable knows nothing about them, -other than that they implement the Observer interface. - -You can push or pull data from the Observable when using the pattern (pull is -considered more “correct”). - -Don’t depend on a specific order of notification for your Observers. - -Java has several implementations of the Observer Pattern, including the general -purpose java.util.Observable - -- Strive for loosely coupled designs between objects that interact -** Notes for page 137 -:PROPERTIES: -:NOTER_PAGE: 137 -:END: - -- Classes should be open for extension, but closed for modification. -** Notes for page 142 -:PROPERTIES: -:NOTER_PAGE: 142 -:END: -Notes for the decaroter pattern. -** Notes for page 143 -:PROPERTIES: -:NOTER_PAGE: 143 -:END: -Decorator pattern: The Decorator Pattern attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality. diff --git a/index.org b/index.org index d8bb7bb..98d93b6 100644 --- a/index.org +++ b/index.org @@ -2,6 +2,7 @@ :ID: DE792A73-FD00-4048-82D8-AB6E84E869F2 :END: #+title: Index +#+filetags: :index: * [[id:b2fb976a-c23c-4275-8a53-da343c223b97][Brain MOC]] diff --git a/lisp/build.el b/lisp/build.el index 2785ba3..4002869 100755 --- a/lisp/build.el +++ b/lisp/build.el @@ -25,10 +25,10 @@ (require 'seq) (require 'cl-lib) -(setq org-export-with-broken-links t) +;(setq org-export-with-broken-links t) (setq org-id-locations-file "~/.emacs.d/.org-id-locations") - + (defun z/org-html-wrap-content-for-stack (orig-fun contents info) "Wrap Org HTML #content in stack container, leaving postamble outside." (let* ((html (funcall orig-fun contents info)) @@ -194,14 +194,6 @@ Created with %c on Arch $")) - (defun my/get-org-roam-backlinks (filename) "Return backlinks for the given org-roam file. FILENAME should be the full path to the org-roam file." (save-excursion diff --git a/search-index.py b/search-index.py index 8d54e89..ebdd946 100644 --- a/search-index.py +++ b/search-index.py @@ -25,7 +25,6 @@ def generate_search_index(org_dir, out_file): org_dir = Path(org_dir).expanduser() out_file = Path(out_file).expanduser() - # Recursively find all .org files (excluding Emacs lockfiles like .#foo.org) org_files = [ f for f in org_dir.rglob("*.org") if not re.search(r"/\.#[^/]+\.org$", str(f)) @@ -34,10 +33,12 @@ def generate_search_index(org_dir, out_file): index = [] for file_path in org_files: org_id, title = get_org_id_and_title(file_path) + filepath_relative = file_path.relative_to(org_dir).with_suffix('') + if org_id: index.append({ "title": title, - "url": f"/{file_path.stem}.html", + "url": f"/{filepath_relative}.html", "id": org_id })