From: Jean-Philippe Orsini Date: Thu, 30 Jun 2016 07:23:26 +0000 (+0200) Subject: moved to its own repository X-Git-Url: http://git.wpitchoune.net/gitweb/?p=www.git;a=commitdiff_plain;h=4f0667ba7dc69532a2cd67b77750179536b28c34 moved to its own repository --- diff --git a/asciidoctor/asciidoctorfeed.props b/asciidoctor/asciidoctorfeed.props deleted file mode 100644 index 1e487af..0000000 --- a/asciidoctor/asciidoctorfeed.props +++ /dev/null @@ -1,4 +0,0 @@ -feed.title=The feed title -feed.description=The description of the feed -feed.link=http://wpitchoune.net/news/feed.xml -feed.baseurl=http://wpitchoune.net/news \ No newline at end of file diff --git a/asciidoctor/lib/asciidoctorj-1.5.4.jar b/asciidoctor/lib/asciidoctorj-1.5.4.jar deleted file mode 100644 index 218a458..0000000 Binary files a/asciidoctor/lib/asciidoctorj-1.5.4.jar and /dev/null differ diff --git a/asciidoctor/lib/jdom2-2.0.6.jar b/asciidoctor/lib/jdom2-2.0.6.jar deleted file mode 100644 index 2850ca1..0000000 Binary files a/asciidoctor/lib/jdom2-2.0.6.jar and /dev/null differ diff --git a/asciidoctor/lib/jruby-complete-1.7.21.jar b/asciidoctor/lib/jruby-complete-1.7.21.jar deleted file mode 100644 index 7cde708..0000000 Binary files a/asciidoctor/lib/jruby-complete-1.7.21.jar and /dev/null differ diff --git a/asciidoctor/lib/rome-1.6.0.jar b/asciidoctor/lib/rome-1.6.0.jar deleted file mode 100644 index baaf16f..0000000 Binary files a/asciidoctor/lib/rome-1.6.0.jar and /dev/null differ diff --git a/asciidoctor/lib/rome-utils-1.6.0.jar b/asciidoctor/lib/rome-utils-1.6.0.jar deleted file mode 100644 index f560df6..0000000 Binary files a/asciidoctor/lib/rome-utils-1.6.0.jar and /dev/null differ diff --git a/asciidoctor/lib/slf4j-api-1.7.6.jar b/asciidoctor/lib/slf4j-api-1.7.6.jar deleted file mode 100644 index 19aaf37..0000000 Binary files a/asciidoctor/lib/slf4j-api-1.7.6.jar and /dev/null differ diff --git a/asciidoctor/lib/slf4j-nop-1.7.6.jar b/asciidoctor/lib/slf4j-nop-1.7.6.jar deleted file mode 100644 index 52509a2..0000000 Binary files a/asciidoctor/lib/slf4j-nop-1.7.6.jar and /dev/null differ diff --git a/asciidoctor/pdoc.sh b/asciidoctor/pdoc.sh deleted file mode 100755 index 1758471..0000000 --- a/asciidoctor/pdoc.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -java -classpath target/classes:lib/asciidoctorj-1.5.4.jar:lib/jruby-complete-1.7.21.jar:target/net.wpitchoune.asciidoctor-1.0.jar:lib/rome-1.6.0.jar:lib/slf4j-api-1.7.6.jar:lib/slf4j-nop-1.7.6.jar:lib/jdom2-2.0.6.jar:lib/rome-utils-1.6.0.jar Main $* diff --git a/asciidoctor/pom.xml b/asciidoctor/pom.xml deleted file mode 100644 index ba3b108..0000000 --- a/asciidoctor/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - - net.wpitchoune.asciidoctor - net.wpitchoune.net - jar - asciidoctor - 1.0 - - - - org.asciidoctor - asciidoctorj - 1.5.4 - - - - com.rometools - rome - 1.6.0 - - - - diff --git a/asciidoctor/src/main/java/Main.java b/asciidoctor/src/main/java/Main.java deleted file mode 100644 index c83bad8..0000000 --- a/asciidoctor/src/main/java/Main.java +++ /dev/null @@ -1,92 +0,0 @@ -import java.io.*; -import java.util.*; - -import org.asciidoctor.Asciidoctor; -import org.asciidoctor.Asciidoctor.Factory; -import org.asciidoctor.Options; -import org.asciidoctor.ast.Document; -import org.asciidoctor.ast.DocumentHeader; - -import com.rometools.rome.feed.synd.*; -import com.rometools.rome.io.FeedException; -import com.rometools.rome.io.SyndFeedOutput; - -public class Main { - private static File toHTMLFile(File dir, File adoc) { - int idx; - String name; - - name = adoc.getName(); - - idx = name.lastIndexOf('.'); - - if (idx >= 0) - name = name.substring(0, idx); - - return new File(dir, name + ".html"); - } - - public static void main(String[] args) throws FileNotFoundException, IOException, FeedException { - File inDir, html, outDir; - File[] adocs; - StringWriter sw; - Asciidoctor asciidoctor; - Options opts; - SyndFeed feed; - Properties props; - ArrayList entries; - SyndEntryImpl e; - InputStream in; - DocumentHeader h; - SyndContentImpl c; - - inDir = new File(args[0]); - outDir = new File(args[1]); - - props = new Properties(); - in = new FileInputStream(args[2]); - props.load(in); - in.close(); - - adocs = inDir.listFiles(); - - asciidoctor = Factory.create(); - - feed = new SyndFeedImpl(); - feed.setTitle(props.getProperty("feed.title")); - feed.setDescription(props.getProperty("feed.description")); - feed.setLink(props.getProperty("feed.link")); - - entries = new ArrayList(); - - for (File adoc: adocs) { - if (!adoc.getName().endsWith(".adoc")) - continue; - sw = new StringWriter(); - - html = toHTMLFile(outDir, adoc); - - h = asciidoctor.readDocumentHeader(adoc); - - asciidoctor.convert(new FileReader(adoc), sw, new HashMap()); - - e = new SyndEntryImpl(); - e.setTitle(h.getDocumentTitle().getMain()); - e.setUri(props.getProperty("feed.baseurl") + "/" + html.getName()); - - c = new SyndContentImpl(); - c.setType("text/html"); - c.setValue(sw.toString()); - - e.setDescription(c); - - entries.add(e); - } - - feed.setEntries(entries); - - feed.setFeedType("rss_2.0"); - SyndFeedOutput output = new SyndFeedOutput(); - output.output(feed, new File(outDir, "feed.xml")); - } -} \ No newline at end of file