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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.1+ x86-64

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

Uploaded Python 3musllinux: musl 1.1+ i686

findent-4.3.0-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.0-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.0-py3-none-macosx_11_0_arm64.whl (899.3 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

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

Uploaded Python 3macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: findent-4.3.0-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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 6d2aa55a366190be065ba5000fc34699ae9b121caf399309584cd7762093dc65
MD5 ac0c8746cb7a424aef7bba6948fe33a6
BLAKE2b-256 f455b94a0d098e6fb1430482c9a66eaa72e6e1c0cf1e45e973a40c5e3c155766

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.0-py3-none-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 9493fc7ed19d0918208051f348f56584a57037b82f8f06cf7aae4c7f478dcdc4
MD5 d462ebc273213ecdedbdcc616ce8e2d0
BLAKE2b-256 01eec060c5af23d71acb994f6c3e1ff6f1245846635aae92d8a1d9e3626c53ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.0-py3-none-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 dc9a1366815fdf76559e32b01d380462d49b1a34a1e0303c0f3ed8cb306992b2
MD5 e8ccdcb994565ef914d1cb85f24eb63d
BLAKE2b-256 fdc7098e1c1d2e07c9701dac533bc962ce3afdc6f4af4b3945ef3082206c8d58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 eaab029010849347fee59859ea152de80051c9f70c7bfe19c25ceb615775b600
MD5 80784042498c92eb3237b4c186a5ff8e
BLAKE2b-256 ec05f51f760b2d3f5a6427ebbbdf2db5f748b9689215ef6aeb6994429e14d0e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.0-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl
Algorithm Hash digest
SHA256 f00c212a3bba07018757aa4de6a842f092a1044562e47077317fc3f01fd9b98e
MD5 92d3167875ef920c0580123492a0524b
BLAKE2b-256 10e7f85e973119de5da02cc84bb9a170cf06dea5f2c02465169e58328f1f3628

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fdee6114adc48b494cb0eae759ab7c359679df4fe3edff2f841b27d3093f0652
MD5 55e29796fddf919ed8a17d886773161c
BLAKE2b-256 7bff62bc97388a496bd6d40ad6e907954c633ab7d4f0fc9a6aa55cfca2611a58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for findent-4.3.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 79d06f86b4824f3d4486bc06da958bc5430571e217177c0d282076a8fc6a4816
MD5 10aa95c056ed778901e15d8eac8f177b
BLAKE2b-256 66351abbfbc6b6c867067e85408ce1ea306fc63cd0d717ac8263734ad900bd5e

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