Skip to content

Commit

Permalink
🏷️ rebranding, icon pack, experimental features, banner, globals, git…
Browse files Browse the repository at this point in the history
…ignore
  • Loading branch information
berkaygediz committed Feb 18, 2025
1 parent 46dd3aa commit 1f5c881
Show file tree
Hide file tree
Showing 89 changed files with 425 additions and 98 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ cover/
local_settings.py
db.sqlite3
db.sqlite3-journal
richspan.db
richspan.db-*
solidwriting.db
solidwriting.db-*

# Flask stuff:
instance/
Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Contributing to RichSpan
# Contributing to SolidWriting

Thank you for considering contributing to RichSpan! We welcome your contributions to help improve this application. Please read this guide to understand how you can contribute effectively.
Thank you for considering contributing to SolidWriting! We welcome your contributions to help improve this application. Please read this guide to understand how you can contribute effectively.

## How to Contribute

1. Fork the Repository: Start by forking the [RichSpan repository](https://github.com/berkaygediz/RichSpan) on GitHub to your account.
1. Fork the Repository: Start by forking the [SolidWriting repository](https://github.com/berkaygediz/SolidWriting) on GitHub to your account.

2. Clone the Repository: Clone your forked repository to your local development environment.

```bash
git clone https://github.com/berkaygediz/RichSpan.git
git clone https://github.com/berkaygediz/SolidWriting.git
```

3. Create a Branch: Create a new branch for your contribution. Use a descriptive name for your branch.
Expand All @@ -34,7 +34,7 @@ Thank you for considering contributing to RichSpan! We welcome your contribution
git push origin feature/your-feature-name
```

8. Create a Pull Request: Visit the [RichSpan repository on GitHub](https://github.com/berkaygediz/RichSpan) and click on the "New Pull Request" button. Provide a descriptive title and description for your pull request.
8. Create a Pull Request: Visit the [SolidWriting repository on GitHub](https://github.com/berkaygediz/SolidWriting) and click on the "New Pull Request" button. Provide a descriptive title and description for your pull request.

9. Review and Discuss: Your pull request will be reviewed by the project maintainers. Be prepared to address any feedback or changes requested during the review process.

Expand All @@ -46,7 +46,7 @@ Thank you for considering contributing to RichSpan! We welcome your contribution

## Reporting Issues

If you encounter any bugs, issues, or have suggestions for improvements, please [create an issue](https://github.com/berkaygediz/RichSpan/issues) on the GitHub repository.
If you encounter any bugs, issues, or have suggestions for improvements, please [create an issue](https://github.com/berkaygediz/SolidWriting/issues) on the GitHub repository.

## Code of Conduct

Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

RichSpan
SolidWriting
Copyright (C) 2024 Berkay Gediz

This program is free software: you can redistribute it and/or modify
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

RichSpan Copyright (C) 2025 Berkay Gediz
SolidWriting Copyright (C) 2025 Berkay Gediz
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# RichSpan - A Supercharged Word Processor
# SolidWriting - A Supercharged Word Processor

<p align="center">
<img src="images/richspan_banner_2.png" alt="RichSpan Banner" />
<img src="images/banner/solidwriting_banner_1.png" alt="SolidWriting Banner" />
</p>

<p align="center">
<a href="https://github.com/berkaygediz/richspan/releases/latest">
<img src="https://img.shields.io/github/v/release/berkaygediz/richspan" alt="GitHub release" />
<a href="https://github.com/berkaygediz/solidwriting/releases/latest">
<img src="https://img.shields.io/github/v/release/berkaygediz/solidwriting" alt="GitHub release" />
</a>
<a href="https://github.com/berkaygediz/richspan">
<img src="https://img.shields.io/github/repo-size/berkaygediz/richspan" alt="GitHub repo size" />
<a href="https://github.com/berkaygediz/solidwriting">
<img src="https://img.shields.io/github/repo-size/berkaygediz/solidwriting" alt="GitHub repo size" />
</a>
<a href="https://github.com/berkaygediz/richspan">
<img src="https://img.shields.io/github/license/berkaygediz/richspan" alt="GitHub license" />
<a href="https://github.com/berkaygediz/solidwriting">
<img src="https://img.shields.io/github/license/berkaygediz/solidwriting" alt="GitHub license" />
</a>
</p>

RichSpan is a supercharged word processor offering a powerful alternative to traditional software. Built with Python and PySide6, it ensures cross-platform compatibility on Windows, macOS, and Linux. RichSpan features offline AI chat for content generation, while respecting your privacy by processing all interactions locally on your device.
SolidWriting is a supercharged word processor offering a powerful alternative to traditional software. Built with Python and PySide6, it ensures cross-platform compatibility on Windows, macOS, and Linux. SolidWriting features offline AI chat for content generation, while respecting your privacy by processing all interactions locally on your device.

## Features

- [x] **Cross-Platform**: Fully compatible with Windows, macOS, and Linux.
- [x] **Document Statistics**: Provides key statistical information about the document.
- [x] **Find & Replace**: Search and replace text within your document.
- [x] **Printing & Exporting**: Print or export documents to PDF format.
- [x] **File Format Support**: Supports .txt, .html, .docx (partial), and .rsdoc (RichSpan) file formats.
- [x] **File Format Support**: Supports .txt, .html, .docx (partial), and .rsdoc (SolidWriting) file formats.
- [x] **Text Formatting**: Customize text with options like color, background color, bold, italic, underline, font style, size, and alignment.
- [x] **Undo & Redo**: Easily undo or redo any edits made in the document.
- [x] **User Experience**: Drag and drop functionality, dark mode support, and alerts for unsaved changes.
Expand Down Expand Up @@ -53,7 +53,7 @@ RichSpan is a supercharged word processor offering a powerful alternative to tra
1. Clone the repository:

```bash
git clone https://github.com/berkaygediz/RichSpan.git
git clone https://github.com/berkaygediz/SolidWriting.git
```

2. Install requirements:
Expand All @@ -65,26 +65,26 @@ RichSpan is a supercharged word processor offering a powerful alternative to tra
3. Creating a executable file (Unsigned):

```bash
pyinstaller --noconfirm --onefile --windowed --icon ".\richspan_icon.ico" --name "RichSpan" --clean --optimize "2" "RichSpan.py"
pyinstaller --noconfirm --onefile --windowed --icon ".\solidwriting_icon.ico" --name "SolidWriting" --clean --optimize "2" "SolidWriting.py"
```

- Command for CUDA

```bash
pyinstaller --noconfirm --onefile --windowed --icon ".\richspan_icon.ico" --name "RichSpan" --clean --optimize "2" --add-data "path\RichSpan\.venv\Lib\site-packages\llama_cpp\lib\;." ".\RichSpan.py"
pyinstaller --noconfirm --onefile --windowed --icon ".\solidwriting_icon.ico" --name "SolidWriting" --clean --optimize "2" --add-data ".\.venv\Lib\site-packages\llama_cpp\lib\;." ".\SolidWriting.py"
```

## Usage

Launch RichSpan from the command line:
Launch SolidWriting from the command line:

```bash
python RichSpan.py
python SolidWriting.py
```

## Contributing

Contributions to the RichSpan project are welcomed. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute and our code of conduct.
Contributions to the SolidWriting project are welcomed. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute and our code of conduct.

## License

Expand Down
56 changes: 29 additions & 27 deletions RichSpan.py → SolidWriting.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,22 @@
try:
from ctypes import windll

windll.shell32.SetCurrentProcessExplicitAppUserModelID("berkaygediz.RichSpan.1.5")
windll.shell32.SetCurrentProcessExplicitAppUserModelID(
"berkaygediz.SolidWriting.1.5"
)
except ImportError:
pass

try:
settings = QSettings("berkaygediz", "RichSpan")
settings = QSettings("berkaygediz", "SolidWriting")
lang = settings.value("appLanguage")
except:
pass


class RS_ControlInfo(QMainWindow):
class SW_ControlInfo(QMainWindow):
def __init__(self, parent=None):
super(RS_ControlInfo, self).__init__(parent)
super(SW_ControlInfo, self).__init__(parent)
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
self.setWindowIcon(QIcon(fallbackValues["icon"]))
self.setWindowModality(Qt.WindowModality.ApplicationModal)
Expand All @@ -59,7 +61,7 @@ def __init__(self, parent=None):
self.widget_central = QWidget(self)
self.layout_central = QVBoxLayout(self.widget_central)

self.title = QLabel("RichSpan", self)
self.title = QLabel("SolidWriting", self)
self.title.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.title.setFont(QFont("Roboto", 30))
self.title.setStyleSheet(
Expand All @@ -73,13 +75,13 @@ def __init__(self, parent=None):

def showWS(self):
self.hide()
self.ws_window = RS_Workspace()
self.ws_window = SW_Workspace()
self.ws_window.show()


class RS_About(QMainWindow):
class SW_About(QMainWindow):
def __init__(self, parent=None):
super(RS_About, self).__init__(parent)
super(SW_About, self).__init__(parent)
self.setWindowFlags(Qt.Dialog)
self.setWindowIcon(QIcon(fallbackValues["icon"]))
self.setWindowModality(Qt.WindowModality.ApplicationModal)
Expand All @@ -98,17 +100,17 @@ def __init__(self, parent=None):
self.about_label.setText(
"<center>"
f"<b>{app.applicationDisplayName()}</b><br><br>"
"Real-time computing and formatting supported word processor<br><br>"
"Real-time computing and formatting supported word processor.<br><br>"
"Made by Berkay Gediz<br><br>"
"GNU General Public License v3.0<br>GNU LESSER GENERAL PUBLIC LICENSE v3.0<br>Mozilla Public License Version 2.0<br><br><b>Libraries: </b>mwilliamson/python-mammoth, Mimino666/langdetect, abetlen/llama-cpp-python, <br>pytorch/pytorch, PySide6, chardet, psutil<br><br>"
"OpenGL: <b>ON</b></center>"
)
self.setCentralWidget(self.about_label)


class RS_Help(QMainWindow):
class SW_Help(QMainWindow):
def __init__(self, parent=None):
super(RS_Help, self).__init__(parent)
super(SW_Help, self).__init__(parent)
self.setWindowFlags(Qt.Dialog)
self.setWindowIcon(QIcon(fallbackValues["icon"]))
self.setWindowModality(Qt.WindowModality.WindowModal)
Expand Down Expand Up @@ -181,9 +183,9 @@ def __init__(self, parent=None):
self.setCentralWidget(scroll_area)


class RS_Workspace(QMainWindow):
class SW_Workspace(QMainWindow):
def __init__(self, parent=None):
super(RS_Workspace, self).__init__(parent)
super(SW_Workspace, self).__init__(parent)
QTimer.singleShot(0, self.initUI)

def initUI(self):
Expand All @@ -207,10 +209,10 @@ def initUI(self):
layout.addWidget(self.hardwareAcceleration)
self.setCentralWidget(centralWidget)

self.richspan_thread = ThreadingEngine(
self.solidwriting_thread = ThreadingEngine(
adaptiveResponse=settings.value("adaptiveResponse")
)
self.richspan_thread.update.connect(self.updateStatistics)
self.solidwriting_thread.update.connect(self.updateStatistics)

self.themePalette()
self.selected_file = None
Expand Down Expand Up @@ -437,7 +439,7 @@ def updateTitle(self):

def threadStart(self):
if not self.thread_running:
self.richspan_thread.start()
self.solidwriting_thread.start()
self.thread_running = True

def textChanged(self):
Expand Down Expand Up @@ -1314,7 +1316,7 @@ def toggleDock(self):
self.ai_widget.hide()

def hybridSaver(self, checked):
settings = QSettings("berkaygediz", "RichSpan")
settings = QSettings("berkaygediz", "SolidWriting")
if checked:
battery = psutil.sensors_battery()
if battery:
Expand Down Expand Up @@ -1408,7 +1410,7 @@ def openFile(self, file_to_open=None):
if selected_file:
self.file_name = selected_file
try:
automaticEncoding = RS_Workspace.detectEncoding(self.file_name)
automaticEncoding = SW_Workspace.detectEncoding(self.file_name)
except Exception as e:
automaticEncoding = "utf-8"

Expand All @@ -1421,7 +1423,7 @@ def openFile(self, file_to_open=None):
QMessageBox.warning(self, None, "Conversion failed.")
else:
with open(self.file_name, "r", encoding=automaticEncoding) as file:
if self.file_name.endswith((".rsdoc")):
if self.file_name.endswith((".swdoc")):
self.DocumentArea.setHtml(file.read())
elif self.file_name.endswith((".html", ".htm")):
self.DocumentArea.setHtml(file.read())
Expand Down Expand Up @@ -1465,14 +1467,14 @@ def saveProcess(self):
self.saveAs()
else:
try:
automaticEncoding = RS_Workspace.detectEncoding(self.file_name)
automaticEncoding = SW_Workspace.detectEncoding(self.file_name)
except Exception as e:
automaticEncoding = "utf-8"
if self.file_name.lower().endswith(".docx"):
None
else:
with open(self.file_name, "w", encoding=automaticEncoding) as file:
if self.file_name.lower().endswith((".rsdoc", ".html", ".htm")):
if self.file_name.lower().endswith((".swdoc", ".html", ".htm")):
file.write(self.DocumentArea.toHtml())
elif self.file_name.lower().endswith((".md")):
file.write(self.DocumentArea.toMarkdown())
Expand Down Expand Up @@ -1519,11 +1521,11 @@ def addImage(self):
self.DocumentArea.insertHtml(img_tag)

def viewAbout(self):
self.about_window = RS_About()
self.about_window = SW_About()
self.about_window.show()

def viewHelp(self):
help_window = RS_Help(self)
help_window = SW_Help(self)
help_window.show()

def bulletList(self):
Expand Down Expand Up @@ -1635,9 +1637,9 @@ def replaceText(self, text):
app = QApplication(sys.argv)
app.setWindowIcon(QIcon(os.path.join(applicationPath, fallbackValues["icon"])))
app.setOrganizationName("berkaygediz")
app.setApplicationName("RichSpan")
app.setApplicationDisplayName("RichSpan 2024.11")
app.setApplicationVersion("1.5.2024.11-1")
ws = RS_ControlInfo()
app.setApplicationName("SolidWriting")
app.setApplicationDisplayName("SolidWriting 2025.02")
app.setApplicationVersion("1.5.2025.02-1")
ws = SW_ControlInfo()
ws.show()
sys.exit(app.exec())
Loading

0 comments on commit 1f5c881

Please sign in to comment.