This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
forked from trelby/trelby
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from limburgher/main
Merge Python 3 migration and enhancements.
- Loading branch information
Showing
92 changed files
with
2,105 additions
and
1,776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
name: Tests | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.8", "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache/restore@v3 | ||
id: restore-cache | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- name: Install Linux dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libgtk-3-dev libsdl2-2.0 libwxgtk3.0-gtk3-dev | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
# Install attrdict3 to support the installation of wxPython from source. | ||
# In most cases, wxPython can be installed from wheels, but if those are not available, | ||
# attrdict3 is a prerequisite for installing from source. | ||
# This is currently a requirement for installing wxPython for Python 3.11. | ||
python -m pip install attrdict3 | ||
pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 -r requirements.txt | ||
- uses: actions/cache/save@v3 | ||
if: steps.restore-cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }} | ||
|
||
- name: Ensure pytest is available on PATH | ||
run: echo "/opt/trelby/bin" >> "$GITHUB_PATH" | ||
|
||
- name: Test with pytest | ||
env: | ||
PYTHONPATH: /opt/trelby | ||
run: pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
*~ | ||
*.pyc | ||
*.pyo | ||
.trelby/ | ||
*.trelby | ||
!tests/fixtures/*.trelby | ||
.tox/ | ||
MANIFEST | ||
.pybuild/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include dict_en.dat.gz fileformat.txt INSTALL LICENSE manual.html names.txt.gz README sample.trelby setup.py trelby.1.gz trelby.desktop | ||
include dict_en.dat.gz fileformat.txt INSTALL LICENSE manual.html names.txt.gz README.md sample.trelby setup.py trelby.1.gz trelby.desktop | ||
include bin/trelby | ||
recursive-include resources * | ||
recursive-include src *.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Trelby | ||
## Screenplay writing software | ||
Trelby is a screenplay writing program. See http://www.trelby.org/ for | ||
more details. | ||
|
||
### About this project | ||
This is a fork of the original codebase from https://github.com/trelby/trelby, which as of this writing appears to be dormant. | ||
|
||
The major difference of this fork is conversion to Python 3. I also have a list of possible enhancements in mind, and I'd love help updating the Windows packaging so that I can provide a Windows build. | ||
|
||
### Installation | ||
|
||
#### From source | ||
|
||
1. git clone https://github.com/limburgher/trelby.git | ||
|
||
2. cd trelby | ||
|
||
3. pip3 install -r requirements.txt | ||
*Depending on your python version, you might run into https://github.com/wxWidgets/Phoenix/issues/2296. We recommend executing `pip3 install attrdict3` before installing the requirements in that case. If that still doesn't work, we recommend upgrading your python version.* | ||
|
||
4. ./bin/trelby | ||
|
||
#### Debian and variants | ||
|
||
Download and install the .deb file for Ubuntu, Debian, or Raspian here: | ||
|
||
https://software.opensuse.org//download.html?project=home%3Agwync&package=trelby | ||
|
||
- or - | ||
|
||
1. make deb | ||
|
||
2. Install the resulting .deb file. | ||
|
||
#### Fedora | ||
|
||
sudo dnf install trelby | ||
|
||
#### Windows | ||
|
||
Currently unsupported, see above. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python | ||
#!/usr/bin/python3 | ||
|
||
import sys | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
rd /s /q dist | ||
rename setup.cfg setup.cfg.bak | ||
python -OO setup.py py2exe | ||
python3 -OO setup.py py2exe | ||
rename setup.cfg.bak setup.cfg | ||
python setup.py nsis | ||
python3 setup.py nsis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8 | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
resources/icon256.png /usr/share/resources | ||
trelby.desktop /usr/share/applications | ||
doc/trelby.1.gz /usr/share/man/man1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
#!/usr/bin/make -f | ||
# -*- makefile -*- | ||
|
||
export PYBUILD_NAME=trelby | ||
export PYBUILD_INSTALL_ARGS="--install-lib=/usr/share/trelby/ --install-scripts=/usr/bin" | ||
%: | ||
dh $@ --with python2 --buildsystem=python_distutils | ||
dh $@ --with python3 --buildsystem=pybuild | ||
|
||
override_dh_auto_install: | ||
dh_auto_install --buildsystem=python_distutils \ | ||
-- --prefix=/usr \ | ||
--install-data=/usr/share \ | ||
--install-lib /usr/share/trelby | ||
dh_auto_install --buildsystem=pybuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0 (quilt) | ||
3.0 (native) |
Oops, something went wrong.