From: "briangpowell ." <briangpowellms@gmail.com>
To: Andrew <heartsayer@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: convert outline to .csv
Date: Mon, 18 Jan 2016 02:21:49 -0500 [thread overview]
Message-ID: <CAFm0skGVHVp_TEa=rk-yPzp0k6g1pqxy7OcsuhAzHcUYDj9r8Q@mail.gmail.com> (raw)
In-Reply-To: <loom.20160118T055951-306@post.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
* Something like this might do it:
tr "\n" "\",\"" < file > newfile
sed -e "s/\",\"* /\n\",\"*/g" newfile > blah.csv
On Mon, Jan 18, 2016 at 1:44 AM, Andrew <heartsayer@gmail.com> wrote:
> Example:
>
> * Micro topic 1
> ** Microbes are small
> ** You can't see them!
> *** Isn't that something?
> * Micro topic 2
> ** I hope I like the teacher
> *** She will be great!
> ** Micro is cool!
>
> I'd like to convert them into a .csv file like so:
>
> "* Micro topic 1"," "** Microbes are small", "** You can't see them!", "***
> Isn't that something?",
> "* Micro topic 2", "** I hope I like the teacher", "*** She will be
> great!",
> "** Micro is cool!"
>
> Where the first column contains only top level headings (lines beginning
> with
> one star), and the following columns are subheadings belonging to the top
> level heading. So for each top level heading, there is one row containing
> the top level heading and its children. I've been messing around with a
> solution in python with regular expressions as well as macros but haven't
> gotten very far. Any suggestions?
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1701 bytes --]
prev parent reply other threads:[~2016-01-18 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 6:44 convert outline to .csv Andrew
2016-01-18 7:21 ` briangpowell . [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFm0skGVHVp_TEa=rk-yPzp0k6g1pqxy7OcsuhAzHcUYDj9r8Q@mail.gmail.com' \
--to=briangpowellms@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=heartsayer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).