DradisMD allows to import, manage Dradis projects locally and convert Dradis textile format to GitHub Flavored Markdown.
Table of contents
- Python >= 3.10
To be able to convert files, 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
git clone https://github.com/T0ille/DradisMD
cd DradisMD
pip install .
[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 (default location is ~/.config/dradismd/config.ini)
instance_url=hxxps://your-dradis-instance-url.com
api_token=your_api_token_here
- List projects
dradismd projects
DradisMD supports the following action:
Show help message
dradismd --help
List projects with their IDs in last updated order. Optional filters can be used. --last option to show only last X projects --filter option with ['team','owner','name'] to filter projects listed by team, owner (email address used for Dradis) or by project name
dradismd projects [-l <number>] [-f <search_criteria> <search_term>]
Example:
dradismd projects
dradismd projects -l 10 -f team megacorp
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
dradismd get <project_id> [destination_folder] [--format <value>]
Example:
Import project with ID 17 to local folder and convert to markdown
dradismd get 17 --format markdown
⚠ Disclaimer: This action erases existing data on Dradis and replaces 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
dradismd update <project_id> [file|folder]
Examples:
Export project folder and all files inside
dradismd update 167 "ProjectFolder"
Export a single content block
dradismd 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 Dradis issue library.
Search the issue library for one of the keywords provided
dradismd issues [keywords]
Add an issue to project folder from issue template or from Dradis issue library if --id is used Create a new evidence too if --node is provided
dradismd 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
dradismd convert <file|folder> <format>
Using the pattern defined in config.ini: Rename all attachments referenced in a project file and update the references
dradismd rename <file>
- 🌟 Visual Code with the following extensions.
- Joplin
- ObsidianMD
Or literally any text editor such as VIM, Atom, Notepad++
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 output styling
- Add project creation
- Make an interactive/UI mode with Textual
At the moment nested nodes are not supported (because I never used them).
The Dradis API doesn't allow to download attachments.