Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions fixit/base64utils.py

This file was deleted.

47 changes: 4 additions & 43 deletions fixit/cli.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@

"""Command line entry point: `fixit <command>`."""
import argparse
import sys
import uuid
from pathlib import Path

from fixit import (
__version__,
base64utils,
convert,
jsonfmt,
password,
textutils,
wordcount,
)

from fixit import __version__, convert, jsonfmt, password, textutils, wordcount

CONVERSIONS = {
"c2f": convert.celsius_to_fahrenheit,
Expand Down Expand Up @@ -91,7 +81,6 @@ def run_slugify(args):
"json": run_json,
"palindrome": run_palindrome,
"reverse": run_reverse,
"base64": run_base64,
"slugify": run_slugify,
"top-words": run_top_words,
}
Expand All @@ -105,15 +94,8 @@ def build_parser() -> argparse.ArgumentParser:
args = parser.parse_args(["wc", "hello world"])
assert args.command == "wc"
"""
parser = argparse.ArgumentParser(
prog="fixit",
description="A tiny toolbox to practice open source.",
)
parser.add_argument(
"--version",
action="version",
version=f"fixit {__version__}",
)
parser = argparse.ArgumentParser(prog="fixit", description="A tiny toolbox to practice open source.")
parser.add_argument("--version", action="version", version=f"fixit {__version__}")
sub = parser.add_subparsers(dest="command", required=True)

wc = sub.add_parser("wc", help="count words, lines and characters")
Expand All @@ -140,28 +122,7 @@ def build_parser() -> argparse.ArgumentParser:
rw = sub.add_parser("reverse", help="reverse the words in a sentence")
rw.add_argument("text")

b64 = sub.add_parser("base64", help="encode or decode Base64 text")
b64_sub = b64.add_subparsers(
dest="base64_action",
required=True,
)

b64_encode = b64_sub.add_parser(
"encode",
help="encode text as Base64",
)
b64_encode.add_argument("text")

b64_decode = b64_sub.add_parser(
"decode",
help="decode Base64 text",
)
b64_decode.add_argument("text")

sg = sub.add_parser(
"slugify",
help="convert text into a URL-friendly slug",
)
sg = sub.add_parser("slugify", help="convert text into a URL-friendly slug")
sg.add_argument("text")

top = sub.add_parser("top-words", help="show the most frequent words")
Expand Down
43 changes: 0 additions & 43 deletions tests/test_base64.py

This file was deleted.

Loading