Working with local copy of site

2014-04-10
2014-04-22
  • Hello! Thank you very much for you genius tool.
    Please advise me is it possible to get data not from inet but from local folder?
    I'm try to use a link file:////e://TEMP//SITE//zoomify//AR1-1000// with -b and -x options but has unsuccess.
    ERROR: Could not open ImageProperties.xml (<urlopen error="" file:="" scheme="" is="" supported="" only="" on="" localhost="">)
    URL: file://e://TEMP//SITE//zoomify//AR1-1000/ImageProperties.xml

    When I'm set a real web path to this data all working great.
    But I'm have a site copy in e:\TEMP\SITE and like to use dezoomify offline? Is it possible?

     
  • Martin Valgur
    Martin Valgur
    2014-04-10

    Hi!

    After a tiny modification to the source code, the file URIs are now properly supported. Get the updated version of dezoomify.py file from the code repo (direct link).

    The following command should likely work for you now:
    py dezoomify.py "file:///e:/TEMP/SITE/zoomify/AR1-1000" test.jpg -bv

    Alternatively, you can also set up a simple file server with Python. Run the following command in the e:/TEMP/SITE/zoomify/ directory:
    py -3 -m http.server 8080
    which creates a server on port 8080. After that you can use the following command to download the tiles:
    py dezoomify.py "http://localhost:8080/AR1-1000" test.jpg -bv

     
    • Has a syntax error with new file

      c:\Users\admin\Downloads>py dezoomify.py
      File "dezoomify.py", line 4
      TAKE A URL CONTAINING A PAGE CONTAINING A ZOOMIFY OBJECT, A ZOOMIFY BASE
      ^
      SyntaxError: invalid syntax

       
  • Martin Valgur
    Martin Valgur
    2014-04-10

    Weird. Does the dezoomify.py file have all of the following lines at the start of the file?

    1
    2
    3
    4
    5
    #!/usr/bin/env python3
    # coding=utf8
    
    """
    TAKE A URL CONTAINING A PAGE CONTAINING A ZOOMIFY OBJECT, A ZOOMIFY BASE
    
     
    • Martin, thank you for you quick response.
      My file is

      !/usr/bin/env python3

      coding=utf8

      """
      TAKE A URL CONTAINING A PAGE CONTAINING A ZOOMIFY OBJECT, A ZOOMIFY BASE
      DIRECTORY OR A LIST OF THESE, AND RECONSTRUCT THE FULL RESOLUTION IMAGE

      ====LICENSE=====================================================================

      This software is licensed under the Expat License (also called the MIT license).
      """

      import sys

      ...

      !/usr/bin/env python3

      coding=utf8

      If I delete

      """
      TAKE A URL CONTAINING A PAGE CONTAINING A ZOOMIFY OBJECT, A ZOOMIFY BASE
      DIRECTORY OR A LIST OF THESE, AND RECONSTRUCT THE FULL RESOLUTION IMAGE

      ====LICENSE=====================================================================

      This software is licensed under the Expat License (also called the MIT license).
      """

      it is work

      Strange, in original file all working with commented strokes.

      Your opinion?

       
      Last edit: Vladimir Monastyrev 2014-04-11
      • Also I add extra " and it is work again

        """"
        TAKE A URL CONTAINING A PAGE CONTAINING A ZOOMIFY OBJECT, A ZOOMIFY BASE
        DIRECTORY OR A LIST OF THESE, AND RECONSTRUCT THE FULL

         
        Last edit: Vladimir Monastyrev 2014-04-22
  • It is looks like that a problem with repository file. When I'm get original file from last stable version 1.3 (from dezoomify.zip archive) and modify it as
    path = urllib.parse.quote(path, '/%:|')
    it is work great.
    May be you work with unix encoded file?

     


Anonymous


Cancel   Add attachments