Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine artist names/sources? #6829

Closed
kojiinari opened this issue Jan 14, 2025 · 3 comments
Closed

Combine artist names/sources? #6829

kojiinari opened this issue Jan 14, 2025 · 3 comments

Comments

@kojiinari
Copy link

Is it possible to combine multiple sources for the same artist into one group, instead of by social?

For example, I follow the same artist on pixiv, fanbox, and Tumblr. Sometimes they post different art to each one, and I would like to capture all of it. Unfortunately under the default directory convention this puts the art in 3 different locations, one under pixiv, one under fanbox, and one under Tumblr.

Is it possible to assign an alias or do something to somehow combine these to be under one directory of just "artist-name"? This would allow for easier viewing and duplication tracking.

@Fghgks
Copy link

Fghgks commented Jan 14, 2025

Directories and filenames can be adjusted via configuration file.
https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractordirectory
To create new if you do not have one use command gallery-dl --config-create
https://github.com/mikf/gallery-dl/blob/master/docs/options.md#configuration-options

in 3 different locations, one under pixiv, one under fanbox, and one under Tumblr.

By default if no directory is specified, gallery-dl just set directory equal to the name of category (site). (this is from where separate folders/directories like /pixiv/, /fanfox/ etc emerge)

Technically you can specify directory for each artist in configuration file using corresponding keywords:

	"pixiv":
	{
		"directory"	  : {
			"user['name'] == 'artist_1_name_on_pixiv'" : ["general_name_1"],
			"user['name'] == 'artist_2_name_on_pixiv'" : ["general_name_2"],
			....
		}
	},
	"fanbox": {....

If names are the same, it is not even necessary.

Going to a grand scale user would need user-created replacement list (aliases list) for that.
Maybe it would be nice to have gallery-dl supported such list as an input option to modify (full) filename before applying.

@Hrxn
Copy link
Contributor

Hrxn commented Jan 15, 2025

Easiest way:

Collect and group those artist profile links in an input file, and then use the input file options to change their output destination etc. to whatever you like..

"""Process an input file.
Lines starting with '#' and empty lines will be ignored.
Lines starting with '-' will be interpreted as a key-value pair
separated by an '='. where
'key' is a dot-separated option name and
'value' is a JSON-parsable string.
These configuration options will be applied
while processing the next URL only.
Lines starting with '-G' are the same as above, except these options
will be applied for *all* following URLs, i.e. they are Global.
Everything else will be used as a potential URL.
Example input file:
# settings global options
-G base-directory = "/tmp/"
-G skip = false
# setting local options for the next URL
-filename="spaces_are_optional.jpg"
-skip = true
https://example.org/
# next URL uses default filename and 'skip' is false.
https://example.com/index.htm # comment1
https://example.com/404.htm # comment2
"""

@mikf
Copy link
Owner

mikf commented Jan 17, 2025

Another way: symbolic links.

Link the respective pixiv, fanbox, etc directories to the same general directory and all files will be downloaded into the general one. This might not be as simple on Windows, though.

mkdir general_name
ln -s general_name artist_name_on_pixiv
ln -s general_name artist_name_on_fanbox
ln -s general_name artist_name_on_tumblr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants