Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video files (mp4) not being attached #500

Open
PhilStollery50Hertz opened this issue Sep 6, 2024 · 6 comments
Open

Video files (mp4) not being attached #500

PhilStollery50Hertz opened this issue Sep 6, 2024 · 6 comments
Labels

Comments

@PhilStollery50Hertz
Copy link

What happened?

Here's my markdown:

<!-- Parent: Reference application -->
<!-- Layout: plain -->
<!-- Type: page -->
<!-- Content-Appearance: full-width -->

<!-- Attachment: img/ES_Slide1.JPG -->
<!-- Attachment: img/ES_Slide2.JPG -->
<!-- Attachment: img/ES_Slide3.JPG -->
<!-- Attachment: img/ES_Slide4.JPG -->
<!-- Attachment: img/ES_Slide5.JPG -->
<!-- Attachment: img/ES_Slide6.JPG -->
<!-- Attachment: img/ES_Slide7.JPG -->
<!-- Attachment: img/ES_Slide8.JPG -->
<!-- Attachment: img/ES_Slide9.JPG -->
<!-- Attachment: img/EventStorming.mp4 -->
<!-- Include: ../../../disclaimer.md -->

What did you expect to happen?

See the mp4 file attached to the page

How can we reproduce the behavior you experienced?

Steps to reproduce the behavior:

  1. Add an mp4 to the folder
  2. Use <!-- Attachment: img/....mp4 -->

In case this is related to specific markdown, please provide a minimal markdown example here.

Further Information (please complete the following information)

  • Mark Version (mark --version): [e.g. v9.1.4]

  • Mark Parameters: mark -p $PERSONAL_ACCESS_TOKEN -b https://***.org --h1_title --drop-h1 --ci --space EDPC --parents "nnn/nnn" -f $file --debug || exit 1;

  • Confluence Hosting: Datacenter

  • Confluence Version: v8.5.14 (confluence-0: 4316361a

  • Environment specific Information: GitLab runner

Logs or other output

Sync ./learn/ref-app/1-design/3-service-templates.md
2024-09-06 15:35:18.192 DEBUG config:
2024-09-06 15:35:18.192 DEBUG files: ./learn/ref-app/1-design/3-service-templates.md
2024-09-06 15:35:18.192 DEBUG compile-only: false
2024-09-06 15:35:18.192 DEBUG dry-run: false
2024-09-06 15:35:18.192 DEBUG edit-lock: false
2024-09-06 15:35:18.192 DEBUG drop-h1: true
2024-09-06 15:35:18.192 DEBUG strip-linebreaks: false
2024-09-06 15:35:18.192 DEBUG title-from-h1: true
2024-09-06 15:35:18.192 DEBUG minor-edit: false
2024-09-06 15:35:18.192 DEBUG version-message:
2024-09-06 15:35:18.192 DEBUG color: auto
2024-09-06 15:35:18.192 DEBUG debug: true
2024-09-06 15:35:18.192 DEBUG trace: false
2024-09-06 15:35:18.192 DEBUG username:
2024-09-06 15:35:18.192 DEBUG password: ******
2024-09-06 15:35:18.192 DEBUG target-url:
2024-09-06 15:35:18.192 DEBUG base-url: https://.org
2024-09-06 15:35:18.192 DEBUG config: /root/.config/mark
2024-09-06 15:35:18.192 DEBUG ci: true
2024-09-06 15:35:18.192 DEBUG space: EDPC
2024-09-06 15:35:18.192 DEBUG parents: nnn/nnn
2024-09-06 15:35:18.193 DEBUG parents-delimiter: /
2024-09-06 15:35:18.193 DEBUG mermaid-provider: cloudscript
2024-09-06 15:35:18.193 DEBUG mermaid-scale: 1
2024-09-06 15:35:18.193 DEBUG include-path:
2024-09-06 15:35:18.193 DEBUG help: false
2024-09-06 15:35:18.193 DEBUG version: false
2024-09-06 15:35:18.193 INFO processing learn/ref-app/1-design/3-service-templates.md
2024-09-06 15:35:18.305 DEBUG resolving page path: ??? > Welcome to EDP > Test importing markdown > Reference application > Service templates
2024-09-06 15:35:18.322 DEBUG parent page "Welcome to EDP" exists: /display/EDPC/Welcome+to+EDP
2024-09-06 15:35:18.340 DEBUG parent page "Test importing markdown" exists: /display/EDPC/Test+importing+markdown
2024-09-06 15:35:18.356 DEBUG parent page "Reference application" exists: /display/EDPC/Reference+application
2024-09-06 15:35:18.356 INFO page will be stored under path: Welcome to EDP > Test importing markdown > Reference application > Service templates
2024-09-06 15:35:18.381 INFO the leading H1 heading will be excluded from the Confluence output
2024-09-06 15:35:18.415 INFO creating attachment: "img/ST_Slide2.JPG"
2024-09-06 15:35:18.623 INFO creating attachment: "img/ST_Slide3.JPG"
2024-09-06 15:35:18.844 INFO creating attachment: "img/ST_Slide4.JPG"
2024-09-06 15:35:19.066 INFO creating attachment: "img/ST_Slide5.JPG"
2024-09-06 15:35:19.275 INFO creating attachment: "img/ServiceTemplate.light.drawio.svg"
2024-09-06 15:35:20.248 DEBUG Page Labels:
2024-09-06 15:35:20.248 DEBUG []
2024-09-06 15:35:20.248 DEBUG Meta Labels:
2024-09-06 15:35:20.248 DEBUG []
2024-09-06 15:35:20.248 DEBUG Del Labels:
2024-09-06 15:35:20.248 DEBUG []
2024-09-06 15:35:20.248 DEBUG Add Labels:
2024-09-06 15:35:20.248 DEBUG []
2024-09-06 15:35:20.248 INFO page successfully updated: https://
.org/display/EDPC/Service+templates
https://***.org/display/EDPC/Service+templates

Additional context

If anyone could tell me how to also make the macro:

<ac:structured-macro ac:name="multimedia" ac:schema-version="1" ac:macro-id="d7e1234">
<ac:parameter ac:name="file">EventStorming.mp4</ac:parameter>
<ac:parameter ac:name="width">100%</ac:parameter>
<ac:parameter ac:name="autoplay">true</ac:parameter>
</ac:structured-macro>

Work too and ignore the include markdown - ../../../disclaimer.md .

@mrueg
Copy link
Collaborator

mrueg commented Sep 9, 2024

What's the size of the video? Maybe it fails due to that?

I also see other attachments missing from the log output.

Does it make a difference if you put the mp4 in as the first attachement?

@mrueg
Copy link
Collaborator

mrueg commented Sep 9, 2024

fwiw, the ac:multimedia macro is available in mark 11.0.0

@PhilStollery50Hertz
Copy link
Author

It's 14.5 MB - I've tried it on it's own and it still fails. I managed to use inline macro:

<ac:structured-macro ac:name="multimedia">
<ac:parameter ac:name="name"><ri:attachment ri:filename="EventStorming.mp4"/></ac:parameter>
<ac:parameter ac:name="autostart">true</ac:parameter>
<ac:parameter ac:name="width">100%</ac:parameter>
</ac:structured-macro>

To get video to work, but having it built in would be great. Thanks for the help.

@mrueg
Copy link
Collaborator

mrueg commented Sep 11, 2024

Can you try with a minimized example that only includes this and share the output of mark with --debug --trace here?

<!-- Title: Foo -->
<!-- Attachment: img/EventStorming.mp4 -->


<!-- Include: ac:multimedia
       Name: EventStorming.mp4  -->

@PhilStollery50Hertz
Copy link
Author

PhilStollery50Hertz commented Sep 12, 2024

2024-09-12 07:35:05.895 TRACE including template "ac:multimedia"
├─ path: ac:multimedia
└─ var Name: EventStorming.mp4
2024-09-12 07:35:05.895 FATAL unable to execute template
├─ template: ac:multimedia:1:227: executing "ac:multimedia" at <.AutoPlay>: AutoPlay is not a method but has arguments
├─ path: ac:multimedia
└─ var Name: EventStorming.mp4

Looks like a bug in the macro? I'm using the docker image via CI CD

deploy_job:
image: kovetskiy/mark
stage: deploy
script:
- ls -la
- chmod +x deploy.sh
- cd docs
- ../deploy.sh
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'

deploy.sh

for file in $(find -type f -name '.md'); do
echo ">> Sync $file";
mark -p $CONF_PERSONAL_ACCESS_TOKEN -b https://confluence.
** --h1_title --drop-h1 --ci --space EDPC --parents "Welcome to EDP/Test importing markdown" -f $file --debug --trace || exit 1;
echo;
done

While I'm here, is there a way to exclude a markdown file from being _mark_ed? Like the disclaimer include I have shouldn't be uploaded as a page.

@mrueg
Copy link
Collaborator

mrueg commented Sep 13, 2024

Yes, there was a bug in the macro, I fixed it in 11.0.1. Please test again with that version.

If you want to exclude the file, the best is do to it in your for loop above that you use to feed into mark.

YuriyAM added a commit to YuriyAM/mark that referenced this issue Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants