{"id":16947714,"url":"https://github.com/toyboot4e/zenn","last_synced_at":"2026-05-19T03:56:30.892Z","repository":{"id":39572886,"uuid":"304268199","full_name":"toyboot4e/zenn","owner":"toyboot4e","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-13T04:51:19.000Z","size":9035,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T23:28:33.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zenn.dev/toyboot4e","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toyboot4e.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-10-15T09:01:13.000Z","updated_at":"2025-01-13T04:51:14.000Z","dependencies_parsed_at":"2024-04-15T15:26:55.344Z","dependency_job_id":"5170d4e9-119e-447a-907f-aee78a9f41cb","html_url":"https://github.com/toyboot4e/zenn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Fzenn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Fzenn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Fzenn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toyboot4e%2Fzenn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toyboot4e","download_url":"https://codeload.github.com/toyboot4e/zenn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776270,"owners_count":20508503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:48:06.569Z","updated_at":"2026-05-19T03:56:30.858Z","avatar_url":"https://github.com/toyboot4e.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: Zenn\n\n** One org file as one book\n\nNew book is composed as one org file, using [[https://zenn.dev/conao3/articles/ox-zenn-usage][ox-zenn]].\n\n*** Export function\n\n#+BEGIN_SRC elisp\n(defun org-zenn-export-buffer-to-book (\u0026optional org-dir)\n    \"Runs subtree export to each level 1 headings. Respects `#+BOOK_DIR'.\"\n    (interactive)\n    (org-babel-tangle)\n\n    ;; export all\n    (let* ((default-dir default-directory)\n           (pub-dir (car (cdr (car (org-collect-keywords '(\"BOOK_DIR\")))))))\n        ;; cd into the target directory\n        (when pub-dir (cd pub-dir))\n        ;; export all\n        (unwind-protect\n                (org-map-entries\n                 (lambda ()\n                     (let* ((is-draft (org-entry-get nil \"DRAFT\")))\n                         (unless is-draft\n                             (org-zenn-export-to-markdown nil t))))\n                 \"LEVEL=1\")\n            ;; be sure to come back to the default directory\n            (when pub-dir (cd default-dir)))))\n#+END_SRC\n\n*** File structure\n\nThe repository structure:\n\n#+BEGIN_SRC txt\n/zenn\n├── books/\n├── img/\n└── org/\n#+END_SRC\n\nThe org book structure is shown in [[./org/kyopro-bonsai-hs.org]].\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoyboot4e%2Fzenn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoyboot4e%2Fzenn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoyboot4e%2Fzenn/lists"}