View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0016380||Scribus||Scripter||public||2020-12-07 19:40||2020-12-10 22:23|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0016380: Merge new version of autoquotes|
|Description||autoquote2 has been improved and should be merged int|
It now behaves more smartly, specialy for french. It manages various sorts of quotes and guillemets. It recognises urls, that include ":" but should not be altered by spaces.
As a consequence, it requires more options to be set first. In the uploaded version of the script, all variables have been set by editing the source, so as to fit my workflow (which is fit for french langage, hyphenation, narrow non breaking spaces...).
In case the user wants to change these options s-he has to edit the file and
- either change do_ask to True : in such a case, a dialog will popup and ask for all variable settings. But all these dialogs are tiedous in everyday life so i dont think it's the good way to use that script.
- or edit the file so as to change every variable's value according to his choices. Comments make this easy. Setting these userpleasing defaults options in the code makes the script easy to use for every langage and usecase.
Included documentation :
# - replaces " with « and » as required
# - warns when « and » dont match or for other such issues
# - adds choosen spaces after « and before »
# - applies some heuristics (some would call that AI) to best deal with ' and "
# - replace multiple following spaces with just one
# - when langages is french, does more typography job :
# - - replaces or adds the choosen space before ! ? ; : and …
# - - doesnt mess urls = doesnt change http://scribus.net
# - - only adds one choosen space before a set of double signs as !!!?!
# - provides a just-go-ahead-dont-ask-for-options mode for geeks : juste change do_ask value to False in script
# - recognizes urls with "p:/" or "ww." patterns (=> possible false positive)
# - same choosen space for « » ; ! ; : …
# - space is added or replaced with absolutely no local-font awareness
# - only manages selected frame and doesnt follow links accross linked text frames <-- PR wanted
# - choose a text frame, launch script
# - choose langage
# - choose sort of space to add for typography : default is thin nonbreakable space.
# - choose whether existing spaces should be replaced or not
# - choose whether set of spaces should be merged into one
Choosen default values for the options in the uploaded version of the script are :
# possible choices are non_breaking_space, non_breaking_thin_space, thin_space"
# in case specified_character is more than one char long
# also apply typo space choice to existing spaces
# avoid multiple spaces sequences
# apply scribus hyphenation on text
# should script display number of changes done ? No
# script does not open any dialog but use default values
# When do_ask=True, 2 of the default values are different :
# * do_hyphenate=False
# * with_feedback=True
|Tags||No tags attached.|
²_autotypo.py (17,419 bytes)
||Question: has this script been tested with latest 126.96.36.199 and Python 3? Asking because there has been a few behavior changes in scripting related to text handling|
I've been using it for several months now and I've only used it a couple of time with the new scribus 188.8.131.52 running python 3.6.9 and until now everything has been OK.
I've added more documentation on features and possible settings in the report.
|2020-12-07 19:40||JLuc||New Issue|
|2020-12-07 19:40||JLuc||File Added: ²_autotypo.py|
|2020-12-07 20:18||jghali||Note Added: 0048535|
|2020-12-07 21:15||JLuc||Description Updated||View Revisions|
|2020-12-07 21:27||JLuc||Description Updated||View Revisions|
|2020-12-07 21:29||JLuc||Description Updated||View Revisions|
|2020-12-07 21:30||JLuc||Description Updated||View Revisions|
|2020-12-07 21:31||JLuc||Description Updated||View Revisions|
|2020-12-07 21:32||JLuc||Description Updated||View Revisions|
|2020-12-08 08:39||JLuc||Note Added: 0048538|
|2020-12-08 08:40||JLuc||Note Edited: 0048538||View Revisions|
|2020-12-08 08:42||JLuc||Description Updated||View Revisions|
|2020-12-08 08:46||JLuc||Description Updated||View Revisions|
|2020-12-10 22:23||JLuc||Description Updated||View Revisions|
|2020-12-10 22:23||JLuc||Note Added: 0048544|