Skip to content

Team FAULT #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
94 changes: 41 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,83 @@
<img width="1280" alt="readme-banner" src="https://github.com/user-attachments/assets/35332e92-44cb-425b-9dff-27bcf1023c6c">

# [Project Name] 🎯
### 🎯AURA CALCULATOR!🗿
[Demo Video](https://www.youtube.com/watch?v=25jjvBbx4Mw&ab_channel=POKER)


## Basic Details
### Team Name: [Name]
### Team Name: FAULT


### Team Members
- Team Lead: [Name] - [College]
- Member 2: [Name] - [College]
- Member 3: [Name] - [College]
- Team Lead: Abhishek Sunil - Government College of Engineering,Parassinikadavu
- Member 2: Richard Reji - Government College of Engineering,Parassinikadavu
- Member 3: Gourav K - Government College of Engineering,Parassinikadavu

### Project Description
[2-3 lines about what your project does]
wanna find your "തേജസ്‌"!?,Here we introduce our AURA CALCULATOR to calculate your daily life Aura

### The Problem (that doesn't exist)
[What ridiculous problem are you solving?]
Ever feel like your vibe could use a little more... vibe? Or maybe you're just curious if helping that old lady cross the street earns you more cosmic points than that time you totally nailed a backflip in front of your friends. In a world where good deeds and cringe moments fly by unnoticed, there's no fun way to keep track of how our actions add up. Sure, we all want to be good people (most of the time), but where’s the scoreboard? How do you know if spilling coffee on your shirt knocked down your cool factor or if saving your friend from a bad joke earned you bonus points?




### The Solution (that nobody asked for)
[How are you solving it? Keep it fun!]
Enter the Aura Calculator: the fun and quirky way to measure the ups and downs of your daily actions. It's like a karma meter, but with a twist—now you can see how your good deeds, awkward mishaps, and epic wins shape your aura score, all while having a good laugh along the way.

## Technical Details
### Technologies/Components Used
For Software:
- [Languages used]
- [Frameworks used]
- [Libraries used]
- [Tools used]
- Python
- CustomTkinter
- Tkinter

For Hardware:
- [List main components]
- [List specifications]
- [List tools required]

### Implementation
For Software:
# Installation
[commands]

To run this project, follow these steps:

1. **Clone the Repository**:
```bash
git clone https://github.com/yourusername/aura-calculator.git
cd aura-calculator
2.install CTKinter
```bash
pip install customtkinter
```
# Run
[commands]

### Project Documentation
For Software:
1.in terminal type
```bash
python aura_calculator.py
```
Comment on lines +39 to +53
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Enhance technical documentation for better setup guidance.

Please consider these improvements:

  • Specify required Python version
  • Add version requirements for dependencies (CustomTkinter, Tkinter)
  • Replace placeholder URL yourusername/aura-calculator with the actual repository URL
  • Add a requirements.txt file and update installation instructions accordingly


# Screenshots (Add at least 3)
![Screenshot1](Add screenshot 1 here with proper name)
*Add caption explaining what this shows*

![Screenshot2](Add screenshot 2 here with proper name)
*Add caption explaining what this shows*

![Screenshot3](Add screenshot 3 here with proper name)
*Add caption explaining what this shows*
![Screenshot1](https://github.com/user-attachments/assets/a41b03b0-9639-4e9c-bf53-dea72c9712a5)
*home interfce*

# Diagrams
![Workflow](Add your workflow/architecture diagram here)
*Add caption explaining your workflow*
![Screenshot2](https://github.com/user-attachments/assets/dada1280-9e85-4f31-9e01-e12c98c72cfd)
*User 1 with his/her aura balance*

For Hardware:

# Schematic & Circuit
![Circuit](Add your circuit diagram here)
*Add caption explaining connections*
![Screenshot3](https://github.com/user-attachments/assets/da580313-271e-4c77-895f-81dd320198ff)

![Schematic](Add your schematic diagram here)
*Add caption explaining the schematic*
*User 2 with his/her aura balance*

# Build Photos
![Components](Add photo of your components here)
*List out all components shown*

![Build](Add photos of build process here)
*Explain the build steps*
![Final Product](https://github.com/user-attachments/assets/ea185eae-79f0-41d5-b049-344446c0213d)

![Final](Add photo of final product here)
*Explain the final build*

### Project Demo
# Video
[Add your demo video link here]
*Explain what the video demonstrates*
[demo video link](https://youtu.be/25jjvBbx4Mw)
*The video demonstrate the user inputing ones actions and calculating his aura blance*
Comment on lines +56 to +74
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix documentation structure and grammar in demo section.

Please address the following:

  • Fix heading structure: Use ## for "Project Demo" instead of ###
  • Correct grammar in video description: "demonstrate" → "demonstrates", "inputing" → "inputting", "blance" → "balance"
  • Add alt text to screenshots for accessibility
🧰 Tools
🪛 LanguageTool

[grammar] ~70-~70: This phrase is duplicated. You should probably use “Demo Video” only once.
Context: ...0-41d5-b049-344446c0213d) ### Project Demo # Video demo video link *Th...

(PHRASE_REPETITION)


[uncategorized] ~73-~73: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...ttps://youtu.be/25jjvBbx4Mw) *The video demonstrate the user inputing ones actions and calc...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~73-~73: It seems likely that a singular genitive (’s) apostrophe is missing.
Context: ...The video demonstrate the user inputing ones actions and calculating his aura blance...

(AI_HYDRA_LEO_APOSTROPHE_S_XS)

🪛 Markdownlint

70-70: Expected: h2; Actual: h3
Heading levels should only increment by one level at a time

(MD001, heading-increment)

Comment on lines +73 to +74
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix grammar in video description.

- *The video demonstrate the user inputing ones actions and calculating his aura blance*
+ *The video demonstrates a user inputting actions and calculating their aura balance*
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[demo video link](https://youtu.be/25jjvBbx4Mw)
*The video demonstrate the user inputing ones actions and calculating his aura blance*
[demo video link](https://youtu.be/25jjvBbx4Mw)
*The video demonstrates a user inputting actions and calculating their aura balance*
🧰 Tools
🪛 LanguageTool

[uncategorized] ~74-~74: This verb does not appear to agree with the subject. Consider using a different form.
Context: ...ttps://youtu.be/25jjvBbx4Mw) *The video demonstrate the user inputing ones actions and calc...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


# Additional Demos
[Add any extra demo materials/links]

## Team Contributions
- [Name 1]: [Specific contributions]
- [Name 2]: [Specific contributions]
- [Name 3]: [Specific contributions]
- Richard Reji: Thought on god level and found the bomblastic idea! [+10,000 aura]
- Abhishek Sunil: Used his gifted coding skills and found the algorthim.coded using tkinter[+16,269 aura]
- Gourav K: Bro watched and chilled(ha ha jk!)....bro modified the code using Customtkinter and made the UI more modern[+6969 aura]

---
Made with ❤️ at TinkerHub Useless Projects
Expand Down
149 changes: 149 additions & 0 deletions aura_calculator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
import customtkinter as ctk
from tkinter import messagebox

class AuraCalculator:
def __init__(self, root):
self.root = root
self.root.title("Aura Calculator")
ctk.set_appearance_mode("dark") # Use dark mode for a modern look
ctk.set_default_color_theme("green") # Change the theme to your liking

self.users = {}
self.current_user = None

# Predefined actions with points
self.actions = {
"Backflip in front of a crowd": 1000,
"Helping an elderly person cross the street": 500,
"Winning a local talent show": 800,
"Making a perfect joke at the right moment": 300,
"Successfully organizing a group event": 600,
"Dressing in a unique, stylish outfit": 400,
"Winning a challenging game of chess": 200,
"Volunteering at a charity event": 700,
"Saving a friend from an embarrassing situation": 400,
"Completing a marathon": 1000,
"Slipping and falling in public": -1000,
"Failing to show up for a friend’s party": -500,
"Making a joke that falls flat": -300,
"Getting caught cheating in a game": -800,
"Arguing loudly with someone in public": -600,
"Showing up late to an important event": -400,
"Spilling coffee on your shirt before a meeting": -200,
"Interrupting someone during a conversation": -300,
"Bragging too much about your achievements": -400,
"Forgetting a close friend's birthday": -600,
}

self.filtered_actions = list(self.actions.keys())

# Add a logo (replace with your own path if you have a logo image)
self.logo = ctk.CTkLabel(root, text=" 🗿Aura Calculator ✨", font=("Helvetica", 24, "bold"))
self.logo.grid(row=0, column=0, columnspan=3, pady=10)

# UI Elements
self.username_entry = ctk.CTkEntry(root, placeholder_text="Enter Username", width=300)
self.username_entry.grid(row=1, column=1, padx=10, pady=5)
ctk.CTkLabel(root, text="Username:", font=("Helvetica", 14)).grid(row=1, column=0)

self.register_button = ctk.CTkButton(root, text="Register", command=self.register_user, width=120)
self.register_button.grid(row=1, column=2)

# Search bar for actions
self.search_entry = ctk.CTkEntry(root, placeholder_text="Search Action", width=300)
self.search_entry.grid(row=2, column=1, padx=10, pady=5)
self.search_entry.bind("<KeyRelease>", self.filter_actions)
ctk.CTkLabel(root, text="Search Action:", font=("Helvetica", 14)).grid(row=2, column=0)

# Dropdown for selecting actions
self.selected_action = ctk.StringVar()
self.action_menu = ctk.CTkOptionMenu(root, variable=self.selected_action, values=self.filtered_actions, width=300)
self.selected_action.set("Select an action")
self.action_menu.grid(row=3, column=1, padx=10, pady=5)
ctk.CTkLabel(root, text="Action:", font=("Helvetica", 14)).grid(row=3, column=0)

self.add_action_button = ctk.CTkButton(root, text="Add Action", command=self.add_action, width=120)
self.add_action_button.grid(row=3, column=2)

self.balance_label = ctk.CTkLabel(root, text="Aura Balance: N/A", font=("Helvetica", 16))
self.balance_label.grid(row=4, columnspan=3, pady=10)

# Action History Listbox
self.history_listbox = ctk.CTkTextbox(root, width=500, height=200, font=("Helvetica", 12))
self.history_listbox.grid(row=5, column=0, columnspan=2, padx=10, pady=5)

# Delete Action Button
self.delete_action_button = ctk.CTkButton(root, text="Delete Selected Action", command=self.delete_action, width=200)
self.delete_action_button.grid(row=5, column=2)

def register_user(self):
username = self.username_entry.get().strip()
if username in self.users:
messagebox.showerror("Error", "User already exists!")
elif not username:
messagebox.showerror("Error", "Username cannot be empty!")
else:
self.users[username] = {'balance': 0, 'actions': []}
self.current_user = username
messagebox.showinfo("Success", f"User {username} registered!")
self.update_balance_label()
self.update_action_history()

def add_action(self):
if not self.current_user:
messagebox.showerror("Error", "No user registered or selected!")
return

action = self.selected_action.get()
if action == "Select an action":
messagebox.showerror("Error", "Please select a valid action!")
return
Comment on lines +97 to +100
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Handle invalid action selection in add_action method

When no actions match the search term, the action menu displays "No actions found". If the user attempts to add an action at this point, the application may not handle this scenario properly.

Consider updating the condition in add_action to handle this case:

-        if action == "Select an action":
+        if action == "Select an action" or action == "No actions found":

Alternatively, disable the add_action_button when there are no available actions to select.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
action = self.selected_action.get()
if action == "Select an action":
messagebox.showerror("Error", "Please select a valid action!")
return
action = self.selected_action.get()
if action == "Select an action" or action == "No actions found":
messagebox.showerror("Error", "Please select a valid action!")
return


points = self.actions[action]
user_data = self.users[self.current_user]
user_data['actions'].append({'action': action, 'points': points})
user_data['balance'] += points
self.update_balance_label()
self.update_action_history()
messagebox.showinfo("Success", f"Action added: {action} ({points} points)")

def delete_action(self):
selected_text = self.history_listbox.get("1.0", "end").splitlines()
if not selected_text or selected_text[0] == "":
messagebox.showerror("Error", "No action selected for deletion!")
return

user_data = self.users[self.current_user]
action_text = selected_text.pop(0)
action_to_delete = user_data['actions'].pop(0)
user_data['balance'] -= action_to_delete['points']
self.update_balance_label()
self.update_action_history()
messagebox.showinfo("Success", f"Deleted action: {action_to_delete['action']} ({action_to_delete['points']} points)")

Comment on lines +110 to +123
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Refactor delete_action method to properly delete selected actions

The current implementation of the delete_action method does not correctly remove the selected action from the user's action history. It always deletes the first action in the list regardless of the user's selection. Additionally, the variable action_text is assigned but never used.

To fix this issue, consider the following:

  1. Use a widget that allows item selection. Replace the CTkTextbox with a widget like CTkListbox that supports item selection.

  2. Modify the delete_action method to delete the selected action. Retrieve the selected index and remove the corresponding action from both the history_listbox and the user's action list.

  3. Remove the unused action_text variable.

Here's a possible modification:

-        selected_text = self.history_listbox.get("1.0", "end").splitlines()
-        if not selected_text or selected_text[0] == "":
+        selected_indices = self.history_listbox.curselection()
+        if not selected_indices:
             messagebox.showerror("Error", "No action selected for deletion!")
             return

         user_data = self.users[self.current_user]
-        action_text = selected_text.pop(0)
-        action_to_delete = user_data['actions'].pop(0)
+        index = selected_indices[0]
+        action_to_delete = user_data['actions'].pop(index)
+        self.history_listbox.delete(index)

         user_data['balance'] -= action_to_delete['points']
         self.update_balance_label()
         self.update_action_history()
         messagebox.showinfo("Success", f"Deleted action: {action_to_delete['action']} ({action_to_delete['points']} points)")

Note: Adjust the code to match the appropriate methods and widgets available in customtkinter. If CTkListbox is not available, consider using the standard Tkinter Listbox widget or implementing custom selection functionality.

Committable suggestion was skipped due to low confidence.

🧰 Tools
🪛 Ruff

117-117: Local variable action_text is assigned to but never used

Remove assignment to unused variable action_text

(F841)

def update_balance_label(self):
if self.current_user:
balance = self.users[self.current_user]['balance']
self.balance_label.configure(text=f"Aura Balance: {balance}")

def update_action_history(self):
self.history_listbox.delete("1.0", "end")
if self.current_user:
for action in self.users[self.current_user]['actions']:
action_text = f"{action['action']} ({action['points']} points)\n"
self.history_listbox.insert("end", action_text)

def filter_actions(self, event):
search_term = self.search_entry.get().lower()
self.filtered_actions = [action for action in self.actions if search_term in action.lower()]
self.update_action_menu()

def update_action_menu(self):
self.action_menu.set(self.filtered_actions[0] if self.filtered_actions else "No actions found")
self.action_menu.configure(values=self.filtered_actions)

if __name__ == "__main__":

root = ctk.CTk()
app = AuraCalculator(root)
root.mainloop()