Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 14 hours 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 (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-03T18:08:06.000Z (almost 5 years ago)
- Last Synced: 2023-08-12T10:44:23.174Z (over 1 year 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
[![Build Status](https://travis-ci.com/th3-z/malgo.svg?branch=master)](https://travis-ci.com/th3-z/malgo) [![Go Report Card](https://goreportcard.com/badge/github.com/th3-z/malgo)](https://goreportcard.com/report/github.com/th3-z/malgo) [![GitHub license](https://img.shields.io/github/license/th3-z/malgo)](https://github.com/th3-z/malgo/blob/master/LICENSE) [![Codecov](https://img.shields.io/codecov/c/github/th3-z/malgo.svg?style=flat)](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.![Image of example usage](https://files.th3-z.xyz/standing/malgo.png)
## Building
Run `make build` to create a release for the CLI tool in `./bin`.
### Requirements
* Golang 1.13.x
* make
* gcc