Commit Graph

108 Commits

Author SHA1 Message Date
Florian Bruhin ec34865168 Move master branch references to main
Closes #7097
2023-07-23 11:38:19 +02:00
Philipp Albrecht d9e8b638bf Remove vim modelines
We're deprecating vim modelines in favor of `.editorconfig`.

Removing vim modelines could be done using two one-liners. Most of the vim modelines
were followed by an empty line, so this one-liner took care of these ones:

```sh
rg '^# vim: .+\n\n' -l | xargs sed -i '/^# vim: /,+1d'
```

Then some of the vim modelines were followed by a pylint configuration line, so running
this one-liner afterwards took care of that:

```sh
rg '^# vim:' -l | xargs sed -i '/^# vim: /d'
```
2023-06-30 11:03:06 +02:00
Florian Bruhin ab7245732e scripts: Patch relative links for correct doc generation
In doc/help/index.asciidoc, we have links like this:
    * link:../quickstart{outfilesuffix}[Quick start guide]

That is correct in e.g. the GitHub file structure, as those files are
stored in e.g. doc/quickstart.asciidoc indeed.

It's *no* longer true when we view the built files via qute://help,
however: There, this turns into a flat file structure, with those pages
being at qute://help/index.html and qute://help/quickstart.html,
respectively.

It looks like QtWebEngine < 6.5 did just ignore the
<a href="../quicktart.html"> and pointed from qute://help/index.html to
qute://help/quickstart.html anyways, weirdly.

With QtWebEngine 6.5, however, this is now interpreted as a link
pointing to qute://quickstart.html instead, which is clearly wrong.

Until we have a less messy doc generation (probably as part of #345),
let's just patch the link to be correct.

See #7624
2023-03-17 17:44:38 +01:00
Florian Bruhin bbdc83f638 Fix lint/ci 2022-12-12 13:37:07 +01:00
Florian Bruhin af176f749f scripts: Use pip-installed asciidoc
Fixes #7352, closes #6793
2022-12-12 11:06:28 +01:00
Florian Bruhin b63cdf19f4 scripts: Show asciidoc errors while discovering 2022-12-12 09:51:22 +01:00
Florian Bruhin fa62360357 Remove unneeded str
Only needed in Python 3.5 times
2022-09-30 20:23:38 +02:00
Emanuele Torre 51ab91c1aa asciidoc2html.py: also install qute://{install,stacktrace}.html
Closes #6900
2022-06-10 20:20:53 +02:00
Jimmy e9ed6456fd Load icons via importlib.resources
The PyQt resources system is gone in 6.2 and deprecated before that. This
should be the last usage of it.

Switches icons to be read with `utils.resources.read_file_binary()` in
`notification.py` (fallback desktop notification icon) and `app.py` (icon for
the desktop window).

importlib only loads resources under a package, so the icons are moved under
the `qutebrowser/` directory.

Closes: #6062
2022-04-04 18:03:54 +12:00
Florian Bruhin f511f11ecd scripts: Fix asciidoc error
Fixup to 28bd35ed58
2021-03-29 23:42:14 +02:00
Florian Bruhin 1a4fff1a42 doc: Switch URLs to https 2021-01-26 15:19:01 +01:00
Florian Bruhin 222f1f19a1 Bump copyright years
Closes #6015
2021-01-20 20:06:19 +01:00
Tim Brown 8028e73d34 mypy: use annotations for typing instead of comments 2020-11-02 22:05:33 +10:00
Florian Bruhin 28bd35ed58 Simplify asciidoc arg 2020-09-16 21:13:47 +02:00
Florian Bruhin da585f2b5d asciidoc2html: Fix linking of quickstart file
The change in #5559 was wrong: We want to link quickstart.html to
doc/quickstart.html relatively *inside* the website copy, we don't want to link
to the absolute path of the git repository.

This happened to work on the old hoster, but broke after the server move to
uberspace, where the webserver process isn't allowed to access files outside of
the web document root.
2020-07-18 11:39:00 +02:00
Florian Bruhin 486c73b43a scripts: Make asciidoc2html.py --web work outside the repository
See #5559
2020-07-07 22:00:44 +02:00
Florian Bruhin 1d398e9d8e scripts: Clean up REPO_ROOT in asciidoc2html
- Use .resolve() and parents[1] for REPO_ROOT
- Use the existing REPO_ROOT for sys.path.insert
- Fix a syntax error
2020-07-03 11:09:38 +02:00
Florian Bruhin 28fe632b4a Merge remote-tracking branch 'origin/pr/5559' 2020-07-03 10:40:08 +02:00
Florian Bruhin 01db8cfb69 scripts: Clean up finding asciidoc in asciidoc2html
I've also tried to add asciidoc3 support, but with its asciidoc3.conf and
asciidoc3_postinstall which creates ~/asciidoc3 (!) it doesn't really seem like
a drop-in replacement.
2020-07-02 15:05:01 +02:00
Axel Dahlberg 649af829fe
Don't create more Path objects
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2020-07-02 13:18:12 +02:00
Axel Dahlberg e697956168
Update scripts/asciidoc2html.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2020-07-02 13:14:47 +02:00
Axel Dahlberg acff1f1312 Fixed paths in asciidoc2html 2020-07-01 16:07:22 +02:00
Florian Bruhin 362d9d917b Use Pygments from virtualenv's path in asciidoc2html
This allows running mkvenv.py without having Pygments installed system-wide.
Prepending to the PATH (rather than appending) so that the virtualenv's one is
always used, so the system-wide one can be older or broken.
2020-06-30 09:22:23 +02:00
Florian Bruhin eed0373feb asciidoc2html: Resolve path for sys.path
For some reason, __file__ was "scripts/dev/../asciidoc2html.py", causing
.parents[1] to point to "scripts/dev/" instead of "scripts/".

See #5534
2020-06-26 08:43:42 +02:00
Julin S 6cbf7e3976 redo old edit 2020-06-24 11:29:27 +05:30
Julin S 969a99ce6d use Path.read_text 2020-06-22 02:20:59 +05:30
Julin S 4bf3556178 Revert "fix error in asciidoc2html.py script"
This reverts commit 64ffce27f9.
2020-06-22 01:23:13 +05:30
Julin S a80d2d38db Fix 3.5 incompatibility in script 2020-06-21 16:09:23 +05:30
Julin S 64ffce27f9 fix error in asciidoc2html.py script 2020-05-27 11:12:45 +05:30
Julin S fd9e0f19c6 fix another pylint error 2020-04-20 13:30:23 +05:30
Julin S 680d6ebb58 fix pylint error 2020-04-19 17:04:36 +05:30
Julin S 9914e448dc add blank line between module docstring and imports 2020-04-19 14:19:58 +05:30
Julin S 0d94278967 add type annotations to asciidoc2html script 2020-04-19 14:17:16 +05:30
Julin S 6fab7845f0 add pathlib to asciidoc2html script 2020-03-15 23:09:11 +05:30
Julin S e298992ec1 finish _build_website_file() 2020-03-15 22:27:39 +05:30
Julin S c777571254 finish _build_website() 2020-03-15 21:38:30 +05:30
Julin S 04905380b9 begin using pathlib 2020-03-15 21:17:05 +05:30
Florian Bruhin 57899d7655 Generate docs as part of mkvenv.py
See #5186
2020-01-27 15:27:43 +01:00
Florian Bruhin 9e4276db9b Adjust copyrights for 2020 2020-01-04 18:21:17 +01:00
Florian Bruhin 21e9b9b41f Specify 'check' with subprocess.run 2019-10-01 11:54:18 +02:00
Jay Kamat 3e816f5f8b
Update copyright for 2019 2019-02-22 21:45:08 -08:00
Marco Zollinger 96e8151cce use up to date cheatsheet images from repo instead of qutebrowser.org 2018-02-20 15:18:31 +01:00
Florian Bruhin 6f028e9ad0 Update copyright years 2018-02-05 12:19:50 +01:00
Florian Bruhin 5c00eea122 Fix stripping of lines in asciidoc2html
This broke in #3382 since re.fullmatch does a different thing for trailing
newlines:

    >>> line
    '===========\n'
    >>> re.match(r'^=+$', line)
    <_sre.SRE_Match object; span=(0, 11), match='==========='>
    >>> re.fullmatch(r'=+', line)
    >>>

This now strips the line by default, and adds newlines if needed.
2017-12-20 11:35:27 +01:00
Florian Bruhin e65c0dd8a7 pylint: Re-enable bad-continuation
And lots and lots of whitespace changes.
2017-12-15 19:16:55 +01:00
Florian Bruhin 3f9ded3bed Add missing docstrings 2017-12-15 13:55:06 +01:00
George Edward Bulmer f74832328f Modify re.match usage in scripts directory. 2017-12-11 23:06:52 +00:00
Florian Bruhin 9febcc2e76 Use https:// links for qutebrowser.org
Fixes #3289
2017-11-14 10:43:05 +01:00
Gyorgy Orban bb54a954fe use subprocess run
The usage of subprocess.run is recommended since python 3.5.
Popen, check_call, call and check_output calls were replaced with run.
2017-11-01 09:59:32 +01:00
Florian Bruhin 0b86b302a2 pylint: Turn off some more too-many-* stuff globally
Humans are just better at judging what's okay here than a machine.
2017-10-31 07:35:00 +01:00