summaryrefslogtreecommitdiff
path: root/go-w32.bat
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2025-06-20 06:32:41 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2025-06-20 06:32:41 -0400
commit79c227155bb8fda89c3cd8ff5367687b47a0f074 (patch)
treecb731df52c743c0129cec404cd358a71a63ca039 /go-w32.bat
parent2eef1bf3e30b7d1205afd83c31d103f900b35467 (diff)
downloadgwblog-79c227155bb8fda89c3cd8ff5367687b47a0f074.tar.gz
gwblog-79c227155bb8fda89c3cd8ff5367687b47a0f074.zip
Added batch file and files routines for running on modern Windows under PC-Basic. Added textile workaround for PC-Basic bug. Added ability to use long filenames, specifically using html as an extension, if LFN=1 is set, though PC-Basic doesn't allow it anyways.
Diffstat (limited to 'go-w32.bat')
-rw-r--r--go-w32.bat40
1 files changed, 40 insertions, 0 deletions
diff --git a/go-w32.bat b/go-w32.bat
new file mode 100644
index 0000000..8dd01ff
--- /dev/null
+++ b/go-w32.bat
@@ -0,0 +1,40 @@
+ECHO OFF
+ECHO GW-Blog by Jeff Armstrong
+
+IF NOT EXIST %1\POSTHDR.HTM GOTO NOLABEL
+ECHO 1 SITEDIR$="%1":LFN=1 >> LOC.BAS
+
+ECHO --
+ECHO Creating the main BASIC program
+COPY LOC.BAS+GWBLOG.BAS+RSS.BAS+DATE.BAS+POST.BAS+TXTILE.BAS+TMPLATE.BAS BLOG.TMP
+COPY BLOG.TMP+FILESW32.BAS+TSORT.BAS+LINK.BAS+COPY.BAS+CONFIG.BAS BLOG.BAS
+DEL BLOG.TMP
+ECHO --
+ECHO Launching GW-Blog Using PC-Basic
+pcbasic BLOG.BAS --interface=cli --shell=cmd.exe -f=20
+ECHO --
+ECHO Performing cleanup
+DEL LOC.BAS
+DEL BLOG.BAS
+
+GOTO CASING
+
+:NOLABEL
+ECHO Usage: GO.BAT [absolute path to blog files]
+ECHO --
+ECHO Blog directory should contain:
+ECHO PAGES\ - Static pages for the blog
+ECHO POSTS\ - Date-encoded posts for the blog
+ECHO POSTHDR.HTM - HTML header with template tags
+ECHO POSTFTR.HTM - HTML footer with template tags
+ECHO --
+GOTO DONE
+
+:CASING
+ECHO Converting output to lowercase
+SET CurrentDir=%CD%
+CD %1\build
+for /f "Tokens=*" %%f in ('dir /l/b/a-d') do (rename "%%f" "%%f")
+CD %CurrentDir%
+
+:DONE