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
  • Provides wrapper wfindent (wfindent.bat on Windows) for batch file processing
  • vim, gedit, emacs: findent optionally emits configuration files for these editors to use findent as a plugin.
  • GUI frontent available in a separate package: jfindent

Installation

Normal installation using pip

pip install findent

Supported platforms

OS Version Architecture
Linux All with GLIBC 2.27+ x64
MacOS 10.15+ x64
Windows 10 and Server 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 -Rr < 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.2.3-py2.py3-none-win_amd64.whl (4.0 MB view details)

Uploaded Python 2Python 3Windows x86-64

findent-4.2.3-py2.py3-none-manylinux1_x86_64.whl (2.3 MB view details)

Uploaded Python 2Python 3

findent-4.2.3-py2.py3-none-macosx_10_15_x86_64.whl (371.7 kB view details)

Uploaded Python 2Python 3macOS 10.15+ x86-64

File details

Details for the file findent-4.2.3-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: findent-4.2.3-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for findent-4.2.3-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0c00cdc77294d6835ac5162bb75024f529e80a9b686b0bb7cdf8419fb298b8a2
MD5 a9e213c22d36acdb617b76270b02d380
BLAKE2b-256 4ac31645e88895c2653b3449fd11510ac9dbcc268b54ebd2bfab08b8b65fd7fb

See more details on using hashes here.

File details

Details for the file findent-4.2.3-py2.py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.2.3-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f251f7d3b8ee4fe6e15ad8418f629a20cf17b1d16e6e100b9969b5eb071e9017
MD5 c1f7f8f5581e565fc454695585f30195
BLAKE2b-256 f59b3cf190887df40da968ed3327a9d9a967a7dfa546a7d0e41ee6cc1a5c4bac

See more details on using hashes here.

File details

Details for the file findent-4.2.3-py2.py3-none-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for findent-4.2.3-py2.py3-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5c3c5cc2c3d5d4d8a13f916b8701a0a81b4fc7f5de5ea16c90dfad3cbf1650a9
MD5 22586f2602bfb51cc5403d816f763ad3
BLAKE2b-256 9ac5bbc7a81921bb2c3aac0ebd2d796da02093c6edf7c132b2fde3d0748a2cac

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