mirror of
https://github.com/ff4500/utilities.git
synced 2026-07-01 11:47:04 -05:00
sectioning up script
This commit is contained in:
19
images/news_md/_lib/config.sh
Normal file
19
images/news_md/_lib/config.sh
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# User configuration
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# User specified directories (no trailing slashes!)
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
base_dir="./news_articles"
|
||||||
|
news_dir="${base_dir}/news"
|
||||||
|
template_dir="${base_dir}/_templates"
|
||||||
|
|
||||||
|
# Variables for functions - Don't mess with these
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
user_parameter="$1"
|
||||||
|
p="${user_parameter}"
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
base_dir="./news_articles"
|
|
||||||
news_dir="${base_dir}/news"
|
|
||||||
template_dir="${base_dir}/_templates"
|
|
||||||
|
|
||||||
user_parameter="$1"
|
|
||||||
p="${user_parameter}"
|
|
||||||
|
|
||||||
# if [ ! -z "$p" ]; then
|
# if [ ! -z "$p" ]; then
|
||||||
# article_dir="${news_dir}/${p}"
|
# article_dir="${news_dir}/${p}"
|
||||||
# echo "${article_dir}"
|
# echo "${article_dir}"
|
||||||
@@ -61,6 +54,11 @@ cp_templates() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# -----
|
||||||
|
|
||||||
|
run() {
|
||||||
mk_news
|
mk_news
|
||||||
mk_folder
|
mk_folder
|
||||||
cp_templates
|
cp_templates
|
||||||
|
echo -e "yay!"
|
||||||
|
}
|
||||||
6
images/news_md/go.sh
Executable file
6
images/news_md/go.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source ./_lib/config.sh
|
||||||
|
source ./_lib/functions.sh
|
||||||
|
|
||||||
|
run
|
||||||
BIN
images/news_md/news_articles/news/asd/asd_template.psd
Normal file
BIN
images/news_md/news_articles/news/asd/asd_template.psd
Normal file
Binary file not shown.
Reference in New Issue
Block a user