From a2704475b073c444ea52487a53bfd9b32c6f92cf Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Thu, 15 Jul 2021 14:35:27 -0600 Subject: [PATCH] Swap out cloc for tokei --- install.sh | 3 +++ jarvis/cogs/dev.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2bb219f..cd05be6 100644 --- a/install.sh +++ b/install.sh @@ -24,6 +24,9 @@ elif [ "$ID" -eq "arch" ] || [ "$ID" -eq "manjaro" ]; then pacman -Sy tmux python python-pip fi +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +cargo install tokei --features all + if [ ! -d "/home/jarvis" ]; then echo Creating user jarvis... useradd -m jarvis diff --git a/jarvis/cogs/dev.py b/jarvis/cogs/dev.py index 37d6d86..a8ebbb7 100644 --- a/jarvis/cogs/dev.py +++ b/jarvis/cogs/dev.py @@ -280,7 +280,9 @@ class DevCog(commands.Cog): await self._decode(ctx, method, data) async def _cloc(self, ctx): - output = subprocess.check_output(["cloc", "."]).decode("UTF-8") + output = subprocess.check_output( + ["tokei", "-C", "--sort", "code"] + ).decode("UTF-8") await ctx.send(f"```\n{output}\n```") @commands.command(name="cloc", help="Get J.A.R.V.I.S. lines of code")