{"id":18854363,"url":"https://github.com/urbanjost/m_io","last_synced_at":"2026-02-26T18:10:29.564Z","repository":{"id":117558061,"uuid":"238361960","full_name":"urbanjost/M_io","owner":"urbanjost","description":"A collection of procedures that create a simple interface for common I/O tasks not conveniently done with intrinsic I/O procedures","archived":false,"fork":false,"pushed_at":"2024-03-30T00:15:55.000Z","size":5175,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-30T18:28:07.443Z","etag":null,"topics":["fortran","fortran-package-manager","io"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/urbanjost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-05T03:44:27.000Z","updated_at":"2024-02-23T21:00:59.000Z","dependencies_parsed_at":"2024-10-26T08:17:25.008Z","dependency_job_id":"c8a6eefa-0b74-47c7-9828-ea0719253cbf","html_url":"https://github.com/urbanjost/M_io","commit_stats":{"total_commits":98,"total_committers":1,"mean_commits":98.0,"dds":0.0,"last_synced_commit":"a090899232d3f297db005182740af397dc0153c6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/urbanjost%2FM_io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/urbanjost","download_url":"https://codeload.github.com/urbanjost/M_io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793065,"owners_count":19697893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fortran","fortran-package-manager","io"],"created_at":"2024-11-08T03:48:02.281Z","updated_at":"2026-02-05T14:30:18.419Z","avatar_url":"https://github.com/urbanjost.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"## M_io.f90 and associated files\n\n### Name\n\n   M_io - Fortran module for common I/O tasks\n\n### Description\n\nThis package is a self-contained version of the M_io library from the GPF\n(General Purpose Fortran) package that has been extracted for those just\ninterested in a library of IO-related functions. In the GPF package this\nlibrary is intertwined with several other large modules.\n\nThe procedures collected into M_io do not depend on interfacing to\nsystem-dependent functionality such as POSIX functions. They are\nself-contained standard Fortran.\n\nThere are related functions in \n [M_system](https://urbanjost.github.io/M_system/man3.html) \nthat require a POSIX system.\n\n [M_display](https://urbanjost.github.io/M_display/man3.html) is\n a collection of routines for writing tables.\n\n [M_strings](https://urbanjost.github.io/M_strings/man3.html) has \n functions for pure string manipulation.\n\n#### File OPs\n + **fileopen**     - A simple open of a sequential file \n + **filewrite**    - A simple write of a CHARACTER array to a file \n + **fileread**     - read a file into a string array \n + **read_table**   - read file containing a table of numeric values \n + **filebyte**     - read a file into a character array \n + **fileclose**    - A simple close of a sequential file \n + **filedelete**   - A simple close of an open file with STATUS='DELETE' \n#### Sequential Reads\n + **rd**            - ask for string from standard input with user-definable prompt \n + **get_next_char** - read from a file one character at a time \n + **getline**       - read a line from specified LUN into allocatable string up to line length limit \n + **read_line**     - read a line from specified LUN into allocatable string up to line length limit cleaning up input line \n#### Manipulate Pathnames\n + **joinpath**      - join parts of a pathname together \n + **basename**      - return last component from filename \n + **splitpath**     - split a Unix pathname into components \n + **dirname**       - strip last component from filename \n#### Find Pathnames\n + **lookfor**       - look for a filename in a number of directories specified by an environment variable \n + **which**         - given a command name find the pathname by searching the directories in the environment variable $PATH \n + **getname**       - get name of the current executable \n + **get_tmp**       - Return the name of the scratch directory \n + **scratch**       - Return the name of a scratch file \n + **uniq**          - append a number to the end of filename to make a unique name if name exists \n#### Other\n + **get_env**           - a function returning the value of an environment variable \n + **print_inquire**     - Do INQUIRE on file by name/number and print results \n + **notopen**           - Find a FUN/LUN (Fortran-unit-number) that is not in use \n + **number_of_lines**   - read an open sequential file to get number of lines \n + **separator**         - try to determine pathname directory separator character \n + **generate_filename** - generate a filename containing the specified whole number\n\n![docs](docs/images/docs.gif)\n\n### Documentation\n#### User \n\nIn the docs/ directory there is\n\n - An [index](https://urbanjost.github.io/M_io/man3.html) to HTML versions\n   of the man-pages \n\n - A single page that uses javascript to combine all the HTML descriptions\n   of the man-pages is at\n   [BOOK_M_io](https://urbanjost.github.io/M_io/BOOK_M_io.html).\n\n - ![manpages](docs/images/manpages.gif)\n   man-pages are in archive files that can be installed on ULS (Unix-like systems)\n    + [manpages.zip](https://urbanjost.github.io/M_io/manpages.zip) \n    + [manpages.tgz](https://urbanjost.github.io/M_io/manpages.tgz) \n\n - [CHANGELOG](docs/CHANGELOG.md) provides a history of significant changes\n\n#### Developer \n\n - The code was run through [ford(1)](https://politicalphysicist.github.io/ford-fortran-documentation.html)\n   to produce a [developers' document](https://urbanjost.github.io/M_strings/fpm-ford/index.html).\n\n - [github action status](docs/STATUS.md)\n\n![demos](docs/images/demo.gif)\n\n### Demo Programs\n\nThere are demo programs extracted from the man pages in the [example/](example/)\ndirectory.\n\n![gmake](docs/images/gnu.gif)\n\n### Build with make\n\n    git clone https://github.com/urbanjost/M_io.git\n    cd M_io/src\n    # change Makefile if not using one of the listed compilers\n     \n    # for gfortran\n    make clean\n    make F90=gfortran gfortran\n     \n    # for ifort\n    make clean\n    make F90=ifort ifort\n\nThis will compile the M_io module and build all the example programs from\nthe document pages in the `example/` sub-directory.\n\n![fpm](docs/images/fpm_logo.gif)\n\n### Build with fpm\n\nAlternatively, download the github repository and build it with \nfpm ( as described at [Fortran Package Manager](https://github.com/fortran-lang/fpm) )\n\n```bash\n     git clone https://github.com/urbanjost/M_io.git\n     cd M_io\n     fpm test  # build and run unit tests\n```\n\nor just list it as a dependency in your fpm.toml project file.\n\n```toml\n     [dependencies]\n     M_io        = { git = \"https://github.com/urbanjost/M_io.git\" }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbanjost%2Fm_io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furbanjost%2Fm_io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbanjost%2Fm_io/lists"}