You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`code4swipe` is a command-line interface (CLI) tool that gamifies your coding process by rewarding you with an automatic "swipe up" action (like the satisfying gesture on TikTok or other social media feeds) whenever you introduce new changes to your local git repository.
3
+
`code4swipe` is a CLI tool that gamifies your coding process by rewarding you with an automatic "swipe up" action (like the satisfying gesture on TikTok or other social media feeds) whenever you introduce new changes to your local git repository.
4
4
5
5
It monitors your current working directory's `git diff` and triggers a **swipe** via a chosen provider (currently, **ADB** for Android devices) to give you a quick, satisfying break or a virtual "pat on the back" for your new lines of code.
6
6
@@ -9,7 +9,7 @@ It monitors your current working directory's `git diff` and triggers a **swipe**
9
9
-**Git Diff Monitoring:** Continuously monitors your local repository's uncommitted changes.
10
10
-**Two Detection Strategies:**
11
11
-**`exact` (Default):** Triggers on **ANY** change to the git diff (additions, deletions, modifications).
12
-
-**`linecount`:** Triggers only if the total number of lines in the git diff has **increased** since the last check (focused on rewarding additions).
12
+
-**`linecount`:** Triggers only if the total number of lines in the git diff has changed.
13
13
-**ADB Swipe Provider:** Uses the **Android Debug Bridge (ADB)** to execute a simulated "swipe up" on a connectedAndroid device.
14
14
-**Customizable:** Set your preferred repository path and polling interval.
15
15
@@ -29,72 +29,41 @@ Before installation, ensure you have the following ready:
29
29
30
30
## Installation
31
31
32
-
You can install `code4swipe` either globally for easy access or within a Python Virtual Environment (`.venv`) for isolated usage.
32
+
### Install Globally
33
33
34
-
### 1\. Global Installation (Recommended for quick use)
35
-
36
-
The script depends on the `click` package for its CLI functionality.
34
+
To install `code4swipe`, use the following command:
37
35
38
36
```bash
39
-
# Install the required package
40
-
pip install click
37
+
pip install code4swipe
41
38
```
42
39
43
-
For a global installation, copy the script file (let's assume you save it as `code4swipe.py`) and make it executable.
40
+
This will install the package and its dependencies, making the `code4swipe` command available globally.
@@ -174,4 +142,4 @@ If you see this warning, your Python version is too old. You must upgrade to **P
174
142
175
143
1.**Check your device:** Make sure the Android device is unlocked and the screen is on, ready to receive input.
176
144
2.**Check the git diff:** The script only reacts to uncommitted changes. Try making a small change to a file in the monitored repo. Run `git diff` manually to confirm you have changes.
177
-
3. **Check the strategy:** If using `--changes linecount`, ensure your new code *increases* the total line count of the diff (i.e., you haven't just deleted lines).
145
+
3.**Check the strategy:** If using `--changes linecount`, ensure your new code changes the total line count of the diff.
0 commit comments