Say there is a fourth system in the two documents that count them

README.tr.md still offered three, so a Turkish reader could not tell Windows was
supported at all. CONTRIBUTING opens the section a port is written from, and it
described three tables and three systems; there are four of each now, plus
paths.py, which master separated out while this branch was adding a Windows case
to the two copies it replaced.
This commit is contained in:
2026-08-16 10:29:07 +03:00
parent 476265465f
commit ec4d7da09d
2 changed files with 33 additions and 18 deletions
+24 -15
View File
@@ -53,19 +53,28 @@ forgets fails rather than hangs.
## Another platform ## Another platform
Three systems are supported: Wayland, X11 and macOS. Each one is a named entry Four systems are supported: Wayland, X11, macOS and Windows. Each one is a named
in a table, and one chooser picks between them, so a fourth adds an entry and a entry in a table, and one chooser picks between them, so a fifth adds an entry
line rather than a branch inside every function. The three tables are and a line rather than a branch inside every function. The tables are
`paste.Desktop` (clipboard and key press), `audio.Sound` (capture and the device `paste.Desktop` (clipboard and key press), `audio.Sound` (capture, the device
lists) and the `_macos()`/`_gnome()` pair in `hotkey.py`. Keep `sys.platform` lists, and whether the far side of a meeting can be recorded at all),
inside the chooser and read it there every time: a constant settled at import is `paths.directories()` (where the settings and the data live) and the
one no test can stand somewhere else. `_macos()`/`_windows()`/`_gnome()` set in `hotkey.py`. Keep `sys.platform` inside
the chooser and read it there every time: a constant settled at import is one no
test can stand somewhere else.
Where a platform cannot do something, say so in its table entry rather than in
the code that asks. `audio.Sound.meetings` is the shape of it: Windows offers no
capture device for what the speakers are playing, and a caller reading a False
there can tell that apart from an empty device list, which only means the tool
that lists them is not installed.
The tests are split along the same line, and almost none of them are skipped. The tests are split along the same line, and almost none of them are skipped.
892 of the 935 run on any machine, including every line of the Wayland, X11 and 1009 of the 1052 run on any machine, including every line of the Wayland, X11,
macOS backends: the programs are faked at `shutil.which`, the frameworks at the macOS and Windows backends: the programs are faked at `shutil.which`, the
one function that loads them. A test class says which system it is standing on frameworks and system libraries at the one function that loads them
rather than avoiding the question: (`paste._win_api`, `hotkey._win_input`). A test class says which system it is
standing on rather than avoiding the question:
```python ```python
class MacOS(ClipboardContract, DikteTest): class MacOS(ClipboardContract, DikteTest):
@@ -73,10 +82,10 @@ class MacOS(ClipboardContract, DikteTest):
here = paste.MACOS here = paste.MACOS
``` ```
so the Linux half is checked on a Mac and the macOS half on Linux, and a change so the Linux half is checked on a Mac, the macOS half on Linux and the Windows
to a chooser cannot quietly break the platform nobody is sitting at. What the half on both, and a change to a chooser cannot quietly break the platform nobody
systems owe in common is written once as a contract class and subclassed by each is sitting at. What the systems owe in common is written once as a contract
of them. class and subclassed by each of them.
The 43 that do carry `@linux_only` are the ones that would need the real thing: The 43 that do carry `@linux_only` are the ones that would need the real thing:
the `/dev/input` listener, KDE's shortcut file, GNOME's gsettings. Mark a test the `/dev/input` listener, KDE's shortcut file, GNOME's gsettings. Mark a test
+9 -3
View File
@@ -4,9 +4,9 @@
çevrilir, bir model transkripti temizler (ıı'lar, tekrarlar, eksik noktalama), çevrilir, bir model transkripti temizler (ıı'lar, tekrarlar, eksik noktalama),
sonuç panoya kopyalanır ve o an yazdığın pencereye yapıştırılır. sonuç panoya kopyalanır ve o an yazdığın pencereye yapıştırılır.
KDE Plasma 6 / Wayland için yazıldı, GNOME X11 ve macOS'ta da çalışır. Sistem KDE Plasma 6 / Wayland için yazıldı, GNOME X11, macOS ve
paketleri dışında bağımlılığı yok: sadece Python standart kütüphanesi (3.11 veya [Windows](README.windows.md)'ta da çalışır. Sistem paketleri dışında bağımlılığı
üstü) ve PyQt6. yok: sadece Python standart kütüphanesi (3.11 veya üstü) ve PyQt6.
*[English README](README.md)* *[English README](README.md)*
@@ -81,6 +81,12 @@ build -j`) ve yolunu Ayarlar → API'ye yaz, ya da buluta çevir. Toplantı içi
BlackHole veya Loopback gerekiyor (`brew install blackhole-2ch`); dikte için BlackHole veya Loopback gerekiyor (`brew install blackhole-2ch`); dikte için
gerekmiyor. gerekmiyor.
Windows da aynı şekilde çalışıyor, Dikte açıkken kombinasyonu sistemin kendi
kısayol servisi üzerinden tutuyor: `winget install Gyan.FFmpeg`, `pip install
PyQt6`, sonra `python dikte.py`; Başlat Menüsü girdisi ve `dikte` komutu için
isteğe bağlı `install.ps1`. Orada toplantı kaydı henüz yok, ayrıntılar
[Windows README](README.windows.md)'sinde.
`install.sh` `dikte` komutunu, menü girdisini, oturum açılışında otomatik `install.sh` `dikte` komutunu, menü girdisini, oturum açılışında otomatik
başlatmayı ve iki global kısayolu kurar; tuşları da iki argümanı. `./update.sh` başlatmayı ve iki global kısayolu kurar; tuşları da iki argümanı. `./update.sh`
son sürümü çeker ve bunları senin seçtiğin tuşlarla yerine koyar; son sürümü çeker ve bunları senin seçtiğin tuşlarla yerine koyar;