diff options
66 files changed, 216 insertions, 216 deletions
@@ -1,4 +1,4 @@ -Copyright (c) 2016 Eliot Whalan <ewhal@pantsu.cat> +Copyright (c) 2016 Eliot Whalan <NyaaPantsu@pantsu.cat> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -1,6 +1,6 @@  -# Nyaa replacement [](https://travis-ci.org/ewhal/nyaa) +# Nyaa replacement [](https://travis-ci.org/NyaaPantsu/nyaa) ## Motivation The aim of this project is to write a fully featured nyaa replacement in golang @@ -18,7 +18,7 @@ You can view the public trello board [here](https://trello.com/b/gMJBwoRq/nyaa-p # Installation Ubuntu 17.04 fails to build, use a different OS or docker * Install [Golang](https://golang.org/doc/install) (version >=1.8) -* `go get github.com/ewhal/nyaa` +* `go get github.com/NyaaPantsu/nyaa` * `go build` * Download DB and place it in your root folder named as "nyaa.db" * `./nyaa` @@ -57,7 +57,7 @@ download [dos2unix](https://sourceforge.net/projects/dos2unix/files/latest/downl on the /deploy/init.sh to convert CR+LF to LF. ```sh -# Make sure the project is in here $GOPATH/src/github.com/ewhal/nyaa +# Make sure the project is in here $GOPATH/src/github.com/NyaaPantsu/nyaa $ cd deploy/ # You may choose another backend by pointing to the # appropriate docker-compose file. diff --git a/cache/cache.go b/cache/cache.go index c16a16d..27291ec 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -1,12 +1,12 @@ package cache import ( - "github.com/ewhal/nyaa/cache/memcache" - "github.com/ewhal/nyaa/cache/native" - "github.com/ewhal/nyaa/cache/nop" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/cache/memcache" + "github.com/NyaaPantsu/nyaa/cache/native" + "github.com/NyaaPantsu/nyaa/cache/nop" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" ) // Cache defines interface for caching search results diff --git a/cache/memcache/memcache.go b/cache/memcache/memcache.go index 57f36d9..7188a4b 100644 --- a/cache/memcache/memcache.go +++ b/cache/memcache/memcache.go @@ -1,8 +1,8 @@ package memcache import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) type Memcache struct { diff --git a/cache/native/native.go b/cache/native/native.go index 56c1094..9442f3d 100644 --- a/cache/native/native.go +++ b/cache/native/native.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) const expiryTime = time.Minute diff --git a/cache/native/native_test.go b/cache/native/native_test.go index 6c977ed..13a2fb5 100644 --- a/cache/native/native_test.go +++ b/cache/native/native_test.go @@ -4,8 +4,8 @@ import ( "sync" "testing" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) // Basic test for deadlocks and race conditions diff --git a/cache/nop/nop.go b/cache/nop/nop.go index 21c1058..85b5234 100644 --- a/cache/nop/nop.go +++ b/cache/nop/nop.go @@ -1,8 +1,8 @@ package nop import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) type NopCache struct { diff --git a/database/database.go b/database/database.go index 761adcd..2059d50 100644 --- a/database/database.go +++ b/database/database.go @@ -1,12 +1,12 @@ package database import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/database/postgres" - //"github.com/ewhal/nyaa/db/sqlite" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/database/postgres" + //"github.com/NyaaPantsu/nyaa/db/sqlite" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" "errors" ) diff --git a/database/postgres/comments.go b/database/postgres/comments.go index 3a31c8e..b4feec0 100644 --- a/database/postgres/comments.go +++ b/database/postgres/comments.go @@ -1,8 +1,8 @@ package postgres import ( - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) func (db *Database) InsertComment(comment *model.Comment) (err error) { diff --git a/database/postgres/postgres.go b/database/postgres/postgres.go index e235ec4..4cb7fcb 100644 --- a/database/postgres/postgres.go +++ b/database/postgres/postgres.go @@ -3,7 +3,7 @@ package postgres import ( "database/sql" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" _ "github.com/lib/pq" ) diff --git a/database/postgres/report.go b/database/postgres/report.go index e1f6a92..a866535 100644 --- a/database/postgres/report.go +++ b/database/postgres/report.go @@ -4,8 +4,8 @@ import ( "database/sql" "fmt" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) func (db *Database) InsertTorrentReport(report *model.TorrentReport) (err error) { diff --git a/database/postgres/scrape.go b/database/postgres/scrape.go index 3a81dae..db37ca8 100644 --- a/database/postgres/scrape.go +++ b/database/postgres/scrape.go @@ -2,7 +2,7 @@ package postgres import ( "database/sql" - "github.com/ewhal/nyaa/common" + "github.com/NyaaPantsu/nyaa/common" ) func (db *Database) RecordScrapes(scrape []common.ScrapeResult) (err error) { diff --git a/database/postgres/statements.go b/database/postgres/statements.go index 58ee6ba..923e53f 100644 --- a/database/postgres/statements.go +++ b/database/postgres/statements.go @@ -4,7 +4,7 @@ import ( "database/sql" "fmt" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/model" ) const queryGetAllTorrents = "GetAllTorrents" diff --git a/database/postgres/torrent.go b/database/postgres/torrent.go index bd3e932..77bfc69 100644 --- a/database/postgres/torrent.go +++ b/database/postgres/torrent.go @@ -1,7 +1,7 @@ package postgres import ( - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/model" "database/sql" ) diff --git a/database/postgres/user.go b/database/postgres/user.go index f7f420a..92c3aa4 100644 --- a/database/postgres/user.go +++ b/database/postgres/user.go @@ -4,8 +4,8 @@ import ( "database/sql" "fmt" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) func userParamToSelectQuery(p *common.UserParam) (q sqlQuery) { diff --git a/database/postgres/where.go b/database/postgres/where.go index 845c55b..8f52d9e 100644 --- a/database/postgres/where.go +++ b/database/postgres/where.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" ) // build sql query from SearchParam for torrent search @@ -2,9 +2,9 @@ package db import ( "github.com/azhao12345/gorm" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" _ "github.com/jinzhu/gorm/dialects/postgres" _ "github.com/jinzhu/gorm/dialects/sqlite" ) diff --git a/db/gorm_test.go b/db/gorm_test.go index ec61824..ec3e2a7 100644 --- a/db/gorm_test.go +++ b/db/gorm_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/azhao12345/gorm" - "github.com/ewhal/nyaa/config" + "github.com/NyaaPantsu/nyaa/config" ) type errorLogger struct { @@ -54,7 +54,7 @@ func TestGormInitSqlite(t *testing.T) { // - psql -c "CREATE USER nyaapantsu WITH PASSWORD 'nyaapantsu';" -U postgres // // Then enable the test by setting this variable to "true" via ldflags: -// go test ./... -v -ldflags="-X github.com/ewhal/nyaa/db.testPostgres=true" +// go test ./... -v -ldflags="-X github.com/NyaaPantsu/nyaa/db.testPostgres=true" var testPostgres = "false" func TestGormInitPostgres(t *testing.T) { diff --git a/deploy/init.sh b/deploy/init.sh index 88e21f1..b42cd08 100755 --- a/deploy/init.sh +++ b/deploy/init.sh @@ -8,7 +8,7 @@ if [[ "${PANTSU_DBTYPE}" = "postgres" ]]; then sleep 40 fi -go get github.com/ewhal/nyaa +go get github.com/NyaaPantsu/nyaa go build ./nyaa -host 0.0.0.0 \ -port "${PANTSU_INTERNAL_PORT}" \ @@ -8,18 +8,18 @@ import ( "os" "time" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/network" - "github.com/ewhal/nyaa/router" - "github.com/ewhal/nyaa/service/scraper" - "github.com/ewhal/nyaa/service/torrent/metainfoFetcher" - "github.com/ewhal/nyaa/service/user" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/search" - "github.com/ewhal/nyaa/util/signals" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/network" + "github.com/NyaaPantsu/nyaa/router" + "github.com/NyaaPantsu/nyaa/service/scraper" + "github.com/NyaaPantsu/nyaa/service/torrent/metainfoFetcher" + "github.com/NyaaPantsu/nyaa/service/user" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/search" + "github.com/NyaaPantsu/nyaa/util/signals" ) // RunServer runs webapp mainloop diff --git a/model/comment.go b/model/comment.go index fa57e53..22d9766 100644 --- a/model/comment.go +++ b/model/comment.go @@ -1,7 +1,7 @@ package model import ( - "github.com/ewhal/nyaa/config" + "github.com/NyaaPantsu/nyaa/config" "time" ) diff --git a/model/torrent.go b/model/torrent.go index 8af3e91..ecf55d5 100644 --- a/model/torrent.go +++ b/model/torrent.go @@ -1,8 +1,8 @@ package model import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util" "fmt" "html/template" diff --git a/network/network.go b/network/network.go index 58ad8eb..3ff1138 100644 --- a/network/network.go +++ b/network/network.go @@ -2,8 +2,8 @@ package network import ( "fmt" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/majestrate/i2p-tools/lib/i2p" "net" ) diff --git a/router/apiHandler.go b/router/apiHandler.go index 548b086..6c2b4e6 100644 --- a/router/apiHandler.go +++ b/router/apiHandler.go @@ -9,14 +9,14 @@ import ( "strings" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/api" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/api" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/gorilla/mux" ) diff --git a/router/changeLanguageHandler.go b/router/changeLanguageHandler.go index 9bef6d5..3c3b349 100644 --- a/router/changeLanguageHandler.go +++ b/router/changeLanguageHandler.go @@ -4,8 +4,8 @@ import ( "encoding/json" "net/http" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/service/user" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/service/user" "github.com/gorilla/mux" ) diff --git a/router/faqHandler.go b/router/faqHandler.go index 0dd20f1..dd2d3e7 100644 --- a/router/faqHandler.go +++ b/router/faqHandler.go @@ -3,7 +3,7 @@ package router import ( "net/http" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/gorilla/mux" ) diff --git a/router/homeHandler.go b/router/homeHandler.go index 464e8f9..91acd94 100644 --- a/router/homeHandler.go +++ b/router/homeHandler.go @@ -5,13 +5,13 @@ import ( "net/http" "strconv" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/gorilla/mux" ) diff --git a/router/modpanel.go b/router/modpanel.go index 2f4ce0d..f947d27 100644 --- a/router/modpanel.go +++ b/router/modpanel.go @@ -7,18 +7,18 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/comment" - "github.com/ewhal/nyaa/service/report" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/service/user" - form "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/search" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/comment" + "github.com/NyaaPantsu/nyaa/service/report" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/service/user" + form "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/search" "github.com/gorilla/mux" ) diff --git a/router/notFoundHandler.go b/router/notFoundHandler.go index 82e9538..8bbfe6c 100644 --- a/router/notFoundHandler.go +++ b/router/notFoundHandler.go @@ -3,7 +3,7 @@ package router import ( "net/http" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/gorilla/mux" ) diff --git a/router/router.go b/router/router.go index 339eb7e..0754c07 100755 --- a/router/router.go +++ b/router/router.go @@ -3,7 +3,7 @@ package router import ( "net/http" - "github.com/ewhal/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/captcha" // "github.com/gorilla/handlers" "github.com/gorilla/mux" ) diff --git a/router/rssHandler.go b/router/rssHandler.go index 2b65a72..3c61464 100644 --- a/router/rssHandler.go +++ b/router/rssHandler.go @@ -1,9 +1,9 @@ package router import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/search" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/search" "github.com/gorilla/feeds" "net/http" "time" diff --git a/router/searchHandler.go b/router/searchHandler.go index e9edcae..0054687 100644 --- a/router/searchHandler.go +++ b/router/searchHandler.go @@ -1,11 +1,11 @@ package router import ( - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/search" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/search" "github.com/gorilla/mux" "html" "net/http" diff --git a/router/templateFunctions.go b/router/templateFunctions.go index 5bbb193..c489fde 100644 --- a/router/templateFunctions.go +++ b/router/templateFunctions.go @@ -7,9 +7,9 @@ import ( "net/url" "strconv" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/nicksnyder/go-i18n/i18n" ) diff --git a/router/templateVariables.go b/router/templateVariables.go index c6f5d9c..6968da7 100644 --- a/router/templateVariables.go +++ b/router/templateVariables.go @@ -4,10 +4,10 @@ import ( "net/http" "net/url" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/user" - userForms "github.com/ewhal/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/user" + userForms "github.com/NyaaPantsu/nyaa/service/user/form" "github.com/gorilla/mux" ) diff --git a/router/torrentReportHandler.go b/router/torrentReportHandler.go index 92f61d5..e0199dc 100644 --- a/router/torrentReportHandler.go +++ b/router/torrentReportHandler.go @@ -4,9 +4,9 @@ package router "net/http" "strconv" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/moderation" - "github.com/ewhal/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/moderation" + "github.com/NyaaPantsu/nyaa/service/user/permission" "github.com/gorilla/mux" )*/ diff --git a/router/upload.go b/router/upload.go index 2ec9f05..b3fd664 100644 --- a/router/upload.go +++ b/router/upload.go @@ -15,11 +15,11 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/service/upload" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/metainfo" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/service/upload" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/metainfo" "github.com/microcosm-cc/bluemonday" "github.com/zeebo/bencode" ) diff --git a/router/uploadHandler.go b/router/uploadHandler.go index de6add1..018d447 100644 --- a/router/uploadHandler.go +++ b/router/uploadHandler.go @@ -6,12 +6,12 @@ import ( "strconv" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/captcha" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" "github.com/gorilla/mux" ) diff --git a/router/userHandler.go b/router/userHandler.go index a2cb075..6744559 100755 --- a/router/userHandler.go +++ b/router/userHandler.go @@ -5,13 +5,13 @@ import ( "net/http" "strconv" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/captcha" - "github.com/ewhal/nyaa/service/user" - "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/modelHelper" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/user" + "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/modelHelper" "github.com/gorilla/mux" ) diff --git a/router/viewTorrentHandler.go b/router/viewTorrentHandler.go index 739c077..13026f7 100644 --- a/router/viewTorrentHandler.go +++ b/router/viewTorrentHandler.go @@ -6,14 +6,14 @@ import ( "strings" "time" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service/captcha" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service/captcha" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/log" "github.com/gorilla/mux" ) diff --git a/service/api/api.go b/service/api/api.go index 268ee80..3c789cb 100644 --- a/service/api/api.go +++ b/service/api/api.go @@ -12,10 +12,10 @@ import ( "regexp" "strings" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/upload" - "github.com/ewhal/nyaa/util/metainfo" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/upload" + "github.com/NyaaPantsu/nyaa/util/metainfo" "github.com/zeebo/bencode" ) diff --git a/service/comment/comment.go b/service/comment/comment.go index 2ac4f3d..5e2a556 100644 --- a/service/comment/comment.go +++ b/service/comment/comment.go @@ -1,9 +1,9 @@ package commentService import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" ) func GetAllComments(limit int, offset int, conditions string, values ...interface{}) ([]model.Comment, int) { diff --git a/service/report/report.go b/service/report/report.go index 7b32eba..4d16eb6 100644 --- a/service/report/report.go +++ b/service/report/report.go @@ -6,9 +6,9 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" ) // Return torrentReport in case we did modified it (ie: CreatedAt field) diff --git a/service/scraper/bucket.go b/service/scraper/bucket.go index bf8c34f..b6a0cdc 100644 --- a/service/scraper/bucket.go +++ b/service/scraper/bucket.go @@ -5,7 +5,7 @@ import ( "net" "sync" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/model" ) const InitialConnectionID = 0x41727101980 diff --git a/service/scraper/scraper.go b/service/scraper/scraper.go index 482c954..96aadc0 100644 --- a/service/scraper/scraper.go +++ b/service/scraper/scraper.go @@ -1,10 +1,10 @@ package scraperService import ( - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" "net" "net/url" "time" diff --git a/service/scraper/transaction.go b/service/scraper/transaction.go index fb69876..c517b2f 100644 --- a/service/scraper/transaction.go +++ b/service/scraper/transaction.go @@ -6,10 +6,10 @@ import ( "net" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" ) // TransactionTimeout 30 second timeout for transactions diff --git a/service/torrent/metainfoFetcher/metainfoFetcher.go b/service/torrent/metainfoFetcher/metainfoFetcher.go index 912a67e..aaa04ec 100644 --- a/service/torrent/metainfoFetcher/metainfoFetcher.go +++ b/service/torrent/metainfoFetcher/metainfoFetcher.go @@ -3,12 +3,12 @@ package metainfoFetcher import ( "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/metainfo" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - serviceBase "github.com/ewhal/nyaa/service" - torrentService "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + serviceBase "github.com/NyaaPantsu/nyaa/service" + torrentService "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util/log" "golang.org/x/time/rate" "math" "sync" diff --git a/service/torrent/metainfoFetcher/operation.go b/service/torrent/metainfoFetcher/operation.go index 92eada2..8c0bd97 100644 --- a/service/torrent/metainfoFetcher/operation.go +++ b/service/torrent/metainfoFetcher/operation.go @@ -2,9 +2,9 @@ package metainfoFetcher; import ( "github.com/anacrolix/torrent/metainfo" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util" "errors" "time" "strings" diff --git a/service/torrent/metainfoFetcher/operation_test.go b/service/torrent/metainfoFetcher/operation_test.go index 1be7347..aa935ca 100644 --- a/service/torrent/metainfoFetcher/operation_test.go +++ b/service/torrent/metainfoFetcher/operation_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/anacrolix/torrent" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/model" ) func TestInvalidHash(t *testing.T) { diff --git a/service/torrent/torrent.go b/service/torrent/torrent.go index b6bb2bd..6c05c74 100644 --- a/service/torrent/torrent.go +++ b/service/torrent/torrent.go @@ -6,11 +6,11 @@ import ( "strconv" "strings" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/util" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/util" ) /* Function to interact with Models diff --git a/service/user/cookieHelper.go b/service/user/cookieHelper.go index 940d5b3..7da7f65 100644 --- a/service/user/cookieHelper.go +++ b/service/user/cookieHelper.go @@ -2,11 +2,11 @@ package userService import ( "errors" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - formStruct "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/util/modelHelper" - "github.com/ewhal/nyaa/util/timeHelper" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + formStruct "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/util/modelHelper" + "github.com/NyaaPantsu/nyaa/util/timeHelper" "github.com/gorilla/securecookie" "golang.org/x/crypto/bcrypt" "net/http" diff --git a/service/user/form/formValidator.go b/service/user/form/formValidator.go index 5ee026b..fe974f1 100644 --- a/service/user/form/formValidator.go +++ b/service/user/form/formValidator.go @@ -3,7 +3,7 @@ package form import ( "regexp" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) const EMAIL_REGEX = `(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})` diff --git a/service/user/permission/permission.go b/service/user/permission/permission.go index 5bdca11..9c7852a 100644 --- a/service/user/permission/permission.go +++ b/service/user/permission/permission.go @@ -1,9 +1,9 @@ package userPermission import ( - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/log" ) diff --git a/service/user/user.go b/service/user/user.go index ac0f945..c021a01 100644 --- a/service/user/user.go +++ b/service/user/user.go @@ -7,14 +7,14 @@ import ( "strconv" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - formStruct "github.com/ewhal/nyaa/service/user/form" - "github.com/ewhal/nyaa/service/user/permission" - "github.com/ewhal/nyaa/util/crypto" - "github.com/ewhal/nyaa/util/log" - "github.com/ewhal/nyaa/util/modelHelper" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + formStruct "github.com/NyaaPantsu/nyaa/service/user/form" + "github.com/NyaaPantsu/nyaa/service/user/permission" + "github.com/NyaaPantsu/nyaa/util/crypto" + "github.com/NyaaPantsu/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/modelHelper" "golang.org/x/crypto/bcrypt" ) diff --git a/service/user/userHelper.go b/service/user/userHelper.go index 57e4dd0..6754730 100644 --- a/service/user/userHelper.go +++ b/service/user/userHelper.go @@ -2,11 +2,11 @@ package userService import ( "errors" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" "net/http" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) // FindUserByUserName creates a user. diff --git a/service/user/verification.go b/service/user/verification.go index e34093e..fe3ae75 100644 --- a/service/user/verification.go +++ b/service/user/verification.go @@ -7,12 +7,12 @@ import ( "strconv" "time" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/util/email" - "github.com/ewhal/nyaa/util/languages" - "github.com/ewhal/nyaa/util/timeHelper" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/util/email" + "github.com/NyaaPantsu/nyaa/util/languages" + "github.com/NyaaPantsu/nyaa/util/timeHelper" "github.com/gorilla/securecookie" ) diff --git a/templates/FAQ.html b/templates/FAQ.html index 677b443..09b38dc 100644 --- a/templates/FAQ.html +++ b/templates/FAQ.html @@ -57,7 +57,7 @@ http://tracker.baka-sub.cf/announce</pre> <p>{{T "answer_how_can_i_help"}}</p> <h2>{{T "your_design_sucks_found_a_bug"}}</h2> - <p><a href="https://github.com/ewhal/nyaa/issues">https://github.com/ewhal/nyaa/issues</a>.</p> + <p><a href="https://github.com/NyaaPantsu/nyaa/issues">https://github.com/NyaaPantsu/nyaa/issues</a>.</p> <h2>{{T "why_written_in_go"}}</h2> <p>{{T "authors_favorite_language"}}</p> diff --git a/util/email/email.go b/util/email/email.go index f4a9547..101dc4b 100644 --- a/util/email/email.go +++ b/util/email/email.go @@ -3,8 +3,8 @@ package email import ( "path/filepath" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/util/log" gomail "gopkg.in/gomail.v2" ) diff --git a/util/languages/translation.go b/util/languages/translation.go index d7c2189..d2bd5b6 100644 --- a/util/languages/translation.go +++ b/util/languages/translation.go @@ -8,8 +8,8 @@ import ( "path" "path/filepath" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/model" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/model" "github.com/nicksnyder/go-i18n/i18n" "github.com/nicksnyder/go-i18n/i18n/language" ) diff --git a/util/languages/translation_test.go b/util/languages/translation_test.go index 81fa696..9146bd8 100644 --- a/util/languages/translation_test.go +++ b/util/languages/translation_test.go @@ -4,7 +4,7 @@ import ( "path" "testing" - "github.com/ewhal/nyaa/config" + "github.com/NyaaPantsu/nyaa/config" ) func TestInitI18n(t *testing.T) { diff --git a/util/log/logger.go b/util/log/logger.go index 6eacfe1..f4cf9f1 100644 --- a/util/log/logger.go +++ b/util/log/logger.go @@ -5,7 +5,7 @@ import ( "os" "github.com/Sirupsen/logrus" - "github.com/ewhal/nyaa/config" + "github.com/NyaaPantsu/nyaa/config" lumberjack "gopkg.in/natefinch/lumberjack.v2" ) diff --git a/util/modelHelper/modelHelper.go b/util/modelHelper/modelHelper.go index fcbad6b..9d42f5c 100644 --- a/util/modelHelper/modelHelper.go +++ b/util/modelHelper/modelHelper.go @@ -2,7 +2,7 @@ package modelHelper import ( "fmt" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" "net/http" "reflect" "strconv" diff --git a/util/search/search.go b/util/search/search.go index 3d76087..c7ca74a 100644 --- a/util/search/search.go +++ b/util/search/search.go @@ -7,14 +7,14 @@ import ( "unicode" "unicode/utf8" - "github.com/ewhal/nyaa/cache" - "github.com/ewhal/nyaa/common" - "github.com/ewhal/nyaa/config" - "github.com/ewhal/nyaa/db" - "github.com/ewhal/nyaa/model" - "github.com/ewhal/nyaa/service" - "github.com/ewhal/nyaa/service/torrent" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/cache" + "github.com/NyaaPantsu/nyaa/common" + "github.com/NyaaPantsu/nyaa/config" + "github.com/NyaaPantsu/nyaa/db" + "github.com/NyaaPantsu/nyaa/model" + "github.com/NyaaPantsu/nyaa/service" + "github.com/NyaaPantsu/nyaa/service/torrent" + "github.com/NyaaPantsu/nyaa/util/log" ) var searchOperator string diff --git a/util/server.go b/util/server.go index caf557a..aa73a66 100644 --- a/util/server.go +++ b/util/server.go @@ -4,7 +4,7 @@ import ( "net/http" "runtime/debug" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) func SendError(w http.ResponseWriter, err error, code int) { diff --git a/util/signals/unix.go b/util/signals/unix.go index fe39500..f6f4085 100644 --- a/util/signals/unix.go +++ b/util/signals/unix.go @@ -3,8 +3,8 @@ package signals import ( - "github.com/ewhal/nyaa/router" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/router" + "github.com/NyaaPantsu/nyaa/util/log" "os" "os/signal" "syscall" diff --git a/util/timeHelper/timeHelper.go b/util/timeHelper/timeHelper.go index 38c8473..ba28c34 100644 --- a/util/timeHelper/timeHelper.go +++ b/util/timeHelper/timeHelper.go @@ -3,7 +3,7 @@ package timeHelper import ( "time" - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" ) func FewDaysLater(day int) time.Time { diff --git a/util/unzlib.go b/util/unzlib.go index 070b144..470328d 100644 --- a/util/unzlib.go +++ b/util/unzlib.go @@ -1,7 +1,7 @@ package util import ( - "github.com/ewhal/nyaa/util/log" + "github.com/NyaaPantsu/nyaa/util/log" "bytes" "compress/zlib" |