Skip to content
/ nitron Public

A multilingual code normalizer application/library

License

Notifications You must be signed in to change notification settings

Durun/nitron

Repository files navigation

nitron

A multilingual code normalizer application/library.

Requirement

  • Java 11 or later
  • srcML (optional)

To use as a Library

nitron is distributed through JitPack

implementation 'com.github.Durun:nitron:version'

nitron as a library Guide (Japanese)

To use as an Application

  1. Clone this repository

    *Don't forget '--recursive' option.

    git clone --recursive https://github.com/Durun/nitron.git
    
  2. Prepare JAR file

  3. Place the config files

    Copy config directory into the same directory with nitron.jar . As below

    WorkingDir/
    ├ config/
    └ nitron.jar
    
  4. Run the JAR file

    Run java -jar nitron.jar [COMMAND] [OPTIONS] [ARGS] on JVM 11 or higher

Command reference

preparse-register

  • Command: preparse-register
  • Options:
  • Args:
    1. Database file named cache.db to save parsetrees
  • Usage: preparse-register --lang java --remote https://github.com/githubtraining/hellogitworld cache.db

for detail: RegisterCommand.kt

preparse-fetch

  • Command: preparse-fetch
  • Options:
    • --dir (optional: default=tmp) Working directory to clone the repository
    • --branch (optional: default=masterormain) Branch to analyze
    • --start-date dd:mm:yyyy --end-date dd:mm:yyyy (optional) filter commits by date
  • Args:
    1. Database file named cache.db to save parsetrees
  • Usage: preparse-fetch --branch master --start-date 01:01:2012 cache.db

for detail: FetchCommand.kt

preparse

  • Command: preparse
  • Options:
    • --repository Repository URL to analyze
    • --dir (optional: default=tmp) Working directory to clone the repository
    • --start-date dd:mm:yyyy --end-date dd:mm:yyyy (optional) filter commits by date
  • Args:
    1. Database file named cache.db to save parsetrees
  • Usage: preparse --repository https://github.com/githubtraining/hellogitworld cache.db

for detail: ParseCommand.kt