<commit_before>#!/usr/bin/env python3

import os

import voatist

def main():
    voat = voatist.Voat("voatist", "0.0.1", "X_____X", os.environ.get("VOAT_API_KEY"), os.environ.get("VOAT_API_USERNAME"), os.environ.get("VOAT_API_PASSWORD"), "access_token")

    username = "X_____X"

    for com in voat.comment_stream():
        print("[+{} -{}] {}".format(com.upvotes, com.downvotes, com.content.replace("\n", " ").replace("\r", "")[:70]), "...")
    print()

    print("{}'s messages:".format(username))
    for msg in voat.user(username).messages():
        print(msg)
        print()

    print("{}'s subscriptions:".format(username))
    one_sub = False
    for sub in voat.user(username).subscriptions():
        if sub.type == "subverse":
            print("*", sub)
            if not one_sub:
                for subm in sub.submissions():
                    print("  [+{} -{}] {}".format(subm.upvotes, subm.downvotes, subm.title))
                    for com in subm.comments():
                        print("    [+{} -{}] {}".format(com.upvotes, com.downvotes, com.content.replace("\n", " ").replace("\r", "")[:66]), "...")
                one_sub = True
        elif sub.type == "set":
            print(">", sub)<commit_msg>cleaner line printing so they don't wrap<commit_after>#!/usr/bin/env python3

import os

import voatist

def single_line(*data):
    limit = 60
    news = " ".join([str(s) for s in data]).replace("\n", " ").replace("\r", "")
    if len(news) > limit:
        news = "{}...".format(news[:limit-3])
    print(news)

def main():
    voat = voatist.Voat("voatist", "0.0.1", "X_____X", os.environ.get("VOAT_API_KEY"), os.environ.get("VOAT_API_USERNAME"), os.environ.get("VOAT_API_PASSWORD"), "access_token")

    username = "X_____X"

    for com in voat.comment_stream():
        single_line("[+{} -{}] {}".format(com.upvotes, com.downvotes, com.content))
    print()

    print("{}'s messages:".format(username))
    for msg in voat.user(username).messages():
        print(msg)
        print()

    print("{}'s subscriptions:".format(username))
    one_sub = False
    for sub in voat.user(username).subscriptions():
        if sub.type == "subverse":
            single_line("*", sub)
            if not one_sub:
                for subm in sub.submissions():
                    single_line("  [+{} -{}] {}".format(subm.upvotes, subm.downvotes, subm.title))
                    for com in subm.comments():
                        single_line("    [+{} -{}] {}".format(com.upvotes, com.downvotes, com.content))
                one_sub = True
        elif sub.type == "set":
            single_line(">", sub)
{'fraction_non_alphanumeric': 0.1917549167927383, 'fraction_numerical': 0.0056732223903177, 'mean_word_length': 2.435064935064935, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 6, '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': '427491', 'n_tokens_mistral': 897, 'n_tokens_neox': 886, 'n_words': 174}