Skip to content

yuuhikaze/tern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tern

Tern is a modular batch conversion interface

Disclaimer

Tern is now in a usable status (beta), so no guarantees; also, some features are incomplete.

Features

  • Recursively scans and converts files from a specified directory
  • Incrementally updates converted files
  • Converter: Outsources conversion work to an external program (scriptable through Lua)
  • Stores and manages options related to the external program
  • Converts only modified files and allows to select files through git ignore patterns
  • Destination of output files is customizable

Installation

  1. Clone the repository and cd into it
  2. Run: cargo install --path . --locked

Ensure you have the latest nightly compiler, tested on 1.85.0-nightly

Usage

Converters are manually created by the user and must be placed under converters found in the project's data directory.

tern # Runs configured conversion engines; if there is no such configuration, `tern` is resolved to `tern --profile-manager`
tern -h # Prints help

Demo

-- /home/user/.local/share/tern/converters/pandoc.lua
function concat_with_space(...)
  return table.concat({...}, " ")
end

function convert(input, output, options)
    local command = concat_with_space("pandoc", options[1], input, "-o", output)
    return os.execute(command)
end

return convert

[VIDEO HERE]

About

Modular batch conversion interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published