<commit_before>import os
import logging
from Tkinter import *
from tkFileDialog import *
from tkMessageBox import *
from model.directory import *
from model.file import *

logging.basicConfig(level=logging.INFO)

targetDirectory = askdirectory()
target = directory(targetDirectory)

if askokcancel("Confirm!", "Press Ok to Move File in " + targetDirectory):
    target.OrganizeFiles('type');
else:
    for k, v in target.classFiles('type').items():
        logging.info (k)
        for f in v:
            logging.info (f)<commit_msg>param in terminal run command<commit_after>#-*- coding: UTF-8 -*-

import os,sys
import logging
from Tkinter import *
from tkFileDialog import *
from tkMessageBox import *
from model.directory import *
from model.file import *

logging.basicConfig(level=logging.INFO)

#参数1，整理方式
if len(sys.argv) >= 2 and sys.argv[1] in ['type', 'month', 'ext']:
    ogzType = sys.argv[1]
else:
    ogzType = 'type'

#参数2，目标目录
if len(sys.argv) >= 3 and os.path.exists(sys.argv[2]):
    targetDirectory = sys.argv[2]
else:
    targetDirectory = askdirectory()

target = directory(targetDirectory)

if askokcancel("Confirm!", "Press Ok to Move File in \n" + targetDirectory):
    if len(sys.argv) >= 4 and sys.argv[3] in ['-R']:
        target.OrganizeFilesAll(ogzType);
    else:
        target.OrganizeFiles(ogzType);
else:
    if len(sys.argv) >= 4 and sys.argv[3] in ['-R']:
        for k, v in target.classFilesAll(ogzType).items():
            logging.info (k)
            for f in v:
                logging.info (f)
    else:
        for k, v in target.classFiles(ogzType).items():
            logging.info (k)
            for f in v:
                logging.info (f)
{'fraction_non_alphanumeric': 0.12721893491124261, 'fraction_numerical': 0.007692307692307693, 'mean_word_length': 3.0845410628019323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2505153', 'n_tokens_mistral': 561, 'n_tokens_neox': 553, 'n_words': 157}