Skip to content

Commit

Permalink
can now read geophone positions + minor fixes in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jbcolme committed Nov 21, 2023
1 parent 6c367cd commit e387820
Show file tree
Hide file tree
Showing 5 changed files with 505 additions and 471 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Currently only the file header and traces header are read when loading the file.

## Installation

You should download or checkout this repository. If you just want to *use* the library, you only need to include the minified version which you can find in the root directory ofthe project: seg2js.min.js
You should download or checkout this repository. If you just want to *use* the library, you only need to include the minified version which you can find in the root directory of the project: seg2js.min.js

If you want *develop* or debug the library, you may want to include in your project thesource file located in the **src** directory: seg2js.src.js.
If you want *develop* or debug the library, you can edit the source file located in the **src** directory: seg2js.src.js. You *must* generate the minified version so the function is properly packaged as a module.

To generate the minified file you can use rollup. You need to have node installed, then just do

Expand All @@ -27,7 +27,7 @@ To generate the minified file you can use rollup. You need to have node installe

### Get the handle of a file and read headers

The first thing is to get a handle of a file. You can look at the example locatedinexamples/example1.html. Then you should read the headers. For that you must first create a headers object
The first thing is to get a handle of a file. You can look at the example located in examples/example1.html. Then you should read the headers. For that you must first create a headers object

let seg2headers = seg2js.createHeader();

Expand Down
4 changes: 3 additions & 1 deletion examples/example1.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<center>
<div id="seg2canvas"></div>
</center>

<script>

window.onload = function() {
Expand All @@ -37,3 +37,5 @@
}
</script>

</body>
</html>
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
"example": "examples"
},
"dependencies": {
"http-server": "^14.1.1",
"rollup": "^2.10.0",
"rollup-plugin-terser": "^6.1.0",
"terser": "^4.8.1"
"terser": "^4.8.1",
"http-server": "^14.1.1"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"rollup": "rollup -c",
"serve": "http-server"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion seg2js.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e387820

Please sign in to comment.