kemono-dl icon indicating copy to clipboard operation
kemono-dl copied to clipboard

Post browser + layout changes

Open sybarix opened this issue 2 years ago • 4 comments

Description

Would be good if a html could be created to act as a post browser, referencing downloaded contents/comments/etc. There used to be an old program called yiff.bat that could do this as per the following screenshot (while yiff.party was still alive anyway), and I have an old release that might be useful as a reference. yiff bat example

Secondly, I forked the latest release (2022.01.29) and managed to edit main.py to avoid individual post folders, to achieve the following layout: KemonoDL └── username [user id] ├── post id [index] - file.ext ├── comments.html ├── content.html └── content_links.txt

Might be useful to consider adding that option in the main post/future releases in case anyone else doesn't like individual post folders.

sybarix avatar Jan 30 '22 05:01 sybarix

The next thing I was planning to work on was output and path variables that could be set like what yt-dlp does. I'm not sure if I will keep the current way default because I can see how for individual posts it's kind of annoying. Would probably have to include more info in the files names by default though like post id to stop duplicate named files from overwriting each other.

So is this post browser just an html file that has all posts content, comment, and file in it? I'll have to look into html formatting as I have not written much html just know how to scrape it. I will have to look into this regardless for formatting the dicord stuff anyways. So maybe?

AlphaSlayer1964 avatar Jan 30 '22 05:01 AlphaSlayer1964

Would probably have to include more info in the files names by default though like post id to stop duplicate named files from overwriting each other.

Yup that's what I did, works well so far.

So is this post browser just an html file that has all posts content, comment, and file in it?

Yes, the following zip contains part of what I have. I have included only one creator and one post to keep the filesize down. Pardon the NSFW nature of the content. YP.zip

All the code should be contained within yiff.bat, as it is downloaded alone and creates all the other files when run.

sybarix avatar Jan 30 '22 06:01 sybarix

Maybe I'll ask a question not quite on your topic. But how can you make sure that the folders are renamed differently? For example, to have only the date and then the title of the post. I have it like this now. Default. 22 And how to make it so that only the date, separated by a hyphen, and the name of the set remain? 23 Is it hard to do. I'm just not very good with python files and not a programmer at all.

Caxapok-X avatar May 28 '22 19:05 Caxapok-X

--date-strf-pattern "%Y-%m-%d" --filename-pattern "{published} {title}\{index}_{filename}.{ext}"

You may also need to change the other filename patterns so look at Output Patterns. Please in the future make a new issue.

AlphaSlayer1964 avatar May 29 '22 23:05 AlphaSlayer1964