Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration.rst no longer renders on GitHub #5059

Open
fireattack opened this issue Jan 13, 2024 · 19 comments
Open

configuration.rst no longer renders on GitHub #5059

fireattack opened this issue Jan 13, 2024 · 19 comments

Comments

@fireattack
Copy link
Contributor

fireattack commented Jan 13, 2024

Not sure how long it has been broken, but currently https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst does not render, makes reading it hard. I think it's a GitHub issue, since I see ppl reporting similar.

Maybe we could provide a static rendered HTML version somewhere in the mean time?

@Hrxn
Copy link
Contributor

Hrxn commented Jan 13, 2024

WTF?

Can't be broken for long, that's for sure.

@mikf
Copy link
Owner

mikf commented Jan 15, 2024

Pretty sure this was working the day before this issue got opened.
Probably an internal update to GitHub's rst-to-html renderer which seems to have made it at least twice as slow and it is now hitting a timeout.

@Hrxn
Copy link
Contributor

Hrxn commented Jan 15, 2024

This might be the reason..
https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst is definitely a lot slower than it was before.

@mikf
Copy link
Owner

mikf commented Jan 15, 2024

Here is the output from rst2html on the first "free static HTML" host I found:
https://gdl.tiiny.site

edit: hosted on GitHub: https://gdl-org.github.io/docs/configuration.html

@Hrxn
Copy link
Contributor

Hrxn commented Mar 14, 2024

For the time being, maybe the configuration docs link in mikf/gallery-dl/README.rst should be changed, until GitHub (or god knows who) fixes this issue?

@Hrxn
Copy link
Contributor

Hrxn commented Apr 2, 2024

Is it just me, or is it working again?

@fireattack
Copy link
Contributor Author

fireattack commented Apr 2, 2024

Is it just me, or is it working again?

It looks they have made some effort to fix it lately, but it is currently still half broken for most complex ones (more info in https://github.com/orgs/community/discussions/86715).

In our case, it's still broken after https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorcategory-transfer

@mikf
Copy link
Owner

mikf commented Apr 2, 2024

Now even simpler .rst files like the README don't render properly anymore.
The table of contents is missing and all text in .. code:: sections is underlined.

JackTildeD added a commit to JackTildeD/gallery-dl-forked that referenced this issue Apr 24, 2024
* save cookies to tempfile, then rename

avoids wiping the cookies file if the disk is full

* [deviantart:stash] fix 'index' metadata (mikf#5335)

* [deviantart:stash] recognize 'deviantart.com/stash/…' URLs

* [gofile] fix extraction

* [kemonoparty] add 'revision_count' metadata field (mikf#5334)

* [kemonoparty] add 'order-revisions' option (mikf#5334)

* Fix imagefap extrcator

* [twitter] add 'birdwatch' metadata field (mikf#5317)

should probably get a better name,
but this is what it's called internally by Twitter

* [hiperdex] update URL patterns & fix 'manga' metadata (mikf#5340)

* [flickr] add 'contexts' option (mikf#5324)

* [tests] show full path for nested values

'user.name' instead of just 'name' when testing for
"user": { … , "name": "…", … }

* [bluesky] add 'instance' metadata field (mikf#4438)

* [vipergirls] add 'like' option (mikf#4166)

* [vipergirls] add 'domain' option (mikf#4166)

* [gelbooru] detect returned favorites order (mikf#5220)

* [gelbooru] add 'date_favorited' metadata field

* Update fapello.py

get fullsize image instead resized

* fapello.py Fullsize image

by remove ".md" and ".th" in image url, it will download fullsize of images

* [formatter] fix local DST datetime offsets for ':O'

'O' would get the *current* local UTC offset and apply it to all
'datetime' objects it gets applied to.
This would result in a wrong offset if the current offset includes
DST and the target 'datetime' does not or vice-versa.

'O' now determines the correct local UTC offset while respecting DST for
each individual 'datetime'.

* [subscribestar] fix 'date' metadata

* [idolcomplex] support new pool URLs

* [idolcomplex] fix metadata extraction

- replace legacy 'id' vales with alphanumeric ones, since the former are
  no longer available
- approximate 'vote_average', since the real value is no longer
  available
- fix 'vote_count'

* [bunkr] remove 'description' metadata

album descriptions are no longer available on album pages
and the previous code erroneously returned just '0'

* [deviantart] improve 'index' extraction for stash files (mikf#5335)

* [kemonoparty] fix exception for '/revision/' URLs

caused by 03a9ce9

* [steamgriddb] raise proper exception for deleted assets

* [tests] update extractor results

* [pornhub:gif] extract 'viewkey' and 'timestamp' metadata (mikf#4463)

mikf#4463 (comment)

* [tests] use 'datetime.timezone.utc' instead of 'datetime.UTC'

'datetime.UTC' was added in Python 3.11
and is not defined in older versions.

* [gelbooru] add 'order-posts' option for favorites (mikf#5220)

* [deviantart] handle CloudFront blocks in general (mikf#5363)

This was already done for non-OAuth requests (mikf#655)
but CF is now blocking OAuth API requests as well.

* release version 1.26.9

* [kemonoparty] fix KeyError for empty files (mikf#5368)

* [twitter] fix pattern for single tweet (mikf#5371)

- Add optional slash
- Update tests to include some non-standard tweet URLs

* [kemonoparty:favorite] support 'sort' and 'order' query params (mikf#5375)

* [kemonoparty] add 'announcements' option (mikf#5262)

mikf#5262 (comment)

* [wikimedia] suppress exception for entries without 'imageinfo' (mikf#5384)

* [docs] update defaults of 'sleep-request', 'browser', 'tls12'

* [docs] complete Authentication info in supportedsites.md

* [twitter] prevent crash when extracting 'birdwatch' metadata (mikf#5403)

* [workflows] build complete docs Pages only on gdl-org/docs

deploy only docs/oauth-redirect.html on mikf.github.io/gallery-dl

* [docs] document 'actions' (mikf#4543)

or at least attempt to

* store 'match' and 'groups' in Extractor objects

* [foolfuuka] improve 'board' pattern & support pages (mikf#5408)

* [reddit] support comment embeds (mikf#5366)

* [build] add minimal pyproject.toml

* [build] generate sdist and wheel packages using 'build' module

* [build] include only the latest CHANGELOG entries

The CHANGELOG is now at a size where it takes up roughly 50kB or 10% of
an sdist or wheel package.

* [oauth] use Extractor.request() for HTTP requests (mikf#5433)

Enables using proxies and general network options.

* [kemonoparty] fix crash on posts with missing datetime info (mikf#5422)

* restore LD_LIBRARY_PATH for PyInstaller builds (mikf#5421)

* remove 'contextlib' imports

* [pp:ugoira] log errors for general exceptions

* [twitter] match '/photo/' Tweet URLs (mikf#5443)

fixes regression introduced in 40c0553

* [pp:mtime] do not overwrite '_mtime' for None values (mikf#5439)

* [wikimedia] fix exception for files with empty 'metadata'

* [wikimedia] support wiki.gg wikis

* [pixiv:novel] add 'covers' option (mikf#5373)

* [tapas] add 'creator' extractor (mikf#5306)

* [twitter] implement 'relogin' option (mikf#5445)

* [docs] update docs/configuration links (mikf#5059, mikf#5369, mikf#5423)

* [docs] replace AnchorJS with custom script

use it in rendered .rst documents as well as in .md ones

* [text] catch general Exceptions

* compute tempfile path only once

* Add warnings flag

This commit adds a warnings flag

It can be combined with -q / --quiet to display warnings.
The intent is to provide a silent option that still surfaces
warning and error messages so that they are visible in logs.

* re-order verbose and warning options

* [gelbooru] improve pagination logic for meta tags (mikf#5478)

similar to 494acab

* [common] add Extractor.input() method

* [twitter] improve username & password login procedure (mikf#5445)

- handle more subtasks
- support 2FA
- support email verification codes

* [common] update Extractor.wait() message format

* [common] simplify 'status_code' check in Extractor.request()

* [common] add 'sleep-429' option (mikf#5160)

* [common] fix NameError in Extractor.request()

… when accessing 'code' after an requests exception was raised.

Caused by the changes in 566472f

* [common] show full URL in Extractor.request() error messages

* [hotleak] download files with 404 status code (mikf#5395)

* [pixiv] change 'sanity_level' debug message to a warning (mikf#5180)

* [twitter] handle missing 'expanded_url' fields (mikf#5463, mikf#5490)

* [tests] allow filtering extractor result tests by URL or comment

python test_results.py twitter:+/i/web/
python test_results.py twitter:~twitpic

* [exhentai] detect CAPTCHAs during login (mikf#5492)

* [output] extend 'output.colors' (mikf#2566)

allow specifying ANSI colors for all loglevels
(debug, info, warning, error)

* [output] enable colors by default

* add '--no-colors' command-line option

---------

Co-authored-by: Luc Ritchie <luc.ritchie@gmail.com>
Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
Co-authored-by: Herp <asdf@qwer.com>
Co-authored-by: wankio <31354933+wankio@users.noreply.github.com>
Co-authored-by: fireattack <human.peng@gmail.com>
Co-authored-by: Aidan Harris <me@aidanharr.is>
@AlttiRi
Copy link

AlttiRi commented May 24, 2024

https://gdl-org.github.io/docs/configuration.html

I think Github's render looks better and more convenient.

However, rewriting to Markdown will take some hours for monotonous boring actions.
Will be accepted a PR if someone will rewrite it?
Or does RST have some benefits over MD?


UPD.

Technically, for such simple thing (rewrite rst to markdown) it's possible to use "a modern chat bot". It should work adequately. However, the input is too big I think.
However, there is a problem with too large output. The input as a link seems to be OK.

rewrite rst file from this link
https://raw.githubusercontent.com/mikf/gallery-dl/master/docs/configuration.rst
to a markdown

Anyone can try this?

@Hrxn
Copy link
Contributor

Hrxn commented May 25, 2024

What do you mean, rewrite? Why would you want to use a chatbot for this?

We have https://github.com/jgm/pandoc

@AlttiRi
Copy link

AlttiRi commented May 25, 2024

What do you mean, rewrite?

Convert .rst to .md. Manual converting is a rewriting.


We have https://github.com/jgm/pandoc

It also produces the wrong result.

$ ./pandoc.exe -o configuration.md configuration.rst
[WARNING] Reference not found for 'extractor.*.path-replace' at configuration.rst_chunk_chunk line 1 column 102
[WARNING] Reference not found for 'path-restrict' at configuration.rst line 246 column 47
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 3 column 69
[WARNING] Reference not found for 'retries' at configuration.rst line 378 column 52
[WARNING] Reference not found for 'extractor.*.cookies' at configuration.rst_chunk_chunk line 1 column 47
[WARNING] Reference not found for 'keywords' at configuration.rst line 702 column 51
[WARNING] Reference not found for 'extractor.*.filename' at configuration.rst_chunk line 6 column 62
[WARNING] Reference not found for 'tags' at configuration.rst line 4452 column 32

Here is: https://gist.github.com/AlttiRi/20e5442961f800f8d0f3f1d05d0535e2/253a2cac3f57f103889f326b9cf4499263e96ff2#extractorcategory-transfer

@Hrxn
Copy link
Contributor

Hrxn commented May 25, 2024

I don't know. This is the best markup format converter that I've heard of.

Maybe there's something not properly "standard" in the RST?

@AlttiRi
Copy link

AlttiRi commented May 26, 2024


image

image


image

image


$ ./pandoc.exe -o configuration.md configuration.rst --from rst --to gfm
[WARNING] Reference not found for 'extractor.*.path-replace' at configuration.rst_chunk_chunk line 1 column 102
[WARNING] Reference not found for 'path-restrict' at configuration.rst line 247 column 47
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 3 column 69
[WARNING] Reference not found for 'retries' at configuration.rst line 379 column 52
[WARNING] Reference not found for 'extractor.*.cookies' at configuration.rst_chunk_chunk line 1 column 47
[WARNING] Reference not found for 'keywords' at configuration.rst line 703 column 51
[WARNING] Reference not found for 'tags' at configuration.rst line 4453 column 32

These warnings are about the wrong count of underscores (_).


Note that I also use --from rst --to gfm.
https://pandoc.org/MANUAL.html#markdown-variants (gfm (Github-Flavored Markdown))

@AlttiRi
Copy link

AlttiRi commented May 26, 2024

One more.
The most important one.

❌❌❌
image

image

✅✅✅
image

image

Also, now more underscore bugs to fix:

$ ./pandoc.exe -o configuration.md configuration.rst --from rst --to gfm
[WARNING] Reference not found for 'extractor.*.path-replace' at configuration.rst_chunk_chunk line 1 column 102
[WARNING] Reference not found for 'path-restrict' at configuration.rst line 247 column 47
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 3 column 69
[WARNING] Reference not found for 'retries' at configuration.rst line 379 column 52
[WARNING] Reference not found for 'extractor.*.cookies' at configuration.rst_chunk_chunk line 1 column 47
[WARNING] Reference not found for 'keywords' at configuration.rst line 703 column 51
[WARNING] Reference not found for 'skip' at configuration.rst line 845 column 32
[WARNING] Reference not found for 'archive-format' at configuration.rst line 876 column 69
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 4 column 50
[WARNING] Reference not found for 'image-range' at configuration.rst line 1138 column 48
[WARNING] Reference not found for 'extractor.*.image-filter' at configuration.rst_chunk line 1 column 50
[WARNING] Reference not found for 'image-unique' at configuration.rst line 1189 column 50
[WARNING] Reference not found for 'extractor.*.image-filter' at configuration.rst_chunk line 11 column 31
[WARNING] Reference not found for 'extractor.*.cookies' at configuration.rst_chunk line 4 column 38
[WARNING] Reference not found for 'extractor.*.verify' at configuration.rst_chunk line 1 column 22
[WARNING] Reference not found for 'extractor.*.proxy' at configuration.rst_chunk line 1 column 21
[WARNING] Reference not found for 'extractor.*.skip' at configuration.rst_chunk_chunk line 2 column 56
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 2 column 34
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 2 column 34
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 2 column 34
[WARNING] Reference not found for 'extractor.*.directory' at configuration.rst_chunk line 4 column 48
[WARNING] Reference not found for 'extractor.*.image-filter' at configuration.rst_chunk line 5 column 44
[WARNING] Reference not found for 'extractor.*.skip' at configuration.rst_chunk_chunk_chunk line 1 column 66

@AlttiRi
Copy link

AlttiRi commented May 26, 2024

One second fix (with Notepad++):

image

The result: https://gist.github.com/AlttiRi/20e5442961f800f8d0f3f1d05d0535e2

No warnings, btw.

@AlttiRi
Copy link

AlttiRi commented May 26, 2024

But some underscores anyway should be deleted:
image

@fireattack
Copy link
Contributor Author

fireattack commented May 26, 2024

imageimage

imageimage

$ ./pandoc.exe -o configuration.md configuration.rst --from rst --to gfm
[WARNING] Reference not found for 'extractor.*.path-replace' at configuration.rst_chunk_chunk line 1 column 102
[WARNING] Reference not found for 'path-restrict' at configuration.rst line 247 column 47
[WARNING] Reference not found for 'extractor.*.archive' at configuration.rst_chunk line 3 column 69
[WARNING] Reference not found for 'retries' at configuration.rst line 379 column 52
[WARNING] Reference not found for 'extractor.*.cookies' at configuration.rst_chunk_chunk line 1 column 47
[WARNING] Reference not found for 'keywords' at configuration.rst line 703 column 51
[WARNING] Reference not found for 'tags' at configuration.rst line 4453 column 32

These warnings are about the wrong count of underscores (_).

Note that I also use --from rst --to gfm. https://pandoc.org/MANUAL.html#markdown-variants (gfm (Github-Flavored Markdown))

This exact error of "wrong rendering caused by no blank line after headings, when title has certain specific sequence of characters including asterisk" seems to be what GitHub currently has, too. I guess they may have switched from using sphinx to pandoc at some point?

And our current syntax isn't really wrong; just GitHub /pandoc's rendering implementation isn't up to spec.

According to https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#toc-entry-10:

A blank line after a title is optional. All text blocks up to the next title of the same or higher level are included in a section (or subsection, etc.).

And here is the rules about when would asterisk would be recognized as literal instead of markup: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules

Where according to rule 6 & 7 (among others), our case of extractor.*.xxx should not be recognized as markup.

Previous discussion: https://github.com/orgs/community/discussions/86715#discussioncomment-9149986


Edit: obviously, if we can fix it by just adding blank lines, we can just workaround it as you suggested. I also made a ticket at pandoc repo.

@mikf
Copy link
Owner

mikf commented Jun 7, 2024

As suggested, I added a newline after every option name heading in my local copy and wanted to use GitHub's edit and preview feature to see if it actually makes a difference, only to realize that docs/configfuration.rst now renders perfectly fine even without these changes.

… Unless I'm missing something, but it looks fine as far as I can tell. The Pandoc issue got fixed as well, but it hasn't been released yet, I don't think.

@fireattack
Copy link
Contributor Author

Maybe they're using dev main version of pandoc (or at least cherry picking important commits in their downstream)? Assuming they're indeed using pandoc, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants