An open API service indexing awesome lists of open source software.

https://github.com/kaushalmodi/strfmt

A string formatting module for Nim, inspired by Python's .format
https://github.com/kaushalmodi/strfmt

format nim python string string-formatting

Last synced: 25 days ago
JSON representation

A string formatting module for Nim, inspired by Python's .format

Awesome Lists containing this project

README

          

* Fork
This repo is a *fork* of the original ~strfmt~ repo by *lyro* (Frank
Fischer) at https://bitbucket.org/lyro/strfmt/.

I do not claim any authorship of this awesome project. I forked it
because I am more comfortable with /git/ than /mercurial/ (which is
used for the original repo), and I wanted to make this project work
once again on Nim /devel/ (2018-06-28).

-----

* Introduction
=strfmt= is a small string formatting library for the [[http://nim-lang.org][Nim]] programming
language similar to Python's [[https://docs.python.org/3.4/library/functions.html#format][=format=]].
* Installation
** Original
To install the original ~strfmt~, do:
#+begin_example
nimble install strfmt
#+end_example
** This fork
To install this forked version, do:
#+begin_example
nimble install https://github.com/kaushalmodi/strfmt
#+end_example
* Documentation
The module is described in this [[https://kaushalmodi.github.io/strfmt/][reference documentation]].

The documentation is written in [[https://orgmode.org/][Org mode]].
- [[https://pandoc.org/][Pandoc]] is then used to convert /Org/ to /ReStructuredText/.
- ~nim doc~ is then used to generate the final HTML documentation that
includes the documentation converted from Org and the doc-strings in
~strfmt.nim~.

To generate this documentation locally, do ~nimble docs~. You will
find an ~index.html~ generated in the ~docs/~ directory.
** ~nimble docs~ Requirements
- Pandoc 2.6
* Development
To run the tests, clone this repo, cd to the repo directory and run:
#+begin_example
nimble test
#+end_example