Skip to content

Commit

Permalink
Merge pull request #6 from DavidCEllis/rename_project
Browse files Browse the repository at this point in the history
Rename project to SplitGuides
  • Loading branch information
DavidCEllis authored Sep 9, 2022
2 parents bc3a29e + 35fa73e commit e1b99e0
Show file tree
Hide file tree
Showing 37 changed files with 39 additions and 41 deletions.
2 changes: 1 addition & 1 deletion application/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from PySide2.QtWidgets import QApplication

from splitnotes2.ui.main_window import MainWindow
from splitguides.ui.main_window import MainWindow

if __name__ == "__main__":
app = QApplication(sys.argv)
Expand Down
4 changes: 2 additions & 2 deletions application/app_server.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from splitnotes2.server import app, get_notes, settings
from splitguides.server import app, get_notes, settings
import flask.cli as cli

# Stop flask from giving users an unhelpful warning.
Expand All @@ -9,7 +9,7 @@ def launch():
get_notes() # Sets internal 'notes' and 'notefile' variables

print(
"This server version of Splitnotes2 allows you view splitnotes via a browser window "
"This server version of SplitGuides allows you view notes via a browser window "
"and should work across a local network.\n"
"It is not intended to be used over the internet and as such is not based on a "
"production server."
Expand Down
12 changes: 6 additions & 6 deletions application/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from cx_Freeze import setup, Executable

base_path = Path(__file__).resolve().parents[1]
templates = str(base_path / "src" / "splitnotes2" / "templates")
static_folder = str(base_path / "src" / "splitnotes2" / "static")
templates = str(base_path / "src" / "splitguides" / "templates")
static_folder = str(base_path / "src" / "splitguides" / "static")
icon_file = str(base_path / "resources" / "logo_alpha.ico")
icon_png = str(base_path / "resources" / "logo_alpha.png")

Expand All @@ -34,13 +34,13 @@
}

executables = [
Executable("app.py", base=base, target_name="splitnotes2", icon=icon_file),
Executable("app_server.py", target_name="splitnotes2_server", icon=icon_file),
Executable("app.py", base=base, target_name="splitguides", icon=icon_file),
Executable("app_server.py", target_name="splitguides_server", icon=icon_file),
]

setup(
name="splitnotes2",
version="0.6.0",
name="splitguides",
version="0.7.0",
description="Speedrun notes tool with HTML rendering",
options=options,
executables=executables,
Expand Down
26 changes: 12 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# SplitNotes 2 #
# SplitGuides #

**Speedrun notes with markdown and html formatting**

SplitNotes2 is an application for displaying speedrun notes in sync with livesplit.
SplitGuides is an application for displaying speedrun notes in sync with livesplit.
Requires *livesplit server* to be running.

There is now a server version included to allow reading from a browser on another device.

## Install/Setup ##

1. Under the Livesplit layout editor add 'LiveSplit Server' (listed under 'control')
2. Download SplitNotes2 from the [**releases page**](https://github.com/DavidCEllis/SplitNotes-2/releases)
3. Extract anywhere and run *splitnotes2.exe*
2. Download SplitGuides from the [**releases page**](https://github.com/DavidCEllis/SplitGuides/releases)
3. Extract anywhere and run *splitguides.exe*

## Usage ##

1. Connect with livesplit by starting the livesplit server component selecting
'Control' and 'Start Server'
2. Right click in the splitnotes window and select 'Open Notes' and find the text file
2. Right click in the splitguides window and select 'Open Notes' and find the text file
containing the notes you wish to use.

The formatting for notes basically follows the format used by the original SplitNotes
with some additional enhancements and exceptions.
Plain text formatting works the same way as SplitNotes.
Notes made for that should function fine in SplitGuides.

Markdown and HTML formatted notes are supported.
Additionally Markdown and HTML formatted notes are supported.
These will be interpreted based on file extension (.md, .txt or .html).
Markdown and plain text formatted notes will automatically have line breaks
inserted in between lines.
Expand All @@ -32,10 +32,10 @@ inserted in between lines.
2. By default splits will break on newlines, multiple newlines are ignored in this case.
3. The rendering is done as HTML so HTML formatting can be used.

## splitnotes2_server.exe ##
## splitguides_server.exe ##

Now included is a server version which launches a (local) webhost so you can view the splitnotes
on another device on your local network. Launch splitnotes2_server.exe to start the service.
Now included is a server version which launches a (local) webhost so you can view the notes
on another device on your local network. Launch splitguides_server.exe to start the service.

If the hostname and port defaults aren't usable you can set them by editing server_hostname
and server_port in settings.json. There is no dialog for editing these settings yet.
Expand Down Expand Up @@ -77,7 +77,7 @@ and server_port in settings.json. There is no dialog for editing these settings

#### Result ####

![Image of splitnotes rendering](resources/demo_notes_md.png)
![Image of splitguides rendering](resources/demo_notes_md.png)

## Configuration ##

Expand All @@ -102,5 +102,3 @@ The settings page offers some customisation and connection settings including:
---

Inspired by (but otherwise unassociated with) the original splitnotes: https://github.com/joeloskarsson/SplitNotes

[*] approximately 19x larger in file size :) (Mostly Qt and PySide2)
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from setuptools import setup, find_packages

__version__ = "0.6.1"
__version__ = "0.7.0"
__author__ = "DavidCEllis"


setup(
name="splitnotes2",
name="splitguides",
version=__version__,
packages=find_packages("src"),
url="",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

class Notes:
"""
Class to handle splitnotes and formatting
Class to handle notes and formatting
Processing order is:
Input -> Strip Comment lines (delimited by [ ])
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
static_folder = str(Path(__file__).parent / "static")

app = Flask(
"splitnotes2",
"splitguides",
template_folder=settings.server_template_folder,
static_folder=settings.server_static_folder,
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Splitnotes</title>
<title>SplitGuides</title>
<style>
:root {
font-size: {{ font_size }}px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Splitnotes - {{ notefile }}</title>
<title>SplitGuides - {{ notefile }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='server.css') }}">
</head>
<body>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</font>
</property>
<property name="windowTitle">
<string>Splitnotes 2</string>
<string>SplitGuides</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_livesplit_client/test_get_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from splitnotes2.livesplit_client import get_client
from splitguides.livesplit_client import get_client


def test_get_client():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_livesplit_client/test_messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from splitnotes2.livesplit_client.messaging import LivesplitMessaging, parse_time
from splitguides.livesplit_client.messaging import LivesplitMessaging, parse_time

times = [
("15:32.34", timedelta(minutes=15, seconds=32, milliseconds=340)),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_livesplit_client/test_networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from splitnotes2.livesplit_client.networking import LivesplitConnection, BUFFER_SIZE
from splitguides.livesplit_client.networking import LivesplitConnection, BUFFER_SIZE


def test_init():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from unittest.mock import patch, mock_open

from splitnotes2.note_parser import Notes, TextProcessor
from splitguides.note_parser import Notes, TextProcessor

notes_base = [
"This is the first split",
Expand Down
8 changes: 4 additions & 4 deletions tests/test_ui/test_main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest
from PySide2 import QtCore, QtGui, QtWidgets

from splitnotes2.ui.main_window import MainWindow
from splitnotes2.note_parser import Notes
from splitguides.ui.main_window import MainWindow
from splitguides.note_parser import Notes


# Default settings for each test
Expand All @@ -15,7 +15,7 @@

@pytest.fixture(scope="function")
def fake_link():
with patch("splitnotes2.ui.main_window.LivesplitLink") as fake_link:
with patch("splitguides.ui.main_window.LivesplitLink") as fake_link:
yield fake_link


Expand Down Expand Up @@ -233,7 +233,7 @@ def test_open_settings(qtbot, fake_link):
fake_link_inst = MagicMock()
fake_link.return_value = fake_link_inst

with patch("splitnotes2.ui.main_window.SettingsDialog") as fake_settings_dialog_cls, \
with patch("splitguides.ui.main_window.SettingsDialog") as fake_settings_dialog_cls, \
patch.object(Notes, "from_file") as mock_notes:
# Mock setup
fake_settings_dialog = MagicMock()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_ui/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from PySide2 import QtWidgets, QtGui
from PySide2.QtCore import Qt, QTimer

from splitnotes2.settings import Settings, settings_file
from splitnotes2.settings import default_static_folder, default_template_folder
from splitnotes2.ui.settings_ui import SettingsDialog
from splitguides.settings import Settings, settings_file
from splitguides.settings import default_static_folder, default_template_folder
from splitguides.ui.settings_ui import SettingsDialog

test_settings = Path(__file__).parent / "settings.json"

Expand Down

0 comments on commit e1b99e0

Please sign in to comment.