Skip to content

AlbeyAmakiir/tenpo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tenpo

ilo ni li ilo pi tenpo pi toki pona. ona li pana e tenpo lon toki linja pi ilo sona. nasin ni li tan lipu Leti ni. nimi pi tenpo mun ale li tan lipu Leti ni. ona li kepeken toki ilo Nim.

kin la, tenpo pini la, mi pali e ilo sama lon toki ilo GForth. ilo ni li tan ona kin.

pali

wile:

pali e ilo: ./build.sh

alasa pona

pali en alasa pona: ./test.sh

pona ilo li lukin sama ni:

PASS: tests/tenpolib/tCreateValidTenpo.nim C                       ( 0.67 sec)
PASS: tests/tenpolib/tDaysInMonth.nim C                            ( 0.67 sec)
PASS: tests/tenpolib/tDaysInYear.nim C                             ( 0.67 sec)
...

taso, ona li suli.

open

$ ./build/tenpo
tenpo sike  20
tenpo mun   Pipi
$ ./build/tenpo -so 140.5
20/Pipi/3
$ ./build/tenpo -h
tenpo pi toki pona
Outputs the current date and/or time in toki pona

Usage:
  tenpo [options] [<longitude>]

Options:
  -h --help      this helptext
  -v --version   version info
  -s             include day number
  -o             one-line output

tenpo li ante tan seme?

ilo tenpo ante pi toki pona li pana e tenpo ante. taso, tenpo open pi ilo ni li ante: 2001/03/25 01:21:37 UTC+0. lipu ni li jo e sona mute.


tenpo

A terminal-based calendar, based on the toki pona luni-solar calendar found in this reddit thread, with month names from this other reddit thread. Written in Nim.

Based also on my previous attempt in GForth.

Building

Requirements:

  • nim (Currently 1.4.8)(Website)
  • docopt.nim (Currently 0.6.7)(Website)

Build: ./build.sh

Testing

Build with tests and immediately run them: ./test.sh

Expected output:

PASS: tests/tenpolib/tCreateValidTenpo.nim C                       ( 0.67 sec)
PASS: tests/tenpolib/tDaysInMonth.nim C                            ( 0.67 sec)
PASS: tests/tenpolib/tDaysInYear.nim C                             ( 0.67 sec)
...

etc.

Usage

$ ./build/tenpo
tenpo sike  20
tenpo mun   Pipi
$ ./build/tenpo -so 140.5
20/Pipi/3
$ ./build/tenpo -h
tenpo pi toki pona
Outputs the current date and/or time in toki pona

Usage:
  tenpo [options] [<longitude>]

Options:
  -h --help      this helptext
  -v --version   version info
  -s             include day number
  -o             one-line output

Why is the date wrong?

If you're comparing to other toki pona calendar tools, note that this one uses a different dateline and slightly different origin time: 2001/03/25 01:21:37 UTC+0. More details in the wiki.

About

ilo pi tenpo pi toki pona tawa linja pi ilo toki tan ilo sona mute. Cross-platform toki pona lunisolar calendar and clock for the command-line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published