Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
| /* | |
| * The author disclaims copyright to this source code. In place of | |
| * a legal notice, here is a blessing: | |
| * | |
| * May you do good and not evil. | |
| * May you find forgiveness for yourself and forgive others. | |
| * May you share freely, never taking more than you give. | |
| * | |
| */ | |
| package org.hibernate.dialect; |
| import java.security.InvalidKeyException; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.SignatureException; | |
| import java.util.Formatter; | |
| import javax.crypto.Mac; | |
| import javax.crypto.spec.SecretKeySpec; | |
| /** |
| /** | |
| * Licensed to the Apache Software Foundation (ASF) under one or more | |
| * contributor license agreements. See the NOTICE file distributed with | |
| * this work for additional information regarding copyright ownership. | |
| * The ASF licenses this file to You under the Apache License, Version 2.0 | |
| * (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * |
| def generateMD5(String s) { | |
| MessageDigest digest = MessageDigest.getInstance("MD5") | |
| digest.update(s.bytes); | |
| new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0') | |
| } |
| class CompoundInstanceControllerIntegrationSpec extends ControllerSpec { | |
| static transactional = true | |
| def "saving a new compound instance and compound"() { | |
| setup: | |
| controller.metaClass.message = {args -> "mockMessage"} | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta name="layout" content="main"/> | |
| <r:require module="application"/> | |
| </head> | |
| <body> | |
| <h3>Confirmation</h3> | |
| <p>${msg}</p> | |
| </body> |
| // define the url | |
| def url = "http://news.google.com/news?ned=us&topic=h&output=rss" | |
| def rss = new XmlSlurper().parse(url) | |
| println rss.channel.title | |
| rss.channel.item.each { | |
| println "- ${it.title}" | |
| } |
| @Grab(group='org.ccil.cowan.tagsoup', module='tagsoup', version='1.2.1') | |
| def parser = new XmlSlurper(new org.ccil.cowan.tagsoup.Parser()) | |
| /** get all talks and their speakers */ | |
| def talksPage = parser.parse('http://rubyconfindia.org/2012/talks.html') | |
| def talks = talksPage.body. | |
| section.find { it.@id == 'page' }. | |
| section.find { it.@id == 'talks' }. | |
| article. | |
| collect { talk(it) } |