fix: update

This commit is contained in:
egarette@silique.fr 2025-11-10 08:20:56 +01:00
parent f0cb191971
commit abf29b2a3c
166 changed files with 146 additions and 161 deletions

View file

@ -47,7 +47,7 @@ if __name__ == "__main__":
# print(config.value.get())
rougailconfig['doc.output_format'] = 'github'
rougailconfig['doc.title_level'] = 3
inventory = RougailOutputDoc(config, rougailconfig=rougailconfig.copy())
inventory = RougailOutputDoc(config, rougailconfig=rougailconfig)
inventory.load_formatter()
inv_formatter = inventory.formatter
rougailconfig['step.output'] = 'console'
@ -79,9 +79,9 @@ if __name__ == "__main__":
with tree.open() as fh:
soup = BeautifulSoup(fh.read(), features="lxml")
doc += str(soup.find('p')) + "\n\n"
for f in Path('.').iterdir():
for f in Path(".").iterdir():
if f.name.startswith('DISPLAY_'):
filename = f.name[9:]
filename = f.name[8:]
display_yml = Path(dirname) / filename
break
else:
@ -209,6 +209,7 @@ if __name__ == "__main__":
doc += conv_data
with open(dirname / 'output_rw.html', 'w') as fh_output:
fh_output.write(conv_data)
tiramisu_config.property.read_only()
#
summary = Path('summary_after.md')
if summary.is_file():

View file

@ -15,7 +15,7 @@ export LC_ALL=C.UTF-8
BUILDER="$(pwd)"
mkdir -p $DEST/firefox
rm -f summary.md
rm -f summary.md previous.yml
touch summary.md
rm -f summary_total.md
touch summary_total.md
@ -44,7 +44,8 @@ for i in $(ls -d "examples"/* | sort); do
num=$(echo $(basename "$i"))
echo "$num"
commit_id="v${VERSION}_$num"
summary="[tutorial $commit_id] $(head -n 1 $i/README.md)"
title="$(head -n 1 $i/README.md)"
summary="[tutorial $commit_id] $title"
echo "- [$summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$commit_id/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/${commit_id}~1..$commit_id))" >> summary_total.md
done
@ -60,29 +61,32 @@ for i in $(ls -d "examples"/* | sort); do
num=$(echo $(basename "$i"))
echo "$num"
commit_id="v${VERSION}_$num"
summary="[tutorial $commit_id)] $(head -n 1 $i/README.md)"
title=$(head -n 1 $i/README.md)
summary="[tutorial $commit_id)] $title"
if [ -f $i/URL ]; then
base_url_doc=$(cat $i/URL)
fi
url_doc="$base_url_doc#$(echo $title | tr A-Z a-z | sed 's/ /-/g' | sed 's//-/g')"
diff_url="https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/${commit_id}~1..$commit_id"
echo " - [$summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$commit_id/README.md) ([diff]($diff_url))" >> summary.md
echo " - [$summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/$commit_id/README.md) ([doc]($url_doc) - [diff]($diff_url))" >> summary.md
cp "summary_total.md" "$DEST"
BEFORE=$PWD
cd "$i/structural_files"
echo "====================="
if [ -d firefox ]; then
for j in $(ls firefox/*.yml 2>/dev/null); do
echo "++++ $j"
cp "$j" "$DEST/$j"
cp -v "$j" "$DEST/$j"
done
fi
if [ -d foxyproxy ]; then
mkdir -p $DEST/foxyproxy
for j in $(ls foxyproxy/*.yml 2>/dev/null); do
cp "$j" "$DEST/$j"
cp -v "$j" "$DEST/$j"
done
fi
cp "DISPLAY_*" "$DEST/" 2> /dev/null || true
cd $DEST
tree -H $TUTO_ROOT/$commit_id/ -P "*.yml" > tree.html
cd - > /dev/null
cp -v DISPLAY_* "$DEST/" 2> /dev/null || true
cp -f ../README.md "$DEST"
if [ -d ../config ]; then
cp -aL ../config "$DEST"
@ -102,6 +106,8 @@ for i in $(ls -d "examples"/* | sort); do
echo "# $summary" >> summary_before.md
echo "" >> summary_before.md
echo "[View the diff]($diff_url)" >> summary_before.md
echo "" >> summary_before.md
echo "[Read the documentation]($url_doc)" >> summary_before.md
after=$(grep "commit/$commit_id/README.md" summary_total.md -A1 | wc -l)
if [ "$after" = "2" ]; then
echo $(grep "commit/$commit_id/README.md" summary_total.md -A1 | tail -n 1) > summary_after.md

View file

@ -1 +1 @@
An empty structured file with format version
Creating a structure file

1
examples/000/URL Normal file
View file

@ -0,0 +1 @@
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/preliminary.html

View file

@ -1 +1 @@
A first variable with only a name
Lets add our first variable

1
examples/010/URL Normal file
View file

@ -0,0 +1 @@
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/proxymode.html

1
examples/020/URL Normal file
View file

@ -0,0 +1 @@
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/disabled.html

View file

@ -1 +0,0 @@
Copy HTTP manual proxy to HTTPS manual proxy

View file

@ -1 +0,0 @@
../020/config

View file

@ -1,21 +0,0 @@
%YAML 1.2
---
version: 1.1
manual:
use_for_https: true # Also use this proxy for HTTPS
https_proxy: # HTTPS Proxy
address:
description: HTTPS address
type: domainname
params:
allow_ip: true
port:
description: HTTPS Port
type: port
default: 8080
...

View file

@ -1 +1 @@
Disable a family
Property disabled

View file

@ -1,2 +1,7 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: 3128
use_for_https: false

View file

@ -1,6 +0,0 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: example.net
port: '3128'

View file

@ -1 +1 @@
A conditional disabled family with a variable
A conditional disabled family

View file

@ -1 +0,0 @@
../030/config

View file

@ -0,0 +1,2 @@
If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.

View file

@ -0,0 +1,7 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: 3128
use_for_https: false

View file

@ -1 +1 @@
An hidden family
Copy HTTP manual proxy to HTTPS manual proxy

View file

@ -1 +1 @@
Property: hidden
Property hidden

View file

@ -1 +0,0 @@
../030/config

View file

@ -6,9 +6,7 @@ manual:
use_for_https: true # Also use this proxy for HTTPS
https_proxy:
description: HTTPS Proxy
hidden: true
https_proxy: # HTTPS Proxy
address:
description: HTTPS address

View file

@ -1 +1 @@
A conditional hidden family with a variable
A conditional hidden family

View file

@ -1 +0,0 @@
../030/config

View file

@ -0,0 +1,2 @@
If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.

View file

@ -3,7 +3,7 @@ proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: '3128'
port: 3128
use_for_https: false
https_proxy:
address: https.proxy.net

View file

@ -0,0 +1,2 @@
If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.

View file

@ -2,4 +2,6 @@
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: example.net
address: http.proxy.net
port: 3128
use_for_https: true

View file

@ -1 +1 @@
Variable: calculated default value
Calculated default value for a variable

View file

@ -1 +0,0 @@
../013/config

View file

@ -0,0 +1,2 @@
If "use_for_https" is false, HTTPS variables are visible in read only mode and in read write mode.

View file

@ -0,0 +1,9 @@
---
proxy_mode: Manual proxy configuration
manual:
http_proxy:
address: http.proxy.net
port: 3128
use_for_https: false
https_proxy:
address: https.proxy.net

View file

@ -13,15 +13,11 @@ manual:
address:
description: HTTPS address
type: domainname
params:
allow_ip: true
default:
variable: __.http_proxy.address
port:
description: HTTPS Port
type: port
default:
variable: __.http_proxy.port
...

View file

@ -1 +0,0 @@
Variable type and parameters type are copied with default value

View file

@ -1 +0,0 @@
../017/config

View file

@ -1,23 +0,0 @@
%YAML 1.2
---
version: 1.1
manual:
use_for_https: true # Also use this proxy for HTTPS
https_proxy:
description: HTTPS Proxy
hidden:
variable: _.use_for_https
address:
description: HTTPS address
default:
variable: __.http_proxy.address
port:
description: HTTPS Port
default:
variable: __.http_proxy.port
...

View file

@ -1 +0,0 @@
Family: dynamic

View file

@ -1 +1 @@
SOCKS Manual mode
Dynamic family

1
examples/050/URL Normal file
View file

@ -0,0 +1 @@
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/dynfam.html

View file

@ -1 +1 @@
A conditional hidden family with Jinja
A conditional disabled variable with dynamic identifier

View file

@ -1 +0,0 @@
Property: Jinja and identifier condition

View file

@ -9,10 +9,7 @@ manual:
'{{ identifier }}_proxy':
description: '{{ identifier }} Proxy'
hidden:
jinja: |-
{% if _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
variable: _.use_for_https
dynamic:
- HTTPS
- SOCKS
@ -26,4 +23,14 @@ manual:
description: '{{ identifier }} port'
default:
variable: __.http_proxy.port
version:
description: SOCKS host version used by proxy
choices:
- v4
- v5
default: v5
disabled:
type: identifier
when: HTTPS
...

View file

@ -1 +0,0 @@
Jinja with a description

View file

@ -1 +0,0 @@
A conditional disabled variable with identifier

View file

@ -1 +1 @@
A variable with type "web_address"
A conditional hidden family with Jinja

View file

@ -1 +1 @@
Automatic proxy
Playing with Jinja

1
examples/060/URL Normal file
View file

@ -0,0 +1 @@
https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/calculation.html

View file

@ -1,2 +0,0 @@
---
auto: https://auto.proxy.net/wpad.dat

View file

@ -1,2 +0,0 @@
---
proxy_mode: Automatic proxy configuration URL

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

View file

@ -10,12 +10,9 @@ manual:
description: '{{ identifier }} Proxy'
hidden:
jinja: |-
{% if my_identifier == 'HTTPS' and _.use_for_https %}
{% if _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
params:
my_identifier:
type: identifier
dynamic:
- HTTPS
- SOCKS
@ -29,4 +26,14 @@ manual:
description: '{{ identifier }} port'
default:
variable: __.http_proxy.port
version:
description: SOCKS host version used by proxy
choices:
- v4
- v5
default: v5
disabled:
type: identifier
when: HTTPS
...

View file

@ -1,8 +0,0 @@
%YAML 1.2
---
version: 1.1
auto:
description: Automatic proxy configuration URL
type: web_address
...

View file

@ -1 +1 @@
A conditional disabled variable
Jinja with a description

View file

@ -1 +0,0 @@
We cannot configure "auto" if "proxy_mode" is not "Automatic proxy configuration URL".

View file

@ -1,2 +0,0 @@
---
auto: https://auto.proxy.net/wpad.dat

View file

@ -1,2 +0,0 @@
---
proxy_mode: Automatic proxy configuration URL

View file

@ -10,13 +10,10 @@ manual:
description: '{{ identifier }} Proxy'
hidden:
jinja: |-
{% if my_identifier == 'HTTPS' and _.use_for_https %}
{% if _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
description: in HTTPS case if "_.use_for_https" is set to True
params:
my_identifier:
type: identifier
description: in HTTPS case if "_.use_for_https" is set to "true"
dynamic:
- HTTPS
- SOCKS
@ -30,4 +27,14 @@ manual:
description: '{{ identifier }} port'
default:
variable: __.http_proxy.port
version:
description: SOCKS host version used by proxy
choices:
- v4
- v5
default: v5
disabled:
type: identifier
when: HTTPS
...

View file

@ -13,7 +13,7 @@ manual:
{% if my_identifier == 'HTTPS' and _.use_for_https %}
HTTPS is same has HTTP
{% endif %}
description: in HTTPS case if "_.use_for_https" is set to True
description: in HTTPS case if "_.use_for_https" is set to "true"
params:
my_identifier:
type: identifier

View file

@ -1 +1 @@
A variable with type "domainname", parameters type and disabled
A conditional disabled variable with type web_address

View file

@ -1 +0,0 @@
Variable: multi and non mandatory

View file

@ -1 +1 @@
Address for which proxy will be desactivated
Various variables

View file

@ -1 +1,2 @@
---
auto: https://auto.proxy.net/wpad.dat

View file

@ -1,4 +1,2 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy: 192.168.1.0/24

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

View file

@ -1 +0,0 @@
A variable with multiple value

View file

@ -1,6 +0,0 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy:
- example.net
- 192.168.1.0/24

View file

@ -1 +0,0 @@
A non mandatory variable

View file

@ -1 +0,0 @@
Examples

View file

@ -1 +0,0 @@
Variable: extra description

View file

@ -1 +0,0 @@
A variable

View file

@ -1 +0,0 @@
Prompt for authentication if password is saved

View file

@ -1 +0,0 @@
A variable

View file

@ -1 +0,0 @@
Use proxy DNS when using SOCKS v5

View file

@ -1 +0,0 @@
Jinja calculation for an hidden variable with a potential inaccessible varible

View file

@ -1 +1 @@
A boolean variable
A conditional disabled variable with type domainname and parameters

View file

@ -1 +0,0 @@
DNS over HTTPS

View file

@ -1,3 +1,4 @@
---
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy: 192.168.1.0/24

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

View file

@ -1 +1 @@
A choice variable
A variable with multiple value

1
examples/081/TITLE.md Normal file
View file

@ -0,0 +1 @@
Multiple variable

View file

@ -1,3 +1,6 @@
---
dns_over_https:
enable_dns_over_https: true
proxy_mode: Automatic proxy configuration URL
auto: https://auto.proxy.net/wpad.dat
no_proxy:
- example.net
- 192.168.1.0/24

Some files were not shown because too many files have changed in this diff Show more