Skip to content

Commit

Permalink
fix(scripts): Use .mdoc extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Feb 4, 2024
1 parent 2e2b7de commit 55901e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/getInfoCoverBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function getDataForBooks() {
continue;
}

const markdownContent = fs.readFileSync(new URL(dirBasename + ".md", bookDir)).toString();
const markdownContent = fs.readFileSync(new URL(dirBasename + ".mdoc", bookDir)).toString();
const isbn = matter(markdownContent).data.isbn;
const response = await fetch(
`https://openlibrary.org/api/books?bibkeys=ISBN:${isbn}&jscmd=details&format=json`,
Expand Down
2 changes: 1 addition & 1 deletion scripts/getInfoCoverGame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function getDataForGames() {
}

const markdownContent = fs
.readFileSync(new URL(path.basename(gameDir.pathname) + ".md", gameDir))
.readFileSync(new URL(path.basename(gameDir.pathname) + ".mdoc", gameDir))
.toString();
const gameID = matter(markdownContent).data.igdb;
const response = await client
Expand Down
2 changes: 1 addition & 1 deletion scripts/getInfoCoverMovieShow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function getDataForMoviesAndShows(type: "movies" | "shows") {
}

const markdownContent = fs
.readFileSync(new URL(path.basename(movieShowDir.pathname) + ".md", movieShowDir))
.readFileSync(new URL(path.basename(movieShowDir.pathname) + ".mdoc", movieShowDir))
.toString();
const id = matter(markdownContent).data.tmdb;
const response = (await fetch(
Expand Down

0 comments on commit 55901e3

Please sign in to comment.