semvec/pypi-packages huggingface dataset:
py-tkoverlay 1.1.0
A package that creates and manipulates screen overlays based on tkinter.
License: MIT

# py-overlay
```
Fork of davidmaamoaix/overlay
Reason: Original repository not updated in a long time (2019) as the time of writing this, even though not archived.
```
A package that creates and manipulates screen overlays based on tkinter.

## Platforms
- Mac OS (not tested)
- Linux (not tested)
- Windows (tested and does not work)

## Installation
```sh
pip install py-overlay
```

## Usage
A basic overlay is created as such:
```python
from overlay import Window

win = Window()
Window.launch()
```

The constructor of the _Window_ class takes the following (optional) parameters:
- __size__: _tuple_, the dimension (width, height) of the overlay window.
- __position__: _tuple_, the position of the overlay (on screen).
- __transparent__: _bool_, whether to set the overlay background transparent.
- __alpha__: _float [0, 1]_, the alpha (transparency) of the overlay.
- __draggable__: _bool_, whether the window can be dragged

Note that the parameters mentioned above can be edited any time as attributes of an instance of _Window_.

In order to edit the content of a overlay, one needs to obtain the root of the overlay, upon which all else shall be build.
```python
import tkinter as tk
from overlay import Window

win = Window()
label = tk.Label(win.root, text="Window_0")
label.pack()
Window.launch()
```

Multiple overlays can be created just as easily:
```python
import tkinter as tk
from overlay import Window

win_0 = Window()
label_0 = tk.Label(win_0.root, text="Window_0")
label_0.pack()
win_1 = Window()
label_1 = tk.Label(win_1.root, text="Window_1")
label_1.pack()
Window.launch()
```

The following program covers a brief explaination on other methods of the _Window_ class.
```python
import tkinter as tk
from time import sleep
from overlay import Window

def other_stuff(text):
	'''A simple demonstration. The usage of sleep is to emphasize the effects of each action.'''
	print(text)
	sleep(2)
	win_0.hide() # Hides the overlay.
	sleep(1)
	win_0.show() # Shows the overlay.
	sleep(1)
	win_0.focus() # Sets focus to overlay.
	win_1.center() # Moves the overlay to the center of the screen.
	sleep(1)
	Window.hide_all() # Hides all overlays.
	sleep(1)
	Window.show_all() # Shows all overlays.
	sleep(1)
	win_0.destroy() # Kills the overlay.
	sleep(1)
	Window.destroy_all() # Kills all overlays and ends the mainloop.


'''Creates two windows.'''
win_0 = Window()
label_0 = tk.Label(win_0.root, text="Window_0")
label_0.pack()
win_1 = Window()
label_1 = tk.Label(win_1.root, text="Window_1")
label_1.pack()

Window.after(2000, other_stuff, 'Hello World') # Identical to the after method of tkinter.Tk.

Window.launch()
```
word-gen-card 0.1.2
a generate anki card  tool from dictionary export csv file
License: MIT
Requires Python: >=3.10

# word-gen-card
a generate anki card  tool from dictionary export csv file

## Installation

word-gen-card requires python version 3.10 or higher

```bash
pip install word-gen-card
```


## Quickstart
**Now Support Eudic export csv file**

```bash
card_cli source_file_path to_save_path -n dect_name -d deck_id

```

see more details

```bash
card_cli --help
```

## Support more csv formats

this tool default model fields like below:

```
fields=[
            {"name": "单词"},
            {"name": "音标"},
            {"name": "图片"},
            {"name": "声音"},
            {"name": "基本释义"},
        ],
```

your process_data method logic only put this struct data to `self.gen_anki` if  using default model, like below:


```python
from word-gen-card.src import GenAnki

class OtherDict(GenAnki):
    def process_data(self, path):
        # do your something
        fields = [word, phonetic symbols, image, f'[sound:{audio_name]', basic meaning]
        self.gen_anki(fields=fields)

```

also you can custom your model, see below:

```
my_deck = genanki.Model(
      model_id,
        "Model NAME",
        fields=[
            {"name": "单词"},
            {"name": "音标"},
            {"name": "图片"},
            {"name": "声音"},
            {"name": "基本释义"},
        ],
        templates=[
        {
            "name": "Card 1",
            "qfmt": "", # front side
            "afmt": "", # back side
        }
        ]
)
eudic = Eudic(deck=my_deck, model=my_model, source_data_path=args.source, to_path=args.to)
eudic.packge()
```
for more model detail see [genanki](https://github.com/kerrickstaley/genanki) repo

## License

This project is open sourced under MIT license, see the [LICENSE](LICENSE) file for more details.