summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortradam <git.tradam.fyi>2021-08-21 02:37:58 -0400
committertradam <git.tradam.fyi>2021-08-21 02:37:58 -0400
commitdbcb42e5380183a6922d6df5d60c2e0e42083325 (patch)
treeed99e18c03bd451f4fb647149a5dba3372837b15
downloadmdbooks-scripts-dbcb42e5380183a6922d6df5d60c2e0e42083325.tar.gz
mdbooks-scripts-dbcb42e5380183a6922d6df5d60c2e0e42083325.zip
.
-rw-r--r--README.mdown13
-rwxr-xr-xmove.sh3
-rwxr-xr-xrename.sh3
3 files changed, 19 insertions, 0 deletions
diff --git a/README.mdown b/README.mdown
new file mode 100644
index 0000000..a526fc3
--- /dev/null
+++ b/README.mdown
@@ -0,0 +1,13 @@
+# Scripts for MDBooks
+
+These scripts are for helping with creating and editing MDBooks
+
+---
+
+### move.sh
+`params: Name NewUrl`
+This is for when you want to move a file. It will rename all the Urls to the new one you give, it matches to the name you give.
+
+### rename.sh
+`params: NewName Url`
+This is for when you want to rename something to a new one. It will rename all instances with the new one you give, it matches to the url you give.
diff --git a/move.sh b/move.sh
new file mode 100755
index 0000000..568535d
--- /dev/null
+++ b/move.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+find ./src -type f -exec sed -i 's/\['"$1"'](.*)/['"$1"']('"$2"')/g' {} \;
diff --git a/rename.sh b/rename.sh
new file mode 100755
index 0000000..4b2efc0
--- /dev/null
+++ b/rename.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+find ./src -type f -exec sed -i 's/\[.*]('"$2"')/['"$1"']('"$2"')/g' {} \;