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

Presenter window/speaker notes #3

Open
dieselmonkey opened this issue Feb 6, 2025 · 7 comments
Open

Presenter window/speaker notes #3

dieselmonkey opened this issue Feb 6, 2025 · 7 comments

Comments

@dieselmonkey
Copy link

I am new to Asciidoc and Revealjs. I wish to be able to create presentations while at the same time generating books or webpages from the same content. This seems to be exactly what I need. I don't have great computer skills so please bear with me.

I downloaded the repository and generated the reveal-my-asciidoc and syntax-quick-reference files as a test. However, when I press s to open the presenter window I get the following error message: invalid file type: html. The address is: https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.8.0/plugin/notes/notes.html. Why is it not looking locally for the speaker notes?

The Readme states: "MS Windows generation files are not actively maintained and tested" Could that be the cause or is the presenter view just not a desired feature?

@bcouetil
Copy link
Contributor

bcouetil commented Feb 8, 2025

Hello 😊

Glad to see someone finding good use of this repo and its concept !

It should work, but I do not use presenter windows myself.

I'll test and come back to you with a solution.

@bcouetil
Copy link
Contributor

bcouetil commented Feb 9, 2025

I tested on unix system, so with the generate.sh script, having ADOC_IMG_TAG=1.60, and presenter mode works.

I see that generate.batscript has set ADOC_IMG_TAG="1.17.0", so it is really older.

Would you try replacing version with 1.60 in the BAT ? If it still does not work, I'll find a Windows PC to debug that.

Keep me posted @dieselmonkey 😊

And in the era of AI, I may instruct one to make a more up to date BAT file, or even a Powershell PS1 😊

@dieselmonkey
Copy link
Author

Thanks for your reply @bcouetil! Thanks for looking into this and thanks for your suggestions. 😊

I tried changing set ADOC_IMG_TAG="1.17.0" to 1.60.0 but the Revealjs rendering was not even a presentation, just a continuous page.

I asked ChatGPT and got the suggestion to use Revealjs 4.1.2 instead of 3.8.0 as it is used in the Unix version.
-a revealjsdir=https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2 ^

This did not fix the problem either, and then I ran out of the CGPT trial version. To do the easy thing I tried setting Asciidoctor to 1.82.0 and Revealjs to 5.1.0 but, this did not make any difference either.

One thing that CGPT pointed out was that revealsdir in the Unix script is local:
-a revealjsdir=../../reveal.js \\\n',
but not in the Windows script:
-a revealjsdir=https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.8.0 ^
Does this have something to do with not loading the presenter view? Again, just to try something I tried to paste the local path and for some reason, slides were rendered. But when I pressed s nothing at all happened.

What I have learned about AI is that it is of great help for someone like me who is an amateur when it comes to scripts, programming, etc. The problem is just that it often gets the context wrong and then you gotta know how to point it in the right direction. Hopefully, you can do it quite easily. 😊

@bcouetil
Copy link
Contributor

bcouetil commented Feb 15, 2025

I tried to avoid rewriting the BAT script, and I think I made it working using Git Bash (included in Git for Windows installation).

  • Install Git for Windows

  • Verify that docker work under Git Bash :

docker ps -a

If you managed to clone the project and to launch the BAT file, you must already be there. Now a few extra steps.

  • download cwrsync from here https://www.itefix.net/cwrsync/client

  • unzip it somewhere (for ex in program files) and put cwrsync bin folder, eg C:\Program Files\cwrsync\bin, in a new entry in Windows system-wide "Path" env variables.

  • In our generate.sh, replace every occurence of $PWD with $(pwd -W)

  • in Git Bash, it should now work ! with an extra variable to avoid Git Bash file handling mess :

export MSYS_NO_PATHCONV=1
./generate.sh guides/guides reveal

If it works on your side, I'll update the file and procedure accordingly. Please let me know !

@dieselmonkey
Copy link
Author

Thanks for your reply @bcouetil!

I did the steps above but somehow i failed to get rsync to work:

$ ./generate.sh guides/guides reveal
Usage : generate.sh [all|<folder>] [all|html|reveal|pdf|zip] [live]
\nDocker image asciidoctor/docker-asciidoctor:1.60 not present locally, pulling...
1.60: Pulling from asciidoctor/docker-asciidoctor
Digest: sha256:0c8df5a7688303b70fb8db3bec25c19503d7232d38b61cfaef0c943e1722c018
Status: Downloaded newer image for asciidoctor/docker-asciidoctor:1.60
docker.io/asciidoctor/docker-asciidoctor:1.60
\nSynchronizing docs/guides/guides to build-docs/guides/guides ... ./generate.sh: line 104: rsync: command not found

It is strange how I managed to get what is really a step and a half wrong. 😊

Anyways, I got the following advice from CGPT:

For Windows (Git Bash or WSL):

  • If using Git Bash, rsync is not included by default. You can:

    1. Install Cygwin and include rsync during setup.
    2. Use WSL (Windows Subsystem for Linux) and install rsync via sudo apt install rsync.
  • If using WSL, just install it inside WSL.

It turned out that one of the packages that was not included in the standard installation was rsync so I had to rerun the installation and select not installed to find rsync.

Alas, if that would have been it. 😊 CGPT sent me on a rabbit trail trying to get the docker container to work in MINGW64.

I also had to do some more modifications to the script: Changing docker to the full path including .exe. (CGPT is so lazy, just does half the job and does not even bother to copy the last third of the script:) In the end, I managed to get a presentation rendered properly with the presenter view working and all!

But the webpage wasn't rendered properly and I didn't get a pdf. I tried to ask CGPT what could be the problem. Though it doesn't admit it, there seems to be a limit of about 100-ish rows of script that it will deal with in the free version.

Script-n-output.zip

@bcouetil
Copy link
Contributor

bcouetil commented Feb 21, 2025

CGPT fails to get rsync to be installed properly, I tried with it first. Please use the procedure I gave you instead.

Did you unzip cwrsync in Program files and put C:\Program Files\cwrsync\bin, in a new entry in Windows system-wide "Path" env variables ?

Before lauching our script, just try rsync.exe in a powershell, as a test. If it does not seem to find the application, you must have missed something in the above process. CGPT could help you on this specific need, but do not ask him to install rsync on Windows, answers are bad.

@bcouetil
Copy link
Contributor

bcouetil commented Feb 21, 2025

I was a bit lazy with the procedure, here is a detailed version from a mutual "friend".

How to Run generate.sh Under Windows Using Git Bash

This guide will help you launch a shell script (generate.sh) in Windows using Git Bash. Follow the steps carefully, even if you're new to Windows or Git Bash.

Step 1: Install Git for Windows

  1. Download Git for Windows from https://gitforwindows.org.
  2. Run the installer and follow the instructions.
  3. Make sure Git Bash is installed as part of the setup.

Step 2: Verify Docker Works in Git Bash

  1. Open Git Bash.
  2. Run the following command:
   docker ps -a
  • If you see a list of containers, Docker is working.
  • If you see an error, make sure Docker Desktop is running and configured correctly.

Step 3: Install cwRsync

  1. Download cwRsync from this link.

  2. Unzip it into a folder (e.g., C:\Program Files\cwrsync).

  3. Add the bin folder to your Windows system-wide Path environment variable:

    • Press Win + R, type sysdm.cpl, and press Enter.
    • Go to the Advanced tab and click Environment Variables.
    • Under System variables, find and select Path, then click Edit.
    • Click New and add:
     C:\Program Files\cwrsync\bin
  • Click OK on all windows to save the changes.
  1. Verify that rsync.exe works in PowerShell:

    • Open PowerShell (press Win + R, type powershell, and hit Enter).
    • Run the following command:
     rsync --version
  • If you see output displaying the rsync version, it is correctly installed.
  • If you get an error like Command not found, restart your computer and try again.
  • If it still doesn’t work, double-check that the cwrsync\bin folder is correctly added to the system Path.

Step 4: Modify generate.sh

Open generate.sh in a text editor (e.g., Notepad++ or VS Code) and replace every occurrence of $PWD with:

$(pwd -W)

This fixes path issues in Git Bash on Windows.

Step 5: Run the Script in Git Bash

  1. Open Git Bash.
  2. Navigate to the script's directory using cd. Example:
   cd /c/path/to/your/project
  1. Set an environment variable to prevent Git Bash from interfering with file paths:
   export MSYS_NO_PATHCONV=1
  1. Run the script:
   ./generate.sh guides/guides reveal

If everything is set up correctly, the script should now execute without issues! 🎉

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

No branches or pull requests

2 participants