1
0
mirror of https://github.com/ihabunek/toot.git synced 2025-05-18 00:58:30 -04:00

Remove deprecated tags commands

This commit is contained in:
Ivan Habunek 2025-01-12 09:42:03 +01:00
parent a84a7e2ee0
commit c98af14a84
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C
2 changed files with 6 additions and 34 deletions

View File

@ -1,3 +1,8 @@
0.48.0:
date: TBA
changes:
- "BREAKING: Remove deprecated commands: `tags_followed`, `tags_follow`, and `tags tags_unfollow`. Use `tags followed`, `tags follow`, and `tags tags unfollow` instead."
0.47.1:
date: 2024-11-27
changes:

View File

@ -4,7 +4,7 @@ import json as pyjson
from toot import api
from toot.cli import cli, pass_context, json_option, Context
from toot.entities import Tag, from_dict
from toot.output import print_tag_list, print_warning
from toot.output import print_tag_list
@cli.group()
@ -128,36 +128,3 @@ def unfeature(ctx: Context, tag: str, json: bool):
click.echo(response.text)
else:
click.secho(f"✓ Tag #{featured_tag['name']} is no longer featured", fg="green")
# -- Deprecated commands -------------------------------------------------------
@cli.command(name="tags_followed", hidden=True)
@pass_context
def tags_followed(ctx: Context):
"""List hashtags you follow"""
print_warning("`toot tags_followed` is deprecated in favour of `toot tags followed`")
response = api.followed_tags(ctx.app, ctx.user)
print_tag_list(response)
@cli.command(name="tags_follow", hidden=True)
@click.argument("tag")
@pass_context
def tags_follow(ctx: Context, tag: str):
"""Follow a hashtag"""
print_warning("`toot tags_follow` is deprecated in favour of `toot tags follow`")
tag = tag.lstrip("#")
api.follow_tag(ctx.app, ctx.user, tag)
click.secho(f"✓ You are now following #{tag}", fg="green")
@cli.command(name="tags_unfollow", hidden=True)
@click.argument("tag")
@pass_context
def tags_unfollow(ctx: Context, tag: str):
"""Unfollow a hashtag"""
print_warning("`toot tags_unfollow` is deprecated in favour of `toot tags unfollow`")
tag = tag.lstrip("#")
api.unfollow_tag(ctx.app, ctx.user, tag)
click.secho(f"✓ You are no longer following #{tag}", fg="green")