compudanzas/README.md

101 lines
2.5 KiB
Markdown
Raw Permalink Normal View History

2021-06-17 01:21:13 +00:00
# compudanzas
2021-06-18 03:32:35 +00:00
this repository contains the scripts and source files for the compudanzas site in gemini and the web
2021-06-17 01:21:13 +00:00
2021-06-18 03:32:35 +00:00
* generated in web/ : [https://compudanzas.net](https://compudanzas.net)
* generated in gem/ : [gemini://compudanzas.net](gemini://compudanzas.net/)
2021-06-17 01:21:13 +00:00
# generate site
call the shell script:
```
./generasitio.sh
```
# files
2021-06-17 23:29:31 +00:00
* `generasitio.sh`: the shell script that copies files and call the other scripts with the corresponding arguments (like last modified date)
* `gemtext2html.awk`: converts the files in .gmo format (modified .gmi) to an html version, according to the spec and my own taste
* `gmo2gmi.awk`: converts the files in .gmo format to real .gmi
* `genindice.awk`: generates the index of all pages
* `links.py`: calculates the incoming links between pages and adds them to the files
2021-11-26 21:47:57 +00:00
* `genlog.awk`: generates the log files (atom, twtxt, gemsub) from `src/log.txt`
* `gmo.nanorc`: syntax highlighting for .gmo format in nano
2021-06-17 01:21:13 +00:00
# .gmo format
the same format as gmi (gemtext), but with the following line types:
2021-11-25 23:33:45 +00:00
* `+` add this line to the html file but not to the gmi file
* `&` add this line to the gmi file but not to the html file
2021-07-26 17:46:48 +00:00
# wikilinks
## inline wikilinks
the generator can parse and convert inline {wikilinks}, one per line
* in html, it gets converted to an inline link
* in gemtext, a link is added after the line with the link
.gmo text:
```
see the {roadmap} for updates that want to happen.
```
converted to html:
```html
<p>
2021-08-25 17:57:42 +00:00
see the <a href='./roadmap.html'>roadmap</a> for updates that want to happen.
2021-07-26 17:46:48 +00:00
</p>
```
converted to gemtext:
```gemtext
2022-01-06 20:09:38 +00:00
see the roadmap for updates that want to happen.
=> ./roadmap.gmi roadmap
2021-07-26 17:46:48 +00:00
```
spaces inside the wikilinks are converted to underscores.
2022-01-06 20:09:38 +00:00
for the moment, only one wikilink per line is allowed.
2021-07-26 17:46:48 +00:00
## gemtext-like wikilinks
the generator can also parse normal links in gemtext, one per line
* in html, it gets converted to an inline link
* in gemtext, the link is left as is
.gmo text:
```
=> ./references.gmi {references}
```
converted to html:
```html
2021-08-25 17:57:42 +00:00
<p><a href='./references.html'>references</a></p>
2021-07-26 17:46:48 +00:00
```
converted to gemtext:
```
2022-01-06 20:09:38 +00:00
=> ./references.gmi references
2021-07-26 17:46:48 +00:00
```
## incoming links calculation
`links.py` takes both of those types of wikilinks in order to perform its calculation.
it looks at the contents between the curly brackets, converts them to a filename format (replacing spaces for underscores), and assummes that file actually exists.
2021-11-09 19:00:31 +00:00
# license
[peer production license](https://wiki.p2pfoundation.net/Peer_Production_License)