Scribusoid

Author Topic: formatXML plugin  (Read 639 times)

srikrishnan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
formatXML plugin
« on: December 09, 2019, 07:53:22 am »
Hi All,

I am using Scribus 1.5.5 on windows 7 operating system. I have downloaded formatXML.py plugin from online. When I tried it in my system, it throws the following error:

Traceback (most recent call last):
  File "<string>", line 10, in <module>
  File "D:\scribus\formatXML.py", line 179, in <module>
    main_wrapper()
  File "D:\scribus\formatXML.py", line 165, in main_wrapper
    main()
  File "D:\scribus\formatXML.py", line 148, in main
    xml_file = getFile("XML File", 'XML (*.xml)')
TypeError: getFile() takes exactly 4 arguments (2 given)

is there any solution for this issue or anything i missed in my side? please help me to solve this issue.

I am trying to explore the possibilities XML based pagination in Scribus

regards,
Srikrishnan

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2407
  • Karma: 34
    • the graphics lab
Re: formatXML plugin
« Reply #1 on: December 09, 2019, 12:09:50 pm »
i looked online for a script of that name and found:

https://wiki.scribus.net/canvas/Formatxml

and, yes it contains a getFile() function with four arguments but the call to the same function is with two arguments.

this does not work with modern python and i wonder if it ever worked.

if you tell us more about your python skills and what exactly are you trying to achieve, we can help you further...

srikrishnan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: formatXML plugin
« Reply #2 on: December 09, 2019, 01:20:42 pm »
Hi,

Thanks for your reply.

I am a Developer in APP (formerly 3B2). I just want to explore the possibilities of making XML based template in Scribus for Book Pagination. I am familiar in Perl, Javascript. But not as familiar in Python, but I am ready to learn that language.

In my search I came to knew that on May 09, 2016, 04:04:18 pm one mail thread is there in this forum in this the same problem has been raised by Rob Dixon.

http://forums.scribus.net/index.php/topic,2050.msg9089.html#msg9089"

At the end of the thread, the same Rob Dixon who asked this question mentioned that 'Scribus has sent me the code for a new script and this now works. I have actually imported some XML into Scribus. Now I have to learn about Scribus.'

Thanks,
Srikrishnan

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2407
  • Karma: 34
    • the graphics lab
Re: formatXML plugin
« Reply #3 on: December 10, 2019, 10:37:56 am »
you're welcome to propose a change that we can put in the wiki...
or edit your self the wiki.

i had a look at the script and i'm writing a simpler and "more correct" version that i will put in my collection of scripts...

- works on the current script
- uses character styles instead of fonts (will be for 1.5.6svn and newer)

if i get something usable i'll post it!

ciao
a.l.e

srikrishnan

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: formatXML plugin
« Reply #4 on: December 11, 2019, 08:28:02 am »
Hi a.l.e.

Thanks for your replies.

I came to knew in my online surfing, that there is a web page, in which the updated script has been placed by kaleworsley,

Here for your reference, and the rest of the scribus members, may be it would be helpful for someone.

https://github.com/kaleworsley/formatxml-scribus/blob/master/formatxml.py

regards,
Srikrishnan