Skip to content
This repository was archived by the owner on Apr 17, 2026. It is now read-only.
This repository was archived by the owner on Apr 17, 2026. It is now read-only.

Add more meaningful file names #15

Description

@Alfa-Q

Option to add more meaningful file names when saving the media. This could be done through format strings. Or just a general string.

Use the fields on the Post class in the format string. So at the moment these would be the options.

  • date
  • postid
  • copyright
  • character
  • artist
  • general

The format string would always be followed by _{count} to prevent naming conflicts. The count field is just a number that increments every time there is a duplicate name.

Example

Post(
    date = '2020-11-29 08:30:31-06',
    postid = 12345678,
    artist = [
        Tag(
            tagtype = 'arist',
            tag = 'yoshida_akihiko',
            tagname_display = 'yoshida akihiko',
            tagurl = '/search.html?q=yoshida_akihiko'
        )
    ],
    character = [
        Tag(
            tagtype = 'character',
            tag = 'yorha_no._2_type_b',
            tagname_display = 'yorha no. 2 type b',
            'tagurl' = '/search.html?q=yorha_no._2_type_b'
        }
    ],
    copyright = [
        Tag(
            tagurl: '/search.html?q=nier_(series)',
            tagtype = 'copyright',
            tag = 'nier_(series)',
            tagname_display = 'nier (series)'
        ),
        Tag(
            tagurl: '/search.html?q=nier_automata',
            tagtype = 'copyright',
            tag = 'nier_automata',
            tagname_display = 'nier automata'
        )
    ]
)

{copyright}_{character}_{artist}

"nier_series_yorha_no._2_type_b_yoshida_akihiko_0"
"nier_series_yorha_no._2_type_b_yoshida_akihiko_1"
"nier_series_yorha_no._2_type_b_yoshida_akihiko_2"

nier_automata_{artist}

This example could be useful if you already know that you queried the posts using the positive_tag nier_automata. So if there are multiple copyright tags (i.e. nier_(series) and nier_automata) then you can apply the one you prefer.

"nier_automata_yoshida_akihiko_0"
"nier_automata_yoshida_akihiko_1"
"nier_automata_yoshida_akihiko_2"

This is not a perfect solution and does have some issues... Just an idea.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions