Commit graph

11 commits

Author SHA1 Message Date
Kosta Harlan 6599353dff catpcha.py: Use opts.output
Script fails on macOS Python 3.9.2 otherwise, with "name 'output' is not
defined".

Change-Id: Id3df19b4a4dedf69f860f1a41348770ac1207377
(cherry picked from commit d1bc02e2fb)
2024-01-16 14:03:28 +00:00
Reedy cc41ef1d50 captcha(-old).py: Fix undefined variables and remove some unused ones
Change-Id: I13b46cceb68a0118274a1fe9d3547b193f62b53d
(cherry picked from commit 1a305a40ee)
2024-01-15 20:24:33 +00:00
Reedy 59d9dee5be captcha(-old).py: Remove trailing semicolon
Change-Id: I7b6458fe24485c995c47c249d6572be37e39d1a1
2024-01-15 14:12:31 +00:00
Reedy 5739fba381 captcha(-old).py: Support Pillow 10
getsize() function was removed in version 10

Bug: T354099
Change-Id: I019a5a89de4340d73a938c907c0a6f5cc22a659c
(cherry picked from commit fbf8d90063)
2024-01-05 15:36:38 +00:00
Reedy db06ec876b FancyCaptcha: Deprecate and add alternative for blacklist parameter in generation
Bug: T277936
Change-Id: I8e758023b38a4d450a0bf02b3bfc0b5033959be7
2022-07-04 16:16:20 +00:00
Reedy 3b477b543d Update captch(-old)?.py shebang to python 3
Bug: T268468
Change-Id: I9e3918939365a3142772627a192b0d92be7d7000
2020-12-01 14:16:56 +00:00
Reedy b86cc888a5 Fix characters typo in captcha python scripts
Change-Id: I855a43d3bd331974c63b4eacf8178805db6de7c1
2020-10-28 19:45:02 +00:00
Reedy 69512c8046 Use floor division (//) when calculating chunks in python
Also remove int() casting from captcha-old.py which was added
in 66152162fe but diverges from
captcha.py

Most of the code should be the same in these two files should
be the same bar the actual image processing...

Bug: T263223
Follows-Up: If4f6bc9048aceacc41538c001255425e848fd8e9
Change-Id: I3062e64fc380022ca9fee793bc522f212eb873d3
2020-09-18 17:18:53 +00:00
Florian Schmidt 66152162fe Add threads parameter to captcha.py for multithread CAPTCHA generation
Bug: T157734
Change-Id: If4f6bc9048aceacc41538c001255425e848fd8e9
2017-06-12 17:11:58 +01:00
Reedy eea24979ed Make captcha python scripts python3 compatible
Remove trailing whitespace

Bug: T157888
Change-Id: I8b2da97c40f8748a1aad5509dddff638a7f3f945
2017-02-12 01:21:52 +00:00
Reedy 7c3d8dc62a Re-add old version of captcha.py without Tim's OCR improvements
Effectively reverts the following two commits:
6f286e52db
df4806c64c

Due to lack of apparent consensus to do T141490, yet...

To be used for cron job regeneration of captchas on a regular basis

Change-Id: Iaedf0d4903c0fd9a9cca3e648a2a9691f54c6af8
2016-11-04 18:49:19 +00:00