diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2e98fe62d28826d3ad39abbb9337f9bc373cd957 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# CodiMD note exporter + +This little tool is intended to help you backup the notes that you have in your CodiMD history to a +local folder. It complements CodiMD's "export user data" functionality, which only downloads +documents that you own. + +## Requirements + +Its only dependency is Python >= 3.7 (use `python3 -V` to check your version). + +## Usage + +### 1. Extract value of the session cookie + +First of all, you need to extract the value of the `connect.sid` browser cookie for the +particular CodiMD instance that you use (e.g., `md.inf.tu-dresden.de`). + +**WARNING**: the value of the cookie is your session ID and as such, **should be treated like a +password**. Don't share it with others! + +Now, the instructions are similar for Chrome and Firefox: + +1. Navigate to the CodiMD instance. +2. Open developer tools. +3. **Chrome**: go to the "Application" tab. **Firefox**: go to the "Storage" tab ("Web-Speicher"). +4. Un-collapse "Cookies". +5. In the list, search for a cookie with the name `connect.sid` +6. Select and copy the value. + + +### 2. Execute the script via the command line + +Clone this repository to a path of your liking and just execute `./codimd_export.py` in a +shell. The script will ask for your session id and download the notes to the relative path +`./codimd-documents`. + + +### Example + + $️ ./codimd_export.py + Please provide your CodiMD session id (connect.sid cookie): + HTTP 404 Not Found: https://md.inf.tu-dresden.de/TOPofLSB + HTTP 404 Not Found: https://md.inf.tu-dresden.de/6jeKGnJnSp6H0f0mVnBwQQ + HTTP 403 Forbidden: https://md.inf.tu-dresden.de/klausur-2020-experiences + HTTP 404 Not Found: https://md.inf.tu-dresden.de/iQVB7TO-QXqi3hGSZ7J4Eg + HTTP 404 Not Found: https://md.inf.tu-dresden.de/LSB-2020-11-17 + HTTP 404 Not Found: https://md.inf.tu-dresden.de/Nzbj13ydRLe1d0fRCyG6cA + HTTP 404 Not Found: https://md.inf.tu-dresden.de/LSB-2021-02-02 + HTTP 404 Not Found: https://md.inf.tu-dresden.de/LSB-2021-06-22 + HTTP 404 Not Found: https://md.inf.tu-dresden.de/LSB-2021-12-07 + HTTP 404 Not Found: https://md.inf.tu-dresden.de/ThesisTemplateBachelor + HTTP 404 Not Found: https://md.inf.tu-dresden.de/cnoGl7hoTaK1JIh2-u-h0g + Done: 163 notes successfully downloaded, 11 not accessible.