Recent posts

#1
Scripts and Plugins / Script para Índice remissivo n...
Last post by lucasnwd - June 06, 2023, 10:14:59 PM
PT-BR

Trabalho diagramando livros de filosofia e meu trabalho me exige criar um indice com as palavras mais frequentes do livro, indicando em quais páginas ela aparecem (um índice remissivo). Desta forma, eu fiz um script simples de Python para encontrar essas palavras de forma um pouco mais automática.

Eu ainda não sei como fazer o script, aceitar várias entradas de uma vez (eu não sei quase nada de Python), mas ele já ajuda bastante.

Para usar:
1 - selecione a caixa de texto na qual quer pesquisar as palavras.
2- abra o console e cole o seguinte código, substituindo "psicologia" pela palavra de sua escolha:
import scribus

word = "psicologia"
occurrence_pages = []

for page_num in range(scribus.pageCount()):
    scribus.gotoPage(page_num + 1)
    for item in scribus.getAllObjects():
        if scribus.getObjectType(item) == "TextFrame":
            if scribus.getTextLength(item) > 0:
                text = scribus.getText(item)
                if word in text:
                    occurrence_pages.append(page_num + 1)
                    break

print(f"{word}: {', '.join(map(str, occurrence_pages))}")
3 - Pressione F9 para executar o código e ele retornará a palavra e em quais paginas ela aparece.

Quem souber mais sobre Python e quiser criar uma interface, ou aprimorar o código para recerber diversas entradas ao mesmo tempo e já escrevê-las em uma caixa de texto na última página do arquivo, por exemplo, ajudaria muito a facilitar o trabalho dos diversos diagramadores e acadêmicos que usam o Scribus.


EN (TRANSLATED WITH GOOGLE)

I work designing philosophy books and my job requires me to create an index with the most frequent words in the book, indicating which pages they appear on (an index). So, I made a simple Python script to find these words a little more automatically.

I still don't know how to make the script accept multiple inputs at once (I know almost nothing about Python), but it already helps a lot.

To use:
1 - select the text box in which you want to search for the words.
2- open the console and paste the following code, replacing "psychology" with the word of your choice:
import scribus

word="psychology"
occurrence_pages = []

for page_num in range(scribus.pageCount()):
     scribus.gotoPage(page_num + 1)
     for item in scribus.getAllObjects():
         if scribus.getObjectType(item) == "TextFrame":
             if scribus.getTextLength(item) > 0:
                 text = scribus.getText(item)
                 if word in text:
                     occurrence_pages.append(page_num + 1)
                     break

print(f"{word}: {', '.join(map(str, occurrence_pages))}")
3 - Press F9 to run the code and it will return the word and which pages it appears on.

Anyone who knows more about Python and wants to create an interface, or improve the code to receive several inputs at the same time and already write them in a text box on the last page of the file, for example, would help a lot to facilitate the work of the various diagrammers and academics who use Scribus.
#2
User Interface / Re: a little suggestion
Last post by a.l.e - June 06, 2023, 08:12:56 AM
Welcome to Scribus!

Quote from: artweave on June 05, 2023, 07:07:04 PMCan't we collect Item>duplicate and transform on the distribute and align panel in the window menu

Sorry, I don't get what's the request here... You'd like one single dialog for all three? You'd like to see all of them moved to the Window menu?

In the second case, yes, the Scribus menus are probably not optimally structured: sometimes the systematic is based on the way a document is structured and sometimes it follows the code structure.

Sadly, I don't see a change coming soon in that field...

Quote from: artweave on June 05, 2023, 07:07:04 PMelement that I often used was the shortcut opening a dialog allowing me to type a page number to go there.

Yes, there should be a way to go to a specific page by number (or, better, both by index and by number...).

Can you please fill a ticket in https://bugs.scribus.net ?

Quote from: artweave on June 05, 2023, 07:07:04 PMregarding the import of bitmap photos, plan to accept the AVIF format in scribus?

Personally, I'm not really fond of multiplying the number of (non mainstream) formats supported by Scribus.
The main issue being that, at the end, if the format cannot be embedded as is in a PDF, Scribus will need to perform a conversion to a common lossless or lossy format and what will be sent to the print shop is not what you see on screen.
(And I did not find any evidence that PDF would support AVIF pictures...)

Thanks for your feedback!
#3
Text and Typography / Re: Fonts unavailable in 1.5.8...
Last post by PatJr - June 05, 2023, 08:19:37 PM
not an answer here
maybe try a flatpak version or native repo install

I have seen issues with the appimage versions and having to rebuild your font cache
#4
Text and Typography / Fonts unavailable in 1.5.8 app...
Last post by BobT53 - June 05, 2023, 07:18:10 PM
Hi,
Been using Scribus 1.4.8 with no problems, just now run up 1.5.8 appimage and found that most of a commercially purchased family of otf fonts which I have been using without issues in 1.4.8 are either not available at all or have been incorrectly substituted in 1.5.8. Attd Screenshot-6 shows the font listing from 1.4.8, -3 from 1.5.8 where most of the Berthold Akzidence Grotesk family are either missing or misdirected. It doesn't seem possible to edit the incorrect filepaths, at least through the font preferences page, and setting the correct font path as 'additional' has no apparent effect. As the image shows, the single font in this group which does appear to be available normally in 1.5.8 (BAG Light) happens to have a duplicate of the file in a different (home) directory.
System is MX Linux 19, 64 bit. Been using these fonts for years in Scribus /    nkscape / LibreOffice etc without issues.
Any thoughts on what is happening and how to fix it gratefully received.
#5
User Interface / a little suggestion
Last post by artweave - June 05, 2023, 07:07:04 PM
I come from quarkxpress which I used for years at work.
I switched to linux at home and I find that version 1.58 has gained in ergonomics in its interface.
A few things:
- Can't we collect Item>duplicate and transform on the distribute and align panel in the window menu

-element that I often used was the shortcut opening a dialog allowing me to type a page number to go there.

- regarding the import of bitmap photos, plan to accept the AVIF format in scribus?

This version of scribus is really successful. Thanks to the developers
#6
Beginner Talk / Re: style manager Window too b...
Last post by AdmFubar - June 05, 2023, 06:24:34 PM
Check in the scribus config file, (.scribus) for prefs140.xml. In a text editor open the file and search for the "style manager" section.It may have some values for the window dimensions. If so change the height so it is a bit smaller and see if that helps. You should do the editing without scribus running. Once you save the edited file restart scribus and open the styles manager and see if there is an improvement.
#7
Beginner Talk / Re: style manager Window too b...
Last post by MrB - June 05, 2023, 06:02:05 PM
Please also let us know your screen resolution
#8
Beginner Talk / Re: adjust frame to image by d...
Last post by hugogogo - June 05, 2023, 01:07:42 PM
Quote from: a.l.e on June 05, 2023, 08:09:13 AMwhen you drag and drop an image into scribus, the size of the newly created frame will not bigger than the page.

all right ! It explains everything, thank you :) I see why it's a good idea indeed
#9
Beginner Talk / Re: adjust frame to image by d...
Last post by a.l.e - June 05, 2023, 08:09:13 AM
when you drag and drop an image into scribus, the size of the newly created frame will not bigger than the page.

in your case, it's maxed at the page width.

believe me, that's a good idea: you don't want to resize an image that is 100 times the page size!

now that you know this, what can you do?

on the one side, you can "correctly" set the image resolution before dragging the image into scribus: scribus will retain it, when creating the frame and you will get something that is closer to what you are expecting.

you can also first create a frame of the correct size (and put it in the scrapbook, so that you can insert it on new pages with a double click) and drop the image on the existing frame.

also, if you want the images to always (or mostly) scale to the frame size, you can modify the preferences of the "item tools > images" (or in the document settings, for the current document) and tell scribus about your predilection.

then, the images will be scaled to the frame size by default.

voilà, i hope that helps..
#10
Beginner Talk / Re: style manager Window too b...
Last post by utnik - June 05, 2023, 05:45:22 AM
hi catrine

it might be better with a newer scribus version.
try 1.5.8 (and hope...)

utnik