How to use pack?

Forums: 

Hi,

I want to edit the inteactive video library so I have followed the next guide https://github.com/h5p/h5p-interactive-video#building-the-distribution-f... found in the readme. Unfortunately when runing the pack command I get the following error "You must specify libraries".
The command in the readme is h5p pack -r <library folder> <output file> and i set the "<library folder>" to be the folder name that I have download "h5p-interactive-video" and <output file> to be my-file.h5p (using windows OS). I have tried to do this with diffrent libraries but the same outcome occurs.

I would appreciate your help

cheers,
Omer

otacke's picture

Hi Omer!

What's the exact command that you execute from what path?

Best,

Oliver

Hi. Having the exact same problem.

the path: C:\Studies\tst

The command: h5p pack -r h5p-three-image tst.h5p

the h5p-three-image folder that i downloaded from the git is in C:\Studies\tst of course.

I added an image.

Thanks in advance 

Attachments: 

The command is: h5p pack -r h5p-interactive-video my-file.h5p
The path is: C:\Users\omer\WebstormProjects

otacke's picture

Hi Omeℛ!

Pretty strange. The command is fine if the folder h5p-interactive-video is inside C:\Users\omer\WebstormProjects and if that's what your current path is when running the command.

Best,
Oliver

Hi,

I have uploded a screen shot just to make sure. I would appreciate any suggestion.

Attachments: 
otacke's picture

Hi Omeℛ!

I am not a Windows user, and you may have deactivated displaying the suffixes of file names, so I'm not sure, but h5p-interactive-video doesn't seem to be a folder? Is it an archive? If yes, did you build the distribution files at all?

Best,

Oliver 

I did not deactivated displaying the suffixes, h5p-interactive-video is a folder. I downloaded  h5p-interactive-video from git as a zip file and then extracted it and kept following the instructions in the README file.

otacke's picture

Hi!

Your problem is caused by h5p-cli that is expecting you to download the archive using git (as developers usually do when they retrieve repositories from github). It's looking for .git/config inside the repository folder and stops if it doesn't find it. So your problem should be solved if you add that file or folder - doesn't matter what it is, it just needs to be there. Or, you switch to git for cloning repositories.

Cheers,
Oliver

Hi Oliver,

I did as you said and switched to git for cloning and it solved the problem. I really appreciate your help!

Best regards,
Omer

otacke's picture

Hi Omeℛ!

You're welcome! It's really not an obvious problem, and I am not sure why the hp5-cli tool checks for being a repository (probably for a good reason, but I don't know). Anyway, glad it's working for you now.

Cheers,
Oliver

<p>
Incidentally, this is also broken with submodules created by <pre>git submodule update --init --recursive</pre> because that will create a <pre>.git</pre> <em>file</em> containing something like
</p>
<p>
<pre>
gitdir: ../.git/modules/h5p-maze-find-video
</pre>
</p>
<p>
Seems like a pretty unnecessary restriction to me, making assumptions about people's workflow is a bad idea.
</p>

otacke's picture

Don't tell me, tell the H5P core team.