Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beliavsky/python-scripts-for-fortran
Python scripts to analyze and reformat Fortran code
https://github.com/beliavsky/python-scripts-for-fortran
fortran python tool
Last synced: 10 days ago
JSON representation
Python scripts to analyze and reformat Fortran code
- Host: GitHub
- URL: https://github.com/beliavsky/python-scripts-for-fortran
- Owner: Beliavsky
- License: mit
- Created: 2024-10-27T17:21:10.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-12-27T00:42:45.000Z (about 1 month ago)
- Last Synced: 2024-12-27T01:22:21.893Z (about 1 month ago)
- Topics: fortran, python, tool
- Language: Fortran
- Homepage:
- Size: 481 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python scripts for Fortran
Python scripts to fix, analyze and reformat Fortran code`fortran_procedures.py` has the function
```
def extract_procedures(lines):
""" Extracts subroutine and function definitions from a list of lines of Fortran code. """
````xxsplit_fortran_line.py` has the function
```
def split_fortran_line(line):
""" Splits a Fortran line into code and comment parts, ignoring '!' inside quotes. """
````move_fortran_declarations.py` is a tool by ClaudeAI for fixing Fortran code by moving declarations
before executable statements. ChatGPT o1 can produce code that needs such a fix.`xremove_fortran_continuations.py` has the function
```
def remove_fortran_continuations(code):
"""Convert Fortran continuation lines into single lines."""
````xsplit_fortran_statements.py` has the function
```
def split_fortran_statements(code):
"""Split Fortran statements separated by semicolons into separate lines."""
````xadd_colons_fortran_declarations.py` has the function
```
def add_colon_to_declarations(code):
"""Add :: to Fortran declarations that do not have it."""
```