<commit_before>#!/usr/bin/env python3
# -*- coding: utf8 -*-
################################################################################
##
## Copyright (C) 2012 Typhos
##
## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at http://mozilla.org/MPL/2.0/.
##
################################################################################

import argparse
import os
import os.path
import random
import readline
import shutil
import subprocess
import sys
import time
import urllib.error
import urllib.request

import lxml.html

UA = "BetterPonymotes stylesheet update checker (1req/2.5secs; pm Typhos)"

def cmd_help(args):
    parser = argparse.ArgumentParser(description="Print help text", prog="help")
    args = parser.parse_args(args)

    print(" ".join(sorted(Commands)))

def cmd_list(args):
    parser = argparse.ArgumentParser(description="List updated files", prog="list")
    args = parser.parse_args(args)

    print("Stylesheet updates:")
    subprocess.call(["git", "status", "-s", "minified-css", "source-css"])
    print("Emote updates:")
    subprocess.call(["git", "status", "-s", "emotes"])

def download_url(num, total, url):
    print("[%s/%s]: %s" % (num+1, total, url))
    req = urllib.request.Request(url, headers={"User-Agent": UA})<commit_msg>Shell tweak to show tag updates<commit_after>#!/usr/bin/env python3
# -*- coding: utf8 -*-
################################################################################
##
## Copyright (C) 2012 Typhos
##
## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at http://mozilla.org/MPL/2.0/.
##
################################################################################

import argparse
import os
import os.path
import random
import readline
import shutil
import subprocess
import sys
import time
import urllib.error
import urllib.request

import lxml.html

UA = "BetterPonymotes stylesheet update checker (1req/2.5secs; pm Typhos)"

def cmd_help(args):
    parser = argparse.ArgumentParser(description="Print help text", prog="help")
    args = parser.parse_args(args)

    print(" ".join(sorted(Commands)))

def cmd_list(args):
    parser = argparse.ArgumentParser(description="List updated files", prog="list")
    args = parser.parse_args(args)

    print("Stylesheet updates:")
    subprocess.call(["git", "status", "-s", "minified-css", "source-css"])
    print("Emote updates:")
    subprocess.call(["git", "status", "-s", "emotes"])
    print("Tag updates:")
    subprocess.call(["git", "status", "-s", "tags"])

def download_url(num, total, url):
    print("[%s/%s]: %s" % (num+1, total, url))
    req = urllib.request.Request(url, headers={"User-Agent": UA})
{'fraction_non_alphanumeric': 0.24818024263431543, 'fraction_numerical': 0.009705372616984401, 'mean_word_length': 5.0125, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1114173', 'n_tokens_mistral': 888, 'n_tokens_neox': 851, 'n_words': 250}