Closed hssm closed 1 year ago
Reported by perceptualchaos2
on 2015-06-02 06:16:32
Issue 946 has been merged into this issue.
Reported by perceptualchaos2
on 2015-06-02 06:16:55
Issue 947 has been merged into this issue.
Reported by perceptualchaos2
on 2015-06-02 06:17:04
Issue 948 has been merged into this issue.
Reported by perceptualchaos2
on 2015-06-02 06:17:13
Issue 994 has been merged into this issue.
Reported by perceptualchaos2
on 2015-06-02 06:18:43
Issue 1010 has been merged into this issue.
Reported by perceptualchaos2
on 2015-06-02 06:19:30
Implemented import from simple text files as a separate app: https://github.com/vi/AnkiImporter
Not everything from the respective Anki Desktop's feature is implemented although.
I'm doing a bit of a rework of our import code at the moment. While I had no intention of porting the CSV importer any time soon, since you've started working on it, I decided to port over the tests from the desktop client and made some stubs out of the required classes.
Hopefully this will make it easier to integrate your work later on once we merge those changes in.
Please add an option to import a csv file without having to install the desktop app. Ideally the phone app should be able to import a local csv file. Alternatively we should be able to upload a csv to the site and have it show up on the phone app.
I would love to have this feature but have not had the time to implement. The code for the importer is pretty generic and I think there is some support for it already, it just is not finished. PRs welcome!
I just keep on using my mini-program that reads semicolon-separated lines and imports them to decks based on filenames.
Very interesting! I had missed that earlier comment - thanks for sharing this @vi
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
Importing CSV in particular is super popular. Not easy perhaps, but super popular. There was some code (if you browse the repository on the release-2.10 branch it will still be there) commented out in the importer that seemed like it might have been close to working even.
@mikehardy Could you point me to where this was. Unit tests were commented out between 2.8 and 2.9, but I don't see anything for the importers
The importer thing was actually an instrumented test, it's been commented since first commit and was prior to the era when I spliced robolectric into the project so all tests were instrumented
Darn... I was hoping for a silver bullet. The test code is still there, and compiles when commented out.
I've had a shot at the conversion (libAnki
is ported with a few TODOs, but the python modules for CSV reading and dealing with files with BOMs are a little more tricky).
My main roadblock: It uses csv.sniffer
to detect the type of CSV. The quote detection of this library uses the regex groupindex
which Java regexes seem to be missing (I do need to do some more googling).
https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Lib/csv.py#L217-L250
CSV is already implemented now, and the others are niche. Closing.
Originally reported on Google Code with ID 2631
Reported by
perceptualchaos2
on 2015-06-02 06:15:19