Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
522828a
Stop overwriting the config the moment it is loaded
matthewyang204 May 1, 2026
32e50ae
Delete extra setChecked
matthewyang204 May 1, 2026
f0d80e5
Fix wrong signal slots across languages in menuconfig
matthewyang204 May 1, 2026
37e7ce2
Use a proper qmessagebox rather than a print when displaying errors
matthewyang204 May 1, 2026
c249520
Missing QMessageBox import here
matthewyang204 May 1, 2026
75fcdb4
Fix verilog lexer setting the color of comments to paper
matthewyang204 May 1, 2026
eed90f7
Fix char-count & word_count not being displayed correctly in summary
matthewyang204 May 1, 2026
65975b6
Don't show this to the user; it's confusing.
matthewyang204 May 1, 2026
0dabadb
Fix QDrag object not being created correctly
matthewyang204 May 1, 2026
cc7f080
Fix messy colons caused by copying directly from notes
matthewyang204 May 1, 2026
4b41aba
Fix duplicate imports (massive performance penalty)
matthewyang204 May 1, 2026
b1b6453
Use a global error string variable for not a git repo
matthewyang204 May 2, 2026
06b2fef
Missing import for Qt here
matthewyang204 May 2, 2026
376c053
Make this work on UNIX systems as well
matthewyang204 May 2, 2026
5c1199d
Fix missing GitRebase import
matthewyang204 May 2, 2026
d80c725
Fix incorrect color syntax
matthewyang204 May 2, 2026
ee1fa53
Fix tabbing in boilerplates.py and add get_appdata_dirs() function
matthewyang204 May 2, 2026
3d9731a
Use get_appdata_dirs in window.py
matthewyang204 May 2, 2026
a2f8c38
Switch everything to use get_appdata_dirs for getting localappdata
matthewyang204 May 2, 2026
6ad284b
Import all the stuff from Core instead of creating a whole new file
matthewyang204 May 2, 2026
6b625a3
Use a proper . folder like all IDEs do
matthewyang204 May 2, 2026
498bdf9
Open with proper connection name; otherwise it will behave weirdly
matthewyang204 May 2, 2026
f6a80e0
Import performance when booting up the main window
matthewyang204 May 2, 2026
23bb158
Use latest Github Actions upload artifact to support Node 24
matthewyang204 May 2, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run:
python3 build.py
- name: Upload ZIP
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v7
with:
name: Aura-Text
path: dist
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run:
python3 build.py
- name: Upload ZIP
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v7
with:
name: Aura-Text
path: dist
4 changes: 2 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:
path: Aura-Text-setup-x64.iss

- name: Upload ZIP
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v7
with:
name: Aura-Text
path: dist

- name: Upload installer
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v7
with:
name: Aura-Text-Installer-Output
path: Output
Expand Down
13 changes: 3 additions & 10 deletions auratext/Components/About.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,9 @@
QVBoxLayout,
QSpacerItem, QHBoxLayout, QLabel, QSizePolicy, QDialog)

if platform.system() == "Windows":
local_app_data = os.getenv('LOCALAPPDATA')
elif platform.system() == "Linux":
local_app_data = os.path.expanduser("~/.config")
elif platform.system() == "Darwin":
local_app_data = os.path.expanduser("~/Library/Application Support")
else:
print("Unsupported operating system")
sys.exit(1)
local_app_data = os.path.join(local_app_data, "AuraText")
from auratext.Misc.boilerplates import get_appdata_dirs

local_app_data, script_dir = get_appdata_dirs()

class AboutAppDialog(QDialog):
def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion auratext/Components/DBViewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def load_db(self):
tables = cursor.fetchall()
con.close()

db = QSqlDatabase.addDatabase("QSQLITE")
db = QSqlDatabase.addDatabase("QSQLITE", "auratext_dbviewer")
db.setDatabaseName(self.db_path)

if not db.open():
Expand Down
12 changes: 2 additions & 10 deletions auratext/Components/GitCommit.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@
import platform

from auratext.Misc.import_res import notepadequalequalComponentImportPathAppend
from auratext.Misc.boilerplates import get_appdata_dirs
sys.path.append(notepadequalequalComponentImportPathAppend)
from notepadequalequal.fileio import retrieve_file

if platform.system() == "Windows":
local_app_data = os.getenv('LOCALAPPDATA')
elif platform.system() == "Linux":
local_app_data = os.path.expanduser("~/.config")
elif platform.system() == "Darwin":
local_app_data = os.path.expanduser("~/Library/Application Support")
else:
print("Unsupported operating system")
sys.exit(1)
local_app_data = os.path.join(local_app_data, "AuraText")
local_app_data, script_dir = get_appdata_dirs()
cpath = retrieve_file(f"{local_app_data}/data/CPath_Project.txt").strip()

# Load theme
Expand Down
16 changes: 5 additions & 11 deletions auratext/Components/GitPush.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,11 @@
import platform

from auratext.Misc.import_res import notepadequalequalComponentImportPathAppend
from auratext.Misc.boilerplates import get_appdata_dirs
sys.path.append(notepadequalequalComponentImportPathAppend)
from notepadequalequal.fileio import retrieve_file

if platform.system() == "Windows":
local_app_data = os.getenv('LOCALAPPDATA')
elif platform.system() == "Linux":
local_app_data = os.path.expanduser("~/.config")
elif platform.system() == "Darwin":
local_app_data = os.path.expanduser("~/Library/Application Support")
else:
print("Unsupported operating system")
sys.exit(1)
local_app_data = os.path.join(local_app_data, "AuraText")
local_app_data, script_dir = get_appdata_dirs()
cpath = retrieve_file(f"{local_app_data}/data/CPath_Project.txt").strip()

class GitPushDialog(QDialog):
Expand Down Expand Up @@ -55,9 +47,11 @@ def __init__(self, parent=None):
push_button = QPushButton("Push")
self.main_layout.addWidget(push_button)
push_button.clicked.connect(self.push)

self.notAGitRepoError = "Not a Git repository. Please initialize a Git repository."

if not self.is_git_repo():
print(self, "Error", "Not a Git repository. Please initialize a Git repository.")
print(self, "Error", self.notAGitRepoError)
self.reject()
return

Expand Down
21 changes: 15 additions & 6 deletions auratext/Components/GitRebase.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import QDialog, QVBoxLayout, QLabel, QLineEdit, QPushButton, QTableWidget, QTableWidgetItem, QComboBox, QHeaderView, QMessageBox
import subprocess
import tempfile
import os
import platform

class GitRebaseDialog(QDialog):
def __init__(self, path):
Expand Down Expand Up @@ -115,12 +117,19 @@ def start_rebase(self):
with open(script_path, 'w') as f:
f.write(rebase_script)

# For Windows, we need to create a simple batch file to act as the editor
editor_script_path = os.path.join(tempfile.gettempdir(), 'auratext-rebase-editor.bat')
with open(editor_script_path, 'w') as f:
# The batch script will be called by git with the path to the git-rebase-todo file
# We overwrite that file with our generated script.
f.write(f'copy "{script_path}" %1 > NUL')
if platform.system() == "Windows":
# For Windows, we need to create a simple batch file to act as the editor
editor_script_path = os.path.join(tempfile.gettempdir(), 'auratext-rebase-editor.bat')
with open(editor_script_path, 'w') as f:
# The batch script will be called by git with the path to the git-rebase-todo file
# We overwrite that file with our generated script.
f.write(f'copy "{script_path}" %1 > NUL')
else:
editor_script_path = os.path.join(tempfile.gettempdir(), 'auratext-rebase-editor.sh')
with open(editor_script_path, 'w') as f:
unixRScriptContents = "#!/bin/sh" + '\n' + f'cp "{script_path}" "$1"' + "\n"
f.write(unixRScriptContents)
os.chmod(editor_script_path, 0o755)

env = os.environ.copy()
env["GIT_SEQUENCE_EDITOR"] = f'"{editor_script_path}"'
Expand Down
13 changes: 3 additions & 10 deletions auratext/Components/Linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@
from pylint.reporters.json_reporter import JSONReporter
import json

if platform.system() == "Windows":
local_app_data = os.getenv('LOCALAPPDATA')
elif platform.system() == "Linux":
local_app_data = os.path.expanduser("~/.config")
elif platform.system() == "Darwin":
local_app_data = os.path.expanduser("~/Library/Application Support")
else:
print("Unsupported operating system")
sys.exit(1)
local_app_data = os.path.join(local_app_data, "AuraText")
from auratext.Misc.boilerplates import get_appdata_dirs

local_app_data, script_dir = get_appdata_dirs()


class LintMessage:
Expand Down
64 changes: 1 addition & 63 deletions auratext/Components/TabWidget.py
Original file line number Diff line number Diff line change
@@ -1,63 +1 @@
"""
A custom tab widget for the AuraText editor, supporting drag-and-drop reordering and a context"""

from PyQt6.QtCore import QMimeData, QPoint
from PyQt6.QtGui import QPixmap, QRegion, QAction
from PyQt6.QtWidgets import QTabWidget, QMenu


class TabWidget(QTabWidget):
def __init__(self, parent=None, new=None):
super().__init__(parent)
self.setAcceptDrops(True)
self.tabBar().setMouseTracking(True)
self.setMovable(True)
self.setDocumentMode(True)
if new:
TabWidget.setup(self)

def __setstate__(self, data):
self.__init__(new=False)
self.setParent(data["parent"])
for widget, tabname in data["tabs"]:
self.addTab(widget, tabname)
TabWidget.setup(self)

def __getstate__(self):
data = {
"parent": self.parent(),
"tabs": [],
}
tab_list = data["tabs"]
for k in range(self.count()):
tab_name = self.tabText(k)
widget = self.widget(k)
tab_list.append((widget, tab_name))
return data

def setup(self):
pass

def mouseMoveEvent(self, e):
globalPos = self.mapToGlobal(e.pos())
tabBar = self.tabBar()
posInTab = tabBar.mapFromGlobal(globalPos)
index = tabBar.tabAt(e.pos())
tabRect = tabBar.tabRect(index)

pixmap = QPixmap(tabRect.size())
tabBar.render(pixmap, QPoint(), QRegion(tabRect))
mimeData = QMimeData()

def contextMenuEvent(self, event):
menu = QMenu(self)
close_alltabs = QAction("Close All Tabs", self)

close_alltabs.triggered.connect(self.close_all_tabs)

menu.addAction(close_alltabs)

menu.exec(event.globalPos())

def close_all_tabs(self):
self.clear()
from auratext.Core.TabWidget import *
18 changes: 5 additions & 13 deletions auratext/Components/ToDo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@
QVBoxLayout, QListWidget, QPushButton, QHBoxLayout, QMessageBox, QDialog, QLineEdit
)
from notepadequalequal.fileio import retrieve_file
from auratext.Misc.boilerplates import get_appdata_dirs

if platform.system() == "Windows":
local_app_data = os.getenv('LOCALAPPDATA')
elif platform.system() == "Linux":
local_app_data = os.path.expanduser("~/.config")
elif platform.system() == "Darwin":
local_app_data = os.path.expanduser("~/Library/Application Support")
else:
print("Unsupported operating system")
sys.exit(1)
local_app_data = os.path.join(local_app_data, "AuraText")
local_app_data, script_dir = get_appdata_dirs()
cpath = retrieve_file(f"{local_app_data}/data/CPath_Project.txt").strip()

def check_folder_exists(folder_path):
Expand All @@ -36,12 +28,12 @@ def create_folder(folder_path):
pass


if check_folder_exists(f"{cpath}/Aura Text/"):
if check_folder_exists(f"{cpath}/.auratext/"):
pass
else:
create_folder(f"{cpath}/Aura Text")
create_folder(f"{cpath}/.auratext")
# Path to the CSV file
CSV_FILE = f"{cpath}/Aura Text/todo.csv"
CSV_FILE = f"{cpath}/.auratext/todo.csv"


class ToDoApp(QDialog):
Expand Down
17 changes: 4 additions & 13 deletions auratext/Components/statusBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,9 @@
from PyQt6.QtWidgets import QFrame, QHBoxLayout, QLabel, QStatusBar, QWidget, QPushButton

# from ..scripts.color_scheme_loader import color_schemes
from auratext.Misc.boilerplates import get_font_for_platform

if platform.system() == "Windows":
local_app_data = os.getenv('LOCALAPPDATA')
elif platform.system() == "Linux":
local_app_data = os.path.expanduser("~/.config")
elif platform.system() == "Darwin":
local_app_data = os.path.expanduser("~/Library/Application Support")
else:
print("Unsupported operating system")
sys.exit(1)
local_app_data = os.path.join(local_app_data, "AuraText")
from auratext.Misc.boilerplates import get_font_for_platform, get_appdata_dirs

local_app_data, script_dir = get_appdata_dirs()
with open(f"{local_app_data}/data/theme.json", "r") as themes_file:
_themes = json.load(themes_file)

Expand Down Expand Up @@ -160,7 +151,7 @@ def __init__(self, parent=None, greeting=None):
self.editModeLabel.setFont(smallFont)
self.editModeLabel.setStyleSheet(
f"""
color: {"#FFFFFF;"};
color: #FFFFFF;
font-weight: bold;
margin-bottom: 5px;
"""
Expand Down
2 changes: 1 addition & 1 deletion auratext/Core/Lexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def verilog(self):
lexer.setDefaultColor(QColor("#FFFFFF"))
self.current_editor.setLexer(lexer)
lexer.setPaper(QColor(self._themes["editor_theme"]))
lexer.setColor(QColor(self._themes["editor_theme"]), lexer.Comment)
lexer.setColor(QColor("#808080"), lexer.Comment)
lexer.setColor(QColor("#FFA500"), lexer.Keyword)
lexer.setFont(get_font_for_platform(size=14, plain=True))

Expand Down
Loading
Loading