[![PyPI Latest Release](https://img.shields.io/pypi/v/findent.svg)](https://pypi.org/project/findent/)
[![PyPi release](https://github.com/gnikit/findent-pypi/actions/workflows/main.yml/badge.svg)](https://github.com/gnikit/findent-pypi/actions/workflows/main.yml)
# findent: powerful Fortran formatter
![alt](https://raw.githubusercontent.com/gnikit/findent-pypi/main/doc/findent-demo.gif)
## 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
```sh
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`
```sh
findent < in.f90 > out.f90
```
### Format with 4-space indentation and convert Fixed Form `in.f` to Free Form `out.f90`
```sh
findent -i4 -ofree < in.f > out.f90
```
### Format and refactor all files with `.f` extension in the current directory
```sh
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:
```Makefile
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:
```sh
findent --vim_help
```
Documentation:
`:help equalprg`
`:help indentexpr`
<!-- - vim/README -->
<!-- - and the comments in the files vim/findent.vim and vim/fortran.vim -->
### GEDIT users
Installation instructions:
```sh
findent --gedit_help
```
### EMACS users
Installation instructions:
```sh
findent --emacs_help
```
Raw data
{
"_id": null,
"home_page": "https://github.com/wvermin/findent",
"name": "findent",
"maintainer": "Giannis Nikiteas",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "fortran,formatter,format converter,dependency generator",
"author": "Willem Vermin",
"author_email": "",
"download_url": "",
"platform": "Posix",
"description": "[![PyPI Latest Release](https://img.shields.io/pypi/v/findent.svg)](https://pypi.org/project/findent/)\n[![PyPi release](https://github.com/gnikit/findent-pypi/actions/workflows/main.yml/badge.svg)](https://github.com/gnikit/findent-pypi/actions/workflows/main.yml)\n\n# findent: powerful Fortran formatter\n\n![alt](https://raw.githubusercontent.com/gnikit/findent-pypi/main/doc/findent-demo.gif)\n\n## What is it?\n\n**findent** indents/beautifies/converts and can optionally generate the dependencies of Fortran sources.\n\n## Features\n\n- Supports Fortran-66 up to Fortran-2018\n- Converts from Fixed Form to Free Form and vice-versa\n- Honours `cpp` and `coco` preprocess statements\n- Honours OpenMP conditionals\n- Validated against all constructs in\n 'Modern Fortran explained, Incorporating Fortran 2018, Metcalf e.a.'\n- Supported platformrs: Unix and Windows\n- High speed: 50K - 100K lines per second\n- vim, gedit, emacs: findent optionally emits configuration files\n for these editors to use findent as a plugin.\n\n## Installation\n\nNormal installation using pip\n\n```sh\npip install findent\n```\n\n## Supported platforms\n\n| OS | Architecture |\n| ------- | --------------------------------------- |\n| Linux | x64, arm64, i686, aarch64, ppc64, s390x |\n| MacOS | x64, arm64 |\n| Windows | x64 |\n\n## Examples\n\n### Format file `in.f90` to `out.f90`\n\n```sh\nfindent < in.f90 > out.f90\n```\n\n### Format with 4-space indentation and convert Fixed Form `in.f` to Free Form `out.f90`\n\n```sh\nfindent -i4 -ofree < in.f > out.f90\n```\n\n### Format and refactor all files with `.f` extension in the current directory\n\n```sh\nwfindent -i4 -Rr *.f\n```\n\n### Generating Fortran source dependencies for use in Makefile\n\n**findent** will generate a dependency list for:\n\n- definitions and uses of modules and submodules\n- `include`, `#include` and `??include` statements\n\nIn your Makefile add something similar to:\n\n```Makefile\nfindent --makefdeps > makefdeps\nchmod +x makefdeps\n\ninclude deps\ndep deps:\n ./makefdeps *.f90 > deps\n```\n\nThe flag `--makefdeps` generates a script in the standard output.\nDepending on your usecase the script might not suffice and you will need to write your own version.\n\n## Editor incorporation\n\n### (G) VIM users\n\nInstallation instructions:\n\n```sh\nfindent --vim_help\n```\n\nDocumentation:\n\n`:help equalprg`\n\n`:help indentexpr`\n\n<!-- - vim/README -->\n<!-- - and the comments in the files vim/findent.vim and vim/fortran.vim -->\n\n### GEDIT users\n\nInstallation instructions:\n\n```sh\nfindent --gedit_help\n```\n\n### EMACS users\n\nInstallation instructions:\n\n```sh\nfindent --emacs_help\n```\n",
"bugtrack_url": null,
"license": "BSD License 2.0",
"summary": "findent: powerful Fortran formatter",
"version": "4.3.1",
"project_urls": {
"Homepage": "https://github.com/wvermin/findent"
},
"split_keywords": [
"fortran",
"formatter",
"format converter",
"dependency generator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7598cd44e360f110815e289f6c78c1f187a6d8ca6a144e571c01ca29cae4a68c",
"md5": "193f94585eb28e3436ccdfe20fbe2d6c",
"sha256": "0399f1114882260379bf3ed324076eb810baeead0f07550ac8ca03e347a0aec7"
},
"downloads": -1,
"filename": "findent-4.3.1-py3-none-macosx_10_9_x86_64.whl",
"has_sig": false,
"md5_digest": "193f94585eb28e3436ccdfe20fbe2d6c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 946355,
"upload_time": "2024-01-27T18:30:25",
"upload_time_iso_8601": "2024-01-27T18:30:25.658541Z",
"url": "https://files.pythonhosted.org/packages/75/98/cd44e360f110815e289f6c78c1f187a6d8ca6a144e571c01ca29cae4a68c/findent-4.3.1-py3-none-macosx_10_9_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "666cd98e305d354fec7353ee8d9d76c98f3298ea8cce691a53708c5c1b169550",
"md5": "154e43095c0b3b980400814490575cfd",
"sha256": "1585c648f508f7c46259d2b7f3091c397a1745ce5205c1c47771a286797657b1"
},
"downloads": -1,
"filename": "findent-4.3.1-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "154e43095c0b3b980400814490575cfd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 946208,
"upload_time": "2024-01-27T18:30:27",
"upload_time_iso_8601": "2024-01-27T18:30:27.588501Z",
"url": "https://files.pythonhosted.org/packages/66/6c/d98e305d354fec7353ee8d9d76c98f3298ea8cce691a53708c5c1b169550/findent-4.3.1-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e074e50106083328f25ccac10036b91b3fc510367c5e202402d3d35424ed4985",
"md5": "bd1421e0a5a04b25c6819c457c6593e9",
"sha256": "02c62914df1d442e800decffdbe60c84b0936132b9c70fb8c7e3dc8932235982"
},
"downloads": -1,
"filename": "findent-4.3.1-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl",
"has_sig": false,
"md5_digest": "bd1421e0a5a04b25c6819c457c6593e9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3506062,
"upload_time": "2024-01-27T18:30:29",
"upload_time_iso_8601": "2024-01-27T18:30:29.223462Z",
"url": "https://files.pythonhosted.org/packages/e0/74/e50106083328f25ccac10036b91b3fc510367c5e202402d3d35424ed4985/findent-4.3.1-py3-none-manylinux2010_i686.manylinux2014_i686.manylinux_2_12_i686.manylinux_2_17_i686.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3d0bcfaf5daac807a8741f578091057ae9239ec15eeb0eb93996b3eaa1372682",
"md5": "622b67eddb79084bd8c238811936d8f8",
"sha256": "73ff105013036900077b2426a8c27a8e0451831a03ec4b9fc0b9ea6ec2a0205c"
},
"downloads": -1,
"filename": "findent-4.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
"has_sig": false,
"md5_digest": "622b67eddb79084bd8c238811936d8f8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3603744,
"upload_time": "2024-01-27T18:30:30",
"upload_time_iso_8601": "2024-01-27T18:30:30.828166Z",
"url": "https://files.pythonhosted.org/packages/3d/0b/cfaf5daac807a8741f578091057ae9239ec15eeb0eb93996b3eaa1372682/findent-4.3.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "534566c8c3bc196e74587f60729506f288dfa4457b3728b46f04f8a7af631772",
"md5": "3a65f2f94c28a741be575da5cbb4a557",
"sha256": "6cea01d7050312725c238fd6a831a1387257def00a0edcb47c73dca6784cdb97"
},
"downloads": -1,
"filename": "findent-4.3.1-py3-none-musllinux_1_1_i686.whl",
"has_sig": false,
"md5_digest": "3a65f2f94c28a741be575da5cbb4a557",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 4395431,
"upload_time": "2024-01-27T18:30:32",
"upload_time_iso_8601": "2024-01-27T18:30:32.595822Z",
"url": "https://files.pythonhosted.org/packages/53/45/66c8c3bc196e74587f60729506f288dfa4457b3728b46f04f8a7af631772/findent-4.3.1-py3-none-musllinux_1_1_i686.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a58d82f80199e528afed263f217eebb47262d5245dbde6a7c6936e091e1b7163",
"md5": "add090069695f61a9afcbd8e685007c8",
"sha256": "dd1f3af19152e33a1b8cb933b34cb62bbaddfd856b7c8c51bf39b9c34d33393d"
},
"downloads": -1,
"filename": "findent-4.3.1-py3-none-musllinux_1_1_x86_64.whl",
"has_sig": false,
"md5_digest": "add090069695f61a9afcbd8e685007c8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 4553072,
"upload_time": "2024-01-27T18:30:34",
"upload_time_iso_8601": "2024-01-27T18:30:34.719460Z",
"url": "https://files.pythonhosted.org/packages/a5/8d/82f80199e528afed263f217eebb47262d5245dbde6a7c6936e091e1b7163/findent-4.3.1-py3-none-musllinux_1_1_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "442a7e250ecf960351ddce5d1854fb2063e7f6b64fbf02d5e72dbc62f3b9f1a6",
"md5": "fa7307e3d4fc649f301c576825835134",
"sha256": "eb77d1530472a3a65917b76f49c25274ed12215e409cf28e24a2c3bcd4766e05"
},
"downloads": -1,
"filename": "findent-4.3.1-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "fa7307e3d4fc649f301c576825835134",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3835449,
"upload_time": "2024-01-27T18:30:36",
"upload_time_iso_8601": "2024-01-27T18:30:36.159465Z",
"url": "https://files.pythonhosted.org/packages/44/2a/7e250ecf960351ddce5d1854fb2063e7f6b64fbf02d5e72dbc62f3b9f1a6/findent-4.3.1-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-27 18:30:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wvermin",
"github_project": "findent",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "findent"
}