get-got / discord-downloader-go

A Discord bot program to download and otherwise handle files sent in Discord channels with extensive configuration. Can be used as a genuine Discord Bot or user account / self-bot
MIT License
271 stars 30 forks source link

Save images based on text #107

Closed Scrooge200FES closed 8 months ago

Scrooge200FES commented 8 months ago

Hi,

In my server, I post groups of images where the only message text is the creator of the image. This way, if I want to find images by a certain artist, I can just look up their name and find it. Is there a way I could download the images (with their original filenames) into a folder, where the folder name matches the text attached to the images?

get-got commented 8 months ago

@Scrooge200FES Sorry for not getting to this sooner. I've replaced the divideByServer, divideByChannel etc with a subfolders list.

As of commit https://github.com/get-got/discord-downloader-go/commit/fd422b5ccd97ff7f06d76b1633a8982f5ee70d5a and https://github.com/get-got/discord-downloader-go/commit/9b707388339dc07c5b39aa80afbdac72815bb9c4 , which will be live as of v2.2.3, you can do something like this:

image

which will equate to: ./ddg-test/2023/Server/Category/Channel/Content-Author/images/file.jpg