findent: powerful Fortran formatter
Project description
findent: powerful Fortran formatter
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
andcoco
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file findent-4.3.1-py3-none-win_amd64.whl
.
File metadata
- Download URL: findent-4.3.1-py3-none-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb77d1530472a3a65917b76f49c25274ed12215e409cf28e24a2c3bcd4766e05 |
|
MD5 | fa7307e3d4fc649f301c576825835134 |
|
BLAKE2b-256 | 442a7e250ecf960351ddce5d1854fb2063e7f6b64fbf02d5e72dbc62f3b9f1a6 |
File details
Details for the file findent-4.3.1-py3-none-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: findent-4.3.1-py3-none-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: Python 3, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd1f3af19152e33a1b8cb933b34cb62bbaddfd856b7c8c51bf39b9c34d33393d |
|
MD5 | add090069695f61a9afcbd8e685007c8 |
|
BLAKE2b-256 | a58d82f80199e528afed263f217eebb47262d5245dbde6a7c6936e091e1b7163 |
File details
Details for the file findent-4.3.1-py3-none-musllinux_1_1_i686.whl
.
File metadata
- Download URL: findent-4.3.1-py3-none-musllinux_1_1_i686.whl
- Upload date:
- Size: 4.4 MB
- Tags: Python 3, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cea01d7050312725c238fd6a831a1387257def00a0edcb47c73dca6784cdb97 |
|
MD5 | 3a65f2f94c28a741be575da5cbb4a557 |
|
BLAKE2b-256 | 534566c8c3bc196e74587f60729506f288dfa4457b3728b46f04f8a7af631772 |
File details
Details for the file findent-4.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
.
File metadata
- Download URL: findent-4.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73ff105013036900077b2426a8c27a8e0451831a03ec4b9fc0b9ea6ec2a0205c |
|
MD5 | 622b67eddb79084bd8c238811936d8f8 |
|
BLAKE2b-256 | 3d0bcfaf5daac807a8741f578091057ae9239ec15eeb0eb93996b3eaa1372682 |
File details
Details for the file findent-4.3.1-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl
.
File metadata
- Download URL: findent-4.3.1-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl
- Upload date:
- Size: 3.5 MB
- Tags: Python 3, manylinux: glibc 2.12+ i686, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02c62914df1d442e800decffdbe60c84b0936132b9c70fb8c7e3dc8932235982 |
|
MD5 | bd1421e0a5a04b25c6819c457c6593e9 |
|
BLAKE2b-256 | e074e50106083328f25ccac10036b91b3fc510367c5e202402d3d35424ed4985 |
File details
Details for the file findent-4.3.1-py3-none-macosx_11_0_arm64.whl
.
File metadata
- Download URL: findent-4.3.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 946.2 kB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1585c648f508f7c46259d2b7f3091c397a1745ce5205c1c47771a286797657b1 |
|
MD5 | 154e43095c0b3b980400814490575cfd |
|
BLAKE2b-256 | 666cd98e305d354fec7353ee8d9d76c98f3298ea8cce691a53708c5c1b169550 |
File details
Details for the file findent-4.3.1-py3-none-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: findent-4.3.1-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 946.4 kB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0399f1114882260379bf3ed324076eb810baeead0f07550ac8ca03e347a0aec7 |
|
MD5 | 193f94585eb28e3436ccdfe20fbe2d6c |
|
BLAKE2b-256 | 7598cd44e360f110815e289f6c78c1f187a6d8ca6a144e571c01ca29cae4a68c |