@jutge.org/toolkit 4.2.37 → 4.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -210,6 +210,18 @@ jtk upload
210
210
 
211
211
  If this is a new problem, it will be created on Jutge.org and a `problem.yml` file will be generated with the problem ID. For subsequent uploads, the problem will be updated. Do not modify `problem.yml`!
212
212
 
213
+ ### How to log in to Jutge.org
214
+
215
+ Logging in to Jutge.org is necessary to upload problems to the platform or to use Jutge<sup>AI</sup> features.
216
+
217
+ You can log in to Jutge.org in any of the following ways:
218
+
219
+ - Use the `JUTGE_TOKEN` environment variable to directoly log in with a token.
220
+ - Use the `JUTGE_EMAIL` and `JUTGE_PASSWORD` environment variables to log in with email and password.
221
+ - Use the credentials file of [jutge-cli](https://github.com/jutge-org/jutge-cli) to log in with email and password.
222
+
223
+ If the toolkit does not find such credentials, it will prompt for an email and password when needed.
224
+
213
225
  ## Common Commands Reference
214
226
 
215
227
  Here's a quick reference of the most commonly used commands:
@@ -264,6 +276,13 @@ jtk doctor # Check system dependencies
264
276
 
265
277
  ## Troubleshooting
266
278
 
279
+ **Filenames and directory names:**
280
+
281
+ - Use lowercase letters, numbers, dashes, and underscores for filenames and directory names.
282
+ - Avoid spaces in filenames and directory names.
283
+ - Avoid special characters in filenames and directory names.
284
+ - Remember that problem directories should have a `.pbm` extension.
285
+
267
286
  **AI features not working:**
268
287
 
269
288
  - Verify your API keys are set correctly
@@ -277,6 +296,22 @@ jtk doctor # Check system dependencies
277
296
 
278
297
  For platform-specific troubleshooting, refer to your installation guide.
279
298
 
280
- ---
299
+ **Compatibility issues with previous tools:**
300
+
301
+ - You may need to convert your files to the new formats. Here are some examples:
302
+
303
+ ```bash
304
+ epstopdf file.eps -o file.pdf # Convert EPS to PDF
305
+ pdf2svg file.pdf file.svg # Convert PDF to SVG
306
+ fig2dev -L svg file.fig file.svg # Convert FIG to SVG
307
+ fig2dev -L pdf file.fig file.pdf # Convert FIG to PDF
308
+ rsvg-convert -f pdf -o file.pdf file.svg # Convert SVG to PDF
309
+ ```
310
+
311
+ Or use https://convertio.co to convert between many formats online or ImageMagick to convert between formats locally.
312
+
313
+ - You may have statements with old `@` behaviour to enclose inline code. You can convert them to the new format using the `jtk convert transform-at-signs` command.
314
+
315
+ ## End
281
316
 
282
317
  You're now ready to start creating problems with Jutge Toolkit! If you have questions or need help, don't hesitate to consult the documentation, use the `ask` command or reach out to the community.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jutge.org/toolkit",
3
3
  "description": "Toolkit to prepare problems for Jutge.org",
4
- "version": "4.2.37",
4
+ "version": "4.2.38",
5
5
  "homepage": "https://jutge.org",
6
6
  "author": {
7
7
  "name": "Jutge.org",
package/toolkit/ask.ts CHANGED
@@ -21,7 +21,7 @@ export const askCmd = new Command('ask')
21
21
  const docs = await loadDocumentation() // Load your markdown files
22
22
  const fullPrompt = `${docs}\n\nUser question: ${question}`
23
23
 
24
- const answer = await complete(jutge, model, systemPrompt, fullPrompt)
24
+ const answer = await complete(jutge, model, "ask", systemPrompt, fullPrompt)
25
25
  await tui.markdown(answer)
26
26
  tui.warning(
27
27
  `This answer generated by JutgeAI using ${model} is not authoritative but we hope it will help you.`,
package/docs/windows.md DELETED
@@ -1,106 +0,0 @@
1
- # Notes for Windows
2
-
3
- ## Installation
4
-
5
- - Use PowerShell as terminal. Remember to reopen the terminal after the installation of each tool.
6
-
7
- - Bun is a JavaScript runtime like Node.js but faster and lighter.
8
- It is required to run the toolkit on Windows. Install `bun` from https://bun.sh/. It is easy.
9
-
10
- - Install the toolkit using `bun`:
11
-
12
- ```sh
13
- bun install --global "@jutge.org/toolkit"
14
- ```
15
-
16
- The first time may take a while as `bun` needs to download and compile some dependencies. If it fails with a `mkdir` error, just try again, it seems to be a transient error.
17
-
18
- - Check that the installation was successful:
19
-
20
- ```sh
21
- jtk
22
- ```
23
-
24
- It should show the help message. You can always add a `--help` flag to any command to get more information.
25
-
26
- - Check the tools required by the toolkit:
27
-
28
- ```sh
29
- jtk doctor
30
- ```
31
-
32
- It should print information about the installed tools. If any tool is missing, consider installing it and try again. Depending on your workflow, some dependencies may not be necessary.
33
-
34
- ## Upgrade
35
-
36
- Try to use the latest version of the toolkit. Upgrade the toolkit to the latest version with the following command:
37
-
38
- ```powershell
39
- jtk upgrade
40
- ```
41
-
42
- Check the version after upgrading:
43
-
44
- ```powershell
45
- jtk --version
46
- ```
47
-
48
- ## Dependencies
49
-
50
- - LaTeX: A LaTeX distribution is required to compile problem statements and get their PDFs. It is not necessary but strongly recommended.
51
-
52
- For Windows, install MiKTeX from https://miktex.org/download. During installation, select the option to install missing packages on-the-fly.
53
-
54
- - Pandoc: Pandoc with Lua support is required to convert problem statements to Markdown, Text and HTML. It is not necessary but recommended.
55
-
56
- Install it easily using the Windows Package Manager (`winget`):
57
-
58
- ```powershell
59
- winget install --id JohnMacFarlane.Pandoc
60
- ```
61
-
62
- - Python 3: You only need Python 3 if you plan to use Python scripts in your problems.
63
-
64
- Install Python from https://www.python.org/downloads/windows/. Make sure to check the option to add Python to the system PATH during installation. The toolkit uses `python3` command to run Python scripts.
65
-
66
- - C/C++ Compiler: You only need a C/C++ compiler if you plan to use C/C++ programs in your problems. The toolkit uses `gcc` and `g++` commands to compile C and C++ programs, respectively.
67
-
68
- We suggest using [w64devkit](https://github.com/skeeto/w64devkit), a portable C and C++ development kit for Windows. Here are the steps to install it:
69
- 1. **Download** the latest `.exe` file from https://github.com/skeeto/w64devkit/releases.
70
-
71
- 2. **Extract** by double-clicking the downloaded file and choosing a destination (e.g., `C:\w64devkit`).
72
-
73
- 3. **Run** `w64devkit.exe` from the extracted folder to open a terminal with gcc and g++ available.
74
-
75
- 4. **Test** by typing `gcc --version` in the terminal.
76
-
77
- 5. **Compile programs:**
78
-
79
- ```bash
80
- gcc myprogram.c -o myprogram.exe
81
- g++ myprogram.cpp -o myprogram.exe
82
- ```
83
-
84
- Other options are to install [MinGW-w64](http://mingw-w64.org/doku.php) or use the compiler provided by [MSYS2](https://www.msys2.org/).
85
-
86
- - Java: You only need Java if you plan to use Java programs in your problems. The toolkit uses the `java` and `javac` commands to run and compile Java programs, respectively.
87
-
88
- Install the Java Runtime Environment (JRE) from https://www.java.com/en/download/manual.jsp. Make sure to download the Windows version.
89
-
90
- - Likewise, you may need to install Rust, Haskell and Clojure if you plan to use these languages in your problems. If you know how to install them on Windows, please consider contributing to the documentation.
91
-
92
- ## Miscellaneous tips
93
-
94
- - Open a file with its associated application with `start filename.extension`.
95
-
96
- - Show environment variables with `echo $env:VARIABLE`.
97
-
98
- - Set environment temporarly variables with `$env:VARIABLE=value`.
99
-
100
- - Set environment variables permanently with `[System.Environment]::SetEnvironmentVariable('VARIABLE', 'value', 'User')`.
101
-
102
- - Console font doesn't support Unicode: The default console font (Raster Fonts) doesn't support many Unicode characters. Change to a font like "Consolas", "Lucida Console", or "Cascadia Code" in your PowerShell window properties.
103
-
104
- ```
105
-
106
- ```