diff --git a/BaseNumber/basenumber.py b/BaseNumber/basenumber.py index 80af20d..814087c 100644 --- a/BaseNumber/basenumber.py +++ b/BaseNumber/basenumber.py @@ -9,7 +9,7 @@ def from_base(number, base, alphabet=None): raise TypeError('base must be an int.') if base == 10: - return number + return int(number) if alphabet is None: alphabet = ALPHABET diff --git a/Fusker/fusker.py b/Fusker/fusker.py new file mode 100644 index 0000000..7eba573 --- /dev/null +++ b/Fusker/fusker.py @@ -0,0 +1,138 @@ +import collections +import itertools +import string +import sys + +from voussoirkit import basenumber + +class Landmark: + def __init__(self, opener, closer, parser): + self.opener = opener + self.closer = closer + self.parser = parser + +def barsplit(chars): + wordlist = [] + wordbuff = [] + def flush(): + if not wordbuff: + return + word = fusk_join(wordbuff) + wordlist.append(word) + wordbuff.clear() + for item in chars: + if item == '|': + flush() + else: + wordbuff.append(item) + flush() + return wordlist + +def fusk_join(items): + form = '' + fusks = [] + result = [] + for item in items: + if isinstance(item, str): + form += item + else: + form += '{}' + fusks.append(item) + product = itertools.product(*fusks) + for group in product: + f = form.format(*group) + result.append(f) + return result + +def fusk_spinner(items): + for item in items: + if isinstance(item, str): + yield item + else: + yield from item + +def parse_spinner(characters): + words = barsplit(characters) + spinner = fusk_spinner(words) + return spinner + +def fusk_range(lo, hi, padto=0, base=10, lower=False): + for x in range(lo, hi+1): + x = basenumber.to_base(x, base) + x = x.rjust(padto, '0') + if lower: + x = x.lower() + yield x + +def parse_range(characters): + r = ''.join(characters) + (lo, hi) = r.split('-') + lo = lo.strip() + hi = hi.strip() + + lowers = string.digits + string.ascii_lowercase + uppers = string.digits + string.ascii_uppercase + lohi = lo + hi + lower = False + if all(c in string.digits for c in lohi): + base = 10 + elif all(c in lowers for c in lohi): + lower = True + base = 36 + elif all(c in uppers for c in lohi): + base = 36 + else: + base = 62 + + if (not lo) or (not hi): + raise ValueError('Invalid range', r) + if len(lo) > 1 and lo.startswith('0'): + padto = len(lo) + if len(hi) != padto: + raise ValueError('Inconsistent padding', lo, hi) + else: + padto = 0 + lo = basenumber.from_base(lo, base) + hi = basenumber.from_base(hi, base) + + frange = fusk_range(lo, hi, padto=padto, base=base, lower=lower) + return frange + + +landmarks = { + '{': Landmark('{', '}', parse_spinner), + '[': Landmark('[', ']', parse_range), +} + +def fusker(fstring, landmark=None, depth=0): + escaped = False + result = [] + buff = [] + + if isinstance(fstring, str): + fstring = collections.deque(fstring) + while fstring: + character = fstring.popleft() + if escaped: + buff.append('\\' + character) + escaped = False + elif character == '\\': + escaped = True + elif landmark and character == landmark.closer: + buff = [landmark.parser(buff)] + break + elif character in landmarks: + subtotal = fusker(fstring, landmark=landmarks[character]) + buff.extend(subtotal) + else: + buff.append(character) + if not landmark: + buff = parse_spinner(buff) + return buff + return result + +if __name__ == '__main__': + pattern = sys.argv[1] + fusk = fusker(pattern) + for result in fusk: + print(result) diff --git a/OpenDirDL/README.md b/OpenDirDL/README.md index 871d6c7..8d262f3 100644 --- a/OpenDirDL/README.md +++ b/OpenDirDL/README.md @@ -3,9 +3,9 @@ Open Dir DL The open directory downloader. -## Installation +## Installing requirements - pip install requirements.txt + pip install -r requirements.txt ## Usage @@ -17,12 +17,15 @@ See inside opendirdl.py for usage instructions. - **[addition]** A new feature was added. - **[bugfix]** Incorrect behavior was fixed. -- **[change]** An existing feature was slightly modified or parameters were renamed. +- **[change]** An existing feature was modified or parameters were renamed. - **[cleanup]** Code was improved, comments were added, or other changes with minor impact on the interface. - **[removal]** An old feature was removed.   +- 2017 01 06 + - **[cleanup]** Much of the file tree builder has been moved to a new file in the voussoirkit, `pathtree.py`. The goal is to generalize the concept of a pathtree so I can start using it in other local-disk applications instead of having it locked into opendirdl's URL database. They were entangled very badly so it's still messy until I get the division of labor sorted out. Running the `tree` command on the commandline still works exactly the same as before. + - 2016 11 11 - **[addition]** You can now call opendirdl using the database filename as the first argument, and the subcommand as the second. Previously, the subcommand always had to come first, but now they are interchangeable when the system detects that argv[0] is a file. This makes it much easier to do multiple operations on a single database because you can just backspace the previous command rather than having to hop over the database name to get to it. - **[addition]** `measure` now takes an argument `--threads x` to use `x` threads during the head requests. diff --git a/OpenDirDL/opendirdl.py b/OpenDirDL/opendirdl.py index ab28f81..810bc1b 100644 --- a/OpenDirDL/opendirdl.py +++ b/OpenDirDL/opendirdl.py @@ -133,17 +133,20 @@ import requests import shutil import sqlite3 import sys +import time ## import tkinter import urllib.parse # pip install voussoirkit from voussoirkit import bytestring from voussoirkit import downloady +from voussoirkit import fusker +from voussoirkit import treeclass +from voussoirkit import pathtree DOWNLOAD_CHUNK = 16 * bytestring.KIBIBYTE FILENAME_BADCHARS = '/\\:*?"<>|' TERMINAL_WIDTH = shutil.get_terminal_size().columns -UNKNOWN_SIZE_STRING = '???' # When doing a basic scan, we will not send HEAD requests to URLs that end in # these strings, because they're probably files. @@ -192,6 +195,10 @@ SKIPPABLE_FILETYPES = [ '.zip', ] SKIPPABLE_FILETYPES = set(x.lower() for x in SKIPPABLE_FILETYPES) +SKIPPABLE_FILETYPES.update(fusker.fusker('.r[0-99]')) +SKIPPABLE_FILETYPES.update(fusker.fusker('.r[00-99]')) +SKIPPABLE_FILETYPES.update(fusker.fusker('.r[000-099]')) +SKIPPABLE_FILETYPES.update(fusker.fusker('.[00-99]')) # Will be ignored completely. Are case-sensitive BLACKLISTED_FILENAMES = [ @@ -199,62 +206,6 @@ BLACKLISTED_FILENAMES = [ 'thumbs.db', ] -# oh shit -HTML_TREE_HEAD = ''' - - - - - - - -''' - -HTML_FORMAT_DIRECTORY = ''' -
- -{directory_anchor} -
-', output_file) - else: - # This helps put some space between sibling directories - write('| ' * (depth), output_file) +def promise_results(promises): + promises = promises[:] + while len(promises) > 0: + for (index, promise) in enumerate(promises): + if not promise.done(): + continue + yield promise.result() + promises.pop(index) + break def safeindex(sequence, index, fallback=None): try: @@ -1085,18 +837,14 @@ def measure(databasename, fullscan=False, new_only=False, threads=4): else: totalsize += size - while len(thread_promises) > 0: - # If that thread is done, `result()` will return immediately - # Otherwise, it will wait, which is okay because the threads themselves - # are not blocked. - head = thread_promises.pop(0).result() + for head in promise_results(thread_promises): fetch = smart_insert(sql, cur, head=head, commit=True) size = fetch[SQL_CONTENT_LENGTH] if size is None: write('"%s" is not revealing Content-Length' % url) size = 0 totalsize += size - except KeyboardInterrupt: + except (Exception, KeyboardInterrupt): for promise in thread_promises: promise.cancel() raise @@ -1141,6 +889,11 @@ def tree(databasename, output_filename=None): be a plain text drawing. ''' tree_root = build_file_tree(databasename) + tree_root.path = None + for node in tree_root.walk(): + if node.path: + node.path = node.path.replace(':||', '://') + node.display_name = node.display_name.replace(':||', '://') if output_filename is not None: output_file = open(output_filename, 'w', encoding='utf-8') @@ -1149,19 +902,20 @@ def tree(databasename, output_filename=None): output_file = None use_html = False - if use_html: - write('\n', output_file) - write(HTML_TREE_HEAD, output_file) - write('', output_file) + size_details = pathtree.recursive_get_size(tree_root) + - size_details = recursive_get_size(tree_root) - recursive_print_node(tree_root, use_html=use_html, output_file=output_file) if size_details['unmeasured'] > 0: - write(UNMEASURED_WARNING % size_details['unmeasured'], output_file) + footer = UNMEASURED_WARNING % size_details['unmeasured'] + else: + footer = None + + line_generator = pathtree.recursive_print_node(tree_root, use_html=use_html, footer=footer) + for line in line_generator: + write(line, output_file) + if output_file is not None: - if use_html: - write('\n', output_file) output_file.close() return tree_root diff --git a/OpenDirDL/requirements.txt b/OpenDirDL/requirements.txt index a751733..5555e74 100644 --- a/OpenDirDL/requirements.txt +++ b/OpenDirDL/requirements.txt @@ -1,3 +1,3 @@ -https://github.com/voussoir/else/raw/master/_voussoirkit/voussoirkit.zip +voussoirkit bs4 requests \ No newline at end of file diff --git a/Piecewise/piecewise.py b/Piecewise/piecewise.py index c159763..4749a18 100644 --- a/Piecewise/piecewise.py +++ b/Piecewise/piecewise.py @@ -8,6 +8,7 @@ import traceback from voussoirkit import bytestring from voussoirkit import downloady +from voussoirkit import clipext DEFAULT_PIECE_SIZE = bytestring.MIBIBYTE DEFAULT_THREAD_COUNT = 10 @@ -133,7 +134,8 @@ def init_argparse(args): piece_size = bytestring.parsebytes(args.piece_size) else: piece_size = args.piece_size - init(args.url, localname=args.localname, piece_size=piece_size) + url = clipext.resolve(args.url) + init(url, localname=args.localname, piece_size=piece_size) def reset_argparse(args): reset(args.databasename) diff --git a/RateMeter/speedtest.py b/RateMeter/speedtest.py index 57b0079..955678d 100644 --- a/RateMeter/speedtest.py +++ b/RateMeter/speedtest.py @@ -1,5 +1,5 @@ from voussoirkit import bytestring -import downloady +from voussoirkit import downloady import ratemeter import requests import sys diff --git a/Steganographic/asciibet.py b/Steganographic/asciibet.py new file mode 100644 index 0000000..6e47c22 --- /dev/null +++ b/Steganographic/asciibet.py @@ -0,0 +1,1470 @@ +asciibet = { +'0': +''' + ########## +#### #### +#### ###### +#### ######## +#### ## #### +######## #### +###### #### +#### #### + ########## + + + +''', +'1': +''' + ## + #### +######## + #### + #### + #### + #### + #### +############ + + + +''', +'2': +''' + ######## +#### #### +#### #### + #### + #### + #### + #### +#### #### +############ + + + +''', +'3': +''' + ######## +#### #### + #### + #### + ###### + #### + #### +#### #### + ######## + + + +''', +'4': +''' + #### + ###### + ######## + #### #### +#### #### +############## + #### + #### + ######## + + + +''', +'5': +''' +############ +#### +#### +#### +########## + #### + #### +#### #### + ######## + + + +''', +'6': +''' + ###### + #### +#### +#### +########## +#### #### +#### #### +#### #### + ######## + + + +''', +'7': +''' +############## +#### #### +#### #### + #### + #### + #### + #### + #### + #### + + + +''', +'8': +''' + ######## +#### #### +#### #### +###### #### + ######## +#### ###### +#### #### +#### #### + ######## + + + +''', +'9': +''' + ######## +#### #### +#### #### +#### #### + ########## + #### + #### + #### + ###### + + + +''', +'a': +''' + + + + ######## + #### + ########## +#### #### +#### #### + ###### #### + + + +''', +'b': +''' +###### + #### + #### + ########## + #### #### + #### #### + #### #### + #### #### +#### ###### + + + +''', +'c': +''' + + + + ######## +#### #### +#### +#### +#### #### + ######## + + + +''', +'d': +''' + ###### + #### + #### + ########## +#### #### +#### #### +#### #### +#### #### + ###### #### + + + +''', +'e': +''' + + + + ######## +#### #### +############ +#### +#### #### + ######## + + + +''', +'f': +''' + ###### + #### #### + #### + #### +########## + #### + #### + #### +######## + + + +''', +'g': +''' + + + + ###### #### +#### #### +#### #### +#### #### + ########## + #### +#### #### + ######## + +''', +'h': +''' +###### + #### + #### + #### #### + ###### #### + #### #### + #### #### + #### #### +###### #### + + + +''', +'i': +''' + #### + #### + + ######## + #### + #### + #### + #### + ############ + + + +''', +'j': +''' + #### + #### + + ######## + #### + #### + #### + #### +#### #### +#### #### + ######## + +''', +'k': +''' +###### + #### + #### + #### #### + #### #### + ######## + #### #### + #### #### +###### #### + + + +''', +'l': +''' +######## + #### + #### + #### + #### + #### + #### + #### +############ + + + +''', +'m': +''' + + + +############ +#### ## #### +#### ## #### +#### ## #### +#### ## #### +#### #### + + + +''', +'n': +''' + + + +########## +#### #### +#### #### +#### #### +#### #### +#### #### + + + +''', +'o': +''' + + + + ######## +#### #### +#### #### +#### #### +#### #### + ######## + + + +''', +'p': +''' + + + +#### ###### + #### #### + #### #### + #### #### + #### #### + ########## + #### +######## + +''', +'q': +''' + + + + ###### #### +#### #### +#### #### +#### #### +#### #### + ########## + #### + ######## + +''', +'r': +''' + + + +###### #### + #### ###### + ###### #### + #### + #### +######## + + + +''', +'s': +''' + + + + ######## +#### #### + #### + #### +#### #### + ######## + + + +''', +'t': +''' + + ## + #### +############ + #### + #### + #### + #### #### + ###### + + + +''', +'u': +''' + + + +#### #### +#### #### +#### #### +#### #### +#### #### + ###### #### + + + +''', +'v': +''' + + + +#### #### +#### #### +#### #### +#### #### + ######## + #### + + + +''', +'w': +''' + + + +#### #### +#### #### +#### ## #### +#### ## #### + #### #### + #### #### + + + +''', +'x': +''' + + + +#### #### + #### #### + ###### + ###### + #### #### +#### #### + + + +''', +'y': +''' + + + + #### #### + #### #### + #### #### + #### #### + ######## + #### + #### +######## + +''', +'z': +''' + + + +############ +## #### + #### + #### +#### ## +############ + + + +''', +'A': +''' + #### + ######## +#### #### +#### #### +#### #### +############ +#### #### +#### #### +#### #### + + + +''', +'B': +''' +############ + #### #### + #### #### + #### #### + ########## + #### #### + #### #### + #### #### +############ + + + +''', +'C': +''' + ######## + #### #### +#### #### +#### +#### +#### +#### #### + #### #### + ######## + + + +''', +'D': +''' +########## + #### #### + #### #### + #### #### + #### #### + #### #### + #### #### + #### #### +########## + + + +''', +'E': +''' +############## + #### ## + #### + #### ## + ########## + #### ## + #### + #### ## +############## + + + +''', +'F': +''' +############## + #### #### + #### ## + #### ## + ########## + #### ## + #### + #### +######## + + + +''', +'G': +''' + ######## + #### #### +#### #### +#### +#### +#### ###### +#### #### + #### #### + ########## + + + +''', +'H': +''' +#### #### +#### #### +#### #### +#### #### +############ +#### #### +#### #### +#### #### +#### #### + + + +''', +'I': +''' + ######## + #### + #### + #### + #### + #### + #### + #### + ######## + + + +''', +'J': +''' + ######## + #### + #### + #### + #### +#### #### +#### #### +#### #### + ######## + + + +''', +'K': +''' +###### #### + #### #### + #### #### + #### #### + ######## + #### #### + #### #### + #### #### +###### #### + + + +''', +'L': +''' +######## + #### + #### + #### + #### + #### ## + #### #### + #### #### +############## + + + +''', +'M': +''' +#### #### +###### ###### +############## +############## +#### ## #### +#### #### +#### #### +#### #### +#### #### + + + +''', +'N': +''' +#### #### +#### #### +###### #### +######## #### +############## +#### ######## +#### ###### +#### #### +#### #### + + + +''', +'O': +''' + ###### + #### #### +#### #### +#### #### +#### #### +#### #### +#### #### + #### #### + ###### + + + +''', +'P': +''' +############ + #### #### + #### #### + #### #### + ########## + #### + #### + #### +######## + + + +''', +'Q': +''' + ###### + #### #### +#### #### +#### #### +#### #### +#### ###### +#### ######## + ########## + #### + ######## + + +''', +'R': +''' +############ + #### #### + #### #### + #### #### + ########## + #### #### + #### #### + #### #### +###### #### + + + +''', +'S': +''' + ######## +#### #### +#### #### +#### + ###### + #### +#### #### +#### #### + ######## + + + +''', +'T': +''' +############ +## #### ## + #### + #### + #### + #### + #### + #### + ######## + + + +''', +'U': +''' +#### #### +#### #### +#### #### +#### #### +#### #### +#### #### +#### #### +#### #### + ######## + + + +''', +'V': +''' +#### #### +#### #### +#### #### +#### #### +#### #### +#### #### +#### #### + ######## + #### + + + +''', +'W': +''' +#### #### +#### #### +#### #### +#### #### +#### ## #### +#### ## #### + #### #### + #### #### + #### #### + + + +''', +'X': +''' +#### #### +#### #### +#### #### + ######## + #### + ######## +#### #### +#### #### +#### #### + + + +''', +'Y': +''' +#### #### +#### #### +#### #### +#### #### + ######## + #### + #### + #### + ######## + + + +''', +'Z': +''' +############## +#### ###### +## #### + #### + #### + #### + #### ## +#### #### +############## + + + +''', +'!': +''' + #### + ######## + ######## + ######## + #### + #### + + #### + #### + + + +''', +'"': +''' + #### #### + #### #### + #### #### + ## ## + + + + + + + + +''', +'#': +''' + + #### #### + #### #### +############## + #### #### + #### #### + #### #### +############## + #### #### + #### #### + + +''', +'$': +''' + #### + #### + ########## +#### +#### + ######## + #### + #### +########## + #### + #### + +''', +'%': +''' + + +#### ## +#### #### + #### + #### + #### +#### #### +## #### + + + +''', +'&': +''' + ###### +#### #### +#### #### + ###### +########## ## +#### ######## +#### #### +#### ###### + ###### #### + + + +''', +'\'': +''' + #### + #### + #### + #### + + + + + + + + +''', +'(': +''' + #### + #### + #### + #### + #### + #### + #### + #### + #### + + + +''', +')': +''' + #### + #### + #### + #### + #### + #### + #### + #### + #### + + + +''', +'*': +''' + + + #### #### + ######## +################ + ######## + #### #### + + + + + +''', +'+': +''' + + + #### + #### + ############ + #### + #### + + + + + +''', +',': +''' + + + + + + + + ###### + ###### + #### + + +''', +'-': +''' + + + + +############## + + + + + + + +''', +'.': +''' + + + + + + + + ###### + ###### + + + +''', +'/': +''' + + ## + #### + #### + #### + #### + #### +#### +## + + + +''', +':': +''' + + + ###### + ###### + + + ###### + ###### + + + + +''', +';': +''' + + + ###### + ###### + + + ###### + ###### + #### + #### + + +''', +'<': +''' + #### + #### + #### + #### +#### + #### + #### + #### + #### + + + +''', +'=': +''' + + + + ############ + + ############ + + + + + + +''', +'>': +''' + #### + #### + #### + #### + #### + #### + #### + #### + #### + + + +''', +'?': +''' + ######## +#### #### + #### + #### + #### + #### + + #### + #### + + + +''', +'@': +''' + ########## +#### #### +#### #### +#### ######## +#### ######## +#### ######## +#### +#### + ########## + + + +''', +'[': +''' + ######## + #### + #### + #### + #### + #### + #### + #### + ######## + + + +''', +'\\': +''' + +## +#### + #### + #### + #### + #### + #### + ## + + + +''', +']': +''' + ######## + #### + #### + #### + #### + #### + #### + #### + ######## + + + ## +''', +'^': +''' + ###### + #### #### +#### #### + + + + + + + + + +''', +'_': +''' + + + + + + + + + +################ + + #### +''', +'`': +''' + #### + #### + + + + + + + + + + +''', +'{': +''' + ###### + #### + #### + #### +#### + #### + #### + #### + ###### + + + +''', +'|': +''' + #### + #### + #### + #### + + #### + #### + #### + #### + + + +''', +'}': +''' +###### + #### + #### + #### + #### + #### + #### + #### +###### + + + +''', +'~': +''' + ###### #### +#### #### ## +#### ###### + + + + + + + + + +''', +' ': +''' + + + + + + + + + + + + +''', +'♂': +''' + ########## + ###### + ###### ## + ###### ## +########## +#### #### +#### #### +#### #### + ######## + + + +''', +'♀': +''' + ######## + #### #### + #### #### + #### #### + ######## + #### + ############ + #### + #### + + + +''', +} + +def headerify(text): + lines = [list() for x in range(12)] + for character in text: + charlines = asciibet[character].splitlines() + for (charline, line) in zip(charlines, lines): + line.append(charline) + lines = [''.join(line) for line in lines] + lines = '\n'.join(lines) + return lines + +import sys +print(headerify(sys.argv[1])) diff --git a/Steganographic/asciibet.txt b/Steganographic/asciibet.txt deleted file mode 100644 index 821e789..0000000 --- a/Steganographic/asciibet.txt +++ /dev/null @@ -1,1310 +0,0 @@ ---------------------- -! ########## ! -! #### #### ! -! #### ###### ! -! #### ######## ! -! #### ## #### ! -! ######## #### ! -! ###### #### ! -! #### #### ! -! ########## ! -! ! -! ! -! ! ---------------------- -! ## ! -! #### ! -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ############ ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### #### ! -! ############ ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### ! -! #### ! -! ###### ! -! #### ! -! #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! #### ! -! ###### ! -! ######## ! -! #### #### ! -! #### #### ! -! ############## ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ############ ! -! #### ! -! #### ! -! #### ! -! ########## ! -! #### ! -! #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### ! -! #### ! -! #### ! -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ############## ! -! #### #### ! -! #### #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ######## ! -! #### ###### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! #### ! -! #### ! -! #### ! -! ###### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ######## ! -! #### ! -! ########## ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### ! -! #### ! -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### ###### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ######## ! -! #### #### ! -! #### ! -! #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### ! -! #### ! -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ######## ! -! #### #### ! -! ############ ! -! #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### #### ! -! #### ! -! #### ! -! ########## ! -! #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ###### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! #### ! -! #### #### ! -! ######## ! -! ! ---------------------- -! ###### ! -! #### ! -! #### ! -! #### #### ! -! ###### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! ! -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! ############ ! -! ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! ! -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! ---------------------- -! ###### ! -! #### ! -! #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ############ ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ############ ! -! #### ## #### ! -! #### ## #### ! -! #### ## #### ! -! #### ## #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ######## ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! #### ###### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! #### ! -! ######## ! -! ! ---------------------- -! ! -! ! -! ! -! ###### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! #### ! -! ######## ! -! ! ---------------------- -! ! -! ! -! ! -! ###### #### ! -! #### ###### ! -! ###### #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ######## ! -! #### #### ! -! #### ! -! #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ! -! ## ! -! #### ! -! ############ ! -! #### ! -! #### ! -! #### ! -! #### #### ! -! ###### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! #### #### ! -! #### #### ! -! #### ## #### ! -! #### ## #### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! #### #### ! -! #### #### ! -! ###### ! -! ###### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### ! -! #### ! -! ######## ! -! ! ---------------------- -! ! -! ! -! ! -! ############ ! -! ## #### ! -! #### ! -! #### ! -! #### ## ! -! ############ ! -! ! -! ! -! ! ---------------------- -! #### ! -! ######## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ############ ! -! #### #### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! ############ ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ############ ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### #### ! -! #### ! -! #### ! -! #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! ! -! ! -! ! ---------------------- -! ############## ! -! #### ## ! -! #### ! -! #### ## ! -! ########## ! -! #### ## ! -! #### ! -! #### ## ! -! ############## ! -! ! -! ! -! ! ---------------------- -! ############## ! -! #### #### ! -! #### ## ! -! #### ## ! -! ########## ! -! #### ## ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### #### ! -! #### ! -! #### ! -! #### ###### ! -! #### #### ! -! #### #### ! -! ########## ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ############ ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ###### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ## ! -! #### #### ! -! #### #### ! -! ############## ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! ###### ###### ! -! ############## ! -! ############## ! -! #### ## #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! ###### #### ! -! ######## #### ! -! ############## ! -! #### ######## ! -! #### ###### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ###### ! -! ! -! ! -! ! ---------------------- -! ############ ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### ###### ! -! #### ######## ! -! ########## ! -! #### ! -! ######## ! -! ! -! ! ---------------------- -! ############ ! -! #### #### ! -! #### #### ! -! #### #### ! -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### #### ! -! #### ! -! ###### ! -! #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ############ ! -! ## #### ## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! #### ## #### ! -! #### ## #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### ! -! ######## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ############## ! -! #### ###### ! -! ## #### ! -! #### ! -! #### ! -! #### ! -! #### ## ! -! #### #### ! -! ############## ! -! ! -! ! -! ! ---------------------- -! #### ! -! ######## ! -! ######## ! -! ######## ! -! #### ! -! #### ! -! ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! #### #### ! -! ## ## ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! #### #### ! -! #### #### ! -! ############## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ############## ! -! #### #### ! -! #### #### ! -! ! -! ! -! #### ! ---------------------- -! #### ! -! ########## ! -! #### ! -! #### ! -! ######## ! -! #### ! -! #### ! -! ########## ! -! #### ! -! #### ! -! ! -! ! ---------------------- -! ! -! ! -! #### ## ! -! #### #### ! -! #### ! -! #### ! -! #### ! -! #### #### ! -! ## #### ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### #### ! -! #### #### ! -! ###### ! -! ########## ## ! -! #### ######## ! -! #### #### ! -! #### ###### ! -! ###### #### ! -! ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! #### #### ! -! ######## ! -! ################ ! -! ######## ! -! #### #### ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! #### ! -! #### ! -! ############ ! -! #### ! -! #### ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ###### ! -! ###### ! -! #### ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ############## ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ###### ! -! ###### ! -! ! -! ! -! ! ---------------------- -! ! -! ## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ## ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ###### ! -! ###### ! -! ! -! ! -! ###### ! -! ###### ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ###### ! -! ###### ! -! ! -! ! -! ###### ! -! ###### ! -! #### ! -! #### ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ############ ! -! ! -! ############ ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! ########## ! -! #### #### ! -! #### #### ! -! #### ######## ! -! #### ######## ! -! #### ######## ! -! #### ! -! #### ! -! ########## ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ! -! ## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ## ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ######## ! -! ! -! ! -! ## ! ---------------------- -! ###### ! -! #### #### ! -! #### #### ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ################ ! -! ! -! #### ! ---------------------- -! #### ! -! #### ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ###### ! -! ! -! ! -! ! ---------------------- -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! #### ! -! #### ! -! #### ! -! #### ! -! ! -! ! -! ! ---------------------- -! ###### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! #### ! -! ###### ! -! ! -! ! -! ! ---------------------- -! ###### #### ! -! #### #### ## ! -! #### ###### ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! -! ! ---------------------- -! ########## ! -! ###### ! -! ###### ## ! -! ###### ## ! -! ########## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! ! -! ! -! ! ---------------------- -! ######## ! -! #### #### ! -! #### #### ! -! #### #### ! -! ######## ! -! #### ! -! ############ ! -! #### ! -! #### ! diff --git a/ThreadedDL/threaded_dl.py b/ThreadedDL/threaded_dl.py index 4f54ee4..f996580 100644 --- a/ThreadedDL/threaded_dl.py +++ b/ThreadedDL/threaded_dl.py @@ -35,10 +35,11 @@ def threaded_dl(urls, thread_count, filename_format=None): if filename_format is None: filename_format = '{now}_{index}_{basename}' filename_format = filename_format.replace('{index}', '{index:0%0dd}' % index_digits) - if '{' not in filename_format and len(urls) > 1: - filename_format += '_{index}' - if '{extension}' not in filename_format: - filename_format += '{extension}' + if filename_format != os.devnull: + if '{' not in filename_format and len(urls) > 1: + filename_format += '_{index}' + if '{extension}' not in filename_format: + filename_format += '{extension}' now = int(time.time()) for (index, url) in enumerate(urls): while len(threads) == thread_count: diff --git a/Toolbox/ffrename.py b/Toolbox/ffrename.py deleted file mode 100644 index 1e4d9ae..0000000 --- a/Toolbox/ffrename.py +++ /dev/null @@ -1,46 +0,0 @@ -import converter -import glob -import os -import re -import subprocess -import sys -import time - -def main(filename): - ffmpeg = converter.Converter() - probe = ffmpeg.probe(filename) - new_name = filename - if '_x_' in filename: - dimensions = '%dx%d' % (probe.video.video_width, probe.video.video_height) - new_name = new_name.replace('_x_', dimensions) - if '___' in filename: - video_codec = probe.video.codec - - audios = [stream for stream in probe.streams if stream.type == 'audio' and stream.bitrate] - if audios: - audio = max(audios, key=lambda x: x.bitrate) - audio_codec = probe.audio.codec - else: - audio_codec = None - - if any(not x for x in [video_codec, probe.video.bitrate, audio_codec, probe.audio.bitrate]): - print('Could not identify media info') - else: - video_bitrate = probe.video.bitrate // 1000 - audio_bitrate = probe.audio.bitrate // 1000 - video = '%s-%d' % (video_codec, video_bitrate) - audio = '%s-%d' % (audio_codec, audio_bitrate) - - video = video.upper() - audio = audio.upper() - video = video.replace('H264', 'h264') - video = video.replace('HEVC', 'h265') - info = '{v}, {a}'.format(v=video, a=audio) - new_name = new_name.replace('___', info) - print(new_name) - if input('Okay?').lower() in ['y', 'yes']: - os.rename(filename, new_name) - -if __name__ == '__main__': - for filename in glob.glob(sys.argv[1]): - main(filename) diff --git a/Toolbox/search.py b/Toolbox/search.py index 64c93e2..8ad9d75 100644 --- a/Toolbox/search.py +++ b/Toolbox/search.py @@ -7,9 +7,15 @@ import sys from voussoirkit import safeprint from voussoirkit import spinal -def search(terms, match_any=False, do_regex=False, do_glob=False): - search_terms = [term.lower() for term in terms] - +def search( + terms, + *, + case_sensitive=False, + do_regex=False, + do_glob=False, + local_only=False, + match_any=False, + ): def term_matches(text, term): return ( (term in text) or @@ -17,11 +23,23 @@ def search(terms, match_any=False, do_regex=False, do_glob=False): (do_glob and fnmatch.fnmatch(text, term)) ) + if case_sensitive: + search_terms = terms + else: + search_terms = [term.lower() for term in terms] + anyall = any if match_any else all - generator = spinal.walk_generator(depth_first=False, yield_directories=True) + generator = spinal.walk_generator( + depth_first=False, + recurse=not local_only, + yield_directories=True, + ) for filepath in generator: - basename = filepath.basename.lower() + basename = filepath.basename + if not case_sensitive: + basename = basename.lower() + if anyall(term_matches(basename, term) for term in search_terms): safeprint.safeprint(filepath.absolute_path) @@ -29,8 +47,10 @@ def search(terms, match_any=False, do_regex=False, do_glob=False): def search_argparse(args): return search( terms=args.search_terms, + case_sensitive=args.case_sensitive, do_glob=args.do_glob, do_regex=args.do_regex, + local_only=args.local_only, match_any=args.match_any, ) @@ -41,6 +61,8 @@ def main(argv): parser.add_argument('--any', dest='match_any', action='store_true') parser.add_argument('--regex', dest='do_regex', action='store_true') parser.add_argument('--glob', dest='do_glob', action='store_true') + parser.add_argument('--case', dest='case_sensitive', action='store_true') + parser.add_argument('--local', dest='local_only', action='store_true') parser.set_defaults(func=search_argparse) args = parser.parse_args(argv) diff --git a/Treeclass/pathtree.py b/Treeclass/pathtree.py new file mode 100644 index 0000000..6297658 --- /dev/null +++ b/Treeclass/pathtree.py @@ -0,0 +1,281 @@ +import argparse +import sys +import os + +from voussoirkit import bytestring +from voussoirkit import treeclass + +HTML_TREE_HEAD = ''' + + + + + + + +''' + +HTML_FORMAT_DIRECTORY = ''' +
+ +{directory_anchor} +
+' + else: + # This helps put some space between sibling directories + yield '| ' * (depth) + + if depth == 0: + if footer is not None: + yield footer + if use_html: + yield '\n' + + + +def pathtree_argparse(args): + from voussoirkit import safeprint + from voussoirkit import spinal + paths = spinal.walk_generator() + paths = [{'path': path.absolute_path, 'size': path.size} for path in paths] + tree = from_paths(paths, '.') + recursive_get_size(tree) + + if args.output_file: + output_file = open(args.output_file, 'w', encoding='utf-8') + else: + output_file = None + + for line in recursive_print_node(tree, use_html=args.use_html): + if output_file: + print(line, file=output_file) + else: + safeprint.safeprint(line) + +def main(argv): + parser = argparse.ArgumentParser() + + parser.add_argument('output_file', nargs='?', default=None) + parser.add_argument('--html', dest='use_html', action='store_true') + parser.set_defaults(func=pathtree_argparse) + + args = parser.parse_args(argv) + args.func(args) + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/Treeclass/treeclass.py b/Treeclass/treeclass.py new file mode 100644 index 0000000..747ca04 --- /dev/null +++ b/Treeclass/treeclass.py @@ -0,0 +1,99 @@ +import os + +class ExistingChild(Exception): + pass + +class InvalidIdentifier(Exception): + pass + +class Tree: + def __init__(self, identifier, data=None): + if not isinstance(identifier, str): + print(identifier) + raise InvalidIdentifier('Identifiers must be strings') + + identifier = identifier.replace('/', os.sep) + identifier = identifier.replace('\\', os.sep) + if os.sep in identifier: + raise InvalidIdentifier('Identifier cannot contain slashes') + + self.identifier = identifier + self.data = data + self.parent = None + self.children = {} + + def __eq__(self, other): + return isinstance(other, Tree) and self.abspath() == other.abspath() + + def __getitem__(self, key): + return self.children[key] + + def __hash__(self): + return hash(self.abspath()) + + def __repr__(self): + return 'Tree(%s)' % self.identifier + + def abspath(self): + node = self + nodes = [node] + while node.parent is not None: + node = node.parent + nodes.append(node) + nodes.reverse() + nodes = [node.identifier for node in nodes] + return '\\'.join(nodes) + + def add_child(self, other_node, overwrite_parent=False): + self.check_child_availability(other_node.identifier) + if other_node.parent is not None and not overwrite_parent: + raise ValueError('That node already has a parent. Try `overwrite_parent=True`') + + other_node.parent = self + self.children[other_node.identifier] = other_node + return other_node + + def check_child_availability(self, identifier): + if identifier in self.children: + raise ExistingChild('Node %s already has child %s' % (self.identifier, identifier)) + + def detach(self): + if self.parent is None: + return + + del self.parent.children[self.identifier] + self.parent = None + + def list_children(self, customsort=None): + children = list(self.children.values()) + if customsort is None: + children.sort(key=lambda node: node.identifier.lower()) + else: + children.sort(key=customsort) + return children + + def merge_other(self, othertree, otherroot=None): + newroot = None + if ':' in othertree.identifier: + if otherroot is None: + raise Exception('Must specify a new name for the other tree\'s root') + else: + newroot = otherroot + else: + newroot = othertree.identifier + othertree.identifier = newroot + othertree.detach() + othertree.parent = self + self.check_child_availability(newroot) + self.children[newroot] = othertree + + def walk(self, customsort=None): + yield self + for child in self.list_children(customsort=customsort): + yield from child.walk(customsort=customsort) + + def walk_parents(self): + parent = self.parent + while parent is not None: + yield parent + parent = parent.parent diff --git a/_voussoirkit/localkit.bat b/_voussoirkit/localkit.bat index efb3b6c..b10f5d3 100644 --- a/_voussoirkit/localkit.bat +++ b/_voussoirkit/localkit.bat @@ -1,3 +1,3 @@ phase1 -xcopy voussoirkit C:\Python35\Lib\site-packages\voussoirkit /y +xcopy voussoirkit C:\Python36\Lib\site-packages\voussoirkit /y phase2 diff --git a/_voussoirkit/phase1.py b/_voussoirkit/phase1.py index e978f07..02d194e 100644 --- a/_voussoirkit/phase1.py +++ b/_voussoirkit/phase1.py @@ -2,13 +2,17 @@ import shutil import os PATHS = [ +'C:\\git\\else\\BaseNumber\\basenumber.py', 'C:\\git\\else\\Bytestring\\bytestring.py', 'C:\\git\\else\\Clipext\\clipext.py', 'C:\\git\\else\\Downloady\\downloady.py', +'C:\\git\\else\\Fusker\\fusker.py', 'C:\\git\\else\\Pathclass\\pathclass.py', 'C:\\git\\else\\Ratelimiter\\ratelimiter.py', 'C:\\git\\else\\RateMeter\\ratemeter.py', 'C:\\git\\else\\Safeprint\\safeprint.py', +'C:\\git\\else\\Treeclass\\treeclass.py', +'C:\\git\\else\\Treeclass\\pathtree.py', 'C:\\git\\else\\SpinalTap\\spinal.py', ] diff --git a/_voussoirkit/setup.py b/_voussoirkit/setup.py index ef880c5..a41737d 100644 --- a/_voussoirkit/setup.py +++ b/_voussoirkit/setup.py @@ -3,9 +3,9 @@ import setuptools setuptools.setup( name='voussoirkit', packages=['voussoirkit'], - version='0.0.8', + version='0.0.9', author='voussoir', - author_email='_', + author_email='ethan@voussoir.net', description='voussoir\'s toolkit', url='https://github.com/voussoir/else', install_requires=['pyperclip'] diff --git a/_voussoirkit/voussoirkit.bat b/_voussoirkit/voussoirkit.bat index d0a0224..3b721b4 100644 --- a/_voussoirkit/voussoirkit.bat +++ b/_voussoirkit/voussoirkit.bat @@ -1,4 +1,4 @@ phase1 -py setup.py register -r pypi +rem py setup.py register -r pypi py setup.py sdist upload -r pypi phase2