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

Uploaded Python 3Windows x86-64

findent-4.3.5-py3-none-musllinux_1_2_x86_64.whl (4.9 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

findent-4.3.5-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.9 MB view details)

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

findent-4.3.5-py3-none-macosx_14_0_x86_64.whl (783.7 kB view details)

Uploaded Python 3macOS 14.0+ x86-64

findent-4.3.5-py3-none-macosx_14_0_arm64.whl (755.8 kB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: findent-4.3.5-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.5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 443a684e85dee67396fb6db6d6f08461dafbd9b3c0bc446e21cc9d9da9f4df83
MD5 caf10e003674788ec4096dec50ed5c17
BLAKE2b-256 f5f4e79db5701464039121c4ed34eb13cc1b5aeec9a3d0ccffe4716ec9a281a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.5-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a46921dfc4b31f1f4772b79805fbc9d23a05347a431a3e20a2ae7359e04f6f8c
MD5 8ea683aefa2e8c63e77f7a52cd811cd3
BLAKE2b-256 6892fdd1b2f226ad69531a0871ef4a2562f906d04689693360af00af0bb9c70b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.5-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eeabef35ee8a3a1e13b2e2f8224c7f16d451ec1a3698cd08a9b5e4481757623d
MD5 7560b644b93d5e781b9b08aeff08dce8
BLAKE2b-256 fb96ea51b0a8f91195f1b4be725225488ba3fd62f72b1284b714eb9df1c280df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.5-py3-none-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 506760dee2e0cbcf247072c30934b297ff6b6e2f42b97963fd8351509a3c3f5e
MD5 3fe1775b5d60264ce51613c1ed4edfda
BLAKE2b-256 37e441df0e86e4131c10ebdd249503e5e4ffa3a4526bc4e257415d498400e760

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.5-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f4229d7af163013d84883e6bde695406bc577f1a43618d9cc232b002e2fa1208
MD5 37f17a2f49717b5c4757839c2509d8d9
BLAKE2b-256 063e3f05f2c186e760ac309c398911d14184089485898dde5079ec516d8e8d09

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