Skip to main content

findent: powerful Fortran formatter

Project description

PyPI Latest Release PyPi release

findent: powerful Fortran formatter

alt

What is it?

findent indents/beautifies/converts and can optionally generate the dependencies of Fortran sources.

Features

  • Supports Fortran-66 up to Fortran-2018
  • Converts from Fixed Form to Free Form and vice-versa
  • Honours cpp and coco preprocess statements
  • Honours OpenMP conditionals
  • Validated against all constructs in 'Modern Fortran explained, Incorporating Fortran 2018, Metcalf e.a.'
  • Supported platformrs: Unix and Windows
  • High speed: 50K - 100K lines per second
  • vim, gedit, emacs: findent optionally emits configuration files for these editors to use findent as a plugin.

Installation

Normal installation using pip

pip install findent

Supported platforms

OS Architecture
Linux x64, arm64, i686, aarch64, ppc64, s390x
MacOS x64, arm64
Windows x64

Examples

Format file in.f90 to out.f90

findent < in.f90 > out.f90

Format with 4-space indentation and convert Fixed Form in.f to Free Form out.f90

findent -i4 -ofree < in.f > out.f90

Format and refactor all files with .f extension in the current directory

wfindent -i4 -Rr *.f

Generating Fortran source dependencies for use in Makefile

findent will generate a dependency list for:

  • definitions and uses of modules and submodules
  • include, #include and ??include statements

In your Makefile add something similar to:

findent --makefdeps > makefdeps
chmod +x makefdeps

include deps
dep deps:
  ./makefdeps *.f90 > deps

The flag --makefdeps generates a script in the standard output. Depending on your usecase the script might not suffice and you will need to write your own version.

Editor incorporation

(G) VIM users

Installation instructions:

findent --vim_help

Documentation:

:help equalprg

:help indentexpr

GEDIT users

Installation instructions:

findent --gedit_help

EMACS users

Installation instructions:

findent --emacs_help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

findent-4.2.6.post0-py3-none-win_amd64.whl (4.3 MB view details)

Uploaded Python 3Windows x86-64

findent-4.2.6.post0-py3-none-musllinux_1_1_x86_64.whl (4.5 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

findent-4.2.6.post0-py3-none-musllinux_1_1_i686.whl (4.4 MB view details)

Uploaded Python 3musllinux: musl 1.1+ i686

findent-4.2.6.post0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

findent-4.2.6.post0-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl (2.9 MB view details)

Uploaded Python 3manylinux: glibc 2.12+ i686manylinux: glibc 2.17+ i686

findent-4.2.6.post0-py3-none-macosx_11_0_arm64.whl (340.0 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

findent-4.2.6.post0-py3-none-macosx_10_9_x86_64.whl (340.1 kB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file findent-4.2.6.post0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for findent-4.2.6.post0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a69e96aab48f98a135db55dbea5fd77d71c1e399cdbb811027ccaf06bc1d3a72
MD5 0e2011076f6dc6775b0f4d31879405e7
BLAKE2b-256 fca3c6c1900b50d82362f13f68a46cc0811f00df31d1b11453956ee88793f66b

See more details on using hashes here.

File details

Details for the file findent-4.2.6.post0-py3-none-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.2.6.post0-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 3b5019a4bdc78d5a7efbd7c7b84485473e15285a9fbdd6a4c0048dbcb6c1a089
MD5 8efb171432570376d625818008455cab
BLAKE2b-256 3dd96aa7935286668ff359f1cc319ed5c29e14f6fbe64e627e8d9db98d1188fe

See more details on using hashes here.

File details

Details for the file findent-4.2.6.post0-py3-none-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for findent-4.2.6.post0-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 e2c54390992b49e33a747d88d9da0a02bfc3d4860167f7380c12fbc9bc9b808d
MD5 786f6783a97ff4f11642d81a8a8a5335
BLAKE2b-256 c36c8e34030f533e88894fe712b58257bb97788929870e637b17e0efe187b90a

See more details on using hashes here.

File details

Details for the file findent-4.2.6.post0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.2.6.post0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 36bb8358349f6bea622d8c4e2963a4b13750bbed566e66aac152cf6ee5dc9a82
MD5 9a65bed2e55dc0951453ba4e3a90ea35
BLAKE2b-256 6d566406072b5bdd5c521e00daaab24d06defc438c62259856a6684ff5a92e60

See more details on using hashes here.

File details

Details for the file findent-4.2.6.post0-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl.

File metadata

File hashes

Hashes for findent-4.2.6.post0-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl
Algorithm Hash digest
SHA256 ab547dfbd2e44d8b118d53f24ee545b2d8bda63ff7768422adef78cf159cdc17
MD5 35c44cbbc8f7c14df3eadb61df5c8c49
BLAKE2b-256 784038d8cbeb776d454ca9561ab181563d84fdf40812c783746459914daa0f4c

See more details on using hashes here.

File details

Details for the file findent-4.2.6.post0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for findent-4.2.6.post0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b1989ba96a792d41b656c2ed7547d5dba25d75baaf74396a0b49757526437b2
MD5 1a40c13182f8573003edfb6365d29543
BLAKE2b-256 cf8b2d13801a5cdeb03795961f105270f0ae04f8246f42a3ab580ca1212437e3

See more details on using hashes here.

File details

Details for the file findent-4.2.6.post0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.2.6.post0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7db3ebb00ff19d69c9dd784e4681c64ac63f1cda5b02eb005248d5c25dda0ccf
MD5 3d61e3fa86e0364de8b0ee8b02487f74
BLAKE2b-256 e6b24f90c08b548d2215a7b97e51b3cdbd610f1adc7bd704afcd312f2e60a55d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page