I want to split one big org file into smaller files. I have found function which do this but it's also exports it to html. So how can I just export the content? Without this function (org-html-export-as-html) ?
(defun my-org-export-each-level-1-headline-to-html (&optional scope)
(interactive)
(org-map-entries
(lambda ()
(let* ((title (car (last (org-get-outline-path t))))
(dir (file-name-directory buffer-file-name))
(filename (concat dir title ".html")))
(org-narrow-to-subtree)
(org-html-export-as-html)
(write-file filename)
(kill-current-buffer)
(widen)))
"LEVEL=1" scope))
Here is similar topic but with exporting to md files split every single org headline in a org file to separate md/org files