Skip to content

Commit

Permalink
git subrepo pull modules
Browse files Browse the repository at this point in the history
subrepo:
  subdir:   "modules"
  merged:   "4f6f848246"
upstream:
  origin:   "[email protected]:daisy/pipeline-modules.git"
  branch:   "master"
  commit:   "53c6ba0c72"
git-subrepo:
  version:  "0.3.1"
  origin:   "???"
  commit:   "???"
  • Loading branch information
bertfrees committed Jan 27, 2025
1 parent b1a9625 commit a46ebe3
Show file tree
Hide file tree
Showing 104 changed files with 898 additions and 231 deletions.
4 changes: 2 additions & 2 deletions modules/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
[subrepo]
remote = [email protected]:daisy/pipeline-modules.git
branch = master
commit = 482453fccd6bb189dbf0d645864d18b340ef372a
parent = fe7ead97b3995328414dbb97e10db70c0bae4297
commit = 53c6ba0c725182fbdcf329c41f55f09898fa4c10
parent = 72d875a57758eb7e7eca1e4bf04d7789cec5d110
cmdver = 0.3.1
4 changes: 2 additions & 2 deletions modules/audio/audio-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>modules-parent</artifactId>
<version>1.14.31-SNAPSHOT</version>
<version>1.15.1-SNAPSHOT</version>
<relativePath>../../parent</relativePath>
</parent>

Expand Down Expand Up @@ -114,4 +114,4 @@
</profile>
</profiles>

</project>
</project>
4 changes: 2 additions & 2 deletions modules/audio/audio-encoder-lame/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>modules-parent</artifactId>
<version>1.14.31-SNAPSHOT</version>
<version>1.15.1-SNAPSHOT</version>
<relativePath>../../parent</relativePath>
</parent>

Expand Down Expand Up @@ -45,4 +45,4 @@
</expose-services>
</properties>

</project>
</project>
20 changes: 10 additions & 10 deletions modules/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>modules-bom</artifactId>
<version>1.14.31-SNAPSHOT</version>
<version>1.15.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>DAISY Pipeline 2 :: Modules BoM</name>
Expand Down Expand Up @@ -52,18 +52,18 @@
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>braille-css-utils</artifactId>
<version>4.0.0</version>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>dotify-utils</artifactId>
<version>6.2.4</version>
<version>6.2.5</version>
</dependency>
<!-- list main libhyphen-utils first because this determines the version of the 'doc' artifact picked for the website -->
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>libhyphen-utils</artifactId>
<version>3.3.0</version>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
Expand All @@ -87,7 +87,7 @@
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>liblouis-utils</artifactId>
<version>6.2.2</version>
<version>6.2.3</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
Expand All @@ -110,7 +110,7 @@
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>pef-utils</artifactId>
<version>6.0.2</version>
<version>6.0.3</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules.braille</groupId>
Expand All @@ -124,12 +124,12 @@
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>common-utils</artifactId>
<version>3.1.2</version>
<version>3.1.3</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>file-utils</artifactId>
<version>4.3.1</version>
<version>4.3.2</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
Expand Down Expand Up @@ -222,7 +222,7 @@
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>css-utils</artifactId>
<version>6.0.0</version>
<version>6.0.1</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
Expand Down Expand Up @@ -485,7 +485,7 @@
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>tts-common</artifactId>
<version>7.2.1</version>
<version>7.3.0</version>
</dependency>
<dependency>
<groupId>org.daisy.pipeline.modules</groupId>
Expand Down
8 changes: 8 additions & 0 deletions modules/braille/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
v1.15.0
=======

Changes
-------
- Support for Finnish hyphenation (https://github.com/celiafi/pipeline-mod-celia/issues/48)
- Various bugfixes and improvements

v1.14.30
========

Expand Down
4 changes: 2 additions & 2 deletions modules/braille/braille-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>modules-parent</artifactId>
<version>1.14.31-SNAPSHOT</version>
<version>1.15.1-SNAPSHOT</version>
<relativePath>../../parent/</relativePath>
</parent>

Expand Down Expand Up @@ -248,4 +248,4 @@
</profile>
</profiles>

</project>
</project>
4 changes: 2 additions & 2 deletions modules/braille/braille-css-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>modules-parent</artifactId>
<version>1.14.31-SNAPSHOT</version>
<version>1.15.1-SNAPSHOT</version>
<relativePath>../../parent/</relativePath>
</parent>

<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>braille-css-utils</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.2-SNAPSHOT</version>
<packaging>bundle</packaging>

<name>DP2 Braille Modules :: braille-css-utils</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ else if (c != null && r.context != c)
}
return r;
}

@Override
public String toString() {
return BrailleCssSerializer.toString(this);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ class UnmodifiableTermIdent extends UnmodifiableTerm<String> implements TermIden
public String getValue() {
return ident.getValue();
}

@Override
public String toString() {
return ident.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ class UnmodifiableTermString extends UnmodifiableTerm<String> implements TermStr
public String getValue() {
return string.getValue();
}
}

@Override
public String toString() {
return string.toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ public java.net.URL getBase() {
public TermURI setBase(java.net.URL base) {
throw new UnsupportedOperationException("Unmodifiable");
}
}

@Override
public String toString() {
return uri.toString();
}
}
4 changes: 2 additions & 2 deletions modules/braille/dotify-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.daisy.pipeline.modules</groupId>
<artifactId>modules-parent</artifactId>
<version>1.14.31-SNAPSHOT</version>
<version>1.15.1-SNAPSHOT</version>
<relativePath>../../parent/</relativePath>
</parent>

<groupId>org.daisy.pipeline.modules.braille</groupId>
<artifactId>dotify-utils</artifactId>
<version>6.2.5-SNAPSHOT</version>
<version>6.2.6-SNAPSHOT</version>
<packaging>bundle</packaging>

<name>DP2 Braille Modules :: dotify-utils</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
import java.util.List;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.Set;

import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import static com.google.common.collect.Iterables.concat;

import org.daisy.braille.css.PropertyValue;
import org.daisy.braille.css.SimpleInlineStyle;

import org.daisy.dotify.api.translator.AttributeWithContext;
Expand Down Expand Up @@ -164,7 +167,34 @@ public BrailleTranslatorResult translate(TranslatableWithContext input) throws T
return translate(styledText, from, to);
}

private static final Set<String> obflStyleProperties = ImmutableSet.of(
"text-transform",
"braille-charset",
"hyphens",
"hyphenate-character",
"white-space",
"word-spacing",
"letter-spacing",
"-dotify-counter-style"
);

private BrailleTranslatorResult translate(Iterable<CSSStyledText> styledText, int from, int to) throws TranslationException {
// Because of caching in cssParser, styledText might contain non-inline properties
// (which should always have the initial value). Omit these properties from the argument
// that is passed to translator.
for (Iterator<CSSStyledText> i = styledText.iterator(); i.hasNext();) {
SimpleInlineStyle s = i.next().getStyle();
if (s != null)
for (Iterator<PropertyValue> j = s.iterator(); j.hasNext();) {
PropertyValue d = j.next();
if ("braille-charset".equals(d.getProperty()))
; // initial value of braille-charset depends on translator
else if (equal(d, d.getDefault()))
j.remove();
else if (!obflStyleProperties.contains(d.getProperty()))
throw new IllegalStateException("coding error");
}
}
return translator.transform(styledText, from, to);
}

Expand All @@ -179,6 +209,20 @@ public String getTranslatorMode() {
/* UTILITIES */
/* ========= */

private static boolean equal(PropertyValue a, PropertyValue b) {
if (a == null)
return b == null;
else if (b == null)
return false;
else {
if (a.getCSSProperty() != b.getCSSProperty())
return false;
if (!a.toString().equals(b.toString()))
return false;
}
return true;
}

/**
* Convert Translatable specification to text + CSS style. Text attributes are assumed to
* contain only CSS or special variable assignments/tests. Computation of the text-transform
Expand All @@ -194,6 +238,10 @@ protected static Iterable<CSSStyledText> cssStyledTextFromTranslatable(Translata
null);
}

// FIXME: Ideally, this should be a parser based on SupportedOBFLProperties. Note that such a
// parser is created by ObflStyleFunctionProvider (through StyleTransformerImpl), however we can
// not get hold of that parser, and moreover in StyleTransformerImpl the assumption is made that
// parseInlineStyle() will not be called on it.
private final static TextStyleParser cssParser = TextStyleParser.getInstance();
private final static SimpleInlineStyle HYPHENS_AUTO = cssParser.parse("hyphens: auto");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private ObflStyle(StyleTransformer transformer) {
public static class ObflStyleFunctionProvider extends ReflexiveExtensionFunctionProvider {

private static final SupportedBrailleCSS brailleCSS
// using a hack to get hold of SupportedBrailleCSS because BrailleCssParser is not visiblej
// using a hack to get hold of SupportedBrailleCSS because BrailleCssParser is not visible
= TextStyleParser.getInstance().parse("display: block").iterator().next().getSupportedBrailleCSS();

public ObflStyleFunctionProvider() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,19 +517,19 @@
'page'
else
for $s in $page-styles return
(for $p in s:get($s,'counter-increment') return string($p),'page')[1]
(for $p in s:get($s,'counter-increment') return tokenize(string($p),'\s+'),'page')[1]
,
if (empty($volume-begin-page-styles)) then
'pre-page'
else
for $s in $volume-begin-page-styles return
(for $p in s:get($s,'counter-increment') return string($p),'pre-page')[1]
(for $p in s:get($s,'counter-increment') return tokenize(string($p),'\s+'),'pre-page')[1]
,
if (empty($volume-end-page-styles)) then
'post-page'
else
for $s in $volume-end-page-styles return
(for $p in s:get($s,'counter-increment') return string($p),'post-page')[1]
(for $p in s:get($s,'counter-increment') return tokenize(string($p),'\s+'),'post-page')[1]
))"/>

<pxi:eval-counter px:progress=".17">
Expand Down
2 changes: 2 additions & 0 deletions modules/braille/libhyphen-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ mvn generate-resources -Pgenerate-table-files
mv target/generated-resources/tables/* src/main/resources/tables/
cp src/main/resources/tables/hyph_no_NO.dic src/main/resources/tables/hyph_nn_NO.dic
cp src/main/resources/tables/hyph_no_NO.dic src/main/resources/tables/hyph_nb_NO.dic
mv src/main/resources/tables/hyph/hyph-fi.dic src/main/resources/tables/hyph_fi.dic
rm -r src/main/resources/tables/hyph
```


Expand Down
Loading

0 comments on commit a46ebe3

Please sign in to comment.