ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - khusnetdinov/loki: :pencil: Loki is library that includes helpers for building powerful interactive command line applications, tasks, modules.
:pencil: Loki is library that includes helpers for building powerful interactive command line applications, tasks, modules. - khusnetdinov/loki
Visit Site

GitHub - khusnetdinov/loki: :pencil: Loki is library that includes helpers for building powerful interactive command line applications, tasks, modules.

GitHub - khusnetdinov/loki: :pencil: Loki is library that includes helpers for building powerful interactive command line applications, tasks, modules.

Loki Code Triagers Badge Build Status Hex.pm Ebert

Loki is a toolkit for building powerful command-line interfaces.

img

Example

img

Instalation

Add loki to your list of dependencies in mix.exs:

def deps do
  [{:loki, "~> 1.2.2"}]
end

Usage

Import all or desired module to scope:

defmodule Project do
  # Import all modules
  use Loki

  # Or import single modules
  import Loki.Shell
  import Loki.Cmd
  import Loki.Directory
  import Loki.File
  import Loki.FileManipulation

  ...

end

Modules

Loki.Shell

Helpers for interaction with user and printing message to shell.

  • ask/2 - Ask user input with given message. Returns tuple with parsed options.
  • yes?/1 - Ask about positive user input with given message.
  • no?/1 - Ask about negative user input with given message.
  • say/1 - Printing message to shell.
  • say_create/1 - Printing message about create file to shell.
  • say_force/1 - Printing message about force action to shell.
  • say_identical/1 - Printing message about identical files content to shell.
  • say_skip/1 - Printing message about skipping action to shell.
  • say_error/1 - Printing message about to shell.
  • say_conflict/1 - Printing message about conflict to shell.
  • say_exists/1 - Printing message about existance to shell.
  • say_rename/2 - Printing message about rename files to shell.
  • say_copy/2 - Printing message about copy files to shell.
  • say_remove/1 - Printing message about removing file to shell.

Loki.Cmd

Executing terminal commands helpers.

  • execute/1 - Execute shell command with Env variables as options.
  • execute_in_path/2 - Execute shell command with Env variables as options in given path.
  • format_output/1 - Format execution output for reading in shell.

Loki.Directory

Working with folders helpers.

  • create_directory/1 - Helper for create directory.
  • exists_directory?/1 - Helper for checking if file exists.
  • copy_directory/2 - Helper for copy directory.
  • remove_directory/1 - Helper for remove directory.

Loki.File

Helpers for working with file.

  • create_file/1 - Helper for create file.
  • create_file_force/1 - Helper for create file in force mode.
  • exists_file?/1 - Helper check if file exists.
  • identical_file?/2 - Helper check if file identical.
  • copy_file/2 - Helper for copy files.
  • create_link/2 - Helper for create link.
  • remove_file/1 - Helper for remove file.
  • rename/2 - Helper for rename files and dirs.

Loki.FileManipulation

Helpers for content manipulation injecting, appending, and other.

  • append_to_file/2 - Helper appends lines to file.
  • prepend_to_file/2 - Helper prepends lines to file.
  • remove_from_file/2 - Helper removes lines from file.
  • inject_into_file/3 - Helper injecting lines to file with before and after options.
  • replace_in_file/3 - Helper replaces lines in file.
  • comment_in_file/2 - Helper comments line in file.
  • uncomment_in_file/2 - Helper uncomments lines in file.
  • remove_comments_in_file - Helper removes all comments in file.

Documentation

Read hexdocs.pm

Contribution

Clone repo, implement additional helpers, write tests and PR welcome!

License

The gem is available as open source under the terms of the MIT License.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory