sgsunder / python-szurubooru

Python interface for szurubooru
GNU General Public License v3.0
10 stars 1 forks source link

Applying Tags to posts, Tag implications, etc #2

Closed ghost closed 4 years ago

ghost commented 4 years ago

(Sorry for the format once again)

Going to try to make this short. I've been reading the code a little better and I'm having a better understanding of the project's code. However I'm running into another problem as tags won't apply to posts or as implications for other tags. I've gone to both posts and tags and found they didn't change anything. I've tried this from the the guide (which I'm well aware is not finished and isn't updated for the revisions and commits done more recently). I wanna know if I'm missing something or if it's bugged at the moment.

marvel_comics_tag = pyszuru.Tag.new(mybooru, "marvel_comics")
spiderman_tag = pyszuru.Tag.new(mybooru, "spiderman")
spiderman_tag.implications = spiderman_tag.implications + [marvel_comics_tag]

Here's a snippet of code I've been trying for adding tags to posts

new_post_tag = pyszuru.Tag.new(mybooru, "spooky")
token = mybooru.upload_file(filename);
my_new_post = pyszuru.Post.new(mybooru, token, safestat);
my_new_post.tags = my_new_post.tags+[new_post_tag];
sgsunder commented 4 years ago

After you made all changes, call my_new_post.push()

ghost commented 4 years ago

Thank you, I'll test it now. I'll refer back if I have any further issues.

ghost commented 4 years ago

It's working! Thank you ^^