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.0rc1-py3-none-win_amd64.whl (4.3 MB view details)

Uploaded Python 3Windows x86-64

findent-4.3.0rc1-py3-none-musllinux_1_1_x86_64.whl (4.6 MB view details)

Uploaded Python 3musllinux: musl 1.1+ x86-64

findent-4.3.0rc1-py3-none-musllinux_1_1_i686.whl (4.4 MB view details)

Uploaded Python 3musllinux: musl 1.1+ i686

findent-4.3.0rc1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

findent-4.3.0rc1-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl (3.5 MB view details)

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

findent-4.3.0rc1-py3-none-macosx_11_0_arm64.whl (899.2 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

findent-4.3.0rc1-py3-none-macosx_10_9_x86_64.whl (899.5 kB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file findent-4.3.0rc1-py3-none-win_amd64.whl.

File metadata

  • Download URL: findent-4.3.0rc1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for findent-4.3.0rc1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 17c805cb5f61214b9c26d6548208854964d5f827ce0112a709c987fba8ba6b59
MD5 b86e2830c110e690a1248eda27577976
BLAKE2b-256 ce278497a2a6e812f6cfd2074aa8af96dc1b8b33c6f4e6e2e3bf0e3314620091

See more details on using hashes here.

File details

Details for the file findent-4.3.0rc1-py3-none-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.3.0rc1-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 207adab03dbaa1f9d607e52ccbe606af701dae853dacfe478297a9ea2c221ba7
MD5 ba97f579b44afa582204667ccb261256
BLAKE2b-256 0ed696251a1240011070fb5f18ffd68bb72c64017b7919d940b9b9a8f58649a1

See more details on using hashes here.

File details

Details for the file findent-4.3.0rc1-py3-none-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for findent-4.3.0rc1-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 4da6d7acd0a2008b79b4c7a080db2301c6f7be1462bd025f4c90bf9eab3ce06e
MD5 323068366b80fbecd81bc0ba6ca70109
BLAKE2b-256 f2a09b042cac7133c9fa1a0e1009b8a7993fd6922322894761a0d84714fdc093

See more details on using hashes here.

File details

Details for the file findent-4.3.0rc1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.3.0rc1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b9d545b6a04491b178f99ee43a139b59f896f47e8d348013df6f29501b77024f
MD5 772dcc9953edcd64c6c984a5e4de07b9
BLAKE2b-256 a449c5048d85ed23e8aecd9881bdd343ef45e5ded7f77e86d51d2ff17afe5ddb

See more details on using hashes here.

File details

Details for the file findent-4.3.0rc1-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl.

File metadata

File hashes

Hashes for findent-4.3.0rc1-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl
Algorithm Hash digest
SHA256 16fcf864726c1e0be268378f3836b9e50064db79b847d9b22ac5d592154e1ea6
MD5 0e5a68f3b7ded7937172dd7f4c2466fc
BLAKE2b-256 4974ecdf18c907b243502af00c5daf929223f27a4473c5c18dba64d636ead841

See more details on using hashes here.

File details

Details for the file findent-4.3.0rc1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for findent-4.3.0rc1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fab5a6a2fa6162d702ed34c73e8529b141eaa1ad33ce06de817d734e9b2f017d
MD5 af5633c5f78fab4725031f9bedd27cb5
BLAKE2b-256 2d764c76b8ef58a7eb23aa56506c6ec139e4d7b17335ec658270255ba465d269

See more details on using hashes here.

File details

Details for the file findent-4.3.0rc1-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.3.0rc1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 581986a24b6ca392013576a0cc583fd5468c177023daeac114761f0bbade4142
MD5 a86e4f034802ec846666ec0645aa62cc
BLAKE2b-256 fa909653786b19fd76bc048f0187d072ee1bb7d9a60dbc0be062be35d1402567

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