From 54cad69fbbaaf098c632a8c27dedfd85600392d9 Mon Sep 17 00:00:00 2001 From: Darragh O'Riordan Date: Mon, 2 Oct 2023 13:09:53 +1100 Subject: [PATCH] fix: windows paths cannot use colons --- src/app/MarketingWeek/MarketingWeekScreen.tsx | 2 +- src/electron/marketingWeek/services/dev-history-cache.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/MarketingWeek/MarketingWeekScreen.tsx b/src/app/MarketingWeek/MarketingWeekScreen.tsx index 745bc39..9c8948e 100644 --- a/src/app/MarketingWeek/MarketingWeekScreen.tsx +++ b/src/app/MarketingWeek/MarketingWeekScreen.tsx @@ -33,7 +33,7 @@ const faqs = [ id: 3, question: 'How does it work?', answer: - "Based on the configuration you provided for your Git repositories and other tools, this tool will scan your work and with OpenAI's products, it will compile summaries of what you achieved.", + "This tool will take all the building work you did for a give date and summarize what you achieved. Then you can use the example social media posts and summaries as starting points for your marketing. Don't use the generated posts directly, people can tell it's fake. Use the output for inspiration. I HIGHLY recommend rewriting the posts in your own voice.", }, { id: 4, diff --git a/src/electron/marketingWeek/services/dev-history-cache.ts b/src/electron/marketingWeek/services/dev-history-cache.ts index 06ee281..313d32b 100644 --- a/src/electron/marketingWeek/services/dev-history-cache.ts +++ b/src/electron/marketingWeek/services/dev-history-cache.ts @@ -3,6 +3,7 @@ import fs from 'fs' import fsp from 'fs/promises' import { CacheFileSchema, IncrementAnalysis } from '../models/IncrementAnalysis' import { app } from 'electron' +import { format } from 'date-fns' export async function getFromCache( startDate: Date, @@ -48,7 +49,7 @@ export function getBaseCachePath(): string { async function getCachePath(startDate: Date): Promise { const cachePath = path.join( getBaseCachePath(), - `${startDate.toISOString()}.json`, + `${format(startDate, 'yyyy-MM-dd')}.json`, ) return cachePath }