Current version: 0.2.1
DradisMD allows to import, manage Dradis projects locally and convert Dradis textile format to GitHub Flavored Markdown and more other format supported by pandoc.
Inspired by DradisFS and based on the following libraries/project
- dradis-api Python wrapper for the Dradis API
- pypandoc wrapper for pandoc: markup file converting
- rich for prettier output 🌈
Table of contents
- Python >= 3.10
To use the convertion features, Pandoc needs to be available in the $PATH.
Note: DradisMD will detect if Pandoc is not installed and prompt to install it for you with pypandoc
pip -r requirements.txt
[Optional] Zsh completion can also be setup see the shell completion folder.
- Find your API token
- Set the instance URL and API token in config.ini
instance_url=hxxps://your-dradis-instance-url.com
api_token=your_api_token_here
- List projects
python dradismd.py list
DradisMD supports the followings action:
Show help message
python dradismd.py --help
List projects with their IDs in last updated order.
--head option to show only last X projects
python dradismd.py list [--head <number>]
Retrieve a project from Dradis to local folder.
Save to local folder if no destination folder is provided.
--format options to convert another format than textile
python dradismd.py get <project_id> [destination_folder] [--format <value>]
Example:
Import project with ID 17 to local folder and convert to markdown
python dradismd.py get 17 --format markdown
⚠ Disclaimer: This action erases existing data on Dradis and replace it.
If you are unsure what you are doing, make sure you have a backup of your Dradis project.
Export your local project file(s) to Dradis. Supports markdown and textile.
If no source is provided, local folder is used.
A single file can also be used
python dradismd.py update <project_id> [file|folder]
Examples:
Export project folder and all files inside
python dradismd.py update 167 "ProjectFolder"
Export a single content block
python dradismd.py update 167 "ProjectFolder/Content Blocks/ContentBlock1.md"
Note: The script expects the following folder structure (which is generated when using retrieving project with get:
📂 ProjectName
┣━━ 📂 Content Blocks
┃ ┣━━ 📄 ContentBlock1
┃ ┗━━ 📄 ContentBlock1
┣━━ 📂 Issues
┃ ┗━━ 📄 Issue1
┣━━ 📂 Nodes
┃ ┗━━ 📂 Web application
┃ ┗━━ 📂 Evidences
┃ ┣━━ 📂 Issue1
┃ ┃ ┗━━📄 EvidenceXX
┃ ┗━━ 📂 Issue2
┃ ┗━━📄 EvidenceXX
┗━━ ⚙ document_properties.ini
The tool will not work properly if your local project has a different folder structure.
List issues from issue library.
Search the issue library for one of the keywords provided
python dradismd.py issues [keywords]
Add an issue to project folder from template or from issue library if --id is used Create a new evidence too if --node is provided
python dradismd.py add_issue <project_path> --id <id> or --title <title>
Convert a project file or all files in a folder to another format. Supported: markdown, textile
python dradismd.py convert <file|folder> <format>
Using the pattern defined in config.ini: Rename all attachments referenced in a project file and update the references
python dradismd.py rename <file>
07/10/2022 - v0.2.0
- Added add_issue and issues action
- Fixed rename
Below some of the markdown editor I would recommend trying
- 🌟 Visual Code with the following extensions.
- Joplin
- ObsidianMD
Or literally any text editor such as VIM, Atom, Notepad++, ...
At the moment nested nodes are not supported (because I never used them).
The Dradis API doesn't allow to download attachments.
- Include interaction with Issue Library to add new issue to project.
- Fix bugs with the auto renaming feature
- Include more pandoc formats support (PDF, word, ...)
- VScode workspace with relevant markdown/textile extensions
- Add a check to verify the local file has a more recent 'last modified date' when updating project