Giter Club home page Giter Club logo

Comments (3)

scanny avatar scanny commented on July 17, 2024 1

Hmm, I can't find a place where python-pptx is making that replacement.

How do you know that's what's happening? I think you would need to inspect the "rels file" for the slide in question, it will be in the .pptx file (which is a zip archive) named something like ppt/slides/_rels/slide1.xml.rels.

You're looking for an entry like:

<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/{something like hyperlink}" Target="some-url"/>

From what I can tell, whatever you give to hlink.address goes here without any changes. So you might need to check the same entry on a .pptx file that behaves the way you want to see what it puts there and how to copy it.

from python-pptx.

numoe avatar numoe commented on July 17, 2024

The issue is not in python-pptx as you say. I did further debugging, and python-pptx does indeed produce the correct URI. Debugging the function relate_to() and printing self._rels.xml gave:

b'<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" Target="../slideLayouts/slideLayout2.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="/select,file:///home/nils/Bilete/2024/20231107_110023.mp4" TargetMode="External"/></Relationships>'

I verified the PPT indeed included the /select,file:///... URI by unzipping the pptx file and searching all files for this URI.

The problem I experience is elsewhere (in LibreOffice, which I used).

Sorry for any inconvenience and thanks for checking the bug report!
Nils

from python-pptx.

scanny avatar scanny commented on July 17, 2024

No worries @numoe :)

from python-pptx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.