Skip to content

Commit

Permalink
Rename MockSign
Browse files Browse the repository at this point in the history
  • Loading branch information
srwi committed Jan 28, 2024
1 parent 4179b41 commit 56d3da1
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 20 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# FalsiSignPy
# MockSign

Simulate the look of hand signed and scanned documents. FalsiSignPy is inspired
Simulate the look of hand signed and scanned documents. MockSign is inspired
by [FalsiSign](https://gitlab.com/edouardklein/falsisign) by Edouard Klein.

![Screenshot](https://github.com/srwi/FalsiSignPy/assets/17520641/5c4a7e69-66e4-4b31-8fe4-575acaf4cc9f)
![Screenshot](https://github.com/srwi/MockSign/assets/17520641/5c4a7e69-66e4-4b31-8fe4-575acaf4cc9f)

## Installation

Use [pip](https://pip.pypa.io/en/stable/) to install FalsiSignPy with
Use [pip](https://pip.pypa.io/en/stable/) to install MockSign with

```bash
pip install git+https://github.com/srwi/FalsiSignPy
pip install git+https://github.com/srwi/MockSign
```

## Usage

Before using FalsiSignPy, a collection of real signature images is needed. This can be
Before using MockSign, a collection of real signature images is needed. This can be
done by scanning and cropping signatures and saving them into a folder.

Afterwards, FalsiSignPy can be started with `falsisignpy`.
Afterwards, MockSign can be started with `mocksign`.

## License

FalsiSignPy is licensed under the [MIT](https://github.com/srwi/FalsiSignPy/blob/master/LICENSE) license.
MockSign is licensed under the [MIT](https://github.com/srwi/MockSign/blob/master/LICENSE) license.
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[tool.poetry]
name = "falsisignpy"
name = "mocksign"
version = "0.1.0"
description = ""
authors = ["Stephan Rumswinkel <17520641+srwi@users.noreply.github.com>"]
license = "MIT"
readme = "README.md"
packages = [{include = "mocksign", from = "src"}]

[tool.poetry.scripts]
falsisignpy = "falsisignpy.falsisignpy:main"
mocksign = "mocksign.mocksign:main"

[tool.poetry.dependencies]
python = "^3.8"
Expand All @@ -28,7 +29,7 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poe.tasks]
mypy = "mypy falsisignpy"
mypy = "mypy mocksign"
format = "ruff format ."
format-check = "ruff format . --check"
ruff = "ruff check ."
Expand Down
File renamed without changes.
Empty file added src/mocksign/__init__.py
Empty file.
File renamed without changes.
12 changes: 6 additions & 6 deletions falsisignpy/falsisignpy.py → src/mocksign/mocksign.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
import PySimpleGUI as sg
from PIL import Image

from falsisignpy import filter, utils
from falsisignpy.pdf import PDF
from falsisignpy.signature import Signature
from . import filter, utils
from .pdf import PDF
from .signature import Signature


class Mode(Enum):
EDIT = 1
PREVIEW = 2


class FalsiSignPy:
class MockSign:
def __init__(self) -> None:
self._running: bool = False
self._window: sg.Window = None # type: ignore
Expand Down Expand Up @@ -177,7 +177,7 @@ def _create_window(self) -> sg.Window:
],
]

return sg.Window("FalsiSignPy", layout, finalize=True, resizable=True)
return sg.Window("MockSign", layout, finalize=True, resizable=True)

def _load_signatures(self, values: Dict[str, Any]) -> None:
path = values["-SIGNATURE-BROWSE-"]
Expand Down Expand Up @@ -469,7 +469,7 @@ def main() -> None:
if os.name == "nt" and int(platform.release()) >= 8:
ctypes.windll.shcore.SetProcessDpiAwareness(True) # type: ignore

app = FalsiSignPy()
app = MockSign()
app.start()


Expand Down
4 changes: 2 additions & 2 deletions falsisignpy/pdf.py → src/mocksign/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import fitz
from PIL import Image

from falsisignpy import filter
from falsisignpy.signature import Signature
from . import filter
from .signature import Signature


class PDF:
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from PIL import Image

from falsisignpy import utils
from src.mocksign import utils


@pytest.mark.parametrize(
Expand Down

0 comments on commit 56d3da1

Please sign in to comment.