Compare commits
No commits in common. "da80c4690ba47a03f98b69f62c752e131af5d76d" and "93df271f7921fc8f0f1a39fa9f908f570c73e7fe" have entirely different histories.
da80c4690b
...
93df271f79
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@bearmetal/pdf-tools",
|
"name": "@bearmetal/pdf-tools",
|
||||||
"version": "1.0.3",
|
"version": "1.0.2",
|
||||||
"license": "GPL 3.0",
|
"license": "GPL 3.0",
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"dev": "deno run -A --env-file=.env main.ts",
|
"dev": "deno run -A --env-file=.env main.ts",
|
||||||
|
@ -3,10 +3,8 @@ import { join } from "@std/path";
|
|||||||
|
|
||||||
export async function getAsciiArt(art: string) {
|
export async function getAsciiArt(art: string) {
|
||||||
try {
|
try {
|
||||||
const artFilePath =
|
const artFilePath = Deno.env.get("BEARMETAL_ASCII_PATH") ||
|
||||||
Deno.env.get("BEARMETAL_ASCII_PATH") || import.meta.dirname
|
join(import.meta.dirname || "", "../asciiart.txt");
|
||||||
? join(import.meta.dirname || "", "../asciiart.txt")
|
|
||||||
: "https://git.cyborggrizzly.com/BearMetal/pdf-tools/raw/branch/main/asciiart.txt";
|
|
||||||
let artFileText: string;
|
let artFileText: string;
|
||||||
if (artFilePath?.startsWith("http")) {
|
if (artFilePath?.startsWith("http")) {
|
||||||
artFileText = await fetch(artFilePath).then((res) => res.text());
|
artFileText = await fetch(artFilePath).then((res) => res.text());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user