No description
Find a file
2016-05-17 15:26:50 +08:00
src Prints code lines before comments and blanks 2016-05-17 15:26:50 +08:00
.gitignore reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
.travis.yml added files flag fixes: #19 2015-11-26 22:32:13 +00:00
Cargo.lock updated cargo.lock 2016-05-13 22:25:19 +01:00
Cargo.toml updated dependencies 2016-05-13 22:22:37 +01:00
CHANGELOG.md version 2.0 2016-05-13 22:16:05 +01:00
cli.yml updated dependencies 2016-05-13 22:22:37 +01:00
CONTRIBUTING.md reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
CONTRIBUTORS.md Added Luthaf to CONTRIBUTORS.md 2015-09-22 09:59:11 +01:00
LICENCE-APACHE reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
LICENCE-MIT reimplemented comment syntax again, added OCaml, and Standard ML 2016-01-26 20:23:21 +00:00
README.md Update README.md 2016-05-16 18:25:38 +01:00

Tokei (時計)

GitHub License

A blazingly fast CLOC(Count Lines Of Code) program, written in Rust.

Canonical Source

The canonical source of this repo is hosted on GitHub. If you have a GitHub account, please make your issues, and pull requests there.

Installation

Automatic

If you have cargo 0.6.0>= installed just run the cargo install command.

$ cargo install tokei

Manual

Fedora 64 bit

Install rust and cargo from either the official page or use a copr repo such as Rust

$ dnf copr enable phnxrbrn/tokei
$ dnf install tokei

Other

$ git clone https://github.com/Aaronepower/tokei.git
$ cd tokei
$ cargo build --release
Linux
# sudo mv target/release/tokei /usr/local/bin
OSX
# sudo mv target/release/tokei /usr/local/bin/tokei
Windows
  • Create a folder for tokei
  • search for env
  • open "edit your enviroment variables"
  • edit PATH
  • append folder path to the end of the string ie: <path_stuff_here>;C:/tokei/;

Usage

To use tokei, use must add it to your path. Then you can call tokei like so

$ tokei ./path/to/code

Options

Tokei 2.0.0
Aaron P. <theaaronepower@gmail.com>
Count code, quickly.

USAGE:
    Tokei [FLAGS] [OPTIONS] <input>...

FLAGS:
    -f, --files        Will print out the files found only recommended for debugging purposes
    -h, --help         Prints help information
    -l, --languages    prints out supported languages and their extensions
    -V, --version      Prints version information

OPTIONS:
    -e, --exclude <exclude>    Will ignore all files and directories containing the word ie --exclude node_modules
    -s, --sort <sort>          Will sort based on a certain column ie --sort=files will sort by file count. [values: files, total, blanks, code, commments]

ARGS:
    <input>...    The input file(s)/directory(ies)

Supported Languages

If there is a language that you want added submit a pull request with the following information

  • Name of language
  • File Extension
  • The comment syntax (Does it have block comments? is it the same as C?)
ActionScript
Assembly
BASH
Batch
C
C Header
Clojure
CoffeeScript
ColdFusion
ColdFusion CFScript
Coq
C++
C++ Header
C#
C Shell
CSS
D
Dart
Device Tree
Erlang
FORTRAN Legacy
FORTRAN Modern
Go
Haskell
HTML
Idris
JAI
Java
JavaScript
Julia
JSON
JSX
Kotlin
LESS
LD Script
LISP
Lua
Makefile
Markdown
Mustache
Nim
Objective C
Objective C++
OCaml
Oz
Pascal
Perl
Polly
PHP
Protocol Buffers
Prolog
Python
QCL
R
Ruby
Ruby HTML
Rust
Sass
Standard ML
SQL
Swift
TeX
Plain Text
TOML
TypeScript
Vim Script
Unreal Script
Wolfram
XML
YAML
Zsh

Common issues

Tokei says I have a lot of D code, but I know there is no D code!

This is likely due to gcc generating .d files. Until the D people decide on a different file extension, you can always exclude .d files using the -e --exclude flag like so

$ tokei . -e .d

(C) Copyright 2015 by Aaron Power and contributors

See CONTRIBUTORS.md for a full list of contributors.

Tokei is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENCE-APACHE, LICENCE-MIT for more information.