Skip to content

Commit

Permalink
converted to pandoc templates, adding go1.16 compiler support, M1 bin…
Browse files Browse the repository at this point in the history
…ary builds
  • Loading branch information
rsdoiel committed Feb 18, 2021
1 parent 63e6295 commit c14f426
Show file tree
Hide file tree
Showing 12 changed files with 344 additions and 228 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@ dist/windows-amd64:
cd dist && zip -r $(PROJECT)-$(VERSION)-windows-amd64.zip README.md LICENSE INSTSALL.md bin/*
rm -fR dist/bin

dist/macosx-amd64:
dist/macos-amd64:
mkdir -p dist/bin
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/fdx2txt cmd/fdx2txt/fdx2txt.go
env GOOS=darwin GOARCH=amd64 go build -o dist/bin/txt2fdx cmd/txt2fdx/txt2fdx.go
cd dist && zip -r $(PROJECT)-$(VERSION)-macosx-amd64.zip README.md LICENSE INSTSALL.md bin/*
cd dist && zip -r $(PROJECT)-$(VERSION)-macos-amd64.zip README.md LICENSE INSTSALL.md bin/*
rm -fR dist/bin

dist/macos-arm64:
mkdir -p dist/bin
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/fdx2txt cmd/fdx2txt/fdx2txt.go
env GOOS=darwin GOARCH=arm64 go build -o dist/bin/txt2fdx cmd/txt2fdx/txt2fdx.go
cd dist && zip -r $(PROJECT)-$(VERSION)-macos-arm64.zip README.md LICENSE INSTSALL.md bin/*
rm -fR dist/bin

dist/raspbian-arm7:
Expand All @@ -75,7 +82,7 @@ distribute_docs:
cp -v README.md dist/
cp -v LICENSE dist/

release: distribute_docs dist/linux-amd64 dist/windows-amd64 dist/macosx-amd64 dist/raspbian-arm7 dist/linux-arm64
release: distribute_docs dist/linux-amd64 dist/windows-amd64 dist/macos-amd64 dist/macos-arm64 dist/raspbian-arm7 dist/linux-arm64

clean:
if [ -d bin ]; then rm -fR bin; fi
Expand Down
99 changes: 65 additions & 34 deletions TODO.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,84 @@
<!DOCTYPE html>
<html>
<head>
<title><no value></title>
<title></title>
<link href="/css/site.css" rel="stylesheet" />
</head>
<body>
<header>
<no value>
</header>
<section>
<h1>Action Items</h1>

<h2>Bugs</h2>

<h2>Next</h2>

<ul>
<li>[ ] Review XML output from ToXML() after a FromFountain() call, see where I need to add mapping for Text elements and embedded styling</li>
<li>[ ] validate that I am producing fdx files that Final Draft, FadeIn and Trelby can read</li>
<h1 id="action-items">
Action Items
</h1>
<h2 id="bugs">
Bugs
</h2>
<h2 id="next">
Next
</h2>
<ul class="task-list">
<li>
<input type="checkbox" disabled="" /> Review XML output from ToXML() after a FromFountain() call, see where I need to add mapping for Text elements and embedded styling
</li>
<li>
<input type="checkbox" disabled="" /> validate that I am producing fdx files that Final Draft, FadeIn and Trelby can read
</li>
</ul>

<h2>Someday, Maybe</h2>

<ul>
<li>[ ] Write and fdx2html using <a href="https://fountain.io/scrippets">scrippets</a> approach</li>
<li>[ ] Left/Right alignment should be respected based based on Paragraph Type</li>
<li>[ ] Plaintext formatting needs to be pickup and respected from whole FinalDraft document (e.g. respect definitions, Layout, etc)</li>
<li>[ ] Screen Headers and Footers can have Text, Dynamic, SceneProperties in any order, right now converting back to XML renders them in fixed order because they are ignored when rendering and plaintext</li>
<h2 id="someday-maybe">
Someday, Maybe
</h2>
<ul class="task-list">
<li>
<input type="checkbox" disabled="" /> Write and fdx2html using <a href="https://fountain.io/scrippets">scrippets</a> approach
</li>
<li>
<input type="checkbox" disabled="" /> Left/Right alignment should be respected based based on Paragraph Type
</li>
<li>
<input type="checkbox" disabled="" /> Plaintext formatting needs to be pickup and respected from whole FinalDraft document (e.g. respect definitions, Layout, etc)
</li>
<li>
<input type="checkbox" disabled="" /> Screen Headers and Footers can have Text, Dynamic, SceneProperties in any order, right now converting back to XML renders them in fixed order because they are ignored when rendering and plaintext
</li>
</ul>

<h2>Completed</h2>

<ul>
<li>[x] Add ParseFile() to fdx.go</li>
<li>[x] String() Paragraph needs to handle trailing new lines based on Paragraph Type</li>
<li>[x] write tests that validate the source FDX content in <em>testout</em> version</li>
<h2 id="completed">
Completed
</h2>
<ul class="task-list">
<li>
<input type="checkbox" disabled="" checked="" /> Add ParseFile() to fdx.go
</li>
<li>
<input type="checkbox" disabled="" checked="" /> String() Paragraph needs to handle trailing new lines based on Paragraph Type
</li>
<li>
<input type="checkbox" disabled="" checked="" /> write tests that validate the source FDX content in <em>testout</em> version
</li>
</ul>

</section>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="./">README</a></li>
<li><a href="license.html">LICENSE</a></li>
<li><a href="docs/">Documentation</a></li>
<li><a href="testdata.html">Test Data</a></li>
<li><a href="https://github.com/rsdoiel/fdx">Github</a></li>
<li>
<a href="/">Home</a>
</li>
<li>
<a href="./">README</a>
</li>
<li>
<a href="license.html">LICENSE</a>
</li>
<li>
<a href="docs/">Documentation</a>
</li>
<li>
<a href="testdata.html">Test Data</a>
</li>
<li>
<a href="https://github.com/rsdoiel/fdx">Github</a>
</li>
</ul>

</nav>
<footer>
copyright (c) 2017 all rights reserved.
Expand Down
86 changes: 48 additions & 38 deletions docs/fdx2txt.html
Original file line number Diff line number Diff line change
@@ -1,61 +1,71 @@
<!DOCTYPE html>
<html>
<head>
<title><no value></title>
<title></title>
<link href="/css/site.css" rel="stylesheet" />
</head>
<body>
<header>
<no value>
</header>
<section>
<h1>USAGE</h1>

<pre><code>fdx2txt [OPTIONS]
</code></pre>

<h2>SYNOPSIS</h2>

<p>fdx2txt is a command line program that reads an fdx file
and returns plain text</p>

<h2>OPTIONS</h2>

<h1 id="usage">
USAGE
</h1>
<pre><code>fdx2txt [OPTIONS]</code></pre>
<h2 id="synopsis">
SYNOPSIS
</h2>
<p>
fdx2txt is a command line program that reads an fdx file and returns plain text
</p>
<h2 id="options">
OPTIONS
</h2>
<pre><code> -generate-markdown-docs generate Markdown documentation
-h, -help display help
-i, -input set the input filename
-l, -license display license
-nl, -newline add a trailing newline
-o, -output set the output filename
-quiet suppress error messages
-v, -version display version
</code></pre>

<h2>EXAMPLES</h2>

<p>Cervert <em>screenplay.fdx</em> into <em>screenplay.txt</em>.</p>

<pre><code>fdx2txt -i screenplay.fdx -o screenplay.txt
</code></pre>

<p>Or alternatively</p>

<pre><code>cat screenplay.fdx | fdx2txt &gt; screenplay.txt
</code></pre>

<p>fdx2txt v0.0.0-dev</p>

-v, -version display version</code></pre>
<h2 id="examples">
EXAMPLES
</h2>
<p>
Cervert <em>screenplay.fdx</em> into <em>screenplay.txt</em>.
</p>
<pre><code>fdx2txt -i screenplay.fdx -o screenplay.txt</code></pre>
<p>
Or alternatively
</p>
<pre><code>cat screenplay.fdx | fdx2txt &gt; screenplay.txt</code></pre>
<p>
fdx2txt v0.0.0-dev
</p>
</section>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="../">README</a></li>
<li><a href="../license.html">LICENSE</a></li>
<li><a href="../testdata.html">Test Data</a></li>
<li><a href="./">Documentation</a></li>
<li><a href="https://github.com/rsdoiel/fdx">Github</a></li>
<li>
<a href="/">Home</a>
</li>
<li>
<a href="../">README</a>
</li>
<li>
<a href="../license.html">LICENSE</a>
</li>
<li>
<a href="../testdata.html">Test Data</a>
</li>
<li>
<a href="./">Documentation</a>
</li>
<li>
<a href="https://github.com/rsdoiel/fdx">Github</a>
</li>
</ul>

</nav>
<footer>
copyright (c) 2017 all rights reserved.
Expand Down
48 changes: 32 additions & 16 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<title><no value></title>
<title></title>
<link href="/css/site.css" rel="stylesheet" />
</head>
<body>
<header>
<no value>
</header>
<section>
<h1>Demonstration programs</h1>

<p>Here are two demonstration programs showing off how the fdx package works.</p>

<h1 id="demonstration-programs">
Demonstration programs
</h1>
<p>
Here are two demonstration programs showing off how the fdx package works.
</p>
<ul>
<li><a href="fdx2txt.html">fdx2txt</a> - converts Final Draft fdx file to plain text (i.e. <a href="https://fountain.io">Fountain</a>)</li>
<li><a href="txt2fdx.html">txt2fdx</a> - attempts to convert plain text file into Final Draft fdx file</li>
<li>
<a href="fdx2txt.html">fdx2txt</a> - converts Final Draft fdx file to plain text (i.e. <a href="https://fountain.io">Fountain</a>)
</li>
<li>
<a href="txt2fdx.html">txt2fdx</a> - attempts to convert plain text file into Final Draft fdx file
</li>
</ul>

</section>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="../">README</a></li>
<li><a href="../license.html">LICENSE</a></li>
<li><a href="../testdata.html">Test Data</a></li>
<li><a href="./">Documentation</a></li>
<li><a href="https://github.com/rsdoiel/fdx">Github</a></li>
<li>
<a href="/">Home</a>
</li>
<li>
<a href="../">README</a>
</li>
<li>
<a href="../license.html">LICENSE</a>
</li>
<li>
<a href="../testdata.html">Test Data</a>
</li>
<li>
<a href="./">Documentation</a>
</li>
<li>
<a href="https://github.com/rsdoiel/fdx">Github</a>
</li>
</ul>

</nav>
<footer>
copyright (c) 2017 all rights reserved.
Expand Down
Loading

0 comments on commit c14f426

Please sign in to comment.