Skip to content

Aleks-Ya/ascii2native-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ascii2native-maven-plugin

Convert ASCII coded text files to native.

Output example

[INFO] --- ascii2native-maven-plugin:1.4-SNAPSHOT:ascii2native (ascii2native) @ express-api ---
[INFO] Ascii2Native: Process folder: /home/aleks/projects/trans_it/express/express-api/target/site
[INFO] Ascii2Native: Include masks: [*.html]
[INFO] Ascii2Native: Charsets: [UTF-8, windows-1251, ISO-8859-5]
[INFO] Ascii2Native: Found files: 1195
[INFO] Ascii2Native: Wrote files: 233
[INFO] Ascii2Native: Skipped files (no ascii symbols): 962
[INFO] Ascii2Native: Skipped files (read error): 0
[INFO] Ascii2Native: Process time (milliseconds): 596
[INFO] ------------------------------------------------------------------------

Maven dependency

<dependency>
    <groupId>ru.yaal.maven</groupId>
    <artifactId>ascii2native-maven-plugin</artifactId>
    <version>1.3.1</version>
</dependency>

Requirements

  • Java 1.7 or higher
  • Maven 3.3.3 or higher

Version history

Version 1.3.1

  • Fix: save files in the same charset
  • Skip files produces IO errors (was exception)
  • Print file charset in log

Version 1.3

  • Charsets support

Version 1.2

  • Algorithm optimization

Version 1.1

  • First version

Example

Replace ASCII symbols ("\u0410", etc) to native in documentation generated by Maven (mvn site).

<project ...>
    <build>
        <plugins>
            <plugin>
                <groupId>ru.yaal.maven</groupId>
                <artifactId>ascii2native-maven-plugin</artifactId>
                <version>1.3.1</version>
                <configuration>
                    <folder>target/site</folder>
                    <includes>
                        <include>*.html</include>
                    </includes>
                    <charsets>
                        <charset>UTF-8</charset>
                        <charset>windows-1251</charset>
                    </charsets>
                </configuration>
                <executions>
                    <execution>
                        <id>ascii2native</id>
                        <phase>site</phase>
                        <goals>
                            <goal>ascii2native</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

About

Convert ASCII coded text files to native

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages