-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# unneko | ||
|
||
An extractor for Revived Witch nekodata. | ||
|
||
|
||
## Usage as binary | ||
|
||
Download and run in terminal | ||
|
||
``` | ||
$ ./unneko -o ./output inputfile.nekodata | ||
``` | ||
|
||
In case the inputfile is a patch nekodata the file extension must be `.patch.nekodata` | ||
|
||
|
||
## Usage as library | ||
|
||
```go | ||
import "github.com/lico-n/unneko" | ||
|
||
func main() { | ||
// initialize with nekodata filepath, if it's patch nekodata must contain `.patch.nekodata` file extension | ||
r, err := unneko.NewReaderFromFile(inputFilePath) | ||
handleError(err) | ||
|
||
// alternatively initialize with in memory nekodata, must provide flag whether this is a patch file | ||
var inMemoryNekoData []byte | ||
isPatchFile := true | ||
|
||
r, err = unneko.NewReader(inMemoryNekoData, isPatchFile) | ||
handleError(err) | ||
|
||
// iterate over all extracted files | ||
for r.HasNext() { | ||
file, err := r.Next() | ||
handleError(err) | ||
|
||
file.Path() // original file path of the extracted file | ||
file.Data() // extracted data as byte array | ||
} | ||
|
||
} | ||
``` | ||
|
||
|