From 0e58ab15a6d0de83ced07ab3403f7cc2fd04392a Mon Sep 17 00:00:00 2001
From: Federico Santandrea <67011878+sntfrc@users.noreply.github.com>
Date: Tue, 16 Jun 2020 23:02:53 +0200
Subject: [PATCH] Added PHP part and style
---
Makefile | 7 ++-
README.md | 2 +-
sendalo.html.tpl | 143 +++++++++++++++++++++++++++++++++++++++++------
sendalo.php.tpl | 6 ++
4 files changed, 140 insertions(+), 18 deletions(-)
create mode 100644 sendalo.php.tpl
diff --git a/Makefile b/Makefile
index 5cb3f28..f528d04 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-all: obj/c2t-96h.so link
+all: obj/c2t-96h.so link addproxy
c2t:
@if [ -z "${C2TDIR}" ]; then echo "Please set C2TDIR environment variable to the path of c2t source tree."; exit 1; fi
@@ -18,6 +18,11 @@ link:
mkdir -p bin
emcc --shell-file sendalo.html.tpl -s INVOKE_RUN=0 -s EXIT_RUNTIME=0 -s ALLOW_MEMORY_GROWTH=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=['callMain'] -o bin/sendalo.html obj/c2t-96h.so
+addproxy:
+ head --bytes=-1 sendalo.php.tpl > bin/sendalo.php
+ cat bin/sendalo.html >> bin/sendalo.php
+# rm bin/sendalo.html
+
test:
cd bin; python3 -m http.server 65020
diff --git a/README.md b/README.md
index d116e29..c689b08 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Sendalo
## Web / mobile frontend for c2t
-Sendalo is a web/mobile interface to an emscripten build of the excellent c2t-96h tool by datajerk (https://github.com/datajerk/c2t). c2t is a really clever program that allows transferring disk images to a running Apple II (among other things).
+Sendalo is a web/mobile interface to an emscripten build of the excellent c2t tool by datajerk (https://github.com/datajerk/c2t). c2t is a really clever program that allows transferring disk images to a running Apple II (among other things).
Why I think this is useful?
diff --git a/sendalo.html.tpl b/sendalo.html.tpl
index 4aa4588..0f5f5bc 100644
--- a/sendalo.html.tpl
+++ b/sendalo.html.tpl
@@ -2,8 +2,51 @@
+ Sendalo is a web/mobile interface to an emscripten build of the excellent
+ c2t tool by
+ datajerk.
+
+
+ c2t is a really clever program that allows transferring disk images to
+ a running Apple II (among other things).
+
+
+
Why do I think this is useful?
+
+
The ASCII Express site is fun and a great idea, but it has
+ limited selection.
+
+
ADTPro is fantastic! But you need a running modern PC, and
+ some means of bidirectional communication to make it work.
+ Ethernet cards are expensive, serial not readily available
+ and audio mic input jacks are becoming difficult to find on
+ modern laptops. And there is no mobile version.
+
+
c2t will work with just a simplex link, so all you need is an
+ audio cable and there you go! But you still need another
+ computer and typing commands in the terminal.
+
+
Finally, with this frontend you can unleash the power of c2t
+ directly on your mobile device, with just an audio cable
+ and no PC. Just paste the .dsk image URL from your favorite
+ web archive, or upload your own, and the disk will be streamed
+ over. Also nice on computers if you don’t want to download
+ executables or type commands.
+
+
+
+ c2t can do a lot more than this, don’t forget to check the official
+ project page on GitHub to learn more.
+