Gaelyk
Upcoming SlideShare
Loading in...5
×
 

Gaelyk

on

  • 2,641 views

2011/02/24 JGGUGの第15回G*ワークショップの連続LTで使った資料

2011/02/24 JGGUGの第15回G*ワークショップの連続LTで使った資料

Statistics

Views

Total Views
2,641
Views on SlideShare
2,154
Embed Views
487

Actions

Likes
0
Downloads
3
Comments
0

4 Embeds 487

http://d.hatena.ne.jp 475
http://webcache.googleusercontent.com 6
http://paper.li 4
http://hatenatunnel.appspot.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Gaelyk Gaelyk Presentation Transcript

  • GAELYK
  •              
  •        
  • http://gaelyk.appspot.com
  •   / +-- build.groovy +-- src +-- war | +-- index.gtpl +-- css +-- images +-- js +-- WEB-INF | +-- appengine-web.xml +-- web.xml +-- plugins.groovy +-- routes.groovy +-- classes | +-- groovy | | | +-- controller.groovy | +-- includes | | | +-- header.gtpl | +-- lib | +-- appengine-api-1.0-sdk-x.y.z.jar +-- appengine-api-labs-x.y.z.jar +-- gaelyk-x.y.z.jar +-- groovy-all-x.y.z.jar
  • // hello.groovyout.println “Hello, JGGUG!”
  • ⼒力力⼒力力
  • <html> <body> <p><% def message = "Hello, JGGUG!" print message %> </p> <p><%= message %></p> <p>${message}</p> <ul> <% 3.times { %> <li>${message}</li> <% } %> </ul> </body></html>
  • ⽤用mail.send to: to@gmail.com, from: other@gmail.com, subject: Hello World, htmlBody: <bold>Hello</bold>
  • get "/about", redirect: "/blog/2008/10/20/welcome-to-my-blog"post "/tweet", forward: "/tweet.groovy"// wildcardsget "/author/*", forward: "/authorsInformation.groovy"// path variablesget "/article/@year/@month/@day", forward: "/article.groovy?year=@year&month=@month&day=@day"// caching outputsget "/news", forward: "/new.groovy", cache: 10.minutesget "/download", forward: "/download.gtpl", cache: 2.hours// incoming emailemail to: "/receiveEmail.groovy"
  • ⽤用✓ ✓✓ ✓✓   ✓✓ ✓
  • // Hatebu Groovy Bot -- @hatebu_groovy// inspired by @nobusues @hatena_groovyimport com.google.appengine.api.datastore.*tag = groovyrss = "http://b.hatena.ne.jp/t/${tag}?sort=eid&mode=rss"def root = new XmlSlurper().parse(rss)root.item.each { item ->! def title = item.title.text().trim()! def url = item.link.text()! def query = new Query(entry)! query.addFilter(url, Query.FilterOperator.EQUAL, url)! def found = datastore.prepare(query).asSingleEntity()!! if (!found) {! ! try {! ! ! twitter.updateStatus "$title $url"! ! ! log.info "tweeted: $title $url"! ! ! def entry = new Entity(entry)! ! ! entry.title = title! ! ! entry.url = url! ! ! entry.save()! ! ! log.info "recorded: $title $url"! ! } catch (TwitterException ex) {! ! ! log.warning(ex.toString())! ! }! }}
  •    
  • ⾝身
  • ⾃自 ▶ http://gaelyk.appspot.com/ ▶ https://github.com/glaforge/gaelyk ▶ http://dl.dropbox.com/u/132573/Gaelyk-Tutorial.html ▶   http://dl.dropbox.com/u/132573/plugins.html
  • GAELYK