diff --git a/README.md b/README.md index a31fe06c..6606af5e 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ Several options are available via command-line switches. Type `bash bg2obs.sh -h | `-e` | Include editorial headers (default is Off)| | `-a` | Create an alias in the YAML front matter with a more user-friendly chapter title (e.g., "Genesis 1") (default is Off)| | `-i` | Show progress information while the script is running (i.e. "verbose" mode) (default is Off)| +| `-n` | Start chapters and verses on a new line that starts with an H5 or H6 heading (default is Off)| | `-c` | Include *inline* navigation for the [breadcrumbs](https://github.com/SkepticMystic/breadcrumbs) plugin (e.g. 'up', 'next','previous') (default is Off)| | `-y` | Include navigation for the breadcrumbs plugin in the *frontmatter* (YAML) (default is Off)| | `-h` | Display help | diff --git a/bg2obs.sh b/bg2obs.sh index 233c7b08..63a76eca 100644 --- a/bg2obs.sh +++ b/bg2obs.sh @@ -38,11 +38,12 @@ boldwords="false" # Set words of Jesus in bold headers="false" # Include editorial headers aliases="false" # Create an alias in the YAML front matter for each chapter title verbose="false" # Show download progress for each chapter +newline="false" # Start chapters and verses on a new line breadcrumbs_inline="false" # Print breadcrumbs in the file breadcrumbs_yaml="false" # Print breadcrumbs in the YAML # Process command line args -while getopts 'v:beaicy?h' c +while getopts 'v:beaincy?h' c do case $c in v) translation=$OPTARG ;; @@ -50,9 +51,10 @@ do e) headers="true" ;; a) aliases="true" ;; i) verbose="true" ;; + n) newline="true" ;; c) breadcrumbs_inline="true" ;; y) breadcrumbs_yaml="true" ;; - h|?) usage ;; + h|?) usage ;; esac done @@ -168,14 +170,18 @@ filename=${export_prefix}$chapter # Setting the filename fi fi - if [[ $boldwords = "true" && $headers = "false" ]] ; then - text=$(ruby bg2md.rb -e -c -b -f -l -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script - elif [[ $boldwords = "true" && $headers = "true" ]] ; then - text=$(ruby bg2md.rb -c -b -f -l -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script - elif [[ $boldwords = "false" && $headers = "true" ]] ; then - text=$(ruby bg2md.rb -e -c -f -l -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script - else - text=$(ruby bg2md.rb -e -c -f -l -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script + if [[ $boldwords = "true" && $headers = "false" && $newline = "false" ]] ; then + text=$(ruby bg2md.rb -e -c -b -f -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script + elif [[ $boldwords = "true" && $headers = "true" && $newline = "false" ]] ; then + text=$(ruby bg2md.rb -c -b -f -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script + elif [[ $boldwords = "false" && $headers = "true" && $newline = "false" ]] ; then + text=$(ruby bg2md.rb -e -c -f -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script + elif [[ $boldwords = "true" && $headers = "false" && $newline = "true" ]] ; then + text=$(ruby bg2md.rb -e -c -b -f -l -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script + elif [[ $boldwords = "true" && $headers = "true" && $newline = "true" ]] ; then + text=$(ruby bg2md.rb -c -b -f -l -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script + elif [[ $boldwords = "false" && $headers = "true" && $newline = "true" ]] ; then + text=$(ruby bg2md.rb -e -c -f -l -r -v "${translation}" "${book} ${chapter}") # This calls the 'bg2md_mod' script fi @@ -222,7 +228,7 @@ alias="Aliases: [${book} ${chapter}]" # Add other aliases or 'Tags:' here if des elif [ ${aliases} == "false" ] && [ ${breadcrumbs_yaml} == "true" ]; then yaml="${yaml_start}${bc_yaml}${yaml_end}" fi - + export="${yaml}${export}" # Export @@ -269,4 +275,4 @@ find . -name "*.md" -print0 | xargs -0 perl -pi -e 's/\