All Projects → mdolidon → Endlines

mdolidon / Endlines

Licence: apache-2.0
Easy conversion between new-line conventions

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Endlines

Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (+100%)
Mutual labels:  command-line-tool, utility
Infinite-File-Curtailer
Curtail is a utility program that reads stdin and writes to a file bound by size.
Stars: ✭ 23 (-79.46%)
Mutual labels:  utility, command-line-tool
dotfiles
dotfiles symbolic links management CLI
Stars: ✭ 156 (+39.29%)
Mutual labels:  utility, command-line-tool
Graphtage
A semantic diff utility and library for tree-like files such as JSON, JSON5, XML, HTML, YAML, and CSV.
Stars: ✭ 2,062 (+1741.07%)
Mutual labels:  utility, command-line-tool
Nomino
Batch rename utility for developers
Stars: ✭ 282 (+151.79%)
Mutual labels:  command-line-tool, utility
Georaptor
Python Geohash Compression Tool
Stars: ✭ 143 (+27.68%)
Mutual labels:  command-line-tool, utility
gee
🏵 Gee is tool of stdin to each files and stdout. It is similar to the tee command, but there are more functions for convenience. In addition, it was written as go
Stars: ✭ 65 (-41.96%)
Mutual labels:  utility, command-line-tool
Asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Stars: ✭ 1,805 (+1511.61%)
Mutual labels:  utility, command-line-tool
goto
Goto - The Good Way to Program
Stars: ✭ 14 (-87.5%)
Mutual labels:  utility, command-line-tool
json2xml
json to xml converter in python3
Stars: ✭ 76 (-32.14%)
Mutual labels:  utility, command-line-tool
wifiqr
Create a QR code with your Wi-Fi login details
Stars: ✭ 207 (+84.82%)
Mutual labels:  utility, command-line-tool
K2tf
Kubernetes YAML to Terraform HCL converter
Stars: ✭ 477 (+325.89%)
Mutual labels:  command-line-tool, utility
diskusage
FANTASTIC SPEED utility to find out top largest folders/files on the disk.
Stars: ✭ 64 (-42.86%)
Mutual labels:  utility, command-line-tool
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+275.89%)
Mutual labels:  command-line-tool, utility
Text Minimap
Generate text minimap/preview using Braille Patterns
Stars: ✭ 21 (-81.25%)
Mutual labels:  command-line-tool, utility
Project Init
Project templates in rust
Stars: ✭ 104 (-7.14%)
Mutual labels:  command-line-tool
N26
API and CLI to get information of your N26 account
Stars: ✭ 107 (-4.46%)
Mutual labels:  command-line-tool
Awesome Cli
A curated list of awesome resources for building immersive CLI experiences.
Stars: ✭ 104 (-7.14%)
Mutual labels:  command-line-tool
Machina
Network capture library for realtime TCP/IP decoding from a windows application. Includes an extension library to support FFXIV data capture.
Stars: ✭ 102 (-8.93%)
Mutual labels:  utility
Nix Deploy
Deploy software or an entire NixOS system configuration to another NixOS system
Stars: ✭ 111 (-0.89%)
Mutual labels:  command-line-tool
Version 1.9.2 Apache License 2.0

Did your source code get polluted by scattered ^M's ?

Endlines smartly converts text files from and to the following line ending conventions : Unix/Apple (LF), Windows (CRLF) and legacy Apple (CR).

endlines unix *
  • No need to know about the source files' convention. Multiple conventions can be mixed within a single file.
  • Straightforward syntax for multiple files and recursion into directories. Hidden files and directories are skipped by default (you don't want to mess with your .git, do you ?)
  • Binary files will be detected and skipped by default, according to a filter based on both file extension and file content.
  • Files' last access and last modified time stamps can be preserved.
  • UTF-8 files, UTF-16 with BOM as well as all single byte encodings will be treated well. However, UTF-32 is not supported (files will be seen as binary and left untouched).
  • Whether converting or checking, a report is given on the original state of line endings that were found.
    $ endlines check -r .
    endlines : dry run, scanning files

    endlines : 6431 files checked ; found :
                  - 142 No line ending
                  - 1 Legacy Mac (CR)
                  - 6250 Unix (LF)
                  - 37 Windows (CR-LF)
                  - 1 Mixed endings
               2403 binaries skipped
               480 hidden files skipped

Full help screen :

    endlines ACTION [OPTIONS] [FILES]
    
    ACTION can be :
      lf, unix, linux, osx    : convert all endings to LF.
      crlf, windows, win, dos : convert all endings to CR-LF.
      cr, oldmac              : convert all endings to CR.
      check                   : perform a dry run to check current conventions.
    
    If no files are specified, endlines converts from stdin to stdout.
    Supports UTF-8, UTF-16 with BOM, and all major single byte codesets.
    
    General   -f / --final    : add final EOL if none.
              -q / --quiet    : silence all but the error messages.
              -v / --verbose  : print more about what's going on.
              --version       : print version and license.
    
    Files     -b / --binaries : don't skip binary files.
              -h / --hidden   : process hidden files (/directories) too.
              -k / --keepdate : keep last modified and last access times.
              -r / --recurse  : recurse into directories.
    
    Examples  endlines check *.txt
              endlines linux -kr aFolder anotherFolder

Easy installation

The download page offers ready-to-eat options for Linux and Apple users.

Compile your own

  • Local install : make; make test ; if satisfied, move the endlines executable to your local path.
  • Global install : make; make test; sudo make install will put an endlines executable in /usr/local/bin.

Endlines is known to have been compiled and run out of the box on Apple OSX, several Linux distributions and IBM AIX. I provide support for all POSIX compliant operating sytems. I won't provide any support for Windows, but pull requests dealing with it will be welcome.

Credits

In particular to :

  • @imalic3 for reporting a bug in a early dev version
  • @hansaya for patiently guiding me towards AIX friendliness
  • @uuencode for finding a critical bug in 1.6.2
  • @ethicalbanker for spotting an inability to compile on OSX
  • @biziclop for providing an OSX binary
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].