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
cppandcocopreprocess 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,#includeand??includestatements
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file findent-4.3.6-py3-none-win_amd64.whl.
File metadata
- Download URL: findent-4.3.6-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8f823626e9a89b56b8c286ec15a86d659b042ca9fdd59f71481e4a922c9b45
|
|
| MD5 |
4355382d4e15171a737cb784bcf54603
|
|
| BLAKE2b-256 |
eed4cbcbe52c7b670b7e8ff888b66037c542dc00a3491c0c4e0afc5585b031c5
|
File details
Details for the file findent-4.3.6-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: findent-4.3.6-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 5.0 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d94c625727f97ccb6f1ebd680d8a6da1af5f43ed0750976d15286a7d2dab24be
|
|
| MD5 |
71e3cef96b9316236a6ebfee23e5fd8e
|
|
| BLAKE2b-256 |
95449020651a448e9b8671acc310717056507866afd2783d2ebf3575fa5ddbfc
|
File details
Details for the file findent-4.3.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: findent-4.3.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: Python 3, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f0e23bfa577682a8360d958b5fa9eab37558a426c1cd9c15ef5cc54146cca2d
|
|
| MD5 |
efdf0f71048886c88b0f40d33c5fa86d
|
|
| BLAKE2b-256 |
e85fcef5f6ce823bf03c196a68b9bf983bc3bce43b20e4e17a5f87c03b853f64
|
File details
Details for the file findent-4.3.6-py3-none-macosx_14_0_x86_64.whl.
File metadata
- Download URL: findent-4.3.6-py3-none-macosx_14_0_x86_64.whl
- Upload date:
- Size: 950.7 kB
- Tags: Python 3, macOS 14.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
605c78220bb5c897971b735be4b944675f0f22c568d0f6dbcb11cbdb52b1bd3c
|
|
| MD5 |
071c62865b6c47892263cc346c67ad3f
|
|
| BLAKE2b-256 |
9aea1eec3f2cb711fb76811ea92cf41eba741970c4a4faa9794f5514eee57f60
|
File details
Details for the file findent-4.3.6-py3-none-macosx_14_0_arm64.whl.
File metadata
- Download URL: findent-4.3.6-py3-none-macosx_14_0_arm64.whl
- Upload date:
- Size: 924.1 kB
- Tags: Python 3, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceb96ceb1a84d143ab9776c19093a9b41480ed2087f47ab08a33b81be6d444e3
|
|
| MD5 |
2c52bba090cfddf1da96658f1795717a
|
|
| BLAKE2b-256 |
c43e0c3fdce2ef783eca0f9ba519145536a9a8503009e373b05a8919789c592c
|