diff options
author | kaotisk <kaotisk@arching-kaos.com> | 2021-11-20 00:08:54 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.com> | 2021-11-20 00:08:54 +0200 |
commit | 4680df3e880be45c83a298002557fa6ac1b3a423 (patch) | |
tree | 9f15ca2f32e90730ad779ed49a9d16e1a18aa083 | |
parent | 7e57767f0c0355f808486111580be41c2f467a10 (diff) | |
download | 01-NEWS-4680df3e880be45c83a298002557fa6ac1b3a423.tar.gz 01-NEWS-4680df3e880be45c83a298002557fa6ac1b3a423.tar.bz2 01-NEWS-4680df3e880be45c83a298002557fa6ac1b3a423.zip |
Packing to latest changes
-rw-r--r-- | README | 24 | ||||
-rwxr-xr-x | bin/add-new.sh | 6 | ||||
-rwxr-xr-x | readme | 2 | ||||
-rwxr-xr-x | utils/01-migrate.sh (renamed from bin/migrate.sh) | 0 | ||||
-rwxr-xr-x | utils/02-migrate_to_folder.sh (renamed from bin/migrate_to_folder.sh) | 0 |
5 files changed, 27 insertions, 5 deletions
@@ -0,0 +1,24 @@ +Kaotisk Hund news repository +============================ +(at last a git blog, lol) + +Description +----------- +I always wanted to post somewhere. I found that this way I could use git to maintain a history of changes. +Some changes came along the way (see Migration tools). + +Usage +----- +- sh bin/add-new.sh + Creates a new file with name from the time you executed the command in form of 20010101_235959. After you are done editing, it renames it by adding your first line of the file in the name, replacing all letters with lowercase and spaces with underscores. Delimiter of the 2 attibutes is one dash "-". + + +Migration tools +--------------- +- utils/01-migrate.sh + Reads the title (first line of file) and puts in on the filename + Note: Make sure you don't use symbols other than letters and spaces in your titles + +- utils/02-migrate_to_folder.sh + Moves all articles to news folder + Note: the articles are recognized with "2" in filename :) diff --git a/bin/add-new.sh b/bin/add-new.sh index 086cff8..5685184 100755 --- a/bin/add-new.sh +++ b/bin/add-new.sh @@ -4,7 +4,7 @@ vi $NEWS_FILE echo "Renaming..." TITLE="$(head -n 1 $NEWS_FILE)" TO_FILE=$NEWS_FILE-$(echo $TITLE | tr '[:upper:]' '[:lower:]' | sed -e 's/ /\_/g' ) -mv $NEWS_FILE $TO_FILE +mv $NEWS_FILE news/$TO_FILE echo "Adding to git repo..." -git add $TO_FILE -git commit -m "Added $NEWS_FILE with $(head -n 1 $TO_FILE)" +git add news/$TO_FILE +git commit -m "Added $TO_FILE with $(head -n 1 news/$TO_FILE)" @@ -1,2 +0,0 @@ -Kaotisk Hund news repository -(at last a git blog, lol) diff --git a/bin/migrate.sh b/utils/01-migrate.sh index 8b6db20..8b6db20 100755 --- a/bin/migrate.sh +++ b/utils/01-migrate.sh diff --git a/bin/migrate_to_folder.sh b/utils/02-migrate_to_folder.sh index 93e64f2..93e64f2 100755 --- a/bin/migrate_to_folder.sh +++ b/utils/02-migrate_to_folder.sh |