On 2017-07-01 06:53, ed...@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!