From: Svjatoslav Agejenko Date: Fri, 20 Feb 2026 18:04:21 +0000 (+0200) Subject: Rename and reorganize files under `Tools/` and enhance documentation with responsive... X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=053bc11d64bd3552a12df15696eef8588dd10e87;p=fifth.git Rename and reorganize files under `Tools/` and enhance documentation with responsive image formatting. --- diff --git a/Tools/5th2src.bas b/Tools/5th2src.bas new file mode 100755 index 0000000..7293f46 --- /dev/null +++ b/Tools/5th2src.bas @@ -0,0 +1,68 @@ +' Utility to convert given file from special FSCII encoding to ASCII encoding. + +DECLARE SUB getline (line$) +DECLARE SUB initializeProgram () +DIM SHARED byte AS STRING * 1 +DIM SHARED endOfFile + +initializeProgram + +OPEN COMMAND$ + ".5th" FOR BINARY AS #1 +OPEN COMMAND$ + ".src" FOR OUTPUT AS #2 + +' Start reading lines from the file +1 +getline line$ +IF endOfFile = 1 THEN GOTO 2 +PRINT #2, line$ +GOTO 1 + +' End of file reached +2 + +CLOSE #2 +CLOSE #1 + +SYSTEM + +SUB getline (line$) + +line$ = "" + +' Start reading bytes from the file +3 +IF EOF(1) <> 0 THEN endOfFile = 1: GOTO 4 +GET #1, , byte + +' Convert non-printable characters to printable ones +IF ASC(byte) <= 9 THEN + byte = CHR$(48 + ASC(byte)) +END IF +IF ASC(byte) <= 15 THEN + byte = CHR$(65 + ASC(byte) - 10) +END IF +IF ASC(byte) = 255 THEN + byte = " " +END IF +IF ASC(byte) = 253 THEN + byte = CHR$(9) +END IF + +' Check for end of line character +IF byte = CHR$(254) THEN GOTO 4 + +line$ = line$ + byte +GOTO 3 + +' End of line reached +4 + +END SUB + +SUB initializeProgram +endOfFile = 0 + +' Check if the command-line argument is empty +IF COMMAND$ = "" THEN END + +END SUB diff --git a/Tools/Update web site b/Tools/Update web site new file mode 100755 index 0000000..d7d5fd7 --- /dev/null +++ b/Tools/Update web site @@ -0,0 +1,74 @@ +#!/bin/bash +cd "${0%/*}"; if [ "$1" != "T" ]; then gnome-terminal -- "$0" T; exit; fi; +cd .. + +# Function to export org to html using emacs in batch mode +export_org_to_html() { + local org_file=$1 + local dir=$(dirname "$org_file") + local base=$(basename "$org_file" .org) + ( + cd "$dir" || return 1 + local html_file="${base}.html" + if [ -f "$html_file" ]; then + rm -f "$html_file" + fi + echo "Exporting: $org_file → $dir/$html_file" + emacs --batch -l ~/.emacs --visit="${base}.org" --funcall=org-html-export-to-html --kill + if [ $? -eq 0 ]; then + echo "✓ Successfully exported $org_file" + else + echo "✗ Failed to export $org_file" + return 1 + fi + ) +} + +echo "🔍 Searching for .org files in doc/ ..." +echo "=======================================" + +mapfile -t ORG_FILES < <(find doc -type f -name "*.org" | sort) + +if [ ${#ORG_FILES[@]} -eq 0 ]; then + echo "❌ No .org files found!" + echo "" + echo "Press ENTER to close this window." + read + exit 1 +fi + +echo "Found ${#ORG_FILES[@]} .org file(s):" +printf '%s\n' "${ORG_FILES[@]}" +echo "=======================================" + +SUCCESS_COUNT=0 +FAILED_COUNT=0 + +for org_file in "${ORG_FILES[@]}"; do + export_org_to_html "$org_file" + if [ $? -eq 0 ]; then + ((SUCCESS_COUNT++)) + else + ((FAILED_COUNT++)) + fi +done + +echo "=======================================" +echo "📊 SUMMARY:" +echo " ✓ Successful: $SUCCESS_COUNT" +echo " ✗ Failed: $FAILED_COUNT" +echo " Total: $((SUCCESS_COUNT + FAILED_COUNT))" +echo "" + +echo "📤 Uploading to server..." +rsync -avz --delete -e 'ssh -p 10006' doc/ n0@www3.svjatoslav.eu:/mnt/big/projects/fifth/ + +if [ $? -eq 0 ]; then + echo "✓ Upload completed successfully!" +else + echo "✗ Upload failed!" +fi + +echo "" +echo "Press ENTER to close this window." +read diff --git a/Tools/editor.bas b/Tools/editor.bas new file mode 100755 index 0000000..3e64fa1 --- /dev/null +++ b/Tools/editor.bas @@ -0,0 +1,395 @@ +' Disk file editor for FIFTH +' Svjatoslav Agejenko: n0@hot.ee + +DECLARE SUB fdisp () +DECLARE SUB fopen (a$) +DECLARE SUB ask (a$, b$) +DECLARE SUB addk (a$) +DECLARE SUB llen (a%, l%) +DECLARE SUB save (a%) +DECLARE SUB disp () +DEFINT A-Z + +DECLARE SUB load (a) +DECLARE SUB start () +DECLARE SUB edit () +DIM SHARED buf(0 TO 31, 0 TO 31) +DIM SHARED obuf(0 TO 31, 0 TO 31) +DIM SHARED byte AS STRING * 1 +DIM SHARED font(0 TO 20, 0 TO 255) +DIM SHARED eb +DIM SHARED keys(0 TO 10000) +DIM SHARED keyl, keyc +DIM SHARED curx, cury +DIM SHARED fil$(0 TO 1000) +DIM SHARED fline, froll +DIM SHARED filename$ + +start + +OPEN "..\..\disk.raw" FOR BINARY AS #1 + +edit + +CLOSE #1 +SYSTEM + +SUB addk (a$) +keys(keyl) = ASC(a$) +keyl = keyl + 1 +IF keyl > 10000 THEN keyl = 0 +END SUB + +SUB ask (a$, b$) +LOCATE 16, 34 +PRINT SPACE$(46) +LOCATE 16, 34 +COLOR 15 +PRINT a$ +COLOR 10 +LOCATE 16, 34 + LEN(a$) +INPUT "", b$ +LOCATE 16, 34 +PRINT SPACE$(46) +COLOR 15 +END SUB + +SUB disp + +FOR y = 0 TO 31 +FOR x = 0 TO 31 +c = buf(x, y) +IF c <> obuf(x, y) THEN + PUT (x * 8, y * 8), font(0, c), PSET + obuf(x, y) = c +END IF +NEXT x +NEXT y + +x1 = curx * 8 +y1 = cury * 8 +FOR y = y1 TO y1 + 7 +FOR x = x1 TO x1 + 7 +c = POINT(x, y) +IF c = 15 THEN c = 0 ELSE c = 10 +PSET (x, y), c +NEXT x +NEXT y +obuf(curx, cury) = -1 + +LOCATE 1, 77 +PRINT " " +LOCATE 1, 76 +PRINT buf(curx, cury) +END SUB + +SUB edit +fdisp +leb = -1 +m = 0 +1 +IF eb <> leb THEN + IF m = 1 THEN + save leb + m = 0 + END IF + load eb + leb = eb + LOCATE 1, 60 + PRINT "page:"; eb; " " +END IF +disp +2 +a$ = INKEY$ +bk = 0 +IF a$ = "" THEN + IF keyl = keyc THEN GOTO 2 + a$ = CHR$(keys(keyc)) + keyc = keyc + 1 + IF keyc > 10000 THEN keyc = 0 + bk = 1 +END IF + +IF a$ = CHR$(0) + CHR$(73) THEN eb = eb - 1 +IF a$ = CHR$(0) + CHR$(81) THEN eb = eb + 1 +IF a$ = CHR$(27) THEN GOTO 4 +IF a$ = CHR$(0) + "M" THEN curx = curx + 1 +IF a$ = CHR$(0) + "K" THEN curx = curx - 1 +IF a$ = CHR$(0) + "P" THEN cury = cury + 1 +IF a$ = CHR$(0) + "H" THEN cury = cury - 1 +IF a$ = CHR$(0) + "=" THEN ask "page: ", b$: eb = VAL(b$) +IF a$ = CHR$(0) + "?" THEN ask "file: ", b$: fopen b$ +IF a$ = CHR$(0) + CHR$(132) THEN fline = fline - 1: fdisp +IF a$ = CHR$(0) + CHR$(118) THEN fline = fline + 1: fdisp +IF a$ = CHR$(0) + CHR$(64) THEN ' F6 + d = 0 + FOR b = 1 TO LEN(fil$(fline)) + c$ = RIGHT$(LEFT$(fil$(fline), b), 1) + IF c$ = CHR$(9) THEN c$ = " " + IF c$ = " " OR c$ = CHR$(255) THEN d = d + 1 ELSE d = 0 + IF d < 2 THEN addk c$ + NEXT b +END IF + +IF a$ = CHR$(0) + ";" THEN + FOR y = 0 TO 31 + FOR x = 0 TO 31 + buf(x, y) = 255 + NEXT x + NEXT y + m = 1 +END IF + +IF a$ = CHR$(0) + CHR$(83) THEN + FOR b = curx TO 30 + buf(b, cury) = buf(b + 1, cury) + NEXT b + buf(31, cury) = 255 + m = 1 +END IF + +IF (a$ = CHR$(13)) AND (bk = 0) THEN +a$ = "" +IF cury < 31 THEN + FOR a = 31 TO cury + 2 STEP -1 + FOR b = 0 TO 31 + buf(b, a) = buf(b, a - 1) + NEXT b + NEXT a + FOR a = 0 TO 31 + buf(a, cury + 1) = 255 + NEXT a + FOR a = curx TO 31 + SWAP buf(a, cury), buf(a - curx, cury + 1) + NEXT a + m = 1 + cury = cury + 1 + curx = 0 +END IF +END IF + +IF LEN(a$) = 1 THEN + IF ASC(a$) = 32 THEN a$ = CHR$(255) + IF (a$ = CHR$(8)) AND (bk = 0) THEN + a$ = "" + IF curx > 0 THEN + FOR b = curx - 1 TO 30 + buf(b, cury) = buf(b + 1, cury) + NEXT b + buf(31, cury) = 255 + curx = curx - 1 + m = 1 + ELSE + IF cury > 0 THEN + llen cury - 1, a + curx = a + FOR b = a TO 31 + buf(b, cury - 1) = buf(b - a, cury) + NEXT b + FOR a = cury TO 30 + FOR b = 0 TO 31 + buf(b, a) = buf(b, a + 1) + NEXT b + NEXT a + FOR b = 0 TO 31 + buf(b, 31) = 255 + NEXT b + m = 1 + cury = cury - 1 + END IF + END IF + END IF +END IF + +IF a$ = CHR$(0) + "<" THEN +ask "decimal number:", b$ +b$ = HEX$(VAL(b$)) +FOR a = 1 TO LEN(b$) + c = ASC(RIGHT$(LEFT$(b$, a), 1)) + IF (c <= 57) AND (c >= 48) THEN d$ = CHR$(c - 48): addk d$ + IF (c <= 70) AND (c >= 65) THEN d$ = CHR$(c - 55): addk d$ +NEXT a +END IF + +IF a$ = CHR$(0) + CHR$(65) THEN +FOR a = 999 TO fline STEP -1 + fil$(a + 1) = fil$(a) +NEXT a +fil$(fline) = "" +FOR a = curx TO 31 + fil$(fline) = fil$(fline) + CHR$(buf(a, cury)) +NEXT a +fdisp +END IF + +IF a$ = CHR$(0) + ">" THEN +ask "ascii code:", b$ +a$ = CHR$(VAL(b$)) +END IF + +IF LEN(a$) = 1 THEN + FOR b = 31 TO curx + 1 STEP -1 + buf(b, cury) = buf(b - 1, cury) + NEXT b + buf(curx, cury) = ASC(a$) + curx = curx + 1 + m = 1 +END IF + +IF eb < 0 THEN eb = 0 +IF curx < 0 THEN curx = 0 +IF cury < 0 THEN cury = 0 +IF curx > 31 THEN curx = 31 +IF cury > 31 THEN cury = 31 +GOTO 1 +4 + +END SUB + +SUB fdisp +IF fline < 0 THEN fline = 0 +IF fline > 1000 THEN fline = 1000 +IF fline - froll > 10 THEN froll = fline - 10 +IF fline - froll < 0 THEN froll = fline +IF froll < 0 THEN froll = 0 + +LOCATE 17, 1 +PRINT SPACE$(80) +LOCATE 17, 1 +PRINT "file: " + filename$ + +LOCATE 17, 20 +PRINT "line:"; fline + +FOR a = 0 TO 10 + LOCATE a + 18, 1 + IF a + froll = fline THEN + COLOR 10 + IF fil$(a + froll) = SPACE$(LEN(fil$(a + froll))) THEN + FOR b = 1 TO 80 + PRINT CHR$(219); + NEXT b + GOTO 7 + END IF + ELSE + COLOR 12 + END IF + PRINT fil$(a + froll) + SPACE$(80 - LEN(fil$(a + froll))); +7 +NEXT a + +COLOR 15 +END SUB + +SUB fopen (a$) +filename$ = a$ +FOR b = 0 TO 1000 + fil$(b) = "" +NEXT b + +b = 0 +OPEN filename$ FOR INPUT AS #2 +5 +IF EOF(2) <> 0 THEN GOTO 6 +LINE INPUT #2, c$ +fil$(b) = c$ +b = b + 1 +IF b > 1000 THEN GOTO 6 +GOTO 5 +6 +CLOSE #2 + +fline = 0 +froll = 0 +fdisp +END SUB + +SUB llen (a, l) +FOR b = 31 TO 0 STEP -1 +IF buf(b, a) <> 255 THEN l = b + 1: GOTO 3 +NEXT b +l = 0 +3 +END SUB + +SUB load (a) +DIM c AS LONG +DIM a1 AS LONG +a1 = a +c = a1 * 1024 +SEEK #1, c + 1 +FOR y = 0 TO 31 + FOR x = 0 TO 31 + GET #1, , byte + buf(x, y) = ASC(byte) + NEXT x +NEXT y +END SUB + +SUB save (a) +DIM c AS LONG +DIM a1 AS LONG +a1 = a +c = a1 * 1024 +SEEK #1, c + 1 +FOR y = 0 TO 31 + FOR x = 0 TO 31 + byte = CHR$(buf(x, y)) + PUT #1, , byte + NEXT x +NEXT y +SOUND 5000, .1 +END SUB + +SUB start +SCREEN 12 +COLOR 15 +eb = 7 + +filename$ = "" +fline = 0 +froll = 0 +keyl = 0 +keyc = 0 + +OPEN "font.dat" FOR BINARY AS #1 +FOR f = 0 TO 255 +FOR y = 0 TO 7 +GET #1, , byte +n = ASC(byte) +b = 128 +FOR a = 0 TO 7 +IF n >= b THEN n = n - b: c = 15 ELSE c = 0 +b = b / 2 +PSET (a, y), c +NEXT a +NEXT y +GET (0, 0)-(7, 7), font(0, f) +NEXT f +CLOSE #1 + +FOR y = 0 TO 31 +FOR x = 0 TO 31 +obuf(x, y) = -1 +NEXT x +NEXT y + +LOCATE 1, 34 +PRINT "F1 - clear page" +LOCATE 2, 34 +PRINT "F2 - enter decimal number" +LOCATE 3, 34 +PRINT "F3 - goto page" +LOCATE 4, 34 +PRINT "F4 - enter character code" +LOCATE 5, 34 +PRINT "F5 - load source file" +LOCATE 6, 34 +PRINT "F6 - insert line from source file" +LOCATE 7, 34 +PRINT "F7 - copy line to source file" + +LOCATE 1, 71 +PRINT "code:" +END SUB + diff --git a/Tools/fsimport.bas b/Tools/fsimport.bas new file mode 100755 index 0000000..fc5e614 --- /dev/null +++ b/Tools/fsimport.bas @@ -0,0 +1,134 @@ +DECLARE SUB bytew (fi&, d&, addr&) +DECLARE SUB byter (fi&, addr&, d&) +DECLARE SUB dwordw (fi&, b&, a&) +DEFLNG A-Z + +DECLARE SUB savepath () +DECLARE SUB getson (a$) +DECLARE SUB start () + +DIM SHARED mitus, sona$(1 TO 50) +DIM SHARED byte AS STRING * 1 +DIM SHARED length +DIM SHARED srcfile$ + +start + +OPEN "..\disk.raw" FOR BINARY AS #1 +savepath +SEEK #1, 2000101 +OPEN srcfile$ FOR BINARY AS #2 +2 +IF EOF(2) <> 0 THEN GOTO 1 +GET #2, , byte +length = length + 1 +PUT #1, , byte +GOTO 2 +1 +CLOSE #2 +dwordw 1, length - 1, 2000000 +CLOSE #1 + +SYSTEM + +SUB byter (fi, addr, d) +SEEK #1, addr + 1 +GET fi, , byte +d = ASC(byte) +END SUB + +SUB bytew (fi, d, addr) +SEEK #1, addr + 1 +byte = CHR$(d) +PUT #1, , byte +END SUB + +SUB dwordr (fi, a, f) +byter fi, a, b +byter fi, a + 1, c +byter fi, a + 2, d +byter fi, a + 3, e +f = e * 16777216 +f = f + d * 65536 + c * 256 + b +END SUB + +SUB dwordw (fi, b, a) +c = b +d = c \ 16777216 +c = c - (d * 16777216) + +e = c \ 65536 +c = c - (e * 65536) + +f = c \ 256 +c = c - (f * 256) + +bytew fi, c, a +bytew fi, f, a + 1 +bytew fi, e, a + 2 +bytew fi, d, a + 3 +END SUB + +DEFSNG A-Z +SUB getson (a$) +mitus = 0 + +d = 1 +FOR b = 1 TO LEN(a$) +c$ = RIGHT$(LEFT$(a$, b), 1) +IF c$ = " " THEN +d = 1 +ELSE +IF d = 1 THEN +mitus = mitus + 1 +sona$(mitus) = "" +d = 0 +END IF +sona$(mitus) = sona$(mitus) + c$ +END IF +NEXT b +END SUB + +SUB savepath +a$ = COMMAND$ + "\" +f$ = "" +ext$ = "" +t$ = "" +m = 0 +FOR b = 1 TO LEN(a$) + c$ = RIGHT$(LEFT$(a$, b), 1) + IF c$ = "." THEN m = 1: GOTO 3 + IF c$ = "\" THEN + IF ext$ = "" THEN ext$ = "list" +4 IF LEN(ext$) < 4 THEN ext$ = ext$ + "_": GOTO 4 + t$ = t$ + ext$ + f$ + "\" + f$ = "" + ext$ = "" + GOTO 3 + END IF + IF m = 0 THEN f$ = f$ + c$ ELSE ext$ = ext$ + c$ +3 +NEXT b +t$ = LEFT$(t$, LEN(t$) - 1) + +' PRINT a$ +' PRINT t$ + +t$ = t$ + CHR$(254) +SEEK #1, 2000005 +PUT #1, , t$ + + + + +END SUB + +SUB start + +IF COMMAND$ = "" THEN END + +srcfile$ = COMMAND$ + + +END SUB + diff --git a/Tools/open with IntelliJ IDEA b/Tools/open with IntelliJ IDEA new file mode 100755 index 0000000..304bf94 --- /dev/null +++ b/Tools/open with IntelliJ IDEA @@ -0,0 +1,54 @@ +#!/bin/bash + +# This script launches IntelliJ IDEA with the current project +# directory. The script is designed to be run by double-clicking it in +# the GNOME Nautilus file manager. + +# First, we change the current working directory to the directory of +# the script. + +# "${0%/*}" gives us the path of the script itself, without the +# script's filename. + +# This command basically tells the system "change the current +# directory to the directory containing this script". + +cd "${0%/*}" + +# Then, we move up one directory level. +# The ".." tells the system to go to the parent directory of the current directory. +# This is done because we assume that the project directory is one level up from the script. +cd .. + +# Now, we use the 'setsid' command to start a new session and run +# IntelliJ IDEA in the background. 'setsid' is a UNIX command that +# runs a program in a new session. + +# The command 'idea .' opens IntelliJ IDEA with the current directory +# as the project directory. The '&' at the end is a UNIX command that +# runs the process in the background. The '> /dev/null' part tells +# the system to redirect all output (both stdout and stderr, denoted +# by '&') that would normally go to the terminal to go to /dev/null +# instead, which is a special file that discards all data written to +# it. + +setsid idea . &>/dev/null & + +# The 'disown' command is a shell built-in that removes a shell job +# from the shell's active list. Therefore, the shell will not send a +# SIGHUP to this particular job when the shell session is terminated. + +# '-h' option specifies that if the shell receives a SIGHUP, it also +# doesn't send a SIGHUP to the job. + +# '$!' is a shell special parameter that expands to the process ID of +# the most recent background job. +disown -h $! + + +sleep 2 + +# Finally, we use the 'exit' command to terminate the shell script. +# This command tells the system to close the terminal window after +# IntelliJ IDEA has been opened. +exit diff --git a/Tools/src25th.bas b/Tools/src25th.bas new file mode 100755 index 0000000..afab7df --- /dev/null +++ b/Tools/src25th.bas @@ -0,0 +1,66 @@ + +DECLARE SUB processLine (lineContent$, encodedString$) +DECLARE SUB readLine (fileLine$) +DECLARE SUB initializeProgram () +DIM SHARED byte AS STRING * 1 +DIM SHARED errorFlag + +initializeProgram + +OPEN COMMAND$ + ".src" FOR INPUT AS #1 +IF errorFlag = 0 THEN KILL COMMAND$ + ".5th" +OPEN COMMAND$ + ".5th" FOR BINARY AS #2 + +ReadLoop: +IF EOF(1) <> 0 THEN GOTO EndOfFile +LINE INPUT #1, fileLine$ + +encodedString$ = "" +tempString$ = "" +FOR charIndex = 1 TO LEN(fileLine$) + currentChar$ = RIGHT$(LEFT$(fileLine$, charIndex), 1) + IF currentChar$ = " " THEN processLine tempString$, encodedString$: encodedString$ = encodedString$ + CHR$(255): GOTO NextChar + IF currentChar$ = CHR$(9) THEN processLine tempString$, encodedString$: encodedString$ = encodedString$ + CHR$(253): GOTO NextChar + tempString$ = tempString$ + currentChar$ + NextChar: +NEXT charIndex + +processLine tempString$, encodedString$ +encodedString$ = encodedString$ + CHR$(254) + +FOR charIndex = 1 TO LEN(encodedString$) + byte = RIGHT$(LEFT$(encodedString$, charIndex), 1) + PUT #2, , byte +NEXT charIndex +GOTO ReadLoop +EndOfFile: + +CLOSE #2 +CLOSE #1 + +SYSTEM + +SUB processLine (lineContent$, encodedString$) + +tempEncoded$ = "" +FOR charPosition = 1 TO LEN(lineContent$) + asciiValue = ASC(RIGHT$(LEFT$(lineContent$, charPosition), 1)) + IF (asciiValue >= 48) AND (asciiValue <= 57) THEN asciiValue = asciiValue - 48: GOTO ValidChar + IF (asciiValue >= 65) AND (asciiValue <= 70) THEN asciiValue = asciiValue - 55: GOTO ValidChar + IF (asciiValue = 45) AND (charPosition = 1) THEN GOTO ValidChar + GOTO InvalidChar + ValidChar: + tempEncoded$ = tempEncoded$ + CHR$(asciiValue) +NEXT charPosition + +lineContent$ = tempEncoded$ +InvalidChar: + +encodedString$ = encodedString$ + lineContent$ +lineContent$ = "" +END SUB + +SUB initializeProgram +IF COMMAND$ = "" THEN END +errorFlag = 0 +END SUB diff --git a/Tools/synchronize b/Tools/synchronize new file mode 100755 index 0000000..bbc8d16 --- /dev/null +++ b/Tools/synchronize @@ -0,0 +1,21 @@ +#!/bin/bash +cd "${0%/*}"; if [ "$1" != "T" ]; then gnome-terminal -- "$0" T; exit; fi + +cd .. + +# pull latest content from repository +git pull + +# stage all changes +git add --all + +# open GUI to confirm/revert/commit changes +cola + +# push changes to remote repository +git push + + +echo "" +echo "Press ENTER to close this window." +read diff --git a/doc/index.org b/doc/index.org index 6d95c01..aa74f94 100644 --- a/doc/index.org +++ b/doc/index.org @@ -71,17 +71,22 @@ enthusiast, a systems programming student, or a curious developer. ** Screenshots +#+attr_html: :class responsive-img +#+attr_latex: :width 1000px [[file:screenshots/start.png]] Startup screen diplaying Fifth logo and full file list. +#+attr_html: :class responsive-img +#+attr_latex: :width 1000px [[file:screenshots/dictionary.png]] Sample words defined. Most of the words are commands that can be executed interactively from the command line or from a file. When executed, they can be selectively compiled or interpreted. - +#+attr_html: :class responsive-img +#+attr_latex: :width 1000px [[file:screenshots/text editor.png]] Built in text editor. @@ -145,6 +150,8 @@ representation ? Here alternative hexadecimal number representation format is devised: +#+attr_html: :class responsive-img +#+attr_latex: :width 1000px [[file:numbers.png][file:numbers.png]] Essentially square is split into 4 triangles. Each triangle represents diff --git a/doc/numbers.png b/doc/numbers.png index 9a15593..0ccd07b 100644 Binary files a/doc/numbers.png and b/doc/numbers.png differ diff --git a/font.dat b/font.dat new file mode 100755 index 0000000..980f716 Binary files /dev/null and b/font.dat differ diff --git a/tools/5th2src.bas b/tools/5th2src.bas deleted file mode 100755 index 7293f46..0000000 --- a/tools/5th2src.bas +++ /dev/null @@ -1,68 +0,0 @@ -' Utility to convert given file from special FSCII encoding to ASCII encoding. - -DECLARE SUB getline (line$) -DECLARE SUB initializeProgram () -DIM SHARED byte AS STRING * 1 -DIM SHARED endOfFile - -initializeProgram - -OPEN COMMAND$ + ".5th" FOR BINARY AS #1 -OPEN COMMAND$ + ".src" FOR OUTPUT AS #2 - -' Start reading lines from the file -1 -getline line$ -IF endOfFile = 1 THEN GOTO 2 -PRINT #2, line$ -GOTO 1 - -' End of file reached -2 - -CLOSE #2 -CLOSE #1 - -SYSTEM - -SUB getline (line$) - -line$ = "" - -' Start reading bytes from the file -3 -IF EOF(1) <> 0 THEN endOfFile = 1: GOTO 4 -GET #1, , byte - -' Convert non-printable characters to printable ones -IF ASC(byte) <= 9 THEN - byte = CHR$(48 + ASC(byte)) -END IF -IF ASC(byte) <= 15 THEN - byte = CHR$(65 + ASC(byte) - 10) -END IF -IF ASC(byte) = 255 THEN - byte = " " -END IF -IF ASC(byte) = 253 THEN - byte = CHR$(9) -END IF - -' Check for end of line character -IF byte = CHR$(254) THEN GOTO 4 - -line$ = line$ + byte -GOTO 3 - -' End of line reached -4 - -END SUB - -SUB initializeProgram -endOfFile = 0 - -' Check if the command-line argument is empty -IF COMMAND$ = "" THEN END - -END SUB diff --git a/tools/Update web site b/tools/Update web site deleted file mode 100755 index d7d5fd7..0000000 --- a/tools/Update web site +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -cd "${0%/*}"; if [ "$1" != "T" ]; then gnome-terminal -- "$0" T; exit; fi; -cd .. - -# Function to export org to html using emacs in batch mode -export_org_to_html() { - local org_file=$1 - local dir=$(dirname "$org_file") - local base=$(basename "$org_file" .org) - ( - cd "$dir" || return 1 - local html_file="${base}.html" - if [ -f "$html_file" ]; then - rm -f "$html_file" - fi - echo "Exporting: $org_file → $dir/$html_file" - emacs --batch -l ~/.emacs --visit="${base}.org" --funcall=org-html-export-to-html --kill - if [ $? -eq 0 ]; then - echo "✓ Successfully exported $org_file" - else - echo "✗ Failed to export $org_file" - return 1 - fi - ) -} - -echo "🔍 Searching for .org files in doc/ ..." -echo "=======================================" - -mapfile -t ORG_FILES < <(find doc -type f -name "*.org" | sort) - -if [ ${#ORG_FILES[@]} -eq 0 ]; then - echo "❌ No .org files found!" - echo "" - echo "Press ENTER to close this window." - read - exit 1 -fi - -echo "Found ${#ORG_FILES[@]} .org file(s):" -printf '%s\n' "${ORG_FILES[@]}" -echo "=======================================" - -SUCCESS_COUNT=0 -FAILED_COUNT=0 - -for org_file in "${ORG_FILES[@]}"; do - export_org_to_html "$org_file" - if [ $? -eq 0 ]; then - ((SUCCESS_COUNT++)) - else - ((FAILED_COUNT++)) - fi -done - -echo "=======================================" -echo "📊 SUMMARY:" -echo " ✓ Successful: $SUCCESS_COUNT" -echo " ✗ Failed: $FAILED_COUNT" -echo " Total: $((SUCCESS_COUNT + FAILED_COUNT))" -echo "" - -echo "📤 Uploading to server..." -rsync -avz --delete -e 'ssh -p 10006' doc/ n0@www3.svjatoslav.eu:/mnt/big/projects/fifth/ - -if [ $? -eq 0 ]; then - echo "✓ Upload completed successfully!" -else - echo "✗ Upload failed!" -fi - -echo "" -echo "Press ENTER to close this window." -read diff --git a/tools/editor.bas b/tools/editor.bas deleted file mode 100755 index 3e64fa1..0000000 --- a/tools/editor.bas +++ /dev/null @@ -1,395 +0,0 @@ -' Disk file editor for FIFTH -' Svjatoslav Agejenko: n0@hot.ee - -DECLARE SUB fdisp () -DECLARE SUB fopen (a$) -DECLARE SUB ask (a$, b$) -DECLARE SUB addk (a$) -DECLARE SUB llen (a%, l%) -DECLARE SUB save (a%) -DECLARE SUB disp () -DEFINT A-Z - -DECLARE SUB load (a) -DECLARE SUB start () -DECLARE SUB edit () -DIM SHARED buf(0 TO 31, 0 TO 31) -DIM SHARED obuf(0 TO 31, 0 TO 31) -DIM SHARED byte AS STRING * 1 -DIM SHARED font(0 TO 20, 0 TO 255) -DIM SHARED eb -DIM SHARED keys(0 TO 10000) -DIM SHARED keyl, keyc -DIM SHARED curx, cury -DIM SHARED fil$(0 TO 1000) -DIM SHARED fline, froll -DIM SHARED filename$ - -start - -OPEN "..\..\disk.raw" FOR BINARY AS #1 - -edit - -CLOSE #1 -SYSTEM - -SUB addk (a$) -keys(keyl) = ASC(a$) -keyl = keyl + 1 -IF keyl > 10000 THEN keyl = 0 -END SUB - -SUB ask (a$, b$) -LOCATE 16, 34 -PRINT SPACE$(46) -LOCATE 16, 34 -COLOR 15 -PRINT a$ -COLOR 10 -LOCATE 16, 34 + LEN(a$) -INPUT "", b$ -LOCATE 16, 34 -PRINT SPACE$(46) -COLOR 15 -END SUB - -SUB disp - -FOR y = 0 TO 31 -FOR x = 0 TO 31 -c = buf(x, y) -IF c <> obuf(x, y) THEN - PUT (x * 8, y * 8), font(0, c), PSET - obuf(x, y) = c -END IF -NEXT x -NEXT y - -x1 = curx * 8 -y1 = cury * 8 -FOR y = y1 TO y1 + 7 -FOR x = x1 TO x1 + 7 -c = POINT(x, y) -IF c = 15 THEN c = 0 ELSE c = 10 -PSET (x, y), c -NEXT x -NEXT y -obuf(curx, cury) = -1 - -LOCATE 1, 77 -PRINT " " -LOCATE 1, 76 -PRINT buf(curx, cury) -END SUB - -SUB edit -fdisp -leb = -1 -m = 0 -1 -IF eb <> leb THEN - IF m = 1 THEN - save leb - m = 0 - END IF - load eb - leb = eb - LOCATE 1, 60 - PRINT "page:"; eb; " " -END IF -disp -2 -a$ = INKEY$ -bk = 0 -IF a$ = "" THEN - IF keyl = keyc THEN GOTO 2 - a$ = CHR$(keys(keyc)) - keyc = keyc + 1 - IF keyc > 10000 THEN keyc = 0 - bk = 1 -END IF - -IF a$ = CHR$(0) + CHR$(73) THEN eb = eb - 1 -IF a$ = CHR$(0) + CHR$(81) THEN eb = eb + 1 -IF a$ = CHR$(27) THEN GOTO 4 -IF a$ = CHR$(0) + "M" THEN curx = curx + 1 -IF a$ = CHR$(0) + "K" THEN curx = curx - 1 -IF a$ = CHR$(0) + "P" THEN cury = cury + 1 -IF a$ = CHR$(0) + "H" THEN cury = cury - 1 -IF a$ = CHR$(0) + "=" THEN ask "page: ", b$: eb = VAL(b$) -IF a$ = CHR$(0) + "?" THEN ask "file: ", b$: fopen b$ -IF a$ = CHR$(0) + CHR$(132) THEN fline = fline - 1: fdisp -IF a$ = CHR$(0) + CHR$(118) THEN fline = fline + 1: fdisp -IF a$ = CHR$(0) + CHR$(64) THEN ' F6 - d = 0 - FOR b = 1 TO LEN(fil$(fline)) - c$ = RIGHT$(LEFT$(fil$(fline), b), 1) - IF c$ = CHR$(9) THEN c$ = " " - IF c$ = " " OR c$ = CHR$(255) THEN d = d + 1 ELSE d = 0 - IF d < 2 THEN addk c$ - NEXT b -END IF - -IF a$ = CHR$(0) + ";" THEN - FOR y = 0 TO 31 - FOR x = 0 TO 31 - buf(x, y) = 255 - NEXT x - NEXT y - m = 1 -END IF - -IF a$ = CHR$(0) + CHR$(83) THEN - FOR b = curx TO 30 - buf(b, cury) = buf(b + 1, cury) - NEXT b - buf(31, cury) = 255 - m = 1 -END IF - -IF (a$ = CHR$(13)) AND (bk = 0) THEN -a$ = "" -IF cury < 31 THEN - FOR a = 31 TO cury + 2 STEP -1 - FOR b = 0 TO 31 - buf(b, a) = buf(b, a - 1) - NEXT b - NEXT a - FOR a = 0 TO 31 - buf(a, cury + 1) = 255 - NEXT a - FOR a = curx TO 31 - SWAP buf(a, cury), buf(a - curx, cury + 1) - NEXT a - m = 1 - cury = cury + 1 - curx = 0 -END IF -END IF - -IF LEN(a$) = 1 THEN - IF ASC(a$) = 32 THEN a$ = CHR$(255) - IF (a$ = CHR$(8)) AND (bk = 0) THEN - a$ = "" - IF curx > 0 THEN - FOR b = curx - 1 TO 30 - buf(b, cury) = buf(b + 1, cury) - NEXT b - buf(31, cury) = 255 - curx = curx - 1 - m = 1 - ELSE - IF cury > 0 THEN - llen cury - 1, a - curx = a - FOR b = a TO 31 - buf(b, cury - 1) = buf(b - a, cury) - NEXT b - FOR a = cury TO 30 - FOR b = 0 TO 31 - buf(b, a) = buf(b, a + 1) - NEXT b - NEXT a - FOR b = 0 TO 31 - buf(b, 31) = 255 - NEXT b - m = 1 - cury = cury - 1 - END IF - END IF - END IF -END IF - -IF a$ = CHR$(0) + "<" THEN -ask "decimal number:", b$ -b$ = HEX$(VAL(b$)) -FOR a = 1 TO LEN(b$) - c = ASC(RIGHT$(LEFT$(b$, a), 1)) - IF (c <= 57) AND (c >= 48) THEN d$ = CHR$(c - 48): addk d$ - IF (c <= 70) AND (c >= 65) THEN d$ = CHR$(c - 55): addk d$ -NEXT a -END IF - -IF a$ = CHR$(0) + CHR$(65) THEN -FOR a = 999 TO fline STEP -1 - fil$(a + 1) = fil$(a) -NEXT a -fil$(fline) = "" -FOR a = curx TO 31 - fil$(fline) = fil$(fline) + CHR$(buf(a, cury)) -NEXT a -fdisp -END IF - -IF a$ = CHR$(0) + ">" THEN -ask "ascii code:", b$ -a$ = CHR$(VAL(b$)) -END IF - -IF LEN(a$) = 1 THEN - FOR b = 31 TO curx + 1 STEP -1 - buf(b, cury) = buf(b - 1, cury) - NEXT b - buf(curx, cury) = ASC(a$) - curx = curx + 1 - m = 1 -END IF - -IF eb < 0 THEN eb = 0 -IF curx < 0 THEN curx = 0 -IF cury < 0 THEN cury = 0 -IF curx > 31 THEN curx = 31 -IF cury > 31 THEN cury = 31 -GOTO 1 -4 - -END SUB - -SUB fdisp -IF fline < 0 THEN fline = 0 -IF fline > 1000 THEN fline = 1000 -IF fline - froll > 10 THEN froll = fline - 10 -IF fline - froll < 0 THEN froll = fline -IF froll < 0 THEN froll = 0 - -LOCATE 17, 1 -PRINT SPACE$(80) -LOCATE 17, 1 -PRINT "file: " + filename$ - -LOCATE 17, 20 -PRINT "line:"; fline - -FOR a = 0 TO 10 - LOCATE a + 18, 1 - IF a + froll = fline THEN - COLOR 10 - IF fil$(a + froll) = SPACE$(LEN(fil$(a + froll))) THEN - FOR b = 1 TO 80 - PRINT CHR$(219); - NEXT b - GOTO 7 - END IF - ELSE - COLOR 12 - END IF - PRINT fil$(a + froll) + SPACE$(80 - LEN(fil$(a + froll))); -7 -NEXT a - -COLOR 15 -END SUB - -SUB fopen (a$) -filename$ = a$ -FOR b = 0 TO 1000 - fil$(b) = "" -NEXT b - -b = 0 -OPEN filename$ FOR INPUT AS #2 -5 -IF EOF(2) <> 0 THEN GOTO 6 -LINE INPUT #2, c$ -fil$(b) = c$ -b = b + 1 -IF b > 1000 THEN GOTO 6 -GOTO 5 -6 -CLOSE #2 - -fline = 0 -froll = 0 -fdisp -END SUB - -SUB llen (a, l) -FOR b = 31 TO 0 STEP -1 -IF buf(b, a) <> 255 THEN l = b + 1: GOTO 3 -NEXT b -l = 0 -3 -END SUB - -SUB load (a) -DIM c AS LONG -DIM a1 AS LONG -a1 = a -c = a1 * 1024 -SEEK #1, c + 1 -FOR y = 0 TO 31 - FOR x = 0 TO 31 - GET #1, , byte - buf(x, y) = ASC(byte) - NEXT x -NEXT y -END SUB - -SUB save (a) -DIM c AS LONG -DIM a1 AS LONG -a1 = a -c = a1 * 1024 -SEEK #1, c + 1 -FOR y = 0 TO 31 - FOR x = 0 TO 31 - byte = CHR$(buf(x, y)) - PUT #1, , byte - NEXT x -NEXT y -SOUND 5000, .1 -END SUB - -SUB start -SCREEN 12 -COLOR 15 -eb = 7 - -filename$ = "" -fline = 0 -froll = 0 -keyl = 0 -keyc = 0 - -OPEN "font.dat" FOR BINARY AS #1 -FOR f = 0 TO 255 -FOR y = 0 TO 7 -GET #1, , byte -n = ASC(byte) -b = 128 -FOR a = 0 TO 7 -IF n >= b THEN n = n - b: c = 15 ELSE c = 0 -b = b / 2 -PSET (a, y), c -NEXT a -NEXT y -GET (0, 0)-(7, 7), font(0, f) -NEXT f -CLOSE #1 - -FOR y = 0 TO 31 -FOR x = 0 TO 31 -obuf(x, y) = -1 -NEXT x -NEXT y - -LOCATE 1, 34 -PRINT "F1 - clear page" -LOCATE 2, 34 -PRINT "F2 - enter decimal number" -LOCATE 3, 34 -PRINT "F3 - goto page" -LOCATE 4, 34 -PRINT "F4 - enter character code" -LOCATE 5, 34 -PRINT "F5 - load source file" -LOCATE 6, 34 -PRINT "F6 - insert line from source file" -LOCATE 7, 34 -PRINT "F7 - copy line to source file" - -LOCATE 1, 71 -PRINT "code:" -END SUB - diff --git a/tools/font.dat b/tools/font.dat deleted file mode 100755 index 980f716..0000000 Binary files a/tools/font.dat and /dev/null differ diff --git a/tools/fsimport.bas b/tools/fsimport.bas deleted file mode 100755 index fc5e614..0000000 --- a/tools/fsimport.bas +++ /dev/null @@ -1,134 +0,0 @@ -DECLARE SUB bytew (fi&, d&, addr&) -DECLARE SUB byter (fi&, addr&, d&) -DECLARE SUB dwordw (fi&, b&, a&) -DEFLNG A-Z - -DECLARE SUB savepath () -DECLARE SUB getson (a$) -DECLARE SUB start () - -DIM SHARED mitus, sona$(1 TO 50) -DIM SHARED byte AS STRING * 1 -DIM SHARED length -DIM SHARED srcfile$ - -start - -OPEN "..\disk.raw" FOR BINARY AS #1 -savepath -SEEK #1, 2000101 -OPEN srcfile$ FOR BINARY AS #2 -2 -IF EOF(2) <> 0 THEN GOTO 1 -GET #2, , byte -length = length + 1 -PUT #1, , byte -GOTO 2 -1 -CLOSE #2 -dwordw 1, length - 1, 2000000 -CLOSE #1 - -SYSTEM - -SUB byter (fi, addr, d) -SEEK #1, addr + 1 -GET fi, , byte -d = ASC(byte) -END SUB - -SUB bytew (fi, d, addr) -SEEK #1, addr + 1 -byte = CHR$(d) -PUT #1, , byte -END SUB - -SUB dwordr (fi, a, f) -byter fi, a, b -byter fi, a + 1, c -byter fi, a + 2, d -byter fi, a + 3, e -f = e * 16777216 -f = f + d * 65536 + c * 256 + b -END SUB - -SUB dwordw (fi, b, a) -c = b -d = c \ 16777216 -c = c - (d * 16777216) - -e = c \ 65536 -c = c - (e * 65536) - -f = c \ 256 -c = c - (f * 256) - -bytew fi, c, a -bytew fi, f, a + 1 -bytew fi, e, a + 2 -bytew fi, d, a + 3 -END SUB - -DEFSNG A-Z -SUB getson (a$) -mitus = 0 - -d = 1 -FOR b = 1 TO LEN(a$) -c$ = RIGHT$(LEFT$(a$, b), 1) -IF c$ = " " THEN -d = 1 -ELSE -IF d = 1 THEN -mitus = mitus + 1 -sona$(mitus) = "" -d = 0 -END IF -sona$(mitus) = sona$(mitus) + c$ -END IF -NEXT b -END SUB - -SUB savepath -a$ = COMMAND$ + "\" -f$ = "" -ext$ = "" -t$ = "" -m = 0 -FOR b = 1 TO LEN(a$) - c$ = RIGHT$(LEFT$(a$, b), 1) - IF c$ = "." THEN m = 1: GOTO 3 - IF c$ = "\" THEN - IF ext$ = "" THEN ext$ = "list" -4 IF LEN(ext$) < 4 THEN ext$ = ext$ + "_": GOTO 4 - t$ = t$ + ext$ + f$ + "\" - f$ = "" - ext$ = "" - GOTO 3 - END IF - IF m = 0 THEN f$ = f$ + c$ ELSE ext$ = ext$ + c$ -3 -NEXT b -t$ = LEFT$(t$, LEN(t$) - 1) - -' PRINT a$ -' PRINT t$ - -t$ = t$ + CHR$(254) -SEEK #1, 2000005 -PUT #1, , t$ - - - - -END SUB - -SUB start - -IF COMMAND$ = "" THEN END - -srcfile$ = COMMAND$ - - -END SUB - diff --git a/tools/open with IntelliJ IDEA b/tools/open with IntelliJ IDEA deleted file mode 100755 index 304bf94..0000000 --- a/tools/open with IntelliJ IDEA +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -# This script launches IntelliJ IDEA with the current project -# directory. The script is designed to be run by double-clicking it in -# the GNOME Nautilus file manager. - -# First, we change the current working directory to the directory of -# the script. - -# "${0%/*}" gives us the path of the script itself, without the -# script's filename. - -# This command basically tells the system "change the current -# directory to the directory containing this script". - -cd "${0%/*}" - -# Then, we move up one directory level. -# The ".." tells the system to go to the parent directory of the current directory. -# This is done because we assume that the project directory is one level up from the script. -cd .. - -# Now, we use the 'setsid' command to start a new session and run -# IntelliJ IDEA in the background. 'setsid' is a UNIX command that -# runs a program in a new session. - -# The command 'idea .' opens IntelliJ IDEA with the current directory -# as the project directory. The '&' at the end is a UNIX command that -# runs the process in the background. The '> /dev/null' part tells -# the system to redirect all output (both stdout and stderr, denoted -# by '&') that would normally go to the terminal to go to /dev/null -# instead, which is a special file that discards all data written to -# it. - -setsid idea . &>/dev/null & - -# The 'disown' command is a shell built-in that removes a shell job -# from the shell's active list. Therefore, the shell will not send a -# SIGHUP to this particular job when the shell session is terminated. - -# '-h' option specifies that if the shell receives a SIGHUP, it also -# doesn't send a SIGHUP to the job. - -# '$!' is a shell special parameter that expands to the process ID of -# the most recent background job. -disown -h $! - - -sleep 2 - -# Finally, we use the 'exit' command to terminate the shell script. -# This command tells the system to close the terminal window after -# IntelliJ IDEA has been opened. -exit diff --git a/tools/src25th.bas b/tools/src25th.bas deleted file mode 100755 index afab7df..0000000 --- a/tools/src25th.bas +++ /dev/null @@ -1,66 +0,0 @@ - -DECLARE SUB processLine (lineContent$, encodedString$) -DECLARE SUB readLine (fileLine$) -DECLARE SUB initializeProgram () -DIM SHARED byte AS STRING * 1 -DIM SHARED errorFlag - -initializeProgram - -OPEN COMMAND$ + ".src" FOR INPUT AS #1 -IF errorFlag = 0 THEN KILL COMMAND$ + ".5th" -OPEN COMMAND$ + ".5th" FOR BINARY AS #2 - -ReadLoop: -IF EOF(1) <> 0 THEN GOTO EndOfFile -LINE INPUT #1, fileLine$ - -encodedString$ = "" -tempString$ = "" -FOR charIndex = 1 TO LEN(fileLine$) - currentChar$ = RIGHT$(LEFT$(fileLine$, charIndex), 1) - IF currentChar$ = " " THEN processLine tempString$, encodedString$: encodedString$ = encodedString$ + CHR$(255): GOTO NextChar - IF currentChar$ = CHR$(9) THEN processLine tempString$, encodedString$: encodedString$ = encodedString$ + CHR$(253): GOTO NextChar - tempString$ = tempString$ + currentChar$ - NextChar: -NEXT charIndex - -processLine tempString$, encodedString$ -encodedString$ = encodedString$ + CHR$(254) - -FOR charIndex = 1 TO LEN(encodedString$) - byte = RIGHT$(LEFT$(encodedString$, charIndex), 1) - PUT #2, , byte -NEXT charIndex -GOTO ReadLoop -EndOfFile: - -CLOSE #2 -CLOSE #1 - -SYSTEM - -SUB processLine (lineContent$, encodedString$) - -tempEncoded$ = "" -FOR charPosition = 1 TO LEN(lineContent$) - asciiValue = ASC(RIGHT$(LEFT$(lineContent$, charPosition), 1)) - IF (asciiValue >= 48) AND (asciiValue <= 57) THEN asciiValue = asciiValue - 48: GOTO ValidChar - IF (asciiValue >= 65) AND (asciiValue <= 70) THEN asciiValue = asciiValue - 55: GOTO ValidChar - IF (asciiValue = 45) AND (charPosition = 1) THEN GOTO ValidChar - GOTO InvalidChar - ValidChar: - tempEncoded$ = tempEncoded$ + CHR$(asciiValue) -NEXT charPosition - -lineContent$ = tempEncoded$ -InvalidChar: - -encodedString$ = encodedString$ + lineContent$ -lineContent$ = "" -END SUB - -SUB initializeProgram -IF COMMAND$ = "" THEN END -errorFlag = 0 -END SUB diff --git a/tools/synchronize b/tools/synchronize deleted file mode 100755 index bbc8d16..0000000 --- a/tools/synchronize +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -cd "${0%/*}"; if [ "$1" != "T" ]; then gnome-terminal -- "$0" T; exit; fi - -cd .. - -# pull latest content from repository -git pull - -# stage all changes -git add --all - -# open GUI to confirm/revert/commit changes -cola - -# push changes to remote repository -git push - - -echo "" -echo "Press ENTER to close this window." -read