From 294fd044deff8e727a29847712a25149c1545063 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 15 Nov 2016 13:29:23 +0100 Subject: Rename entries.json to metadata.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- Makefile | 2 +- entries.json | 18 ------------------ metadata.json | 18 ++++++++++++++++++ scripts/build.py | 2 +- scripts/publish | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 entries.json create mode 100644 metadata.json diff --git a/Makefile b/Makefile index 5db47e0..678221a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -build: $(wildcard entries/*.rst) $(wildcard templates/*.html) entries.json +build: $(wildcard entries/*.rst) $(wildcard templates/*.html) metadata.json scripts/build.py publish: check-entry-given check-title-given $(ENTRY) diff --git a/entries.json b/entries.json deleted file mode 100644 index f1339b9..0000000 --- a/entries.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "title": "About me", - "date": "2016-11-15", - "file": "about", - "published": "False" - }, - { - "title": "New blog!", - "date": "2016-11-12", - "file": "new-blog" - }, - { - "title": "Style", - "date": "2016-11-15", - "file": "style" - } -] diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..f1339b9 --- /dev/null +++ b/metadata.json @@ -0,0 +1,18 @@ +[ + { + "title": "About me", + "date": "2016-11-15", + "file": "about", + "published": "False" + }, + { + "title": "New blog!", + "date": "2016-11-12", + "file": "new-blog" + }, + { + "title": "Style", + "date": "2016-11-15", + "file": "style" + } +] diff --git a/scripts/build.py b/scripts/build.py index 52f2775..03b83b3 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -72,7 +72,7 @@ if __name__ == '__main__': trim_blocks=True, lstrip_blocks=True) - with open('entries.json') as f: + with open('metadata.json') as f: entries = json.load(f) published, unpublished = split_entries(entries) diff --git a/scripts/publish b/scripts/publish index e76409e..b761265 100755 --- a/scripts/publish +++ b/scripts/publish @@ -11,7 +11,7 @@ main() { local date="$(date -Id)" mv "$file" entries/"$file" - jq "[.[], { title: \"$title\", date: \"$date\", file: \"$file\" }]"