Remove lua_api.html

master
rubenwardy 2020-12-24 13:38:26 +00:00
parent 37e530728b
commit e5add369f8
18 changed files with 40 additions and 7117 deletions

View File

@ -4,7 +4,6 @@
],
"spellright.documentTypes": [
"latex",
"plaintext",
"markdown"
"plaintext"
]
}

View File

@ -28,12 +28,12 @@ The node params are used to control how a node is individually rendered.
- [Cubic Nodes: Normal and Allfaces](#cubic-nodes-normal-and-allfaces)
- [Glasslike Nodes](#glasslike-nodes)
- [Glasslike_Framed](#glasslikeframed)
- [Glasslike_Framed](#glasslike_framed)
- [Airlike Nodes](#airlike-nodes)
- [Lighting and Sunlight Propagation](#lighting-and-sunlight-propagation)
- [Liquid Nodes](#liquid-nodes)
- [Node Boxes](#node-boxes)
- [Wallmounted Node Boxes](#wallmounted-node-boxes)
- [Wallmounted Node Boxes](#wallmounted-node-boxes)
- [Mesh Nodes](#mesh-nodes)
- [Signlike Nodes](#signlike-nodes)
- [Plantlike Nodes](#plantlike-nodes)
@ -442,5 +442,5 @@ This is not a comprehensive list, there are more types including:
The torches in Minetest Game actually use two different node definitions of
mesh nodes (default:torch and default:torch_wall).
As always, read the [Lua API documentation](../../lua_api.html#node-drawtypes)
As always, read the [Lua API documentation](https://minetest.gitlab.io/minetest/nodes/#node-drawtypes)
for the complete list.

View File

@ -151,7 +151,7 @@ print("entity is at " .. minetest.pos_to_string(object:get_pos()))
```
There are a number of available callbacks for use with entities.
A complete list can be found in [lua_api.txt]({{ page.root }}/lua_api.html#registered-entities).
A complete list can be found in [lua_api.txt](https://minetest.gitlab.io/minetest/minetest-namespace-reference/#registered-definition-tables).
```lua
function MyEntity:on_step(dtime)

View File

@ -77,7 +77,7 @@ on multiple lines, like so:
Elements are items such as text boxes or buttons, or can be metadata such
as size or background. You should refer to
[lua_api.txt](../../lua_api.html#elements)
[lua_api.txt](https://minetest.gitlab.io/minetest/formspec/)
for a list of all possible elements.
@ -89,7 +89,7 @@ game-wide theme should be applied.
The elements in the header must be defined in a specific order, otherwise you
will see an error. This order is given in the above paragraph, and, as always,
documented in [lua_api.txt](../../lua_api.html#sizewhfixed_size).
documented in the Lua API reference.
The size is in formspec slots - a unit of measurement which is roughly
around 64 pixels, but varies based on the screen density and scaling

View File

@ -14,15 +14,15 @@ Heads Up Display (HUD) elements allow you to show text, images, and other graphi
The HUD doesn't accept user input; for that, you should use a [formspec](formspecs.html).
- [Positioning](#positioning)
- [Position and Offset](#position-and-offset)
- [Alignment](#alignment)
- [Scoreboard](#scoreboard)
- [Position and Offset](#position-and-offset)
- [Alignment](#alignment)
- [Scoreboard](#scoreboard)
- [Text Elements](#text-elements)
- [Parameters](#parameters)
- [Our Example](#our-example)
- [Parameters](#parameters)
- [Our Example](#our-example)
- [Image Elements](#image-elements)
- [Parameters](#parameters-1)
- [Scale](#scale)
- [Parameters](#parameters-1)
- [Scale](#scale)
- [Changing an Element](#changing-an-element)
- [Storing IDs](#storing-ids)
- [Other Elements](#other-elements)
@ -291,4 +291,4 @@ end)
## Other Elements
Read [lua_api.txt]({{ page.root }}/lua_api.html#hud-element-types) for a complete list of HUD elements.
Read [lua_api.txt](https://minetest.gitlab.io/minetest/hud/) for a complete list of HUD elements.

View File

@ -42,7 +42,7 @@ minetest.register_chatcommand("antigravity", {
## Available Overrides
`player:set_physics_override()` is given a table of overrides.\\
According to [lua_api.txt]({{ page.root }}/lua_api.html#player-only-no-op-for-other-objects),
According to [lua_api.txt](https://minetest.gitlab.io/minetest/class-reference/#player-only-no-op-for-other-objects),
these can be:
* speed: multiplier to default walking speed value (default: 1)

View File

@ -12,7 +12,7 @@ After you've read this book, take a look at the following.
### Minetest Modding
* Minetest's Lua API Reference - [HTML version]({{ page.root }}/lua_api.html) |
* Minetest's Lua API Reference - [HTML version](https://minetest.gitlab.io/minetest/class-reference/#player-only-no-op-for-other-objects) |
[Text version](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt).
* Explore the [Developer Wiki](http://dev.minetest.net/Main_Page).
* Look at [existing mods](https://forum.minetest.net/viewforum.php?f=11).

View File

@ -9,8 +9,8 @@ redirect_from: /it/chapters/node_drawtypes.html
## Introduzione <!-- omit in toc -->
Il metodo col quale un nodo viene disegnato in gioco è chiamato *drawtype*.
Ci sono diversi tipi di drawtype: il loro comportamento è determinato dalle proprietà impostate durante la definizione del tipo di nodo.
Il metodo col quale un nodo viene disegnato in gioco è chiamato *drawtype*.
Ci sono diversi tipi di drawtype: il loro comportamento è determinato dalle proprietà impostate durante la definizione del tipo di nodo.
Queste proprietà sono fisse, uguali per tutte le istanze, tuttavia è possibile manipolarne alcune per singolo nodo usando una cosa chiamata `param2`.
Il concetto di nodo è stato introdotto nello scorso capitolo, ma non è mai stata data una definizione completa.
@ -410,4 +410,4 @@ Questa non è una lista esaustiva, in quanto ci sono infatti altri tipi di nodi
Le torce in Minetest Game usano in verità due diverse definizioni dei
nodi mesh (default:torch e default:torch_wall).
Come al solito, consulta la [documentazione sull'API Lua](../../lua_api.html#node-drawtypes) per l'elenco completo.
Come al solito, consulta la [documentazione sull'API Lua](https://minetest.gitlab.io/minetest/nodes/#node-drawtypes) per l'elenco completo.

View File

@ -15,10 +15,10 @@ degrad:
In questo capitolo imparerai come manipolare gli oggetti e come definirne di tuoi.
- [Cosa sono gli oggetti, i giocatori e le entità?](#cosa-sono-gli-oggetti-i-giocatori-e-le-entita)
- [Posizione e velocità](#posizione-e-velocita)
- [Proprietà degli oggetti](#proprieta-degli-oggetti)
- [Entità](#entita)
- [Cosa sono gli oggetti, i giocatori e le entità?](#cosa-sono-gli-oggetti-i-giocatori-e-le-entità)
- [Posizione e velocità](#posizione-e-velocità)
- [Proprietà degli oggetti](#proprietà-degli-oggetti)
- [Entità](#entità)
- [Oggetti figli](#oggetti-figli)
- [Il tuo turno](#il-tuo-turno)
@ -129,7 +129,7 @@ print("L'entità si trova a " .. minetest.pos_to_string(oggetto:get_pos()))
```
Ci sono diversi callback disponibili da usare per le entità.
Una lista completa può essere trovata in [lua_api.txt]({{ page.root }}/lua_api.html#registered-entities).
Una lista completa può essere trovata in [lua_api.txt](https://minetest.gitlab.io/minetest/minetest-namespace-reference/#registered-definition-tables).
```lua
function MiaEntita:on_step(dtime)

View File

@ -64,7 +64,7 @@ Si possono concatenare più elementi, piazzandoli eventualmente su più linee:
bo[param1]
Gli elementi sono o oggetti come i campi di testo e i pulsanti, o dei metadati come la grandezza e lo sfondo.
Per una lista esaustiva di tutti i possibili elementi, si rimanda a [lua_api.txt](../../lua_api.html#elements).
Per una lista esaustiva di tutti i possibili elementi, si rimanda a [lua_api.txt](https://minetest.gitlab.io/minetest/formspec/).
### Intestazione
@ -72,7 +72,7 @@ L'intestazione di un formspec contiene informazioni che devono apparire prima di
Questo include la grandezza del formspec, la posizione, l'ancoraggio, e se il tema specifico del gioco debba venir applicato.
Gli elementi nell'intestazione devono essere definiti in un ordine preciso, altrimenti ritorneranno un errore.
L'ordine è dato nel paragrafo qui in alto e, come sempre, documentato in [lua_api.txt](../../lua_api.html#sizewhfixed_size).
L'ordine è dato nel paragrafo qui in alto e, come sempre, documentato inlua_api.txt.
La grandezza è in caselle formspec - un'unità di misura che è circa 64 pixel, ma varia a seconda della densità dello schermo e delle impostazioni del client.
Ecco un formspec di 2x2:

View File

@ -13,15 +13,15 @@ Le HUD (Heads Up Display) ti permettono di mostrare testi, immagini e altri elem
Le HUD, infatti, non accettano input dall'utente, lasciando quel ruolo ai [formspec](formspecs.html).
- [Posizionamento](#posizionamento)
- [Posizione e scostamento](#posizione-e-scostamento)
- [Allineamento](#allineamento)
- [Esempio: tabellone segnapunti](#esempio-tabellone-segnapunti)
- [Posizione e scostamento](#posizione-e-scostamento)
- [Allineamento](#allineamento)
- [Esempio: tabellone segnapunti](#esempio-tabellone-segnapunti)
- [Elementi di testo](#elementi-di-testo)
- [Parametri](#parametri)
- [Tornando all'esempio](#tornando-all-esempio)
- [Parametri](#parametri)
- [Tornando all'esempio](#tornando-allesempio)
- [Elementi immagine](#elementi-immagine)
- [Parametri](#parametri-1)
- [Tornando all'esempio](#tornando-all-esempio-1)
- [Parametri](#parametri-1)
- [Tornando all'esempio](#tornando-allesempio-1)
- [Cambiare un elemento](#cambiare-un-elemento)
- [Salvare gli ID](#salvare-gli-id)
- [Altri elementi](#altri-elementi)
@ -278,4 +278,4 @@ end)
## Altri elementi
Dai un occhio a [lua_api.txt]({{ page.root }}/lua_api.html#hud-element-types) per una lista completa degli elementi HUD.
Dai un occhio a [lua_api.txt](https://minetest.gitlab.io/minetest/hud/) per una lista completa degli elementi HUD.

View File

@ -14,8 +14,8 @@ Per esempio, un valore di 2 sulla gravità, renderà la gravità di un utente du
- [Esempio base](#esempio-base)
- [Sovrascritture disponibili](#sovrascritture-disponibili)
- [Vecchio sistema di movimento](#vecchio-sistema-di-movimento)
- [Incompatibilità tra mod](#incompatibilita-tra-mod)
- [Vecchio sistema di movimento](#vecchio-sistema-di-movimento)
- [Incompatibilità tra mod](#incompatibilità-tra-mod)
- [Il tuo turno](#il-tuo-turno)
## Esempio base
@ -36,7 +36,7 @@ minetest.register_chatcommand("antigrav", {
## Sovrascritture disponibili
`set_physics_override()` è una tabella. Stando a [lua_api.txt]({{ page.root }}/lua_api.html#player-only-no-op-for-other-objects), le chiavi possono essere:
`set_physics_override()` è una tabella. Stando a [lua_api.txt](https://minetest.gitlab.io/minetest/class-reference/#player-only-no-op-for-other-objects), le chiavi possono essere:
* `speed`: moltiplicatore della velocità di movimento (predefinito: 1)
* `jump`: moltiplicatore del salto (predefinito: 1)

View File

@ -12,7 +12,7 @@ Dopo aver letto questo libro, se mastichi l'inglese dai un occhio a ciò che seg
### Modding di Minetest
* Riferimento alla API Lua di Minetest - [versione HTML]({{ page.root }}/lua_api.html) |
* Riferimento alla API Lua di Minetest - [versione HTML](https://minetest.gitlab.io/minetest/) |
[versione solo testo](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt).
* Esplora la [Wiki Sviluppatore](http://dev.minetest.net/Main_Page).
* Spulcia le [mod esistenti](https://forum.minetest.net/viewforum.php?f=11).

View File

@ -31,8 +31,6 @@ layout: base
{% assign last_section = section %}
{% assign num = num | plus:1 %}
{% endfor %}
<li><a href="{{ page.root }}/lua_api.html" class="hr">Lua Modding API Reference</a></li>
<li><a href="https://github.com/rubenwardy/minetest_modding_book/archive/examples.zip">Download Examples</a></li>
</nav>

File diff suppressed because it is too large Load Diff

View File

@ -22,14 +22,6 @@
{% assign num = num | plus:1 %}
{% endfor %}
{
"title": "Lua Modding API Reference",
"loc": "https://rubenwardy.com/minetest_modding_book/lua_api.html",
"description": "lua_api.html is an HTML version of lua_api.txt",
"priority": 0.75
},
{
"title": "Download Examples",
"loc": "https://github.com/rubenwardy/minetest_modding_book/archive/examples.zip",

View File

@ -1,2 +0,0 @@
markdown==2.6.8
bs4==0.0.1

View File

@ -1,112 +0,0 @@
import markdown, urllib2, datetime, re, string
from bs4 import BeautifulSoup
def get_key(index, li, title):
title = title.replace(" ", "-")
title = title.replace(" ", "-")
title = title.replace(" ", "-")
#title = re.sub(r'\([^)]*\)', '', title)
title = pattern.sub('', title)
if title == "":
return None
i = 0
while True:
key = title
if i > 0:
key = key + "_" + str(i)
i = i + 1
try:
existing = index[key]
except KeyError:
return key
#
# Downloading lua_api.txt
#
print("Downloading lua_api.txt...")
url = "https://raw.githubusercontent.com/minetest/minetest/master/doc/lua_api.txt"
text = urllib2.urlopen(url).read()
text = unicode(text, "utf-8")
print("Pre-generation replacements...")
header = """Minetest Lua Modding API Reference
=================================="""
text = text.replace(header, "")
#
# Generating HTML
#
print("Generating HTML...")
md = markdown.Markdown(extensions=['markdown.extensions.toc'])
html = md.convert(text)
print("Post-generation replacements...")
links = """<ul>
<li>More information at <a href="http://www.minetest.net/">http://www.minetest.net/</a></li>
<li>Developer Wiki: <a href="http://dev.minetest.net/">http://dev.minetest.net/</a></li>
</ul>"""
html = html.replace("{{", "{ {")
html = html.replace(links, "")
credit = "This page was last updated "
credit += datetime.date.today().strftime("%d/%B/%Y")
credit += ".<br />See <a href=\"https://github.com/minetest/minetest/blob/master/doc/lua_api.txt\">doc/lua_api.txt</a> for the latest version (in plaintext)."
credit += "<br />Generated using <a href=\"https://github.com/rubenwardy/minetest_modding_book/blob/gh-pages/update_lua_api.py\">a Python script</a>."
links += credit
html = html.replace("<h2 id=\"programming-in-lua\">", links + "<h2 id=\"programming-in-lua\">")
print("Parsing HTML...")
soup = BeautifulSoup(html, 'html.parser')
pattern = re.compile('[\W]+')
lis = soup.find_all("li")
index = {}
# Build index of anchors
headings = soup.find_all({"h1", "h2", "h3", "h4", "h5", "h6"})
for tag in headings:
if tag.has_attr("id"):
index[tag["id"]] = True
if tag.has_attr("name"):
index[tag["name"]] = True
# Add anchors to <li>s containing <code>
for li in lis:
code = li.find_all('code')
if len(code) > 0:
key = get_key(index, li, code[0].string)
if key is not None:
index[key] = True
#print("Created " + key)
new_tag = soup.new_tag('a', href="#" + key)
new_tag['class'] = "anchor"
new_tag['name'] = key
new_tag.string = "#"
li.insert(0, new_tag)
html = str(soup)
#
# Writing to file
#
print("Writing to file...")
file = open("lua_api.html", "w")
file.write("---\ntitle: Lua Modding API Reference\nlayout: default\n---\n")
file.write("<div class='notice notice-info'>\n")
file.write("<h2>This is lua_api.txt nicely formated: I did not write this</h2>\n")
file.write(credit)
file.write("</div>\n")
file.write("<h2 id=\"table-of-contents\">Table of Contents</h2>\n")
file.write(md.toc)
file.write(html)
file.close()
print("Done")