API Reference
This section contains automatically generated documentation from the qm2 source code.
Core Engine
Question Logic
cleanup_questions_cache()
Remove entries from cache for files that no longer exist.
Source code in src/qm2/core/questions.py
42 43 44 45 46 47 48 49 50 | |
delete_question(category_file)
Select a question from the list and delete it from the file.
Source code in src/qm2/core/questions.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 | |
edit_question_by_index(questions, index_number)
Edit a question directly by its ordinal number (1-based).
Source code in src/qm2/core/questions.py
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 | |
File Utilities
load_json(filename)
Load JSON from file. Returns empty list on any error. For detailed error info, use load_json_result().
Source code in src/qm2/utils/files.py
14 15 16 17 18 19 20 | |
load_json_result(filename)
Load JSON from file. Returns (data, error_message). On success: (data, None) On error: ([], "descriptive error message")
Source code in src/qm2/utils/files.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |