Skip to content

Commit a8757f8

Browse files
committed
Update language reference page
1 parent 9666d10 commit a8757f8

File tree

9 files changed

+944
-55
lines changed

9 files changed

+944
-55
lines changed

_build/pages/articles.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [FLTK](/pages/fltk.html)
1111
- [TRY/CATCH](/pages/trycatch.html)
1212
- [Network programming](/pages/network.html)
13+
- [Contributing](/pages/contributing.html)
1314

1415
## Programming SmallBASIC by Gerard Thomas Labèrnia
1516

_build/pages/contributing.markdown

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributing
2+
3+
## Reference documentation
4+
5+
1 Navigate to the documentation page:
6+
7+
- https://github.com/smallbasic/smallbasic.github.io
8+
9+
2 Click clone to create your own copy.
10+
11+
3 In your clone, navigate to any of the poorly documented SUBs/FUNCs
12+
13+
- For example:
14+
15+
- https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/reference/569-data-data.markdown
16+
17+
4 Click the edit link to make some improvements.
18+
19+
- Since this is BASIC, in a lot of cases there's already some other place that could be used for "inspiration" for example;
20+
21+
- https://www.c64-wiki.com/wiki/DATA
22+
23+
5 Commit and raise a pull request.
24+
25+
- Click "Create a new branch" for this commit and start a pull request.
26+
- Click "Learn more about pull requests."
27+
- Click "commit"
28+
- You don't need any special software to do any of this, just a web browser
File renamed without changes.

_build/refindex.bas

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
unit refindex
22

33
export build
4+
export build_all
45

56
sub build(label_str, package)
67
tload "reference.json", s, 1
@@ -29,3 +30,27 @@ sub build(label_str, package)
2930
next i
3031
print ("</ul></div></div>")
3132
end
33+
34+
sub build_all()
35+
local s, i, j, keywords
36+
tload "reference.json", s, 1
37+
local ref = array(s)
38+
39+
for i in ref
40+
for j = 0 to len(ref[i]) - 1
41+
keywords << [ref[i][j].keyword, ref[i][j].help, ref[i][j].nodeID]
42+
print
43+
next j
44+
next i
45+
46+
func cmpfunc(a, b)
47+
return iff(a[0] == b[0], 0, iff(a[0] < b[0], -1, 1))
48+
end
49+
50+
sort keywords use cmpfunc(x,y)
51+
52+
for i = 0 to len(keywords) - 1
53+
print ("<a title=\"" + keywords[i][1] + "\" href=\"/reference/" + keywords[i][2] + ".html\">" + keywords[i][0] + "</a>&nbsp;")
54+
next i
55+
end
56+

_build/scripts/reference.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<div class="article">
2+
<h1 id="language-reference">Language reference</h1>
3+
<p>BASIC is a very simple language and it is a perfect tool for calculations or utilities. Its name stands for (B)eginners (A)ll-purpose (S)ymbolic (I)nstruction (c)ode. It was developed by John Kemeny and Thomas Kurtz at Dartmouth College during the middle of 1960, and was one of the most popular languages for several decades.</p>
4+
5+
<a href="/pages/reference_help.html">More...</a>
6+
7+
<div class="lavenderBox">
8+
<div class="header">Keywords</div>
9+
<div class="linklist">
10+
{% import refindex
11+
refindex.build_all()
12+
%}
13+
</div>
14+
</div>
15+
</div>

pages/articles.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ <h1 id="articles">Articles</h1>
7777
<li><a href="/pages/fltk.html">FLTK</a></li>
7878
<li><a href="/pages/trycatch.html">TRY/CATCH</a></li>
7979
<li><a href="/pages/network.html">Network programming</a></li>
80+
<li><a href="/pages/contributing.html">Contributing</a></li>
8081
</ul>
8182
<h2 id="programming-smallbasic-by-gerard-thomas-labèrnia">Programming SmallBASIC by Gerard Thomas Labèrnia</h2>
8283
<ul>

pages/contributing.html

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<title>SmallBASIC | contributing</title>
8+
<meta name="description" content="SmallBASIC | One more basic">
9+
<link rel="canonical" href="/contributing.html">
10+
<link rel="keywords" href="contributing">
11+
<link rel="stylesheet" href="/css/style.css">
12+
<link rel="icon" type="image/png" href="/images/sb-desktop-32x32.png">
13+
</head>
14+
<body>
15+
<div class="wrapAll clearfix">
16+
<div class="sidebar">
17+
<div class="logo">
18+
<a href="/"><img src='/images/sb-desktop-128x128.png' alt="logo"></a>
19+
</div>
20+
<div class="navigation">
21+
<h4>SmallBASIC</h4>
22+
<ul>
23+
<li><a href="/">Main page</a></li>
24+
<li><a href="/pages/download.html">Download</a></li>
25+
<li><a href="/pages/reference.html">Language reference</a></li>
26+
<li><a href="/pages/samples.html">Code library</a></li>
27+
</ul>
28+
<hr class="menuSeparator"/>
29+
<ul>
30+
<li><a href="/pages/articles.html">Artices</a></li>
31+
<li><a href="/pages/community.html">Community</a></li>
32+
<li><a href="/pages/changelog.html">Changelog</a></li>
33+
<li><a href="/pages/screenshots.html">Screenshots</a></li>
34+
<li><a href="/pages/links.html">Links</a></li>
35+
</ul>
36+
<hr class="menuSeparator"/>
37+
<ul>
38+
<li><a href="https://play.google.com/store/apps/details?id=net.aircave">Air Cave Game</a></li>
39+
</ul>
40+
</div>
41+
</div>
42+
<div class="mainsection">
43+
<div class="tabs clearfix">
44+
<div class="tabsLeft">
45+
<ul>
46+
<li><a href="#" class="active">Article</a></li>
47+
<li><a href="https://www.syntaxbomb.com/index.php/board,54.0.html">Discuss</a></li>
48+
</ul>
49+
</div>
50+
<div id="simpleSearch">
51+
<div id="submitSearch"></div>
52+
<form action="https://github.com/smallbasic/smallbasic.github.io/search"
53+
target="_github" accept-charset="UTF-8" method="get" style="display:inline">
54+
<input type="hidden" class="js-site-search-type-field" name="type">
55+
<input type="hidden" name="utf8" value="">
56+
<input type="hidden" name="l" value="Visual Basic">
57+
<input type="text" name="q" placeholder="Search" size="12" id="searchInput">
58+
</form>
59+
</div>
60+
<div class="tabsRight">
61+
<ul>
62+
<li><a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/pages/contributing.markdown">View source</a></li>
63+
<li><a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/commits/master/_build/pages/contributing.markdown">View history</a></li>
64+
</ul>
65+
</div>
66+
</div>
67+
<div class="article">
68+
<h1 id="contributing">Contributing</h1>
69+
<h2 id="reference-documentation">Reference documentation</h2>
70+
<p>1 Navigate to the documentation page:</p>
71+
<ul>
72+
<li>https://github.com/smallbasic/smallbasic.github.io</li>
73+
</ul>
74+
<p>2 Click clone to create your own copy.</p>
75+
<p>3 In your clone, navigate to any of the poorly documented SUBs/FUNCs</p>
76+
<ul>
77+
<li><p>For example:</p></li>
78+
<li><p>https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/reference/569-data-data.markdown</p></li>
79+
</ul>
80+
<p>4 Click the edit link to make some improvements.</p>
81+
<ul>
82+
<li><p>Since this is BASIC, in a lot of cases there’s already some other place that could be used for “inspiration” for example;</p></li>
83+
<li><p>https://www.c64-wiki.com/wiki/DATA</p></li>
84+
</ul>
85+
<p>5 Commit and raise a pull request.</p>
86+
<ul>
87+
<li>Click “Create a new branch” for this commit and start a pull request.</li>
88+
<li>Click “Learn more about pull requests.”</li>
89+
<li>Click “commit”</li>
90+
<li>You don’t need any special software to do any of this, just a web browser</li>
91+
</ul>
92+
</div>
93+
<div class="pagefooter">
94+
This page was last edited on |
95+
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
96+
processed with
97+
<a href="https://pandoc.org/MANUAL.html#pandocs-markdown" target="_blank" rel="nofollow">pandoc 2.2.1</a>
98+
| Template by <a href="http://html5-templates.com/" target="_blank" rel="nofollow">HTML5 Templates</a>
99+
</div>
100+
</div>
101+
</div>
102+
</body>
103+
</html>

0 commit comments

Comments
 (0)