https://github.com/th3-z/malgo
:floppy_disk: MyAnimeList XML to SQLite migration utility and Go library — command line tool also available
https://github.com/th3-z/malgo
golang library migration myanimelist sql sqlite3
Last synced: 4 months ago
JSON representation
:floppy_disk: MyAnimeList XML to SQLite migration utility and Go library — command line tool also available
- Host: GitHub
- URL: https://github.com/th3-z/malgo
- Owner: th3-z
- License: mit
- Created: 2019-12-30T20:09:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-03T18:08:06.000Z (over 5 years ago)
- Last Synced: 2025-01-14T00:49:27.880Z (6 months ago)
- Topics: golang, library, migration, myanimelist, sql, sqlite3
- Language: Go
- Homepage: https://github.com/th3-z/malgo
- Size: 93.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Malgo
[](https://travis-ci.com/th3-z/malgo) [](https://goreportcard.com/report/github.com/th3-z/malgo) [](https://github.com/th3-z/malgo/blob/master/LICENSE) [](https://codecov.io/gh/th3-z/malgo)A MyAnimeList SQL migration utility and Go library.
## Cli exporter usage
* Export your list from MyAnimeList
* Run `malgo -o anime.sqlite yourAnimeList.xml`
* Receieve SQLite database `./anime.sqlite`## Databases
Malgo has so far been tested with the following databases. Let me know if you have success with any of the other database drivers.
* Sqlite3
## Golang examples
The golang module provides structs and functions for reading and editing the migrated database.
#### Migrate directly from an exported anime list and retrieve series.
```
malgo.storage.CreateSchema(someDb)
malgo.MigrateFile(someDb, "sample.xml")user := malgo.models.SearchUser(someDb, "th3-z")
for _, review := range user.Reviews {
print(review.Series.Name)
print("\n")
}
```#### Datatables example
A more complex example can be seen on [my public website](https://github.com/th3-z/beta-th3-z-xyz)'s repo. It produces the following table.
## Building
Run `make build` to create a release for the CLI tool in `./bin`.
### Requirements
* Golang 1.13.x
* make
* gcc