greps – new version (v1.5)

Previous topic - Next topic

richard-cdbox

New features:

Searching and replacing across the entire document (footnotes are included)
Searching and replacing inside tables
Safe ungrouping of grouped text frames

https://github.com/richard-cdbox/greps/releases/tag/v1.5

a.l.e

As AdmFubar already reported, I also have issues with the dialog.

It does not (really) close, leaves artifacts behind it when moving the dialog (but this -- i think -- also happens with the dialog I have created), and after finishing to replace left Scribus idle, impossible to close it, without killing it.

It's a huge script, but one day I might have a look at it and try to find out the reasons why it does not work on some computer...

Anyway, it's a good start! Congrats.

jerome

Salut! I'm new to Scribus, and I'm trying to see if I can use Scribus every day as a graphic designer.
I was happy to be able to try this GREP script, but we agree that it doesn't work on Scribus 1.7.0 or 1.7.1 on macOS, right?

Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "<string>", line 15, in <module>
  File "/Applications/Scribus-1.7.1.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/tkinter/__init__.py", line 38, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
    ^^^^^^^^^^^^^^^
ImportError: dlopen(/Applications/Scribus-1.7.1.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/lib-dynload/_tkinter.cpython-313-darwin.so, 0x0002): Library not loaded: @rpath/Versions/8.6/Tcl
  Referenced from: <9620CE60-AE36-33E5-BAC2-CE18D0B40C33> /Applications/Scribus-1.7.1.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/python3.13/lib-dynload/_tkinter.cpython-313-darwin.so
  Reason: tried: 'lib/Versions/8.6/Tcl' (relative path not allowed in hardened program), '/opt/local/lib/Versions/8.6/Tcl' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/local/lib/Versions/8.6/Tcl' (no such file), '/Applications/Scribus-1.7.1.app/Contents/MacOS/../Frameworks/Versions/8.6/Tcl' (no such file)

utnik

hi jerome

You're right, afaik tkinter based scripts don't work on mac os. (at least i have never seen them running on a mac...)

utnik

richard-cdbox

Hi all,

I am very sorry, but I don't have the opportunity to test it on a Mac. However, I noticed this:

import _tkinter # If this fails your Python may not be configured for Tk

Maybe this will help (from Github discussion):

You don't have pkg-config. That's probably what changed. The error that you saw was from Configure trying to use Tck/Tk from XCode SDK which is deprecated and broken.

Previously, CPython accepted --with-tcltk-* configure options but they changed it since 3.11.0 to a pkg-config call with TCLTK_CFLAGS and TCLTK_LIBS envvars as overrides. We set the path for pkg-config but don't set the overrides if it's missing.

So you can either brew install pkg-config, or set those envvars as a workaround:

export TCLTK_CFLAGS="-I$(brew --prefix tcl-tk@8)/include/tcl-tk"
export TCLTK_LIBS="-L$(brew --prefix tcl-tk@8)/lib -ltcl8.6 -ltk8.6"

Richard

MrB

#5
I don't even bother to ensure the TK libraries work/are included in the DMGs. If someone can help work that part out, we can try. Otherwise, something better must be available, surely.

a.l.e

At some time in Spring, I'd like to give a new try at building a new scripting engine based on pybind11 and having access to Qt for Python...

Sadly, I have no way to access a Mac and can't even try if it will work there.
Or why Tk does not work there.

AdmFubar

does the mac even have tk available for it?
Using Scribus1.6.1, 1.7.0 openSUSE 15.6
Advanced hobbyist