@jutge.org/toolkit 4.2.4 → 4.2.7

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.
package/README.md CHANGED
@@ -1,5 +1,135 @@
1
- # new-jutge-toolkit
1
+ # Jutge Toolkit
2
2
 
3
- This repository contains a toolkit for creating and managing programming exercises on the Jutge.org platform.
3
+ A powerful command-line toolkit for creating and managing programming problems on the [Jutge.org](https://jutge.org) platform.
4
4
 
5
- This new repository is intended to replace the previous `jutge-toolkit` repository, providing enhanced features and improved usability for educators and developers.
5
+ ## Key Features
6
+
7
+ - 📝 Create new problems from scratch or using templates
8
+ - 🤖 Generate problems using JutgeAI
9
+ - 🔧 Compile and test solutions in multiple programming languages
10
+ - 📄 Generate PDF statements and other formats automatically
11
+ - ✅ Verify solutions against test cases
12
+ - ☁️ Upload and update problems directly to Jutge.org
13
+ - ✨ Beautiful terminal interface with color output and help
14
+
15
+ ## Installation
16
+
17
+ The toolkit requires [Bun](https://bun.sh) as a JavaScript runtime. Follow the installation guides for your platform:
18
+
19
+ - **[Linux Installation Guide](docs/linux-installation.md)**
20
+ - **[macOS Installation Guide](docs/macos-installation.md)**
21
+ - **[Windows Installation Guide](docs/windows-installation.md)**
22
+
23
+ ### Quick Install
24
+
25
+ If you already have Bun installed:
26
+
27
+ ```bash
28
+ bun install --global @jutge.org/toolkit
29
+ ```
30
+
31
+ Verify the installation:
32
+
33
+ ```bash
34
+ jtk --version
35
+ ```
36
+
37
+ ## Getting Started
38
+
39
+ ### Quick Start
40
+
41
+ ```bash
42
+ # Get help
43
+ jtk
44
+ jtk --help
45
+
46
+ # Check system dependencies
47
+ jtk doctor
48
+
49
+ # Ask JutgeAI for help (requires API key setup)
50
+ jtk ask "How do I create a problem?"
51
+
52
+ # Clone a template problem interactively
53
+ jtk clone
54
+
55
+ # Generate a new problem with AI
56
+ jtk generate problem
57
+
58
+ # Build problem files
59
+ cd my-problem.pbm
60
+ jtk make
61
+
62
+ # Verify a solution
63
+ jtk verify solution.py
64
+
65
+ # Upload to Jutge.org
66
+ jtk upload
67
+ ```
68
+
69
+ For a complete walkthrough, see the [Getting Started Guide](docs/getting-started-guide.md).
70
+
71
+ ## Documentation
72
+
73
+ ### Essential Guides
74
+
75
+ - **[Getting Started Guide](docs/getting-started-guide.md)** - Complete guide to using the toolkit
76
+ - **[Problem Anatomy](docs/problem-anatomy.md)** - Understanding problem structure and files
77
+ - **[JutgeAI Features](docs/jutge-ai.md)** - Using AI to generate content
78
+
79
+ ### Installation Guides
80
+
81
+ - **[Linux Installation](docs/linux-installation.md)** - Installation steps for Linux
82
+ - **[macOS Installation](docs/macos-installation.md)** - Installation steps for macOS
83
+ - **[Windows Installation](docs/windows-installation.md)** - Installation steps for Windows
84
+
85
+ ## Common Commands
86
+
87
+ ```bash
88
+ # Configuration
89
+ jtk config show # View current configuration
90
+ jtk config set <key> <value> # Set a configuration value
91
+ jtk config edit # Edit configuration file
92
+
93
+ # Problem Creation
94
+ jtk clone [template] # Clone a template problem
95
+ jtk generate problem # Generate problem with AI
96
+ jtk generate translations en es ca # Add statement translations
97
+ jtk generate solutions python cpp # Generate solutions in other languages
98
+
99
+ # Building and Testing
100
+ jtk make # Build all problem elements
101
+ jtk make pdf # Generate PDF statements only
102
+ jtk verify <program> # Test a solution
103
+ jtk clean # Clean temporary files
104
+
105
+ # Publishing
106
+ jtk upload # Upload problem to Jutge.org
107
+
108
+ # Maintenance
109
+ jtk upgrade # Update to latest version
110
+ jtk doctor # Check system dependencies
111
+ jtk about # Show toolkit information
112
+ ```
113
+
114
+ ## Requirements
115
+
116
+ ### Core Requirements
117
+ - [Bun](https://bun.sh) - JavaScript runtime (required)
118
+
119
+ ### Optional Dependencies
120
+ - **LaTeX** (for PDF generation) - texlive-xetex, texlive-fonts-recommended
121
+ - **Pandoc** (for format conversion)
122
+ - **Programming language compilers/interpreters** - Python, GCC/G++, Java, etc. (depending on your needs)
123
+
124
+ Run `jtk doctor` to check which dependencies are installed on your system.
125
+
126
+ ## Support
127
+
128
+ - **Documentation:** Check the [docs](docs/) folder for detailed guides
129
+ - **Get Help:** Use `jtk ask "your question"` to get AI-powered assistance
130
+ - **Issues:** Report bugs and feature requests on [GitHub Issues](https://github.com/jutge-org/jutge-toolkit/issues)
131
+ - **Community:** Visit [Jutge.org](https://jutge.org) for the problem platform
132
+
133
+ ## License
134
+
135
+ Copyright © Jutge.org. All rights reserved.
@@ -188,6 +188,7 @@
188
188
  \item \textbf{#1:} ~ #3 \hfill \fbox{\textbf{~#2 \TxtPoints~}}
189
189
  \end{itemize}
190
190
  }
191
+
191
192
  \newcommand{\ObservationElastic}{
192
193
  \TxtObservationElastic
193
194
  }
@@ -268,16 +269,12 @@
268
269
  % Entre cometes dobles (double quoted).
269
270
  \newcommand{\qq}[1]{``\texttt{\small #1}''}
270
271
 
271
- % Sense cometes per� el mateix est�l (unquoted).
272
+ % Sense cometes però el mateix estil (unquoted).
272
273
  \newcommand{\uq}[1]{\texttt{\small #1}}
273
274
 
274
275
 
275
- \newcommand{\directori}{}
276
-
277
- \newcommand{\enllac}[1]{\texttt{#1}}
278
-
279
276
  \providecommand{\Link}[1]{
280
- \texttt{#1}
277
+ \texttt{#1} % TODO: hyperlink
281
278
  }
282
279
 
283
280
 
@@ -302,25 +299,24 @@
302
299
  \lstset{literate={->}{$\rightarrow$}1 {<=}{$\le$}1 {>=}{$\ge$}1 {!=}{$\neq$}1 {<<}{$<\!\!\!<$}2 {>>}{$>\!\!\!>$}2}
303
300
  \lstset{xleftmargin=0.25cm}
304
301
 
305
- %\lstMakeShortInline@ Aquesta comanda el principal, perqu� aqu� hem potinejat les @,
302
+ %\lstMakeShortInline@ Aquesta comanda el principal, perquè aquí hem potinejat les @,
306
303
 
307
304
 
308
305
  \renewcommand{\footnote}[1]{ (#1)}
309
306
 
310
-
311
-
312
307
  \newcommand{\UseHaskell}{
313
308
  \lstset{language=Haskell}
314
309
  \lstset{columns=fullflexible}
315
310
  \lstset{literate={<=}{$\le$}1 {>=}{$\ge$}1 {/=}{$\neq$}1 {->}{$\rightarrow$}1 {=>}{$\Rightarrow$}1}
316
- \lstset{deletekeywords={insert}}
311
+ }
312
+
313
+ \newcommand{\UseClojure}{
314
+ \lstset{language=Clojure}
315
+ \lstset{columns=fullflexible}
317
316
  }
318
317
 
319
318
  \newcommand{\UsePython}{
320
319
  \lstset{language=Python}
321
320
  \lstset{columns=fullflexible}
322
- %\lstset{literate={<=}{$\le$}1 {>=}{$\ge$}1 {/=}{$\neq$}1 {->}{$\rightarrow$}1 {=>}{$\Rightarrow$}1}
323
321
  }
324
322
 
325
-
326
- \newcommand{\CPP}{C++}