-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
8 changed files
with
114 additions
and
45 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
server/app/secret.yaml | ||
vendor |
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
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,24 @@ | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"time" | ||
|
||
"github.com/otiai10/amesh/lib/amesh" | ||
"github.com/otiai10/gat/render" | ||
) | ||
|
||
// Amesh デフォルトのアメッシュを表示 | ||
func Amesh(r render.Renderer, geo, mask bool) error { | ||
entry := amesh.GetEntry(time.Now()) | ||
merged, err := entry.Image(geo, mask) | ||
if err != nil { | ||
return err | ||
} | ||
if err := r.Render(os.Stdout, merged); err != nil { | ||
return err | ||
} | ||
fmt.Println("#amesh", entry.URL) | ||
return nil | ||
} |
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
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,25 @@ | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
"net/http" | ||
"os" | ||
|
||
"github.com/otiai10/amesh/lib/typhoon" | ||
"github.com/otiai10/gat/render" | ||
) | ||
|
||
// Typhoon 台風情報を表示 | ||
func Typhoon(r render.Renderer) error { | ||
entry, err := typhoon.GetEntry(http.DefaultClient) | ||
if err != nil { | ||
return err | ||
} | ||
img, err := entry.Image(http.DefaultClient) | ||
if err != nil { | ||
return err | ||
} | ||
r.Render(os.Stdout, img) | ||
fmt.Println("#tenkijp", entry.Reference) | ||
return nil | ||
} |
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,13 @@ | ||
module github.com/otiai10/amesh | ||
|
||
go 1.12 | ||
|
||
require ( | ||
github.com/otiai10/chant v0.0.0-20181025063644-2735aa752660 | ||
github.com/otiai10/gat v0.0.0-20190422041449-67c01b969755 | ||
github.com/otiai10/marmoset v0.4.0 | ||
github.com/otiai10/opengraph v1.0.0 | ||
github.com/otiai10/openweathermap v0.0.0-20181017081002-254e9d1b05a2 | ||
golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6 | ||
google.golang.org/appengine v1.5.0 | ||
) |
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,33 @@ | ||
bou.ke/monkey v1.0.1/go.mod h1:FgHuK96Rv2Nlf+0u1OOVDpCMdsWyOFmeeketDHE7LIg= | ||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= | ||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
github.com/mattn/go-sixel v0.0.0-20190320171103-a8fac8fa7d81 h1:AiRo+166RFsFNOhKhNI5szixSWPInRmBjWvfSihTn5c= | ||
github.com/mattn/go-sixel v0.0.0-20190320171103-a8fac8fa7d81/go.mod h1:zlzhYSuMbLdRdrxfutExxGpC+Pf2uUTJ6GpVQ4LB5dc= | ||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= | ||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= | ||
github.com/otiai10/chant v0.0.0-20181025063644-2735aa752660 h1:kisuS1AKtGH7+UIKKYTDpw1aiAOK3TprjzT5dcR4tHM= | ||
github.com/otiai10/chant v0.0.0-20181025063644-2735aa752660/go.mod h1:3vdOwedEA05C09N2EkCo+6RymMl9FQwjP7zSuofEjBQ= | ||
github.com/otiai10/gat v0.0.0-20190422041449-67c01b969755 h1:Mj/jpguqHNencRsruk40pF5wIgRGzKIOzvFZ7zTTvGQ= | ||
github.com/otiai10/gat v0.0.0-20190422041449-67c01b969755/go.mod h1:4KfaQUq7V21ZOGpdWaxC+djudOuhU4tvVQi8ZqrF+as= | ||
github.com/otiai10/marmoset v0.4.0 h1:Hg59lQI7qQowBEdsAJ/+VDTEospTBzXX/A1Gsw4mlvA= | ||
github.com/otiai10/marmoset v0.4.0/go.mod h1:t2q6dXWZ9YcFdRREDApX4bCmfQnL3isJ2dgl8ychlXg= | ||
github.com/otiai10/mint v1.2.3/go.mod h1:YnfyPNhBvnY8bW4SGQHCs/aAFhkgySlMZbrF5U0bOVw= | ||
github.com/otiai10/opengraph v1.0.0 h1:Fal0Qx7mBWds0z2cxMMPfZh2Ld3mW61m5BBUTybajD0= | ||
github.com/otiai10/opengraph v1.0.0/go.mod h1:X/1XWvVWxb+8migvztlPAclxuxVCIRuLhf0xLnngZ78= | ||
github.com/otiai10/openweathermap v0.0.0-20181017081002-254e9d1b05a2 h1:tMm4hkiJJ8q1agp5otCZsQic0+1jH5cPMBTlN2oBepU= | ||
github.com/otiai10/openweathermap v0.0.0-20181017081002-254e9d1b05a2/go.mod h1:y4Z/bGRFIG19iQhxuUp0gXmOZU9XhPZaHDg/Hxpn34U= | ||
github.com/soniakeys/quant v1.0.0 h1:N1um9ktjbkZVcywBVAAYpZYSHxEfJGzshHCxx/DaI0Y= | ||
github.com/soniakeys/quant v1.0.0/go.mod h1:HI1k023QuVbD4H8i9YdfZP2munIHU4QpjsImz6Y6zds= | ||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | ||
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 h1:O5YqonU5IWby+w98jVUG9h7zlCWCcH4RHyPVReBmhzk= | ||
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= | ||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6 h1:FP8hkuE6yUEaJnK7O2eTuejKWwW+Rhfj80dQ2JcKxCU= | ||
golang.org/x/net v0.0.0-20190424112056-4829fb13d2c6/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a h1:XCr/YX7O0uxRkLq2k1ApNQMims9eCioF9UpzIPBDmuo= | ||
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||
google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= | ||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= |
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