Skip to content

Commit 28fdd72

Browse files
committed
Remove unused node-fetch import and clean up code
1 parent 836c6c2 commit 28fdd72

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

update-gist.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ async function updateGist(data) {
3737
}
3838

3939
const lines = [];
40+
lines.push('🦇🦇 **BADMAN Todoist Stats** 🦇🦇\n');
4041
const { karma, completed_count, days_items, week_items, goals } = data;
41-
42-
if (karma !== undefined) lines.push(`🏆 ${formatNumber(karma)} Karma Points`);
43-
if (days_items && days_items[0]) lines.push(`🌞 Completed ${formatNumber(days_items[0].total_completed)} tasks today`);
44-
if (week_items && week_items[0]) lines.push(`📅 Completed ${formatNumber(week_items[0].total_completed)} tasks this week`);
45-
if (completed_count !== undefined) lines.push(`✅ Completed ${formatNumber(completed_count)} tasks so far`);
46-
if (goals && goals.last_daily_streak) lines.push(`⌛ Current streak is ${formatNumber(goals.last_daily_streak.count)} days`);
42+
if (karma !== undefined) lines.push(`🦸‍♂️ **${formatNumber(karma)}** Karma Points`);
43+
if (days_items && days_items[0]) lines.push(`🌃 **${formatNumber(days_items[0].total_completed)}** tasks completed tonight`);
44+
if (week_items && week_items[0]) lines.push(`🦹‍♂️ **${formatNumber(week_items[0].total_completed)}** tasks completed this week`);
45+
if (completed_count !== undefined) lines.push(`🦇 **${formatNumber(completed_count)}** tasks completed so far`);
46+
if (goals && goals.last_daily_streak) lines.push(`🦾 **${formatNumber(goals.last_daily_streak.count)}**-night streak`);
47+
lines.push('\n🦇🦇🦇🦇🦇🦇🦇\n');
48+
lines.push('"The night is darkest just before the dawn. And I promise you, the dawn is coming."');
49+
lines.push('"All men have limits. They learn what they are and learn not to exceed them. I ignore mine."');
50+
lines.push(`\n_Updated at ${new Date().toLocaleString()}_`);
4751

4852
if (lines.length === 0) return;
4953

@@ -53,7 +57,7 @@ async function updateGist(data) {
5357
gist_id: gistId,
5458
files: {
5559
[filename]: {
56-
filename: ` Todoist Stats`,
60+
filename: ` Todoist Stats`,
5761
content: lines.join("\n"),
5862
},
5963
},

0 commit comments

Comments
 (0)