Skip to content

Commit

Permalink
chore: update to Ubuntu noble manpages
Browse files Browse the repository at this point in the history
  • Loading branch information
mundanevision20 authored Sep 21, 2024
1 parent 04adb1d commit 86fa289
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
3 changes: 2 additions & 1 deletion explainshell/manpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ def _parse_text(lines):
section = None
i = 0
for ln in lines:
# TODO: check if this url is still valid
ln = re.sub(
_href,
r'<a href="http://manpages.ubuntu.com/manpages/precise/en/man\2/\1.\2.html">',
r'<a href="https://manpages.ubuntu.com/manpages/noble/en/man\2/\1.\2.html">',
ln,
)
for look_for, rp_with in _replacements:
Expand Down
2 changes: 1 addition & 1 deletion explainshell/web/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div id="about">
<p>Hello,</p>
<p>This site contains 29761 parsed manpages from sections 1 and 8 found in
<a href="http://manpages.ubuntu.com/">Ubuntu's manpage repository</a>.
<a href="https://manpages.ubuntu.com/">Ubuntu's manpage repository</a>.
A lot of heuristics were used to extract the arguments of each
program, and there are errors here and there, especially in
manpages that have a non-standard layout.</p>
Expand Down
2 changes: 1 addition & 1 deletion explainshell/web/templates/explain.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div class="push"></div><div class="text-center"><small>
{% for m in matches if m.name %}
{% if loop.first %}source manpages: {% endif %}
<a href="http://manpages.ubuntu.com/manpages/precise/en/man{{ m.section }}/{{ m.source|e }}.html">{{ m.name|e }}</a>{% if not loop.last %},&nbsp;{% endif %}
<a href="https://manpages.ubuntu.com/manpages/precise/en/man{{ m.section }}/{{ m.source|e }}.html">{{ m.name|e }}</a>{% if not loop.last %},&nbsp;{% endif %}
{% endfor %}
</small></div>
{%- endblock %}
Expand Down
4 changes: 2 additions & 2 deletions explainshell/web/templates/macros.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% macro outputcommand(mp, suggestions) -%}
{% if suggestions|length == 0 %}
<a href="http://manpages.ubuntu.com/manpages/precise/en/man{{ mp.section }}/{{ mp.source }}.html">{{ mp.program|e }}</a>
<a href="https://manpages.ubuntu.com/manpages/precise/en/man{{ mp.section }}/{{ mp.source }}.html">{{ mp.program|e }}</a>
{% else %}
<span class="dropdown">
<b class="caret" data-toggle="dropdown"></b>
<a href="http://manpages.ubuntu.com/manpages/precise/en/man{{ mp.section }}/{{ mp.source }}.html">{{ mp.program|e }}</a>
<a href="https://manpages.ubuntu.com/manpages/precise/en/man{{ mp.section }}/{{ mp.source }}.html">{{ mp.program|e }}</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li>other manpages</li>
<li class="divider"></li>
Expand Down
2 changes: 1 addition & 1 deletion explainshell/web/templates/tagger.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="small-push"></div>
<div class="push"></div>
<div id="command">
<a href="http://manpages.ubuntu.com/manpages/precise/en/man1/{{ m.name }}.html">{{ m.name|e }}</a> - {{ m.synopsis|e
<a href="https://manpages.ubuntu.com/manpages/precise/en/man1/{{ m.name }}.html">{{ m.name|e }}</a> - {{ m.synopsis|e
}}
</div>
<div class="small-push"></div>
Expand Down
4 changes: 3 additions & 1 deletion tools/dlgzlist
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ while read url; do

python -c 'import time, random; time.sleep(float(random.randint(1000, 2000)) / 1000)'
wget -nv "$url" || echo "$url" >> failed
done < gzlist
done < gzlist8

mv -f *.8.gz ../manpages/8/
6 changes: 3 additions & 3 deletions tools/extractgzlist
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

release="precise"
release="noble"
section="8"
man1list="http://manpages.ubuntu.com/manpages/$release/en/man$section/"
gzroot="http://manpages.ubuntu.com/manpages.gz/$release/man$section/"
man1list="https://manpages.ubuntu.com/manpages/$release/en/man$section/"
gzroot="https://manpages.ubuntu.com/manpages.gz/$release/man$section/"
filename="index$section.html"

if ! [ -f $filename ]; then
Expand Down

0 comments on commit 86fa289

Please sign in to comment.