Skip to content

Commit 0dc5e8e

Browse files
committed
add the usual files.
1 parent 6f53952 commit 0dc5e8e

File tree

4 files changed

+105
-0
lines changed

4 files changed

+105
-0
lines changed

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Fortran CSV Module
2+
https://github.com/jacobwilliams/fortran-csv-module
3+
4+
Copyright (c) 2017, Jacob Williams
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright notice, this
14+
list of conditions and the following disclaimer in the documentation and/or
15+
other materials provided with the distribution.
16+
17+
* The names of its contributors may not be used to endorse or promote products
18+
derived from this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Description
2+
3+
A modern Fortran library for reading and writing CSV (comma-separated value) files.
4+
5+
This is a work in progress, and is not finished!
6+
7+
### License
8+
9+
This library is released under a BSD-3 license.

build.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
3+
#
4+
# Simple build script.
5+
#
6+
# Requires: FoBiS and Ford
7+
#
8+
9+
MODCODE='csv_module.f90' # module file name
10+
LIBOUT='libcsv.a' # name of library
11+
DOCDIR='./doc/' # build directory for documentation
12+
SRCDIR='./src/' # library source directory
13+
TESTSRCDIR='./src/tests/' # unit test source directory
14+
BINDIR='./bin/' # build directory for unit tests
15+
LIBDIR='./lib/' # build directory for library
16+
FORDMD='fortran-csv-module.md' # FORD config file name
17+
18+
#compiler flags:
19+
20+
FCOMPILER='gnu' #Set compiler to gfortran
21+
FCOMPILERFLAGS='-c -O2 -std=f2008'
22+
23+
#build using FoBiS:
24+
25+
if hash FoBiS.py 2>/dev/null; then
26+
27+
echo "Building library..."
28+
29+
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
30+
31+
echo "Building test programs..."
32+
33+
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${BINDIR} -s ${TESTSRCDIR} -dmod ./ -dobj ./ -colors -libs ${LIBDIR}${LIBOUT} --include ${LIBDIR}
34+
35+
else
36+
echo "FoBiS.py not found! Cannot build library. Install using: sudo pip install FoBiS.py"
37+
fi
38+
39+
# build the documentation using FORD:
40+
41+
if hash ford 2>/dev/null; then
42+
43+
echo "Building documentation..."
44+
45+
ford ${FORDMD}
46+
47+
else
48+
echo "Ford not found! Cannot build documentation. Install using: sudo pip install ford"
49+
fi

fortran-csv-module.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
project: fortran-csv-module
2+
project_dir: ./src
3+
output_dir: ./doc
4+
project_github: https://github.com/jacobwilliams/fortran-csv-module
5+
summary: Read and Write CSV Files Using Modern Fortran
6+
author: Jacob Williams
7+
github: https://github.com/jacobwilliams
8+
predocmark_alt: >
9+
predocmark: <
10+
docmark_alt:
11+
docmark: !
12+
display: public
13+
protected
14+
source: true
15+
graph: true
16+
extra_mods: iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html
17+
18+
{!README.md!}

0 commit comments

Comments
 (0)