Giter Site home page Giter Site logo

Comments (11)

divi255 avatar divi255 commented on June 8, 2024 1

will look into this in a couple of days

from sphinxcontrib.asciinema.

charego avatar charego commented on June 8, 2024

The same problem is not seen with other extensions. For example when I add sphinxcontrib-blockdiag to the build, the manpage output contains "[image]", which is acceptable and definitely preferred to failing the build. I believe that output comes from sphinx/writers/manpage.py.

But neither this extension nor sphinxcontrib-blockdiag refers directly to that function (visit_image), so I'm not sure how it all works. Any idea?

from sphinxcontrib.asciinema.

divi255 avatar divi255 commented on June 8, 2024

I've added empty visit method for mans. It works, but asciinema tag in man files is currently simply removed.

from sphinxcontrib.asciinema.

charego avatar charego commented on June 8, 2024

Thanks! With v0.1.8 it works with a hosted video like .. asciinema:: 261648.

Now I get this error on manpages with .. asciinema:: local_file.cast:

> make doc
[ 21%] Built target pcre2-32
[ 21%] Built target CHECK-FISH-BUILD-VERSION-FILE
[ 94%] Built target fishlib
[ 97%] Built target fish_indent
[ 98%] Building man pages with Sphinx

Exception occurred:
  File "/usr/local/lib/python3.7/site-packages/sphinx/builders/manpage.py", line 56, in get_target_uri
    raise NoUri(docname, typ)
sphinx.errors.NoUri: ('tutorial', None)
The full traceback has been saved in /var/folders/j6/5pd6brws00n7k_6l6j_v8v840000gy/T/sphinx-err-3gy7dzlc.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[3]: *** [CMakeFiles/sphinx-manpages] Error 2
make[2]: *** [CMakeFiles/sphinx-manpages.dir/all] Error 2
make[1]: *** [CMakeFiles/doc.dir/rule] Error 2
make: *** [doc] Error 2

I don't understand what's different about this extension. The blockdiag one doesn't reference manpages, so why should yours need to?

from sphinxcontrib.asciinema.

divi255 avatar divi255 commented on June 8, 2024

sphinx man builder is different from HTML builder, I've added a couple of fixes. should work now, check 0.1.9

from sphinxcontrib.asciinema.

charego avatar charego commented on June 8, 2024

Just re-tested .. asciinema:: local_file.cast and while the NoUri problem is fixed for the man pages (thank you), now the generated HTML is

<script id="asciicast-None" src="https://asciinema.org/a/None.js" async>

from sphinxcontrib.asciinema.

divi255 avatar divi255 commented on June 8, 2024

sorry can't reproduce this. "asciicast-None" can appear only if sphinx raises NoUri exception for some reason. It's raised for man files (that's fine) but it shouldn't for HTML. could you please give a full example? (repo+branch+build command)

from sphinxcontrib.asciinema.

charego avatar charego commented on June 8, 2024

The directory structure for fish is like this:

.
├── build
│   ├── Makefile
│   └── user_doc
├── doc_src
│   ├── _static      <-- on my branch, local_file.cast is here
│   ├── conf.py
│   └── tutorial.rst

I'm testing out the directive in tutorial.rst.

With valid path .. asciicast:: _static/local_file.cast:

<script id="asciicast-None"  src="https://asciinema.org/a/None.js" async></script>

With invalid path .. asciicast:: _static/invalid_file.cast:

<script id="asciicast-_static/invalid_file.cast"  src="https://asciinema.org/a/_static/invalid_file.cast.js" async>

Here's the full info you requested:

from sphinxcontrib.asciinema.

divi255 avatar divi255 commented on June 8, 2024

Just tried, got

<asciinema-player  src="_casts/72dda36451c97b022e1eb358f22444fe/_static/local_file.cast"></asciinema-player>

sphinxcontrib.asciinema 0.1.9
sphinx 3.0.2
Python 3.8.2

from sphinxcontrib.asciinema.

divi255 avatar divi255 commented on June 8, 2024
    <link rel="stylesheet" type="text/css" href="_static/asciinema-player_2.6.1.css" />
    <link rel="stylesheet" type="text/css" href="_static/asciinema-custom.css" />
    <script src="_static/asciinema-player_2.6.1.js"></script>
<asciinema-player  src="_casts/72dda36451c97b022e1eb358f22444fe/_static/local_file.cast"></asciinema-player><p>Once installed, just type in <code class="docutils literal notranslate"><span class="pre">fish</span></code> into your current shell to try it out!</p>

that's inserted

from sphinxcontrib.asciinema.

charego avatar charego commented on June 8, 2024

Weird, ok. Let's close this. I'll open a new one if I figure out my problem.

Thanks for the help!

from sphinxcontrib.asciinema.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.