<commit_before>#encoding:utf-8

# Some utils can be useful.
from utils import get_url


# Write here subreddit name. Like this one for /r/jokes.
subreddit = 'fakealbumcovers'
# This is for your public telegram channel.
t_channel = '@fakealbumcovers'

separators = [" - ", " | ", "- ", "-", " by "]

def send_post(submission, r2t):
    what, url, ext = get_url(submission)
    
    fullTitle = submission.title
    link = submission.shortlink
    
    title = fullTitle
    artist = ""
    
    for sep in separators:
        if sep in fullTitle:
            if sep == " by ":
                artist = fullTitle[fullTitle.find(sep)+len(sep):]]
                title = fullTitle[:fullTitle.find(sep)
            else:
                artist = fullTitle[:fullTitle.find(sep)]
                title = fullTitle[fullTitle.find(sep)+len(sep):]
            break
    
    if artist != "":
        text = '<b>{title}</b>\n<i>{artist}</i>\n\n▶️ {link}\n🎵 {channel}'.format(
                title=title, artist=artist, link=link, channel=t_channel)
    else:
        text = '<b>{title}</b>\n\n▶️ {link}\n🎵 {channel}'.format(
                title=title, link=link, channel=t_channel)
        
       
    if what in ['text', 'other', 'album']:
        return False
    elif what == 'img':<commit_msg>Added better formatting for self titled<commit_after>#encoding:utf-8

# Some utils can be useful.
from utils import get_url


# Write here subreddit name. Like this one for /r/jokes.
subreddit = 'fakealbumcovers'
# This is for your public telegram channel.
t_channel = '@fakealbumcovers'

separators = [" - ", " | ", "- ", "-", " by "]

def send_post(submission, r2t):
    what, url, ext = get_url(submission)
    
    fullTitle = submission.title
    link = submission.shortlink
    
    title = fullTitle
    artist = ""
    
    for sep in separators:
        if sep in fullTitle:
            if sep == " by ":
                artist = fullTitle[fullTitle.find(sep)+len(sep):]]
                title = fullTitle[:fullTitle.find(sep)
            else:
                artist = fullTitle[:fullTitle.find(sep)]
                title = fullTitle[fullTitle.find(sep)+len(sep):]
            break
     
    if title.lower() == "self titled":
        title = artist
    
    if artist != "":
        text = '<b>{title}</b>\n<i>{artist}</i>\n\n▶️ {link}\n🎵 {channel}'.format(
                title=title, artist=artist, link=link, channel=t_channel)
    else:
        text = '<b>{title}</b>\n\n▶️ {link}\n🎵 {channel}'.format(
                title=title, link=link, channel=t_channel)
        
       
    if what in ['text', 'other', 'album']:
        return False
    elif what == 'img':
{'fraction_non_alphanumeric': 0.14547494390426327, 'fraction_numerical': 0.0014958863126402393, 'mean_word_length': 2.1807372175980975, 'pattern_counts': {'":': 5, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5144244', 'n_tokens_mistral': 858, 'n_tokens_neox': 864, 'n_words': 202}