New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hackaclime

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hackaclime - pypi Package Compare versions

Comparing version
0.1.5
to
0.1.6
+2
-2
PKG-INFO
Metadata-Version: 2.4
Name: hackaclime
Version: 0.1.5
Version: 0.1.6
Summary: CLI utility to read Hack Club's Hackatime time tracking API

@@ -19,5 +19,5 @@ License-Expression: GPL-3.0-only

## Usage
Make sure you've set up your Hackatime, and have a .wakatime.cfg file. Run `hackaclime` in your chosen terminal emulator.
Make sure you've set up your Hackatime, and have a .wakatime.cfg file. Run `hackaclime` in your chosen terminal emulator. If you'd like to change your theme, do so - you may also create a custom theme from there, as long as you have the RGB or hex values. HackaCLIme comes prepackaged with about 15 commonly used themes (or at least my interpretation of their colors - some aren't too clear with the docs), and your current theme is saved. To open a user, open the https://hackclub.slack.com, and select any user, then open their profile and select Copy Member ID from the kebab menu. It should look something like `U091JJ2JF8E`.
## Themes
A utility to create custom themes is included, or you can make yourself in `hackaclime.cfg`!
[project]
name = "hackaclime"
version = "0.1.5"
version = "0.1.6"
description = "CLI utility to read Hack Club's Hackatime time tracking API"

@@ -21,4 +21,3 @@ readme = "README.md"

[tool.setuptools.packages.find]
where = ["src"]

@@ -8,5 +8,5 @@ ## HackaCLIme

## Usage
Make sure you've set up your Hackatime, and have a .wakatime.cfg file. Run `hackaclime` in your chosen terminal emulator.
Make sure you've set up your Hackatime, and have a .wakatime.cfg file. Run `hackaclime` in your chosen terminal emulator. If you'd like to change your theme, do so - you may also create a custom theme from there, as long as you have the RGB or hex values. HackaCLIme comes prepackaged with about 15 commonly used themes (or at least my interpretation of their colors - some aren't too clear with the docs), and your current theme is saved. To open a user, open the https://hackclub.slack.com, and select any user, then open their profile and select Copy Member ID from the kebab menu. It should look something like `U091JJ2JF8E`.
## Themes
A utility to create custom themes is included, or you can make yourself in `hackaclime.cfg`!
[DEFAULT]
currenttheme = Adawaita Dark
currenttheme = Pop
add = monokai, onedark, tokyonight, solarized

@@ -4,0 +4,0 @@

@@ -13,7 +13,4 @@ import requests

wakatime_config = configparser.ConfigParser()
home = Path.home()
wakatime_config.read([Path.home() / ".wakatime.cfg"], encoding="utf-8-sig")
wakatime_path = home / ".wakatime.cfg"
wakatime_config.read(wakatime_path)
api_url = wakatime_config["settings"]["api_url"]

@@ -23,3 +20,3 @@ api_key = wakatime_config["settings"]["api_key"]

themes = configparser.ConfigParser()
themes = configparser.ConfigParser()
theme_path = f"{os.path.dirname(os.path.abspath(__file__))}/hackaclime.cfg"

@@ -37,2 +34,15 @@ themes.read(theme_path)

actual_print = print
buffer = ""
def print_buffer() -> None:
global buffer
actual_print(buffer, end="")
buffer = ""
def print(*v, sep=" ", end="\n", flush=False) -> None:
global buffer
buffer += sep.join(v) + end
if flush:
print_buffer()
if sys.platform.startswith("win"):

@@ -77,3 +87,4 @@ import msvcrt

finally:
tty.setcbreak(fd)
if not sys.platform.startswith("win"):
tty.setcbreak(fd)
listening = True

@@ -84,2 +95,3 @@

print("goodbye :(")
print_buffer()
sys.exit(0)

@@ -177,2 +189,3 @@ else:

print(f"{color.ERROR}Invalid user!")
print_buffer()
time.sleep(3)

@@ -205,3 +218,3 @@ req_user = "my"

def get_user():
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n") #clear
print("\033[2J\033[H", end="")
print(f"{color.BORDER}╭──────────────────────────────╮")

@@ -242,2 +255,3 @@ username = read(api_response.TODAY, "data.username")

print(f"{color.TITLE}Type {color.TEXT}\"my\" {color.TITLE}for your profile.")
print_buffer()
try:

@@ -247,2 +261,3 @@ user = safe_input(f"{color.ERROR}Slack member ID? ")

print("Invalid user,\ndid you use special chars?")
print_buffer()
return "my"

@@ -255,3 +270,3 @@ return user

while(1):
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
print("\033[2J\033[H", end="")
print(f"{color.BORDER}╭──────────────────────────────╮")

@@ -275,2 +290,3 @@ print(f"│ {color.TITLE}HackaCLIme: {color.TEXT}Change Theme{color.BORDER} │")

print("╰───────────┴───────────┴──────╯")
print_buffer()
num = safe_input(f"{color.TITLE}> ")

@@ -285,2 +301,3 @@ if num == "n":

print(f"{color.ERROR}Not an option, learn to count!")
print_buffer()
time.sleep(2)

@@ -291,2 +308,3 @@ break

print(f"{color.ERROR}Invalid input!")
print_buffer()
time.sleep(2)

@@ -302,2 +320,3 @@ break

print("\033[2J\033[H", end="")
print(f"{color.BORDER}╭──────────────────────────────╮")

@@ -314,2 +333,3 @@ print(f"{color.BORDER}│ {color.TITLE}Theme: {color.TEXT}{theme:>21}{color.BORDER} │")

print("╰────────────┴─────┴────┴──────╯")
print_buffer()
choice = safe_input(f"{color.TITLE}> ")

@@ -322,2 +342,3 @@ if choice == "y":

print("Success!")
print_buffer()
break

@@ -330,2 +351,3 @@ elif choice == "b":

print(f"{color.ERROR}Invalid input!")
print_buffer()
time.sleep(2)

@@ -337,2 +359,3 @@ break

global themes
print("\033[2J\033[H", end="")
print(f"{color.TITLE}Creating new theme...")

@@ -343,2 +366,3 @@ print(f"{color.TITLE}Input {color.ERROR}r, g, b{color.TITLE} / {color.ERROR}hex{color.TITLE} only. (No {color.ERROR}#{color.TITLE})")

print(f"{color.TITLE}(lowercase, alphanumeric)\n")
print_buffer()
name = safe_input("> ")

@@ -350,2 +374,3 @@ name = name.translate(str.maketrans('', '', "!@#$%^&*()[]\"\'/}{"))

print(f"{color.TITLE}Input color for {index}s...")
print_buffer()
choice = safe_input(f"{color.TITLE}> ")

@@ -355,3 +380,4 @@ if "," in choice:

col = choice.split(", ")
print(f"\x1b[38;2;{col[0]};{col[1]};{col[2]}mIs this the correct color?")
print(f"\x1b[38;2;{col[0]};{col[1]};{col[2]}mIs this the correct color? ░▒▓█")
print_buffer()
yn = safe_input("y/n > ")

@@ -364,2 +390,3 @@ if yn == "y":

print("Invalid value, try again...")
print_buffer()
time.sleep(2)

@@ -373,2 +400,3 @@ pass

print(f"\x1b[38;2;{r};{g};{b}mIs this the correct color? ░▒▓█")
print_buffer()
yn = safe_input("y/n > ")

@@ -381,5 +409,7 @@ if yn == "y":

print("Invalid value, try again...")
print_buffer()
time.sleep(2)
else:
print("Invalid string? Try again")
print_buffer()
themes[name][index] = col

@@ -415,2 +445,3 @@ with open(theme_path, 'w') as configfile:

print("Please increase your terminal window size")
print_buffer()
time.sleep(5)

@@ -422,2 +453,3 @@ continue

print("Please increase your size.")
print_buffer()
time.sleep(5)

@@ -427,3 +459,3 @@ continue

if active:
print("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
print("\033[2J\033[H", end="")
print(f"{color.BORDER}╭──────────────────────────────╮")

@@ -462,2 +494,3 @@ username = read(api_response.TODAY, "data.username")

print("╰──────────┴────────┴──────────╯")
print_buffer()

@@ -477,2 +510,4 @@ time.sleep(1)

if __name__ == "__main__":
main()
main()