Skip to content

Commit

Permalink
Add: GitHub Action
Browse files Browse the repository at this point in the history
Signed-off-by: NaveenKumar Namachivayam <[email protected]>
  • Loading branch information
QAInsights committed Nov 19, 2023
1 parent 202c3a6 commit 074f5b3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
13 changes: 1 addition & 12 deletions hamster/__main__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import menu
import os
import config, menu, utils


def main():
"""
Entry point of the Hamster - menu bar application.
"""
# Get the path to the user's home directory
home_dir = os.path.expanduser("~")

# Create a new directory within the home directory
app_dir = os.path.join(home_dir, "HamsterApp")
os.makedirs(app_dir, exist_ok=True)

# Specify the path to the properties file within the new directory
properties_file = os.path.join(app_dir, "app.properties")

menu_builder = menu.DynamicMenuApp("JMeter")
menu_builder.run()

Expand Down
3 changes: 2 additions & 1 deletion hamster/app.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[JMETER]
home = /Users/naveenkumar/Tools/apache-jmeter-5.6.2
home = /Users/naveenkumar/Tools/apache-jmeter-5.6.1

18 changes: 16 additions & 2 deletions hamster/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
import sys
import getpass
import re
import shutil


# Get the path to the user's home directory
home_dir = os.path.expanduser("~")

# Define the source path (current directory)
source_path = os.path.join(os.path.dirname(sys.argv[0]), 'app.properties')

# Define the destination path (user's home directory)
destination_path = os.path.join(home_dir, 'app.properties')

# Use shutil to copy the file
shutil.copy(source_path, destination_path)

config_parser = configparser.ConfigParser()
properties_file_path = os.path.join(os.path.dirname(sys.argv[0]), 'app.properties')
properties_file_path = os.path.join(home_dir, 'app.properties')
config_parser.read(properties_file_path)

icon_path=os.path.join(os.path.dirname(sys.argv[0]), 'img/hamster.png')
icon_path = os.path.join(os.path.dirname(sys.argv[0]), 'img/hamster.png')
username = getpass.getuser()
pattern = re.compile("recent_file_.*")

Expand Down

0 comments on commit 074f5b3

Please sign in to comment.