From ac8b56a00defff4cb44a6a34251a19d8ab6159b6 Mon Sep 17 00:00:00 2001 From: kumavis Date: Wed, 13 Jun 2018 22:56:46 -0700 Subject: notices - notices collection is now manually edited --- notices/notice-delete.js | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 notices/notice-delete.js (limited to 'notices/notice-delete.js') diff --git a/notices/notice-delete.js b/notices/notice-delete.js deleted file mode 100644 index 652f96159..000000000 --- a/notices/notice-delete.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require('fs') -var path = require('path') -var prompt = require('prompt') -var open = require('open') -var extend = require('extend') -var notices = require('./notices.json') - - -console.log('List of Notices') -console.log(`ID \t DATE \t\t\t TITLE`) -notices.forEach((notice) => { - console.log(`${(' ' + notice.id).slice(-2)} \t ${notice.date} \t ${notice.title}`) -}) -prompt.get(['id'], (error, res) => { -prompt.start() - if (error) { - console.log("Exiting...") - process.exit() - } - var index = notices.findIndex((notice) => { return notice.id == res.id}) - if (index === -1) { - console.log('Notice not found. Exiting...') - } - notices.splice(index, 1) - fs.unlink(`notices/archive/notice_${res.id}.md`) - fs.writeFile(`notices/notices.json`, JSON.stringify(notices)) -}) -- cgit v1.2.3