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
def fix = { String text-> | |
def out=''<<'' | |
new StringReader(text).each{ out << it.trim() } | |
out.toString() | |
} | |
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
import java.awt.Image | |
import java.awt.image.BufferedImage | |
import javax.imageio.ImageIO | |
class Conv { | |
File inputFile | |
File outputFile |
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
class MyMacroFilter extends org.radeox.filter.MacroFilter { | |
private MacroRepository macros | |
private MacroRepository getMacros(){ | |
if(macros==null) | |
macros = new MacroRepository() | |
macros | |
} | |
public void setInitialContext(InitialRenderContext context) { | |
getMacros().setInitialContext(context) |
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
// | |
// markdown から textile への変換だけする | |
// | |
import java.util.regex.* | |
class Conv { |
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
@Grab(group='radeox', module='radeox', version='1.0-b2') | |
import org.radeox.api.engine.context.InitialRenderContext | |
import org.radeox.engine.* | |
import org.radeox.engine.context.* | |
import org.radeox.filter.* | |
import org.radeox.filter.context.* |
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
import java.io.*; | |
import java.util.*; | |
import java.util.zip.*; | |
class ProcessFlateDecode { | |
private File f; | |
public ProcessFlateDecode(File f){ | |
this.f=f; |
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
@Grab(group='commons-httpclient', module='commons-httpclient', version='3.1') | |
import org.apache.commons.httpclient.* | |
import org.apache.commons.httpclient.methods.* | |
import groovy.json.* | |
class GistFetcher { |
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
import groovy.xml.MarkupBuilder | |
import groovy.xml.MarkupBuilderHelper | |
def builder = new MarkupBuilder() | |
builder.root() { | |
eps() { | |
src('foo/1.eps') | |
} | |
textframe() { |
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
// | |
// convert textile to html using textile-j | |
// | |
@Grab(group='net.java', module='textile-j', version='2.2') | |
import net.java.textilej.parser.MarkupParser; | |
import net.java.textilej.parser.builder.HtmlDocumentBuilder; | |
import net.java.textilej.parser.markup.textile.TextileDialect; |
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
// | |
// fetch code from gist using groovy | |
// | |
@Grab(group='commons-httpclient', module='commons-httpclient', version='3.1') | |
import org.apache.commons.httpclient.* | |
import org.apache.commons.httpclient.methods.* | |
def encoding = 'UTF-8' |
NewerOlder