Code Monkey home page Code Monkey logo

Comments (3)

darkdragn avatar darkdragn commented on August 26, 2024

Yeah, I can look into it. The complication here is that we compile a list of files from all posts without preserving the origination post details. I could add that as a supplemental field, or run the download from the top level to get around this. When I threw this together, I did things the way they are to make it easier to add a progress bar. It's honestly not a big change to make. In all honesty, the CLI is the only thing that would receive the overhaul. The backend user and post libraries are already prepped to do just this.
Would you prefer {PostTitle} - {FileName}.{FileExtension} or just {PostTitle} - {FileIndex}.{FileExtension} ? I would need the index to make sure posts with multiple files get everything... Hhhmmm, a bigger undertaking would be adding metadata to image posts that could preserve everything. All post details, dates and all of the API metadata, but that's a pipe dream for a later date.

from party.

darkdragn avatar darkdragn commented on August 26, 2024

Just finished adding it! Check it out:

darkdragn@penguin:~/src/party$ party kemono patreon Creux --post-title --limit 5
2023-11-03 01:33:28.110 | DEBUG    | party.cli:pull_user:114 - Excluded Extensions: []
⠹ User found: creux; parsing posts...Duplicate files found, recommend using post_id
Embedded objects found; saving to creux/.embedded
Downloading from user: creux
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:23<00:00,  2.10s/it]
2023-11-03 01:34:16.140 | INFO     | party.cli:pull_user:199 - Output status: Counter({<StatusEnum.SUCCESS: 1>: 11})                                                                      
darkdragn@penguin:~/src/party$ ls creux/                                                                                                                                                  
'Bex & Keit - Medium Support_Bex_MediumSupport_1_Twitter.jpg'         'Lois Lane - Strip game - Part 2_LoisLane_StripGame02_1_Twitter.jpg'                                                
'Bex & Keit - Medium Support_Bex_MediumSupport_2_Patreon.jpg'         'Lois Lane - Strip game - Part 2_LoisLane_StripGame02_2_Twitter.jpg'
'Bex - Yellow Jacket_Bex_YellowJacket_1_Twitter.jpg'                  'Lois Lane - Strip game - Part 2_LoisLane_StripGame02_3_Patreon.jpg'
'Bex - Yellow Jacket_Bex_YellowJacket_2_Patreon.jpg'                  'Lucia - Concept Sheet_Splatball_Lucia_1_Twitter.jpg'
'Lois Lane - Strip game - Part 1_LoisLane_StripGame01_1_Twitter.jpg'  'Lucia - Concept Sheet_Splatball_Lucia_2_Patreon.jpg'
'Lois Lane - Strip game - Part 1_LoisLane_StripGame01_2_Patreon.jpg'

If you want to mix, I added robust formatting options. You can do things like: "{ref.post_id}_{ref.post_title}_{ref.index:03}.{ref.extension}" to get something like:

darkdragn@penguin:~/src/party$ party kemono patreon Creux --limit 5 --file-format "{ref.post_id}_{ref.post_title}_{ref.index:03}.{ref.extension}"
2023-11-03 01:36:43.384 | DEBUG    | party.cli:pull_user:114 - Excluded Extensions: []
⠧ User found: creux; parsing posts...Duplicate files found, recommend using post_id
Embedded objects found; saving to creux/.embedded
Downloading from user: creux
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:14<00:00,  1.09it/s]
2023-11-03 01:37:23.913 | INFO     | party.cli:pull_user:199 - Output status: Counter({<StatusEnum.SUCCESS: 1>: 16})                                                                      
darkdragn@penguin:~/src/party$ ls creux/                                                                                                                                                  
'86307825_Bex - Yellow Jacket_000.jpg'              '86462263_Lois Lane - Strip game - Part 2_003.jpg'             'Bex - Yellow Jacket_Bex_YellowJacket_1_Twitter.jpg'                   
'86307825_Bex - Yellow Jacket_001.jpg'              '88614838_Bex & Keit - Medium Support_000.jpg'                 'Bex - Yellow Jacket_Bex_YellowJacket_2_Patreon.jpg'                   
'86307825_Bex - Yellow Jacket_002.jpg'              '88614838_Bex & Keit - Medium Support_001.jpg'                 'Lois Lane - Strip game - Part 1_LoisLane_StripGame01_1_Twitter.jpg'
'86410843_Lois Lane - Strip game - Part 1_000.jpg'  '88614838_Bex & Keit - Medium Support_002.jpg'                 'Lois Lane - Strip game - Part 1_LoisLane_StripGame01_2_Patreon.jpg'
'86410843_Lois Lane - Strip game - Part 1_001.jpg'  '88831815_Lucia - Concept Sheet_000.jpg'                       'Lois Lane - Strip game - Part 2_LoisLane_StripGame02_1_Twitter.jpg'
'86410843_Lois Lane - Strip game - Part 1_002.jpg'  '88831815_Lucia - Concept Sheet_001.jpg'                       'Lois Lane - Strip game - Part 2_LoisLane_StripGame02_2_Twitter.jpg'
'86462263_Lois Lane - Strip game - Part 2_000.jpg'  '88831815_Lucia - Concept Sheet_002.jpg'                       'Lois Lane - Strip game - Part 2_LoisLane_StripGame02_3_Patreon.jpg'
'86462263_Lois Lane - Strip game - Part 2_001.jpg'  'Bex & Keit - Medium Support_Bex_MediumSupport_1_Twitter.jpg'  'Lucia - Concept Sheet_Splatball_Lucia_1_Twitter.jpg'
'86462263_Lois Lane - Strip game - Part 2_002.jpg'  'Bex & Keit - Medium Support_Bex_MediumSupport_2_Patreon.jpg'  'Lucia - Concept Sheet_Splatball_Lucia_2_Patreon.jpg'

from party.

darkdragn avatar darkdragn commented on August 26, 2024

@Pineapple1989 if you get a chance, let me know what you think about the updates. Also, check out #24 to see if you like that change too!

from party.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.