Skip to content

Commit

Permalink
add README
Browse files Browse the repository at this point in the history
  • Loading branch information
lico-n committed Dec 10, 2021
1 parent 4025572 commit 90fa233
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
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
}

}
```


0 comments on commit 90fa233

Please sign in to comment.