Skip to content

Commit a3e7d29

Browse files
committed
0.9.4 weather fixed + sitemap
1 parent aa2d5bb commit a3e7d29

File tree

7 files changed

+65
-349
lines changed

7 files changed

+65
-349
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _data/
1313
_private.js
1414
_private.json
1515
a_private.go
16-
banned.list
16+
banned*.list
1717
codetabsData.db3
1818
*.db*
1919
*.db3*

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

2-
![Version](https://img.shields.io/badge/version-0.9.3-orange.svg)
2+
![Version](https://img.shields.io/badge/version-0.9.4-orange.svg)
33
![Maintained YES](https://img.shields.io/badge/Maintained%3F-yes-green.svg)
44
![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)
55

66
# ![logo](https://github.com/jolav/codetabs/blob/master/www/_public/icons/ct/ct64r.png?raw=true) **ONLINE TOOLS ([codetabs.com](https://codetabs.com))**
77

8-
**version 0.9.3**
8+
**version 0.9.4**
99

1010
1. [Count LOC (lines of code) online from github/gitlab repos or zipped uploaded folder](#count-loc-online)
1111
2. [CORS proxy](#cors-proxy)

main.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ import (
2424
"github.com/jolav/codetabs/random"
2525
"github.com/jolav/codetabs/stars"
2626
"github.com/jolav/codetabs/store"
27-
28-
//"github.com/jolav/codetabs/video2gif"
2927
"github.com/jolav/codetabs/weather"
3028
)
3129

32-
var version = "0.9.3"
30+
var version = "0.9.4"
3331
var when = "undefined"
3432

3533
type Conf struct {
@@ -89,15 +87,13 @@ func main() {
8987

9088
go alexa.OnceADayTask()
9189
index := loc.NewIndex(false)
92-
//index2 := video2gif.NewIndex(false)
9390

9491
mux := http.NewServeMux()
9592

9693
mux.HandleFunc("/v1/alexa/", mw(alexa.Router, "alexa", c))
9794
mux.HandleFunc("/v1/geolocation/", mw(geolocation.Router, "geoip", c))
9895
mux.HandleFunc("/v1/headers/", mw(headers.Router, "headers", c))
9996
mux.HandleFunc("/v1/weather/", mw(weather.Router, "weather", c))
100-
//mux.HandleFunc("/v1/video2gif/", mw(index2.Router, "video2gif", c))
10197
mux.HandleFunc("/v1/random/", mw(random.Router, "random", c))
10298
mux.HandleFunc("/v1/stars/", mw(stars.Router, "stars", c))
10399
mux.HandleFunc("/v1/proxy/", mw(proxy.Router, "proxy", c))
@@ -200,7 +196,6 @@ func FAKE__getGlobalConfigJSON() (configjson []byte) {
200196
"loc",
201197
"proxy",
202198
"stars",
203-
"video2gif",
204199
"weather"
205200
]
206201
}

video2gif/video2gif.go

Lines changed: 0 additions & 284 deletions
This file was deleted.

weather/weather.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func (wt *weather) getWeather(w http.ResponseWriter) {
116116
} else if source == 3 {
117117
url = "https://api.weatherapi.com/v1/current.json"
118118
url += "?key=" + WEATHERAPI_KEY
119-
url += "&q=" + wt.Out.City + "&aqui=no"
119+
url += "&q=" + wt.Out.City + "&aqi=no"
120120
}
121121
resp, err := http.Get(url)
122122
if err != nil {
@@ -163,7 +163,9 @@ type geoData struct {
163163

164164
func (wt *weather) getGeo(w http.ResponseWriter, r *http.Request) {
165165
var geo = geoData{}
166-
url := "https://api.codetabs.com/v1/geolocation/json?q=" + u.GetIP(r)
166+
//url := "https://api.codetabs.com/v1/geolocation/json?q=" + u.GetIP(r)
167+
url := AUX_URL + u.GetIP(r)
168+
167169
resp, err := http.Get(url)
168170
if err != nil {
169171
msg := fmt.Sprint("ERROR requesting GetGeo URL")

0 commit comments

Comments
 (0)