Ask arguments for code
()
| 281 | |
| 282 | |
| 283 | def ask_code_options(): |
| 284 | """ |
| 285 | Ask arguments for code |
| 286 | """ |
| 287 | filename = questionary.path("filename:", validate=FilePathValidator).ask() |
| 288 | |
| 289 | input_ = questionary.text("input:").ask() |
| 290 | if not input_: |
| 291 | input_ = None |
| 292 | |
| 293 | format_ = questionary.select( |
| 294 | "format:", |
| 295 | choices=['bin', 'asm', 'hex']).ask() |
| 296 | |
| 297 | arch = questionary.select( |
| 298 | "arch:", |
| 299 | choices=arch_map).ask() |
| 300 | |
| 301 | endian = questionary.select( |
| 302 | "endian:", |
| 303 | choices=['little', 'big']).ask() |
| 304 | |
| 305 | os = questionary.select( |
| 306 | "os:", |
| 307 | choices=os_map).ask() |
| 308 | |
| 309 | rootfs = questionary.path("rootfs:", only_directories=True, |
| 310 | validate=RequiredDirectoryPathValidator, default=".").ask() |
| 311 | |
| 312 | thumb = questionary.confirm("thumb:", |
| 313 | default=False, auto_enter=True).ask() |
| 314 | |
| 315 | return {"filename": filename, "input": input_, "format": format_, |
| 316 | "arch": arch, "endian": endian, "os": os, "rootfs": rootfs, |
| 317 | "thumb": thumb} |
| 318 | |
| 319 | |
| 320 | def ask_additional_options(): |