Forked from brunoamaral/build-page-bundles-for-instagram.sh
Created
December 18, 2020 20:12
-
-
Save bugsysop/2b8ab4628e1cd9f8ebdced4a38f9574f to your computer and use it in GitHub Desktop.
Revisions
-
brunoamaral renamed this gist
Nov 27, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
brunoamaral created this gist
Nov 27, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ for file in * do date=`cut -d' ' -f 1 <<< "$file"` dir=${file%".jpg"} mkdir "$dir" mv "$file" "$dir" time=`cut -d' ' -f 2 <<< "$file" | sed -e 's/\./\:/g'` datetime=$date'T'$time'+00:00' printf '%s\n' '---' 'categories: ["instagram"]' "date: $datetime" 'description: ""' 'draft: false' 'resources:' " - src: '$file'" ' name: "header"' 'layout: instagram' 'slug:' 'stories:' 'subtitle:' 'title: Untitled' 'options:' ' unlisted: false' ' showHeader: true' '---' '' "<img src=\"$file\" />" | tee $dir/index.md $dir/index.pt.md done