frik 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- frik-0.0.1/PKG-INFO +47 -0
- frik-0.0.1/README.md +36 -0
- frik-0.0.1/pyproject.toml +21 -0
- frik-0.0.1/pyproject.toml.orig +20 -0
- frik-0.0.1/src/frik/__init__.py +0 -0
- frik-0.0.1/src/frik/main.py +27 -0
frik-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: frik
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A Wayland-exclusive screenshot tool that extracts text from your screenshot
|
|
5
|
+
Author: quandelaa
|
|
6
|
+
Author-email: quandelaa <sergiotobamasilalahi@gmail.com>
|
|
7
|
+
Requires-Dist: pyperclip>=1.11.0
|
|
8
|
+
Requires-Dist: pytesseract>=0.3.13
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# frik
|
|
13
|
+
|
|
14
|
+
A Wayland-exclusive screenshot tool that extracts text from your screenshot
|
|
15
|
+
|
|
16
|
+
# Prerequisites:
|
|
17
|
+
|
|
18
|
+
- grim
|
|
19
|
+
- tesseract packages and language data or smth
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
pip
|
|
24
|
+
```bash
|
|
25
|
+
pip install frik
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
uv
|
|
29
|
+
```bash
|
|
30
|
+
uv tool install pitt
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
There's really only one way to use it:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
frik
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
This project is licensed under the MIT License - see the LICENSE file for details
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
Fully by quandela
|
frik-0.0.1/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frik
|
|
2
|
+
|
|
3
|
+
A Wayland-exclusive screenshot tool that extracts text from your screenshot
|
|
4
|
+
|
|
5
|
+
# Prerequisites:
|
|
6
|
+
|
|
7
|
+
- grim
|
|
8
|
+
- tesseract packages and language data or smth
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
pip
|
|
13
|
+
```bash
|
|
14
|
+
pip install frik
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
uv
|
|
18
|
+
```bash
|
|
19
|
+
uv tool install pitt
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
There's really only one way to use it:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
frik
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
This project is licensed under the MIT License - see the LICENSE file for details
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
Fully by quandela
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "frik"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "A Wayland-exclusive screenshot tool that extracts text from your screenshot"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"pyperclip>=1.11.0",
|
|
9
|
+
"pytesseract>=0.3.13",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
[[project.authors]]
|
|
13
|
+
name = "quandelaa"
|
|
14
|
+
email = "sergiotobamasilalahi@gmail.com"
|
|
15
|
+
|
|
16
|
+
[project.scripts]
|
|
17
|
+
frik = "frik.main:main"
|
|
18
|
+
|
|
19
|
+
[build-system]
|
|
20
|
+
requires = ["uv_build>=0.12.10,<0.13.0"]
|
|
21
|
+
build-backend = "uv_build"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "frik"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "A Wayland-exclusive screenshot tool that extracts text from your screenshot"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [
|
|
7
|
+
{ name = "quandelaa", email = "sergiotobamasilalahi@gmail.com" }
|
|
8
|
+
]
|
|
9
|
+
requires-python = ">=3.12"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"pyperclip>=1.11.0",
|
|
12
|
+
"pytesseract>=0.3.13",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.scripts]
|
|
16
|
+
frik = "frik.main:main"
|
|
17
|
+
|
|
18
|
+
[build-system]
|
|
19
|
+
requires = ["uv_build>=0.12.10,<0.13.0"]
|
|
20
|
+
build-backend = "uv_build"
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from pytesseract import image_to_string
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
from subprocess import run
|
|
4
|
+
from pyperclip import copy
|
|
5
|
+
|
|
6
|
+
def main() -> None:
|
|
7
|
+
cords = run(['slurp'], capture_output=True).stdout.decode().strip()
|
|
8
|
+
|
|
9
|
+
if cords == "":
|
|
10
|
+
print("cancelling..")
|
|
11
|
+
return
|
|
12
|
+
|
|
13
|
+
path = f"/home/quandela/Images/frik_{datetime.now()}.png"
|
|
14
|
+
run(['grim', '-g', cords, path])
|
|
15
|
+
|
|
16
|
+
print(f"saved screenshot in {path}\n")
|
|
17
|
+
text = get_text(path).strip()
|
|
18
|
+
|
|
19
|
+
if text == "":
|
|
20
|
+
print("no text recognized.. exiting")
|
|
21
|
+
return
|
|
22
|
+
|
|
23
|
+
copy(text)
|
|
24
|
+
print("text copied succesfully!")
|
|
25
|
+
|
|
26
|
+
def get_text(path) -> str:
|
|
27
|
+
return image_to_string(path, lang="eng")
|