def tweet(ctx, created_at, twtfile, text):
    """Append a new tweet to your twtxt file."""
    text = expand_mentions(text)
    tweet = Tweet(text, created_at) if created_at else Tweet(text)

    pre_tweet_hook = ctx.obj["conf"].pre_tweet_hook
    if pre_tweet_hook:
        run_pre_tweet_hook(pre_tweet_hook, ctx.obj["conf"].options)

    if not add_local_tweet(tweet, twtfile):
        click.echo("✗ Couldn’t write to file.")
    else:
        post_tweet_hook = ctx.obj["conf"].post_tweet_hook
        if post_tweet_hook:
            run_post_tweet_hook(post_tweet_hook, ctx.obj["conf"].options)
def tweet(ctx, created_at, twtfile, text):
    """Append a new tweet to your twtxt file."""
    text = expand_mentions(text)
    tweet = Tweet(text, created_at) if created_at else Tweet(text)

    pre_tweet_hook = ctx.obj["conf"].pre_tweet_hook
    if pre_tweet_hook:
        run_pre_tweet_hook(pre_tweet_hook, ctx.obj["conf"].options)

    if not add_local_tweet(tweet, twtfile):
        click.echo("✗ Couldn’t write to file.")
    else:
        post_tweet_hook = ctx.obj["conf"].post_tweet_hook
        if post_tweet_hook:
            run_post_tweet_hook(post_tweet_hook, ctx.obj["conf"].options)
def tweet ( ctx , created_at , twtfile , text ) : text = expand_mentions ( text ) tweet = Tweet ( text , created_at ) if created_at else Tweet ( text ) pre_tweet_hook = ctx . obj [ "conf" ] . pre_tweet_hook if pre_tweet_hook : run_pre_tweet_hook ( pre_tweet_hook , ctx . obj [ "conf" ] . options ) if not add_local_tweet ( tweet , twtfile ) : click . echo ( "✗ Couldn’t write to file.") else : post_tweet_hook = ctx . obj [ "conf" ] . post_tweet_hook if post_tweet_hook : run_post_tweet_hook ( post_tweet_hook , ctx . obj [ "conf" ] . options )
Append a new tweet to your twtxt file.
Append a new tweet to your twtxt file .