SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
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.groovy
out.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"

// wildcards
get "/author/*", forward: "/authorsInformation.groovy"
// path variables
get "/article/@year/@month/@day",
  forward: "/article.groovy?year=@year&month=@month&day=@day"
// caching outputs
get "/news",      forward: "/new.groovy",   cache: 10.minutes
get "/download", forward: "/download.gtpl", cache: 2.hours
// incoming email
email to: "/receiveEmail.groovy"
⽤用



✓               ✓
✓               ✓
✓   	
          ✓
✓               ✓
// Hatebu Groovy Bot -- @hatebu_groovy
//   inspired by @nobusue's @hatena_groovy
import com.google.appengine.api.datastore.*

tag = 'groovy'
rss = "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

Weitere ähnliche Inhalte

Was ist angesagt?

Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxPlone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope Rpx
Paris, France
 

Was ist angesagt? (20)

World of Logging
World of LoggingWorld of Logging
World of Logging
 
Quicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of RustQuicli - From zero to a full CLI application in a few lines of Rust
Quicli - From zero to a full CLI application in a few lines of Rust
 
お題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part Aお題でGroovyプログラミング: Part A
お題でGroovyプログラミング: Part A
 
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyTdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
 
CouchDB Day NYC 2017: MapReduce Views
CouchDB Day NYC 2017: MapReduce ViewsCouchDB Day NYC 2017: MapReduce Views
CouchDB Day NYC 2017: MapReduce Views
 
わかった気になるgitit-0.8
わかった気になるgitit-0.8わかった気になるgitit-0.8
わかった気になるgitit-0.8
 
Puppet and Openshift
Puppet and OpenshiftPuppet and Openshift
Puppet and Openshift
 
React for Beginners
React for BeginnersReact for Beginners
React for Beginners
 
Grailsx@ロンドンへ行ってきた報告。
Grailsx@ロンドンへ行ってきた報告。Grailsx@ロンドンへ行ってきた報告。
Grailsx@ロンドンへ行ってきた報告。
 
GPars For Beginners
GPars For BeginnersGPars For Beginners
GPars For Beginners
 
PHP 机智问答
PHP 机智问答PHP 机智问答
PHP 机智问答
 
gunicorn introduction
gunicorn introductiongunicorn introduction
gunicorn introduction
 
ES6 generators
ES6 generatorsES6 generators
ES6 generators
 
2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js
 
Do something in 5 minutes with gas 1-use spreadsheet as database
Do something in 5 minutes with gas 1-use spreadsheet as databaseDo something in 5 minutes with gas 1-use spreadsheet as database
Do something in 5 minutes with gas 1-use spreadsheet as database
 
Do something in 5 with gas 3-simple invoicing app
Do something in 5 with gas 3-simple invoicing appDo something in 5 with gas 3-simple invoicing app
Do something in 5 with gas 3-simple invoicing app
 
Virthualenvwrapper
VirthualenvwrapperVirthualenvwrapper
Virthualenvwrapper
 
Creating ASTTs The painful truth
Creating ASTTs The painful truthCreating ASTTs The painful truth
Creating ASTTs The painful truth
 
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxPlone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope Rpx
 
Git Tutorial Yang Yang
Git Tutorial Yang YangGit Tutorial Yang Yang
Git Tutorial Yang Yang
 

Ähnlich wie Gaelyk

Private slideshow
Private slideshowPrivate slideshow
Private slideshow
sblackman
 
cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123
Parag Gajbhiye
 

Ähnlich wie Gaelyk (20)

Grooscript greach 2015
Grooscript greach 2015Grooscript greach 2015
Grooscript greach 2015
 
Grooscript gr8conf 2015
Grooscript gr8conf 2015Grooscript gr8conf 2015
Grooscript gr8conf 2015
 
PHP Backdoor: The rise of the vuln
PHP Backdoor: The rise of the vulnPHP Backdoor: The rise of the vuln
PHP Backdoor: The rise of the vuln
 
Website Performance Basics
Website Performance BasicsWebsite Performance Basics
Website Performance Basics
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Web-Performance
Web-PerformanceWeb-Performance
Web-Performance
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
HTML 5 - Overview
HTML 5 - OverviewHTML 5 - Overview
HTML 5 - Overview
 
cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123cdac@parag.gajbhiye@test123
cdac@parag.gajbhiye@test123
 
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
 
Code Management
Code ManagementCode Management
Code Management
 
Php on the Web and Desktop
Php on the Web and DesktopPhp on the Web and Desktop
Php on the Web and Desktop
 
Monitoring web application behaviour with cucumber-nagios
Monitoring web application behaviour with cucumber-nagiosMonitoring web application behaviour with cucumber-nagios
Monitoring web application behaviour with cucumber-nagios
 
Grooscript and Grails 3
Grooscript and Grails 3Grooscript and Grails 3
Grooscript and Grails 3
 
Test upload
Test uploadTest upload
Test upload
 
WordCamp Montreal 2016 WP-API + React with server rendering
WordCamp Montreal 2016  WP-API + React with server renderingWordCamp Montreal 2016  WP-API + React with server rendering
WordCamp Montreal 2016 WP-API + React with server rendering
 
Makezine
MakezineMakezine
Makezine
 
Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)Big query - Command line tools and Tips - (MOSG)
Big query - Command line tools and Tips - (MOSG)
 

Mehr von Kazuchika Sekiya

「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告
Kazuchika Sekiya
 

Mehr von Kazuchika Sekiya (16)

10分でわかるOpenAPI V3
10分でわかるOpenAPI V310分でわかるOpenAPI V3
10分でわかるOpenAPI V3
 
Apigee x Drupal: APIエコノミーを支える開発者ポータル
Apigee x Drupal: APIエコノミーを支える開発者ポータルApigee x Drupal: APIエコノミーを支える開発者ポータル
Apigee x Drupal: APIエコノミーを支える開発者ポータル
 
Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理Routeサービスを使ったCloud FoundryアプリのAPI管理
Routeサービスを使ったCloud FoundryアプリのAPI管理
 
Apigee+OASでらくらくAPI開発(予定)
Apigee+OASでらくらくAPI開発(予定)Apigee+OASでらくらくAPI開発(予定)
Apigee+OASでらくらくAPI開発(予定)
 
OpenAPI Specification概要
OpenAPI Specification概要OpenAPI Specification概要
OpenAPI Specification概要
 
G* Workshop in Fukuoka - Introduction
G* Workshop in Fukuoka - IntroductionG* Workshop in Fukuoka - Introduction
G* Workshop in Fukuoka - Introduction
 
[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration[English version] JavaFX and Web Integration
[English version] JavaFX and Web Integration
 
[JavaOne Tokyo 2012] JavaFX and Web Integration
[JavaOne Tokyo 2012] JavaFX and Web Integration[JavaOne Tokyo 2012] JavaFX and Web Integration
[JavaOne Tokyo 2012] JavaFX and Web Integration
 
JGGUG合宿2011報告
JGGUG合宿2011報告JGGUG合宿2011報告
JGGUG合宿2011報告
 
GroovyFX
GroovyFXGroovyFX
GroovyFX
 
GDK48
GDK48GDK48
GDK48
 
「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告「プログラミングGroovy」発売予告
「プログラミングGroovy」発売予告
 
「プログラミングGroovy」Groovyってなんだろ?編
「プログラミングGroovy」Groovyってなんだろ?編「プログラミングGroovy」Groovyってなんだろ?編
「プログラミングGroovy」Groovyってなんだろ?編
 
"G"はGrapeのG
"G"はGrapeのG"G"はGrapeのG
"G"はGrapeのG
 
GroovyなGAE/J Gaelykでかんたんbot工作
GroovyなGAE/J Gaelykでかんたんbot工作GroovyなGAE/J Gaelykでかんたんbot工作
GroovyなGAE/J Gaelykでかんたんbot工作
 
Groovy/Grails on Google App Engine <シンプル導入編>
Groovy/Grails on Google App Engine <シンプル導入編>Groovy/Grails on Google App Engine <シンプル導入編>
Groovy/Grails on Google App Engine <シンプル導入編>
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Gaelyk

  • 2.
  • 3.              
  • 4.        
  • 6.   / +-- 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
  • 9. <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>
  • 10. ⽤用 mail.send to: 'to@gmail.com', from: 'other@gmail.com', subject: 'Hello World', htmlBody: '<bold>Hello</bold>'
  • 11.
  • 12. get "/about", redirect: "/blog/2008/10/20/welcome-to-my-blog" post "/tweet", forward: "/tweet.groovy" // wildcards get "/author/*", forward: "/authorsInformation.groovy" // path variables get "/article/@year/@month/@day", forward: "/article.groovy?year=@year&month=@month&day=@day" // caching outputs get "/news", forward: "/new.groovy", cache: 10.minutes get "/download", forward: "/download.gtpl", cache: 2.hours // incoming email email to: "/receiveEmail.groovy"
  • 13. ⽤用 ✓ ✓ ✓ ✓ ✓   ✓ ✓ ✓
  • 14.
  • 15.
  • 16. // Hatebu Groovy Bot -- @hatebu_groovy // inspired by @nobusue's @hatena_groovy import com.google.appengine.api.datastore.* tag = 'groovy' rss = "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()) ! ! } ! } }
  • 17.    
  • 19. ⾃自 ▶ 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