#4 Update commands for inkscape 1.0
Merged 4 years ago by bex. Opened 4 years ago by bex.
bex/fedora-business-cards inkscape_1.0  into  master

@@ -73,13 +73,13 @@ 

      filename = os.path.join(os.getenv("PWD"), filename)

      try:

          if output_format == 'png':

-             run_command(['inkscape', '-C', '-z', '-d', str(dpi), '-e',

+             run_command(['inkscape', '-C', '-z', '-d', str(dpi), '-o',

                           filename, svgfilename])

          elif output_format == 'pdf':

-             run_command(['inkscape', '-C', '-z', '-T', '-A', filename,

+             run_command(['inkscape', '-C', '-z', '-T', '-o', filename,

                           svgfilename])

          elif output_format == 'eps':

-             run_command(['inkscape', '-C', '-z', '-T', '-E', filename,

+             run_command(['inkscape', '-C', '-z', '-T', '-o', filename,

                           svgfilename])

          else:

              os.remove(svgfilename)
@@ -102,10 +102,11 @@ 

      """

      filename = os.path.join(os.getenv("PWD"), filename)

      svgfilename = svg_to_file(xmlstring)

-     args = ['inkscape', '-C', '-z', '-T', '-E', '/dev/stdout', svgfilename]

-     eps = run_command(args)[0]

+     args = ['inkscape', '-C', '-z', '-T', '--export-type=eps', svgfilename]

+     run_command(args)[0]

+     epsfilename = svgfilename[0:-3] + 'eps'

      if converter:

-         eps = eps_cmyk_convert(eps, converter)

+         eps = eps_cmyk_convert(epsfilename, converter)

      width = int(math.ceil(convert(user_width + (user_bleed * 2), unit, 'in') *

                            dpi))

      height = int(math.ceil(convert(user_height + (user_bleed * 2), unit, 'in')
@@ -115,14 +116,15 @@ 

              '-sOutputFile=%s' % filename, '-', '-c', 'quit']

      

      run_command(args, eps)

+     os.remove(epsfilename)

      os.remove(svgfilename)

      return True

  

  

  def eps_cmyk_convert(epsdata_in, converter):

      # first, normalize the output through eps2eps

-     args = ['eps2eps', '/dev/stdin', '/dev/stdout']

-     epsdata = run_command(args, epsdata_in)[0]

+     args = ['eps2eps', epsdata_in, '/dev/stdout']

+     epsdata = run_command(args)[0]

      epsdata_new = ''

      # go through each line and check for color commands

      for line in epsdata.decode().split('\n'):

The CLI changed ... Effective in f32

This is not ready to be merged ...

There is a new release of inkscape in rawhide with very different command line options. We need to figure out the best way to handle this. The only ideas I have are:

a) Detect the right version and adjust in the code - feels like "ugh".
b) ​Produce a patch that is applied for rawhide and beyond and then reverse it when f31 goes EOL.
c) Produce two versions of the software.

Comments and suggestions welcome

rebased onto dc3268c

4 years ago

rebased onto 2da66ad

4 years ago

F31 got inkscape 1.0 so merging

Pull-Request has been merged by bex

4 years ago
Metadata