Search code examples
scribus

Scribus: How can I find images used twice?


How can I find images used more than one time in a scribus document?

Is it possible to search a scribus document for images that have been used more than once?


Solution

  • No, not really.

    But in "Extras > Manage Image" you can have an overview of the images you have used. It might help you detect duplicates.

    You could also write a simple Python script that goes through all images in the document and tells you on which pages you have duplicates...


    After your feedback in the comments, I've skimmed through https://wiki.scribus.net/canvas/Category:Scripts and wrote a simple script that lists the path of each image in your document:

    import scribus
    
    for page in range(1, scribus.pageCount() + 1):
        scribus.gotoPage(page)
        for item in scribus.getPageItems():
            if item[1] == 2:
                print(scribus.getImageFile(item[0]))
    

    You can easily adapt it to detect duplicated images and do something with them.

    You can get further help for the Scribus Python API by going into the help and looking for "For Developers > Scripter API" or in the Scribus Wiki.

    And if you produce a script that can be useful for other people do not forget to publish and put a link in here!