Import automation

I read some older threads about automating import of content, but those threads seem to have trailed off without a conclusion. Is there any method for automation of lesson import?

Thanks,
Brian

2 Likes

I was just checking out the same thing. I was fiddling around with using Selenium webdriver to automate the process. Not sure if you have programming experience, but if so, that might be a good option.

1 Like

What is it that you guys are looking to import? The extensions don’t work for you?

Yeah the extensions are great. I was talking about importing hundreds of lessons at a time (e.g., importing the text of a novel or something). I assumed that’s what the original post was about, but I could be wrong.

In that case, it might just be easiest to copy and paste the full text of the book into the import page and let our importer split it automatically into parts. That is how I import books.

It is indeed importing of many things at once that I’m looking for. I read about the extension, looks like it only deals with the text. I have a fairly large set of content (couple hundred audio files with text, going through these one at a time is rather tedious.
Selenium is worth considering, and I’ve started playing with it, but I always hate solutions that depend heavily on the details of the upload web page - would be better if native import APIs were available.

1 Like

Sometimes I do that, but for me, the parts are too long.

We have updated our API docs to include that import API now. Enjoy!

1 Like

I’ve tried to use the new API, but get an error 500 back from the site. I’m using python, and haven’t had a chance to debug further to see if I’m doing something wrong. I am able to request data using the APIs, but POSTing a new lesson doesn’t work for me. Do you have any example scripts that work successfully that I could compare against?

That said, I did successfully get something working using Selenium. A little kludgy, but it works.

@xubio1 - We have fixed several issues but don’t see anything in the logs from your account. In the simple example already in the doc only the “title” and “text” fields are mandatory.

Here’s another one:

curl -X POST
-H “Content-Type: application/json”
-H “Authorization: Token TOKEN
-d ‘{“title”: “Test”, “text”: “Just a test”}’
https://www.lingq.com/api/v2/en/lessons/

I suppose what you have done is a 2 steps process:

  1. collect content (text and audio)
  2. update the content as lessons in a course at lingq

Here are my questions:
a) If the content (step 1) is on the web, what automation tool do you use to download the hundreds of files?
b) Is it possible to have access to your method to do step 2?

Thanks

I’ve got a few ideas for importing material that could be nice:

Auto import by sending either an URL or the text that you want imported to a specific email address (amazon has this feature with their kinde, where you can just send a text to a personalized email address) - this is great if you have something that you want to save for later study.

Auto import from RSS feed - eg. all posted articles of a specific site are automatically imported in a new course for each day (perhaps with auto-deletion too, if there is a space-issue) (can google news be turned into an rss feed?)

Quick import for android (I know it’s on the way, but I can’t wait :wink: )

1 Like