emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: edgar@openmail.cc
To: emacs-orgmode@gnu.org
Subject: Re: :noweb from external file
Date: Sat, 01 Jul 2017 07:36:05 +0000	[thread overview]
Message-ID: <2c15f83c1f7a5cba0779b24f86024cc7@openmail.cc> (raw)
In-Reply-To: <e4880e3e5575d7a1c70a32c461c28faa@openmail.cc>

On 2017-07-01 06:53, edgar@openmail.cc wrote:
> * Contribution: Script to convert directory with source to an org-file
> So, by now, everybody knows that I don't understand squat about lisp.
> Yet, I created a little bash script (for which there may be an
> alternative already) to convert a directory with source files (in
> Python) to source blocks within an Org file. It should be easily
> adaptable to other languages. I hope that it is useful to someone. See
> attachment.
> 

Oops, missed the name file in the awk line

modified   dir-to-org-babel.org
@@ -58,7 +58,7 @@ load into the Library of Babel by doing
            while IFS= read -r -d '' file; do
                # *** Print file only if it has code
                # **** Get number of lines with awk
-              numl=$(awk 'END{print NR}')
+              numl=$(awk 'END{print NR}' "$file")
                if [[ "$numl" -gt 0 ]]; then
                    # *** Print the file names (in quotation
                    # format; with spaces like \ )

-------------------------------------------------

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  

      reply	other threads:[~2017-07-01 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.109.1498147218.16109.emacs-orgmode@gnu.org>
2017-06-22 22:08 ` :noweb from external file edgar
2017-06-24  6:03   ` edgar
2017-07-01  6:53     ` edgar
2017-07-01  7:36       ` edgar [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=2c15f83c1f7a5cba0779b24f86024cc7@openmail.cc \
    --to=edgar@openmail.cc \
    --cc=emacs-orgmode@gnu.org \
    /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).