Skip to content

Commit

Permalink
prep for v0.0.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdoiel committed Mar 9, 2024
1 parent b12521f commit 6647cfa
Show file tree
Hide file tree
Showing 23 changed files with 264 additions and 398 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ testdata/Brick%20&%20Steel.fdx
testdata/The%20Last%20Birthday%20Card.fdx
bin/
dist/
man/
*.bak
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ hash: .FORCE
git log --pretty=format:'%h' -n 1

check: .FORCE
for FNAME in $(shell ls -1 *.md); do aspell -c $$FNAME; done
for FNAME in $(shell ls -1 cmd/*/*.go); do aspell -c $$FNAME; go fmt $$FNAME; done
for FNAME in $(shell ls -1 *.go); do go fmt $$FNAME; done
for FNAME in $(shell ls -1 cmd/*/*.go); do go vet $$FNAME; done
go vet *.go

test: clean build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OSF
A Go package support Open Screenplay Format
-------------------------------------------

Experimental golang package for working with Open Screenplay Format 2.0.
Experimental Golang package for working with Open Screenplay Format 2.0.
Open Screenplay Format is an open XML format for screenplays and the
native format (when zipped) for [Fade In](https://www.fadeinpro.com).
Two package will include several demonstration command line programs
Expand Down
10 changes: 7 additions & 3 deletions TODO.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ <h2 id="bugs">Bugs</h2>
<h2 id="next">Next</h2>
<ul class="task-list">
<li><input type="checkbox" disabled="" />
Update code to Go 1.22</li>
<li><input type="checkbox" disabled="" />
Remove dependency on <code>github.com/caltechlibrary/cli</code></li>
<li><input type="checkbox" disabled="" />
implement a txt2osf demonstration</li>
<li><input type="checkbox" disabled="" />
review Text element, make sure I am mapping embedded newlines and formatting correctly</li>
Expand All @@ -45,7 +49,7 @@ <h2 id="someday-maybe">Someday, Maybe</h2>
<li><input type="checkbox" disabled="" />
add support for Ron Severdia’s Open Screenplay Format 2.1 spec<ul>
<li>rename divergent structs’ xml defs with 20 and 21 suffix</li>
<li>make sure they are all 20/21 structs are treaded as tag “,omitempty”</li>
<li>make sure they are all 20/21 structs are treated as tag “,omitempty”</li>
<li>duplicate String methods as needed</li>
<li>Parse, ParseFile should work without sniffing using a single struct tree for 1.2, 2.0 or 2.1</li>
</ul></li>
Expand All @@ -72,11 +76,11 @@ <h2 id="completed">Completed</h2>
<h3 id="reference-links">Reference links</h3>
<ul>
<li><a href="https://fountain.io">Fountain</a></li>
<li><a href="https://sourceforge.net/projects/openscrfmt/">Open Screenplay Format 2.0</a> (the one targetted by osf.go)</li>
<li><a href="https://sourceforge.net/projects/openscrfmt/">Open Screenplay Format 2.0</a> (the one targeted by osf.go)</li>
<li><a href="https://github.com/severdia/Open-Screenplay-Format">Open Screenplay Format 2.1</a></li>
<li><a href="https://www.fadeinpro.com">Fade In</a></li>
<li><a href="http://www.kenttessman.com/2012/02/open-screenplay-format/">Open Screenplay Format by Kent Tessman</a></li>
<li><a href="https://github.com/azcoppen/screenplay-parser">screenplay-parser</a> - a PHP repo with a really nice README.md discussing format and convertion issues and challenges</li>
<li><a href="https://github.com/azcoppen/screenplay-parser">screenplay-parser</a> - a PHP repo with a really nice README.md discussing format and conversion issues and challenges</li>
</ul>
</section>

Expand Down
48 changes: 25 additions & 23 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,38 @@

## Next

+ [ ] implement a txt2osf demonstration
+ [ ] review Text element, make sure I am mapping embedded newlines and formatting correctly
+ [ ] validate ToXML() after FromFountain() can be read by FadeIn
- [ ] Update code to Go 1.22
- [ ] Remove dependency on `github.com/caltechlibrary/cli`
- [ ] implement a txt2osf demonstration
- [ ] review Text element, make sure I am mapping embedded newlines and formatting correctly
- [ ] validate ToXML() after FromFountain() can be read by FadeIn

## Someday, Maybe

+ [ ] write and osf2html using [scrippets](https://fountain.io/scrippets) approach
+ [ ] add support for Ron Severdia's Open Screenplay Format 2.1 spec
+ rename divergent structs' xml defs with 20 and 21 suffix
+ make sure they are all 20/21 structs are treaded as tag ",omitempty"
+ duplicate String methods as needed
+ Parse, ParseFile should work without sniffing using a single struct tree for 1.2, 2.0 or 2.1
- [ ] write and osf2html using [scrippets](https://fountain.io/scrippets) approach
- [ ] add support for Ron Severdia's Open Screenplay Format 2.1 spec
- rename divergent structs' xml defs with 20 and 21 suffix
- make sure they are all 20/21 structs are treated as tag ",omitempty"
- duplicate String methods as needed
- Parse, ParseFile should work without sniffing using a single struct tree for 1.2, 2.0 or 2.1

## Completed

+ [x] String (Fountain style plain text) needs to be formatted correctly...
+ [x] Write osf.go, osf_test.go based on [Open Screenplay Format 2.0](https://sourceforge.net/projects/openscrfmt/) and in the mode of [fdx](https://github.com/rsdoiel/fdx) package
+ [x] Write osf2txt
+ [x] Write fadein2osf
+ [x] Write fadein2txt
+ [x] self closing tags should be self closing
+ [x] Support parsing .fadein files (i.e. unzip the Fade In file, then parse document.xml)
+ [x] Add ParseFile() to osf.go, if file extension is ".fadein" then it should handle the unzipping and and parsing of document.xml as OSF
- [x] String (Fountain style plain text) needs to be formatted correctly...
- [x] Write osf.go, osf_test.go based on [Open Screenplay Format 2.0](https://sourceforge.net/projects/openscrfmt/) and in the mode of [fdx](https://github.com/rsdoiel/fdx) package
- [x] Write osf2txt
- [x] Write fadein2osf
- [x] Write fadein2txt
- [x] self closing tags should be self closing
- [x] Support parsing .fadein files (i.e. unzip the Fade In file, then parse document.xml)
- [x] Add ParseFile() to osf.go, if file extension is ".fadein" then it should handle the unzipping and and parsing of document.xml as OSF

### Reference links

+ [Fountain](https://fountain.io)
+ [Open Screenplay Format 2.0](https://sourceforge.net/projects/openscrfmt/) (the one targetted by osf.go)
+ [Open Screenplay Format 2.1](https://github.com/severdia/Open-Screenplay-Format)
+ [Fade In](https://www.fadeinpro.com)
+ [Open Screenplay Format by Kent Tessman](http://www.kenttessman.com/2012/02/open-screenplay-format/)
+ [screenplay-parser](https://github.com/azcoppen/screenplay-parser) - a PHP repo with a really nice README.md discussing format and convertion issues and challenges
- [Fountain](https://fountain.io)
- [Open Screenplay Format 2.0](https://sourceforge.net/projects/openscrfmt/) (the one targeted by osf.go)
- [Open Screenplay Format 2.1](https://github.com/severdia/Open-Screenplay-Format)
- [Fade In](https://www.fadeinpro.com)
- [Open Screenplay Format by Kent Tessman](http://www.kenttessman.com/2012/02/open-screenplay-format/)
- [screenplay-parser](https://github.com/azcoppen/screenplay-parser) - a PHP repo with a really nice README.md discussing format and conversion issues and challenges

2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors:
repository-code: "https://github.com/rsdoiel/osf"
version: 0.0.4
license-url: "https://rsdoiel.github.io/osf/license.html"
keywords: [ "Github", "text markup", "screen play" ]
keywords: [ "GitHub", "text markup", "screen play" ]

---

Expand Down
14 changes: 6 additions & 8 deletions cmd/fadein2osf/fadein2osf.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
//
// fadein2osf will convert a Fade In file to OSF 2.0.
//
// @author R. S. Doiel, <[email protected]>
//
// BSD 2-Clause License
// # BSD 2-Clause License
//
// Copyright (c) 2021, R. S. Doiel
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand All @@ -28,7 +27,6 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
package main

import (
Expand Down
14 changes: 6 additions & 8 deletions cmd/osf2txt/osf2txt.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
//
// osf2txt converts an Open Screenplay Format 2.0 XML document into a plain text
// suitable to read from the console.
//
// @author R. S. Doiel, <[email protected]>
//
// BSD 2-Clause License
// # BSD 2-Clause License
//
// Copyright (c) 2021, R. S. Doiel
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand All @@ -29,7 +28,6 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
package main

import (
Expand Down
14 changes: 6 additions & 8 deletions cmd/txt2osf/txt2osf.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
//
// txt2osf converts a plain text document into an Open Screenplay Format 2.0 XML document
// suitable to read from the console.
//
// @author R. S. Doiel, <[email protected]>
//
// BSD 2-Clause License
// # BSD 2-Clause License
//
// Copyright (c) 2021, R. S. Doiel
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand All @@ -29,7 +28,6 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
package main

import (
Expand Down
10 changes: 7 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"codeRepository": "https://github.com/rsdoiel/osf",
"issueTracker": "https://github.com/rsdoiel/osf/issues",
"license": "https://rsdoiel.github.io/osf/license.html",
"version": "0.0.4",
"version": "0.0.5",
"createdDate": "2017-12-22",
"releaseDate": "2022-08-07",
"modifiedDate": "2024-03-09",
"releaseNotes": "Updated to Go 1.22, added YAML annotations",
"author": [
{
"@type": "Person",
Expand All @@ -18,12 +22,12 @@
],
"developmentStatus": "inactive",
"keywords": [
"Github",
"GitHub",
"text markup",
"screen play"
],
"maintainer": "https://orcid.org/0000-0003-0900-6903",
"programmingLanguage": [
"Go"
"Go >= 1.22"
]
}
14 changes: 6 additions & 8 deletions fromfountain.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
//
// osf is a package for working with Open Screenplay Format 1.2 and 2.0 XML documents.
//
// @author R. S. Doiel, <[email protected]>
//
// BSD 2-Clause License
// # BSD 2-Clause License
//
// Copyright (c) 2021, R. S. Doiel
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
// - Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// - Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand All @@ -28,7 +27,6 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
package osf

import (
Expand Down
18 changes: 9 additions & 9 deletions get-optional-testdata.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

START=$(pwd)
cd testdata
curl -L -O "https://fountain.io/_downloads/Big%20Fish.fountain"
curl -L -O "https://fountain.io/_downloads/Big%20Fish.fdx"
curl -L -O "https://fountain.io/_downloads/Big%20Fish.pdf"
curl -L -O "https://fountain.io/_downloads/Brick%20&%20Steel.fountain"
curl -L -O "https://fountain.io/_downloads/Brick%20&%20Steel.fdx"
curl -L -O "https://fountain.io/_downloads/Brick%20&%20Steel.pdf"
curl -L -O "https://fountain.io/_downloads/The%20Last%20Birthday%20Card.fountain"
curl -L -O "https://fountain.io/_downloads/The%20Last%20Birthday%20Card.fdx"
curl -L -O "https://fountain.io/_downloads/The%20Last%20Birthday%20Card.pdf"
curl -L -O "https://fountain.io/_downloads/Big-Fish.fountain"
curl -L -O "https://fountain.io/_downloads/Big-Fish.fdx"
curl -L -O "https://fountain.io/_downloads/Big-Fish.pdf"
curl -L -O "https://fountain.io/_downloads/Brick-&-Steel.fountain"
curl -L -O "https://fountain.io/_downloads/Brick-&-Steel.fdx"
curl -L -O "https://fountain.io/_downloads/Brick-&-Steel.pdf"
curl -L -O "https://fountain.io/_downloads/The-Last-Birthday-Card.fountain"
curl -L -O "https://fountain.io/_downloads/The-Last-Birthday-Card.fdx"
curl -L -O "https://fountain.io/_downloads/The-Last-Birthday-Card.pdf"
cd "$START"
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module github.com/rsdoiel/osf

go 1.16
go 1.22.0

require (
github.com/caltechlibrary/cli v0.0.16
github.com/rsdoiel/fountain v0.0.3
github.com/caltechlibrary/cli v0.0.18
github.com/rsdoiel/fountain v1.0.1
)

require gopkg.in/yaml.v3 v3.0.1 // indirect
14 changes: 8 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
github.com/caltechlibrary/cli v0.0.16 h1:jgw6dZb3VDy9L5LrWWm1ieqHYAMKgcv+NF6osSj3YRM=
github.com/caltechlibrary/cli v0.0.16/go.mod h1:BVT+6d/QqcN4UApWR3ufjkkKj2O6+48B4G6iUpP8m38=
github.com/rsdoiel/fountain v0.0.2 h1:uG0dPOygBqUsygPeB8p0OTFZX32g2Csw3SGF9HIt1Ec=
github.com/rsdoiel/fountain v0.0.2/go.mod h1:mCs/6pNzXWy+tOpLtQqsZj1t6hc5URROg0dS0jnpjfM=
github.com/rsdoiel/fountain v0.0.3 h1:FvpOfS5z1C7mTkuvEm5AvBDh0+CpgiiD1OhcsHmZ1Qk=
github.com/rsdoiel/fountain v0.0.3/go.mod h1:gSQk57Zm16sVyy42VzHYBWeeHqsuFny3n7ewuJssq+w=
github.com/caltechlibrary/cli v0.0.18 h1:Z1NjhJ2ar2lWCFlA00wVDa5j0qnsL2XeI/qtgX2wOXU=
github.com/caltechlibrary/cli v0.0.18/go.mod h1:9crFPycCNeyTWautZ0t/YjaW8Clsr9uQZfq/SNNwhak=
github.com/rsdoiel/fountain v1.0.1 h1:m5JZbnasFendZbYzoTsOsJ/gcup7VNTUjJGTANshQck=
github.com/rsdoiel/fountain v1.0.1/go.mod h1:Sd3MZuWObP+tssyGIuUUfl3+nslvRVndkEEpBVsWAJU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<p><a href="https://www.repostatus.org/#inactive"><img src="https://www.repostatus.org/badges/latest/inactive.svg" alt="Project Status: Inactive – The project has reached a stable, usable state but is no longer being actively developed; support/maintenance will be provided as time allows." /></a></p>
<h1 id="osf">OSF</h1>
<h2 id="a-go-package-support-open-screenplay-format">A Go package support Open Screenplay Format</h2>
<p>Experimental golang package for working with Open Screenplay Format 2.0. Open Screenplay Format is an open XML format for screenplays and the native format (when zipped) for <a href="https://www.fadeinpro.com">Fade In</a>. Two package will include several demonstration command line programs <a href="docs/osf2txt.html">osf2txt</a> which will read a osf file and render plain text in a <a href="https://fountain.io">Fountain</a> like format, <a href="docs/txt2osf.html">txt2osf</a> which takes a plain text file and attempts to render an OSF 2.0 document and finally <a href="docs/fadein2osf">fadein2osf</a> which will read in a Fade In file and write out Open Screenplay Format.</p>
<p>Experimental Golang package for working with Open Screenplay Format 2.0. Open Screenplay Format is an open XML format for screenplays and the native format (when zipped) for <a href="https://www.fadeinpro.com">Fade In</a>. Two package will include several demonstration command line programs <a href="docs/osf2txt.html">osf2txt</a> which will read a osf file and render plain text in a <a href="https://fountain.io">Fountain</a> like format, <a href="docs/txt2osf.html">txt2osf</a> which takes a plain text file and attempts to render an OSF 2.0 document and finally <a href="docs/fadein2osf">fadein2osf</a> which will read in a Fade In file and write out Open Screenplay Format.</p>
</section>

<footer>
Expand Down
Loading

0 comments on commit 6647cfa

Please sign in to comment.