Skip to main content

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

Metadata

Release files for findent 4.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for findent 4.3.6
File
findent-4.3.6-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
findent-4.3.6-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
findent-4.3.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
findent-4.3.6-py3-none-macosx_14_0_x86_64.whl Python 3 none macOS 14.0+ x86-64 Details
findent-4.3.6-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details

Total release size: 14.6 MB

Release files / findent-4.3.6-py3-none-win_amd64.whl

Download URL findent-4.3.6-py3-none-win_amd64.whl
Size 3.6 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
3e8f823626e9a89b56b8c286ec15a86d659b042ca9fdd59f71481e4a922c9b45
BLAKE2b-256 checksum
How to use checksums
eed4cbcbe52c7b670b7e8ff888b66037c542dc00a3491c0c4e0afc5585b031c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / findent-4.3.6-py3-none-musllinux_1_2_x86_64.whl

Download URL findent-4.3.6-py3-none-musllinux_1_2_x86_64.whl
Size 5.0 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
d94c625727f97ccb6f1ebd680d8a6da1af5f43ed0750976d15286a7d2dab24be
BLAKE2b-256 checksum
How to use checksums
95449020651a448e9b8671acc310717056507866afd2783d2ebf3575fa5ddbfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / findent-4.3.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL findent-4.3.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 4.1 MB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
4f0e23bfa577682a8360d958b5fa9eab37558a426c1cd9c15ef5cc54146cca2d
BLAKE2b-256 checksum
How to use checksums
e85fcef5f6ce823bf03c196a68b9bf983bc3bce43b20e4e17a5f87c03b853f64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / findent-4.3.6-py3-none-macosx_14_0_x86_64.whl

Download URL findent-4.3.6-py3-none-macosx_14_0_x86_64.whl
Size 950.7 kB
Tags Python 3 macOS 14.0+ x86-64
SHA-256 checksum
How to use checksums
605c78220bb5c897971b735be4b944675f0f22c568d0f6dbcb11cbdb52b1bd3c
BLAKE2b-256 checksum
How to use checksums
9aea1eec3f2cb711fb76811ea92cf41eba741970c4a4faa9794f5514eee57f60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / findent-4.3.6-py3-none-macosx_14_0_arm64.whl

Download URL findent-4.3.6-py3-none-macosx_14_0_arm64.whl
Size 924.1 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
ceb96ceb1a84d143ab9776c19093a9b41480ed2087f47ab08a33b81be6d444e3
BLAKE2b-256 checksum
How to use checksums
c43e0c3fdce2ef783eca0f9ba519145536a9a8503009e373b05a8919789c592c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page