Can I bulk add flashcards from Excel?

Hi,

Is it possible to bulk add data from Excel to make flashcards?

 

Content types: 
BV52's picture

Hi finkingcap,

I'm afraid this is not possible.

-BV52

serettig's picture

Hi,

depending on how far your technical knowledge goes, you can use the tool I wrote for this purpose (still work in progress). It's written in NodeJS and you'll find it at GitHub. It expects CSV files with the headings 'question' and 'answer' that are separated by semi-colons. Optionally, you can specify columns with 'tip' and 'image' (urls). The actual creation process works, but it's not possible to pass in parameters at the command line, as there are some issues with a libraries I'm using that need to be fixed. So you'll have to replace the 'test/flash1.csv' file with your file and it will always emit 'test.h5p'.

BV52's picture

Thank you for the suggestion serettig.

serettig's picture

I've worked on this a bit and now you can actually properly start the program from the command line. These are the steps to run it:

  • install NodeJS
  • clone the repository
  • in the command-line at the directory you've cloned the repository into:
  • run npm install
  • run npm run build
  • run npm run h5p-creator --help and npm run h5p-creator flashcards --help to see what options you can specify.
  • example: npm run h5p-creator flashcards ./myflashcards.csv ./outputfile.h5p -l=de -n="Meine Karteikarten"

It will download a fresh copy of the current Flashcards module from the H5P hub, parse the CSV file and put its content into the specified output file. I know running this is a bit technical, but if you've got lots of content to convert, I guess it's worth the effort to get this running.

Hi serettig, 

did you ever make any new updates to this project? are you available for paid consultation? i want to bring you idea more to life.

 

Hi,

I have a handful of  large excel question data sets that I'm going to need your help with converting that using your GitHub code. Are you interested?

 

I have been trying to convert a csv to h5p using the cli-creator tool mentioned above. The github install instructions and commands are easy enough to execute. I get the output.h5p file as specified on github but when I go to import it into wordpress the file does not validate! Even extracting the archive files and changing a single question/answer by hand throws dozens of failed validations when uploading.

What am I missing here???

Has there been an update to h5p that makes the cli-creator obsolete? 

I have tens of thousands of flashcards that I would like to import and doing this all by hand is out of the question. Please help!

studyaid's picture

How are you compressing your zip file?  What OS or command line switches are you using?  Depending on what you are using I can give you the commands that should work.

serettig's picture

Hi afarough,

you can use the tool on GitHub, but I'm afraid I have my hands full at the moment, so I won't be able to fix issue that might have occured since I released it.

Sebastian

Hi Sebastian,

Thanks for creating this useful CLI!  I'd love to contribute to its further development - I can see so much potential for adding new content types.  I don't have NodeJS skills myself, but I could invest in working with you, someone you recommend if you're too busy, or a contractor (who is unlikely to be familiar with H5P) to develop my fork on GitHub, submitting PRs to you once new functionality is tested.  What's your preferred way forward?

Best wishes, Lucy

Hi Sebastian,

Thanks for creating this useful CLI!  I'd love to contribute to its further development - I can see so much potential for adding new content types.  I don't have NodeJS skills myself, but I could invest in working with you, someone you recommend if you're too busy, or a contractor (who is unlikely to be familiar with H5P) to develop my fork on GitHub, submitting PRs to you once new functionality is tested.  What's your preferred way forward?  You can reach me on lucy dot tallents at verdantlearn dot com

Cheers, Lucy

Hi serettig,

Thanks a lot for creating such a nice tool! It works like a magic and really safes me a lot of time!

I'm facing one small issue with audio files - keep getting error message that the audio is not supported by browser after creation of dialog cards. Would appreciate any tips how to get it to work. Thanks!

 

 

villon's picture

Hi edurova,

please give mor information. What audioformat do you use? With which browser do test the dialog-cards? Maybe you can link a test file anywhere. This would help.

Greetings villon

Hi villon, 

Looks like the issue is not caused by the use of the CLI as I thought initially. It happens when I download any H5P files with working sound and uploading them again as well. So I added a detailed bug report about it here https://h5p.org/node/1306193 with h5p elements attached and screenshots. Looks like it might be still under moderation, so I duplicate the details here:

Issue description:

Audio is not available if content was added via H5P file upload. When game is played, audio is not available. Your browser does not support this audio message is shown.

Reproduction:

Add H5P file containing dialog cards with audio files in .wav format (either created by CLI  or by downloading existing games). After pressing on create button, the format starts to be shown in some weird octet extension (application/stream-octet) instead of wav (with manual upload I see audio/x-wav while hovering). 

Technical details:

Platform: Wordpress, 6.0.2

Device: Desktop

Browser: Chrome

H5P plugin version: 1.15.4 

 

 

villon's picture

H edurova, you have to change the audioformat from wav to mp3 or maybe to ogg

Greetings villon

 

villon's picture

Hi edurova,

After unzipping your H5P file, I noticed that you created an audio file for each task. This is unnecessary if you can provide multiple tasks with the same audio file. It only increases the data volume. You can save that.
Furthermore, as I said, it is common that in HTML5 and that is the standard nowadays to create sound on the Internet, not *.wav is taken, but *.mp3 and *.ogg. *.wav can certainly be output with some tricks, but that would be too much effort in my opinion.
Depending on your operating system there are different ways to convert the *.wav files into ogg or mp3.
Or you take audacity and get familiar with the possibilities of this program to create files that can be output on the internet.

Greetings villon

Hi villon

Thanks a lot, it works now. Didn't thought that the issue can be caused by audio file format since .wav worked just fine with manual creation. Sorry for double posting.

Regards 

edurova

 

villon's picture

Hi edurova,

fine that it's solved. I wish you success with the tasks.

Greeting

villon