Skip to content

Commit

Permalink
RDF to iCalendar converter #203 : clock times must have 6 figures aft…
Browse files Browse the repository at this point in the history
…er "T" ; format Text: remove bad new line after SUMMARY
  • Loading branch information
jmvanel committed Mar 17, 2019
1 parent a41afd3 commit 6ae10fd
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@ with RDFStoreLocalProvider[Rdf, DATASET]{
return ""
val t1 = value.replaceAll("-", "").replaceAll(":", "")
val t2 = if ( t1 . contains("T"))
t1
if ( (t1.split("T"))(1) . length() == 4 )
t1 + "00"
else
t1
else
t1 + "T120000"
"DTSTAMP:" + t2 + CRLF +
"DTSTART:" + t2
}

def formatText(t: String): String =
t.replaceAll("\n", CRLF+" ").grouped(60).fold("")((a,b) => a+b+CRLF+" ")
t.replaceAll("\n", CRLF+" ").grouped(60).mkString(CRLF+" ")

def processTriple(triple: Rdf#Triple) = {
val pred = triple.predicate;
Expand Down

0 comments on commit 6ae10fd

Please sign in to comment.