This file contains hidden or 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
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
| <xsl:output method="xml" indent="yes" encoding="UTF-8" /> | |
| <xsl:variable name="br"><xsl:text> </xsl:text></xsl:variable> <!-- u2029 --> | |
| <xsl:variable name="nbsp"><xsl:text> </xsl:text></xsl:variable> <!-- nbsp --> | |
| <!-- br to u2029 --> | |
| <xsl:template match="br"> |
This file contains hidden or 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
| // | |
| // Fix (R) and (TM) mojibake | |
| // | |
| String replace(String str){ | |
| def log = { text,i-> | |
| def out = ''<<'' | |
| for(int j=Math.max(0,i-10); j<i; j++){ |
This file contains hidden or 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 java.lang.reflect.Field | |
| import org.radeox.filter.FilterPipe | |
| import org.radeox.engine.BaseRenderEngine | |
| import org.radeox.engine.context.BaseInitialRenderContext | |
| import org.radeox.api.engine.WikiRenderEngine |
This file contains hidden or 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
| // 段落構築用テキストフレームを生成 | |
| function createBufferedTextFrame(){ | |
| var mytf = app.activeDocument.textFrames.add(); | |
| return mytf; | |
| } | |
| // マージ | |
| function mergeTextFrame( tf0 , tf1 ){ | |
| tf0.nextTextFrame = tf1; | |
| tf1.remove(); |
This file contains hidden or 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='poi', module='poi', version='3.1-FINAL') | |
| @Grab(group='jdom', module='jdom', version='1.1') | |
| import org.jdom.* | |
| import org.jdom.output.* | |
| import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
| def xlsfile = new File(args[0]) |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| class NN5Reader(object) : | |
| def __init__(self,nn5data): | |
| self.nn5data=nn5data | |
| def __recoverLineBreak( self, str ): | |
| r='' | |
This file contains hidden or 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.* | |
| class Utils { | |
| def getGoodRenderingHints() { | |
| def hints = new RenderingHints(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON) | |
| hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY) |
This file contains hidden or 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.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.net.URL; | |
| import org.json.JSONArray; | |
| import org.json.JSONObject; | |
| public class GetMyStatus { |
This file contains hidden or 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 kana_to_romaji(text): | |
| dict={ | |
| u'あ':'a',u'い':'i',u'う':'u',u'え':'e',u'お':'o', | |
| u'か':'ka',u'き':'ki',u'く':'ku',u'け':'ke',u'こ':'ko', | |
| u'さ':'sa',u'し':'si',u'す':'su',u'せ':'se',u'そ':'so', | |
| u'た':'ta',u'ち':'ti',u'つ':'tu',u'て':'te',u'と':'to', |
This file contains hidden or 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='nekohtml', module='nekohtml', version='1.9.6') | |
| import org.cyberneko.html.parsers.SAXParser | |
| import java.util.regex.Pattern | |
| // URLからタイトルを取得する. |