From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Re: Announcement: org-one-to-many Date: Thu, 23 Oct 2014 21:39:37 +0700 Message-ID: References: <87ppdlfotc.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf3063dae5a2f9c405061808de Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhJYH-0001co-RJ for emacs-orgmode@gnu.org; Thu, 23 Oct 2014 10:39:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhJYA-0000Nn-Kd for emacs-orgmode@gnu.org; Thu, 23 Oct 2014 10:39:45 -0400 Received: from mail-vc0-x22d.google.com ([2607:f8b0:400c:c03::22d]:50432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhJYA-0000NS-BL for emacs-orgmode@gnu.org; Thu, 23 Oct 2014 10:39:38 -0400 Received: by mail-vc0-f173.google.com with SMTP id ij19so742196vcb.4 for ; Thu, 23 Oct 2014 07:39:37 -0700 (PDT) In-Reply-To: <87ppdlfotc.fsf@wmi.amu.edu.pl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcin Borkowski Cc: Org mailing list --20cf3063dae5a2f9c405061808de Content-Type: text/plain; charset=ISO-8859-1 Hi, breaking a big .org file in many small pieces is one of my major concerns with .org and one which gives me lots of problems. Thank you very much for having the clear objective of one-to-many. If your goal is HTML export, you can do a function that iterates over all headers and exports them (see below). But then links are broken, you need to decide filenames, etc. Which is what your project solves. org-one-to-many has a shortcoming which is present in so many "org to blog" systems: it expects a particular structure (in this case, all headers at the same level). I suggest you iterate over search results of a normal search: For instance, you can get all headers tagged with "tobesplit" like this: (org-map-entries (lambda () (line-number-at-pos)) "+tobesplit" 'agenda) One of the possible searches is "headers at level 2", so this new system would include the one you have. Greetings On Tue, Oct 21, 2014 at 10:02 PM, Marcin Borkowski wrote: > Hi all, > > a long time ago I asked here about a way to split an Org file into a > bunch of smaller ones. One of the answers I got was that the tricky > part is maintaining internal links in a reasonable way. > > It is probably overoptimistic on my side, but it seems that this problem > is solved now. The code is not very elegant, and I will be actively > working on it (I want to write an org-to-e-learning exporter, based on > the HTML one, and this is a small part of that effort), but here it is > for testing/review/bug reports/feature requests/any other kind of > feedback. > > And here it is: https://github.com/mbork/org-one-to-many > > Best, > > -- > Marcin Borkowski > http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski > Adam Mickiewicz University > > --20cf3063dae5a2f9c405061808de Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
breaking a big = .org file in many small pieces is one of my major concerns with .org and on= e which gives me lots of problems. Thank you very much for having the clear= objective of one-to-many.

If your goal is HTML export, you can do a= function that iterates over all headers and exports them (see below). But = then links are broken, you need to decide filenames, etc. Which is what you= r project solves.

org-one-to-many has a shortcomin= g which is present in so many „org to blog“ systems: it expects= a particular structure (in this case, all headers at the same level). I su= ggest you iterate over search results of a normal search:

For = instance, you can get all headers tagged with "tobesplit" like th= is:
(org-map-entries (lambda () (line-number-at-pos))  "+tobes= plit" 'agenda)

One of the possible searches is &bdquo= ;headers at level 2“, so this new system would include the one you ha= ve.

Greetings

On Tue, Oct 21, 2014 at 10:02 PM, Marcin Borkowski &l= t;mbork@wmi.amu.e= du.pl> wrote:
Hi all,

a long time ago I asked here about a way to split an Org file into a
bunch of smaller ones.  One of the answers I got was that the tricky part is maintaining internal links in a reasonable way.

It is probably overoptimistic on my side, but it seems that this problem is solved now.  The code is not very elegant, and I will be actively working on it (I want to write an org-to-e-learning exporter, based on
the HTML one, and this is a small part of that effort), but here it is
for testing/review/bug reports/feature requests/any other kind of
feedback.

And here it is: https://github.com/mbork/org-one-to-many

Best,

--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University


--20cf3063dae5a2f9c405061808de--