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.3.2-py3-none-win_amd64.whl (3.6 MB view details)

Uploaded Python 3Windows x86-64

findent-4.3.2-py3-none-musllinux_1_2_x86_64.whl (5.0 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

findent-4.3.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.0 MB view details)

Uploaded Python 3manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

findent-4.3.2-py3-none-macosx_14_0_x86_64.whl (940.9 kB view details)

Uploaded Python 3macOS 14.0+ x86-64

findent-4.3.2-py3-none-macosx_14_0_arm64.whl (916.3 kB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file findent-4.3.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: findent-4.3.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for findent-4.3.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9f3957d81d2535c423496526b7d58113eb3fc35b743c8e1f1f5d669a709654d5
MD5 ddacca4baee7f6aa17b93e5ed7f7392e
BLAKE2b-256 66b05861ba2affbe4deb997d19654902a16ccbcc2676854d917b8f9be196614c

See more details on using hashes here.

File details

Details for the file findent-4.3.2-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.3.2-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5bd0e5400e7b045dc8bbe3e39fe73a382b812986be68c44af2a8302ce428da59
MD5 e989e0b9628bb8a4ddb1cdbc1647291a
BLAKE2b-256 8992a5dc8cd1f46058b23502e9ba711818ede691706df7ae565e4e30881d209e

See more details on using hashes here.

File details

Details for the file findent-4.3.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.3.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b62d97a851d216cec249cd15b30e1dcdc8b63e73cd3c8eeb35b96277848b05f
MD5 a7e78d6fb279fe48598e775665a6edea
BLAKE2b-256 0e94401421e8e667a21998c56d1ce823ff3441c08a6346c22f40901d74d7a6b6

See more details on using hashes here.

File details

Details for the file findent-4.3.2-py3-none-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.3.2-py3-none-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 d9612c02f68e4dc53ae9e91920eadbbd4c591c5878d756a7d86188329c07c977
MD5 7074af4896b4a8d9ff9895aaac7dfb59
BLAKE2b-256 1248e0132812a99549959a4c535e7f15ae41fafd9f7cda7bca44a90718c69488

See more details on using hashes here.

File details

Details for the file findent-4.3.2-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for findent-4.3.2-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4b90a68adce7f6ff94b6b3e249f3fdfe0da8389ea228627190888a6509ac3bc0
MD5 e3955b515c74d00a475aad8332f934b0
BLAKE2b-256 115d2b4aac0d0437c1c0632030d34e635e8edd8cbc89c29ad3c037c59820dc96

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