Export lists from databases / courses I have created?


(Zurreal) #21

Is anything being done about this? I’d love hearing something from the Memrise team.


(Irridmemorizza) #22

@Rabolde, @DW7, @Tommy3000
Thanks a lot! This is really a big help :grinning: :sunflower:


(Drew) #23

It occurred to me that I have a Python script that will actually print the contents of a course in a way that excel will understand pretty easily using the Text to Columns feature. It wasn’t designed for this purpose but it will do what you need.

If you get the script running, it will do two things: First, it will make the incorrect answers in your multiple choice tests a bit cleaner. Second, it will print your entire database to the terminal screen. You could capture the output (copy and paste) and paste it into Excel via the Text to Columns feature.

If you don’t like that it will clean up the wrong answers in your tests, just delete line 33 of file main.py. This will make the script only print things from your course, leaving your course exactly as it was before.

There are two things that I should mention before you try to use this: First, the script will print things out of order. Second, any columns in your database that are not text-based will not be included.

Without further ado, here’s the script: https://github.com/DrewSSP/delete_phantom_answers


(Diegovizia) #24

If someone could give me the address where Memrise stores databases in raw form, I could create a parsing program. I know C++, SQL and PowerBuilder, so maybe I can come up with something.


(Mila83) #25

@DW7
Thank you very much. I tried this method, and it worked fine, but there are 105 pages in my course, and I wonder if there is a way to copy their content at once?


(Mikatu) #26

If you use the Import.io you can just create a Batch and download everything at once.
You still need to list all the pages, for example:
http://www.memrise.com/course/xxx/flags-of-the-world/1/
http://www.memrise.com/course/xxx/flags-of-the-world/2/
etc…

But you can do it easily in Excel. Then the program is able to run and give you a file with everything in order that you convert to Excel in oder to use it.

I do it all the time and it works pretty good.


(Diegovizia) #27

This and all the solutions posted in this thread only take into account the main meanings of a word (the ones that show in big during learning and on the side during testing), but so far there is no way to import the alternate meanings as well.

Importing everything without alternate meanings is just pointless. It took a lot of work to add those for every word, so if I’m gonna backup my course, I wanna do it completely, with alternate meanings included.


(Kaspian) #28

@diegovizia

I’m not an expert, since I only experimented with it once or twice, but Memrise-to-Anki will let you download any column in the database, including alternatives.

As for whether or not you could export it again from Anki, I have no idea! :wink:


(tech189) #29

If anyone is still looking for an answer, I recommend this python tool:

just run the setup.py
then python memrise.py > output.txt
this will export it to a text file where you can copy it into excel!


(tech189) #30

Update:

I have created an online tool for those not so used to the command line and so that you don’t have to install anything.

Here is a link: http://tech189.duckdns.org/memrise/


(Neko Chan) #31

First of all: thank you very much for your effort. I tried the online tool a few times, but unfortunately it doesn’t seem to work for my rather large course (this one: https://www.memrise.com/course/39780/top-6000-japanisch/). Do you think anything can be done about this?

Thanks a lot again.
neko-chan


Important Update: Upcoming changes to Memrise community-created courses
(tech189) #32

Thanks! Yeah that is a huge course, there’s no issue with the script itself, it can get the whole list but it just takes time on the poor little Rasbperry Pi…

Here’s the list if you still need it: https://paste.ubuntu.com/p/Y9QjpzCZmm/

I’m not particularly experienced but I’ll look into making some sort of progress bar.


(Neko Chan) #33

Wow! Thank you so much for your effort! I tried it quite a few times and waited patiently but in the end I always just got a blank tab. :sweat_smile:
Thank you very much once again, that is a big help!
neko-chan


(Baite) #34

I think the greatest thing you have done is, that it indeed doesn’t need any technical knowledge, that scripts usually require. Thank you!
It only copies the primary columns I understand. Any chance of improving it, exporting all columns, or alternatives, or/and the audio files (or at least the audio file names; if there were another script for exporting the files, a list with the names is helpful in matching and renaming). E.g. if we use an URL like this:
https://www.memrise.com/course//edit/# would.


(tech189) #35

Thank you! I’m not the author of the script, but I suspect that it would not be possible to download sound files, as it would require you to log in. At the moment, the script does not require you to log in, but I have submitted a feature request to the author, which you can track here: https://github.com/nad2000/memrise-scraper/issues/2

Concerning exporting all columns, could you send me an example of a course that does have more than two columns? I might not be able to work on it right now as I have exams coming up, but I will do what I can.


(Baite) #36

Actually, most courses have more than 2 columns, but only the creator and contributors can see them when going to the edit mode. Those extra columns I meant. I do not have any course with three columns.

BTW: if the script runs on the web-server, then yes, logging in is a different deal. However, if the script runs in the browser, the browser has already the login cookie if the user is logged on, and the problem should be solved by itself. But who knows, their is somewhere a catch - I am not a script writer.


(Magistrabunch) #37

Not my idea, but something I got from someone else on an other thread that I can’t find now (I had copied the code into a Google doc). This has worked very well for me to export my words in a way that I can copy it straight into Quizlet:

Export Memrise course words to CSV.

  1. Log into memrise.com
  2. Navigate to course home page (e.g. http://www.memrise.com/course/335725/comprehensive-german-duolingo-vocabulary/)
  3. Open Developer Console
    To open the developer console window on Chrome, use the keyboard shortcut Ctrl Shift J (on Windows) or Command Option J (on Mac). Alternatively, you can use theChrome menu in the browser window, select the option “More Tools,” and then select “Developer Tools.”
  4. Paste below script and hit enter
  5. After all urls have been fetched, copy final word list into spreadsheet.

SCRIPT:

(() => {

function getWords(courseId, level) {
const url = https://www.memrise.com/ajax/session/?course_id=${courseId}&level_index=${level}&session_slug=preview
console.log('Fetching words from ’ + url)
return fetch(url, { credentials: ‘same-origin’ })
// parse response
.then(res => {
return res.status === 200
? res.json()
// map results
.then(data => {
return data.learnables.map(row => ({
original: row.item.value,
translation: row.definition.value
}))
})
.then(words => {
return getWords(courseId, level + 1)
.then(words.concat.bind(words))
})
: []
})
.catch(err => {
console.error(err)
return []
})
}

// fetch
const start = 1
const courseId = location.href.slice(30).match(/\d+/)[0]
getWords(courseId, start)
// format as csv
.then(words => {
console.log(words.length + ’ words’)
return words.map(word => word.translation + ‘\t’ + word.original + ‘\n’).join(’’)
})
// print
.then(console.log)

})()


#38

Hey, if you’re still looking for a solution, perhaps my exporter will work for you. It should export all of the columns, but you’ll need to download it and right now it’s for Windows only.


(Mila83) #39

Thanks a lot!
It wasn’t working until I downloaded the new version:


but, it does not support Arabic. I get these characters in the csv file :frowning:
ط§ظ„ط§ط³طھط¹ط§ط°ط© ظˆط§ظ„ظپط§طھط­ط© ظٹظژظˆظ’ظ…ظگ ط§ظ„ط¬ظژط²ظژط§ط،ظگ ظˆظژط§ظ„ط­ظگط³ظژط§ط¨ظگ (4){ظٹظژظˆظ’ظ…ظگ ط§ظ„ط¯ظگظ‘ظٹظ†ظگ} ط§ظ„ظپط§طھط­ط©

UPDATE:
Actually, the issue is not Arabic-specific…This is what happened after scrapping a course written in French:
anti-agrأ©gants plaquettaires
The “é” is not recognized


#40

Did you open the file in Excel? Open it in notepad and see if it looks correct there.

I believe the proble with Excel is this - https://www.webtoffee.com/how-to-save-csv-excel-file-as-utf-8-encoded/

Let me try to fix this in the exporter itself.