Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions src/file/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ const htmlImageRegex = /<img[^>]*src=["'](https?:\/\/[^"']+)["'][^>]*>/g;
* @param text - Text to search for image URLs.
* @returns Array of unique image URLs.
*/

/**
*
* @param text
*/

/**
*
* @param text
*/

/**
*
* @param text
*/
export function extractImageUrls(text: string): string[] {
const urls: string[] = [];
let match: RegExpExecArray | null;
Expand All @@ -55,24 +40,6 @@ export function extractImageUrls(text: string): string[] {
* @param downloadDir - Directory path where images will be saved.
* @returns Array of relative file paths for downloaded images.
*/

/**
*
* @param urls
* @param downloadDir
*/

/**
*
* @param urls
* @param downloadDir
*/

/**
*
* @param urls
* @param downloadDir
*/
export async function downloadImages(
urls: string[],
downloadDir: string,
Expand Down Expand Up @@ -116,25 +83,6 @@ export async function downloadImages(
* @param dest - Local filesystem path where the file will be written.
* @returns Promise that resolves once the file has been fully written.
*/

/**
*
* @param url
* @param dest
*/

/**
*
* @param url
* @param dest
*/

/**
*
* @param url
* @param dest
*/

function downloadFile(url: string, dest: string): Promise<void> {
return axios.get(url, { responseType: 'stream' }).then((response) => {
return new Promise<void>((resolve, reject) => {
Expand Down