Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Knowledgeable Kois #10

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
4b701ac
First PR
Transfusion Feb 22, 2019
9b29bed
Add pytest for unit testing and sphinx for docs as dependencies
Transfusion Feb 22, 2019
4913049
Fix linting issue
Transfusion Feb 22, 2019
18a7fc5
Create filename.py
Feb 23, 2019
45f33a2
Begin structuring the project and display a QMainWindow
Transfusion Feb 23, 2019
f77f670
Add an item to TreeWidget to show the dummy interface
Transfusion Feb 23, 2019
b6c4346
Merge pull request #1 from knowledgeable-kois-codejam-4/BWACpro
mrshmllow Feb 23, 2019
8347faa
renamed file
Feb 23, 2019
02ff84a
mm?
Feb 23, 2019
6665c87
Update __main__.py
Feb 23, 2019
f444cb8
updated
Feb 23, 2019
8512be8
updated, the 'add' button now works :0
Feb 23, 2019
4ea5acd
Begin hooking the MainWindow up to the ClipboardManager, making class…
Transfusion Feb 23, 2019
240a082
Create PredictiveText.py
Feb 23, 2019
fc4fa3c
Update __main__.py
Feb 23, 2019
47c4f78
Update PredictiveText.py
Feb 23, 2019
354e809
Linted :P
Feb 23, 2019
f1333dd
add files :p
Feb 24, 2019
74d1d9c
Update .gitignore
Feb 24, 2019
e51a9d0
random_spelling_mistakes done :P
mrshmllow Feb 24, 2019
792171c
updates
mrshmllow Feb 24, 2019
74a68b9
fixed typo in linter settings
kaleidawave Feb 24, 2019
8d7dd0c
Display copied text as a custom widget with date and index information
Transfusion Feb 24, 2019
86ca053
Inserted spelling mestakes :p
mrshmllow Feb 25, 2019
3ad89ae
General clean up and twitch quotes coming :p
mrshmllow Feb 25, 2019
71cc282
Tidied up the main file. Still a lot commented out and the menu bar d…
kaleidawave Feb 26, 2019
1b286ee
more tidying up, please read some of the comments made
kaleidawave Feb 26, 2019
e706546
Systray works but fails on close due to callback issue
kaleidawave Feb 26, 2019
bc1c25e
Fix linting, refactor to use qt slots and code remove item
Transfusion Feb 27, 2019
2c4be78
Merge with systray and PredictiveText plugin changes
Transfusion Feb 27, 2019
a7cbbab
Updates and the appy() func :p
mrshmllow Feb 27, 2019
4c1fedf
Fixed my mistakes, also the apply() thing is here
mrshmllow Feb 27, 2019
16c49de
Built working system tray icon, no functionality yet
kaleidawave Feb 27, 2019
a12e0ed
Moved quotes into app.json and implemented retrieval of them
kaleidawave Feb 27, 2019
7a2fcf7
Fix linting and fix moving items up and down
Transfusion Feb 27, 2019
f0e0d45
small update
mrshmllow Feb 27, 2019
69847d6
updates
mrshmllow Feb 27, 2019
72395c9
bigish update, just some file rearranging
mrshmllow Feb 28, 2019
d8f7e49
Add image support
Transfusion Feb 28, 2019
7d84bed
Merge branch 'develop' of github.com:knowledgeable-kois-codejam-4/cod…
Transfusion Feb 28, 2019
9a5ec8c
New text method
mrshmllow Feb 28, 2019
d777357
mm
mrshmllow Feb 28, 2019
2a0abd4
Merge branch 'develop' of https://github.com/knowledgeable-kois-codej…
mrshmllow Feb 28, 2019
36e9c81
Big updates!
mrshmllow Mar 1, 2019
8b90d00
Add settings dialog and coresponding configuration manager, separate …
Transfusion Mar 1, 2019
6130154
synonym updates, the parse.py file was uneeded
mrshmllow Mar 1, 2019
7fd9d82
Merge branch 'develop' of https://github.com/knowledgeable-kois-codej…
mrshmllow Mar 1, 2019
bb42fe1
Fix saving of settings
Transfusion Mar 2, 2019
fe052b1
synonym() optomized a lot. also app.json
mrshmllow Mar 2, 2019
e9995d0
Merge branch 'develop' of https://github.com/knowledgeable-kois-codej…
mrshmllow Mar 2, 2019
0b435e5
Make plugins conform to an interface and add a PluginManager
Transfusion Mar 2, 2019
0c23647
linted for you. only the __init__ fails
mrshmllow Mar 2, 2019
2e68dd1
imagerotae works
mrshmllow Mar 3, 2019
f1de50b
Update README.md
mrshmllow Mar 3, 2019
8191818
Merge branch 'develop' of https://github.com/knowledgeable-kois-codej…
mrshmllow Mar 3, 2019
49d3f69
Prevent the plugins from firing upon moving an item up or down
Transfusion Mar 3, 2019
ece0bc8
Merge branch 'develop' of github.com:knowledgeable-kois-codejam-4/cod…
Transfusion Mar 3, 2019
5018213
icon
mrshmllow Mar 3, 2019
056591b
Rename some of the plugins and prevent the _stack_changed event from …
Transfusion Mar 3, 2019
f8eb9b2
Merge branch 'develop' of github.com:knowledgeable-kois-codejam-4/cod…
Transfusion Mar 3, 2019
72c25d0
Fix linting and logging issue
Transfusion Mar 3, 2019
f897e36
TextEditor works
mrshmllow Mar 3, 2019
8927e77
text editor
mrshmllow Mar 3, 2019
341a9c9
New Icon + Saving works, saves photos, filepicker
kaleidawave Mar 3, 2019
22fc8b5
Added dialog box to disable plugins
Transfusion Mar 3, 2019
4ca0262
Merge branch 'develop' of github.com:knowledgeable-kois-codejam-4/cod…
Transfusion Mar 3, 2019
12c79b6
Implemented saving and reloading the clipboard state from FS
Transfusion Mar 3, 2019
48ef2b0
cleaned up code
mrshmllow Mar 3, 2019
467f04b
Fill in README.md and prepare for submission with usage instructions …
Transfusion Mar 3, 2019
46cb3fa
Merge branch 'master' into develop
Transfusion Mar 3, 2019
5ead5a0
Update README.md
Transfusion Mar 3, 2019
6a2a7ff
Remove a stray Text.py
Transfusion Mar 3, 2019
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
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[flake8]
max-line-length=100
application_import_names=projectt
application_import_names=project
ignore=P102,B311,W503,E226,S311,W504,F821
exclude=__pycache__, venv, .venv, tests
import-order-style=pycharm
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Project-specific files
project/*.ini
project/**/autosave.data

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -102,3 +106,10 @@ venv.bak/

# mypy
.mypy_cache/

# IDEA workspace
.idea/

# compiled sphinx HTML documentation
docs/build
.vscode/settings.json
12 changes: 11 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@ verify_ssl = true

[dev-packages]
flake8 = "*"
pytest = "*"
sphinx = "*"

[packages]
pyqt5 = "*"
flake8 = "*"
lxml = "*"
requests = "*"
thesaurus = "*"

[requires]
python_version = "3.7"

[scripts]
lint = "python -m flake8"
lint = "python -m flake8"
start = "python -m project"
test = "pytest project/tests/"
gendoc = "pydoc -g"
385 changes: 377 additions & 8 deletions Pipfile.lock

Large diffs are not rendered by default.

73 changes: 69 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,82 @@ You should be using [Pipenv](https://pipenv.readthedocs.io/en/latest/). Take a l
* Running the application (assuming you use our project layout): `pipenv run start`

# Project Information
##### Team Name

`# TODO`
Knowledgeable Kois

##### Members

[BWACPro](https://github.com/BWACpro)

[kaleidawave](https://github.com/kaleidawave)

[Transfusion](https://github.com/Transfusion) 👑
## Description

`# TODO`
### Theme
Clipboard Mangler

### What does it do?
It's a clipboard manager in all its usefulness:

- For when you `Ctrl-Z` but have no way to redo
- For when you need to quickly swap items in and out of the clipboard
- For when you need images and text to be quickly accessible at the same time
- ...etc

However, it has a mind of its own...

### Feature Breakdown
#### Core
* ~~Hooks into Ctrl-C, Ctrl-X and Ctrl-V~~ **done!**
* Able to select specific copied items and modify them
* Able to edit copied text
* ~~Able to add and remove copied items~~ **done!**
* ~~Able to rearrange copied items~~ **done!**
* ~~Able to delete specific items~~ **done!**
* ~~Clipboard should be saved after exiting the app~~ **done!**
* _(Keep entire clipboard history as a stack too?)_
* _(Tray Logo, from which we can access settings?)_
#### Crappifying
* Plugin-based architecture, each crappifier should be a class which applies its own transformation onto an image or text
* Ideas for text
* ~~Misspell words~~ **done!**
* Randomly transpose words around
* ~~Replace entire blocks of text with "funny" copypasta from APIs~~ **done!**
* Ideas for images
* Deep fry and load back into memory
* ~~Randomly rotate~~ **done!**
* Randomly add meme images to the front of the clipboard
* ~~Randomly select transformations to apply.~~ **done!**

## Setup & Installation

`# TODO`
Clone this repo, in a terminal run `pipenv install` then `pipenv run start`

Unit tests are written using the [pytest](https://docs.pytest.org/en/latest/) framework.

`pipenv run test` runs the available tests.

## How do I use this thing?

`# TODO`
As you copy and paste text or images, the copied content will be added to the scroll area of the main window.

The numbers on the left, indicated by ③ in the infographic below indicate their position in the list of copied items.

A selected item, ① in the infographic below, has a different background color compared to other items. After selection, it may be moved up or down the list, i.e. swapped with the item above or below it, as shown by ②. Remove removes the selected item.

This may be useful if you want to organize your frequently accessed items at the top. Unchecking the `Always load top item into clipboard` option in the Settings menu will automatically copy the selected item into the system's clipboard.

Saving the state of the clipboard is done automatically if the option in Settings is checked, or may be done manually in the File menu.

![Screenshot of Clipboard Mangler on macOS Mojave](https://i.imgur.com/FbxCbjF.png)

## Documentation

Documentation is generated using [Sphinx](http://www.sphinx-doc.org/en/master/). To build:
```sh
cd docs
sphinx-apidoc -f -o source/ ../project/
make html
```
5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ jobs:
displayName: 'Install project dependencies'

- script: pipenv run lint
displayName: 'Lint the project'
displayName: 'Lint the project'

- script: pipenv run test
displayName: 'Unit test the project'
19 changes: 19 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
38 changes: 38 additions & 0 deletions docs/source/ClipboardManager.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ClipboardManager package
========================

Submodules
----------

ClipboardManager.ClipboardManager module
----------------------------------------

.. automodule:: ClipboardManager.ClipboardManager
:members:
:undoc-members:
:show-inheritance:

ClipboardManager.ClipboardObject module
---------------------------------------

.. automodule:: ClipboardManager.ClipboardObject
:members:
:undoc-members:
:show-inheritance:

ClipboardManager.HistoryManager module
--------------------------------------

.. automodule:: ClipboardManager.HistoryManager
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: ClipboardManager
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/source/PluginManager.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
PluginManager package
=====================

Submodules
----------

PluginManager.PluginManager module
----------------------------------

.. automodule:: PluginManager.PluginManager
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: PluginManager
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/source/Stack.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Stack package
=============

Submodules
----------

Stack.Stack module
------------------

.. automodule:: Stack.Stack
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: Stack
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/source/Widgets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Widgets package
===============

Submodules
----------

Widgets.MainListWidget module
-----------------------------

.. automodule:: Widgets.MainListWidget
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: Widgets
:members:
:undoc-members:
:show-inheritance:
Loading