youdaonote-pull Project Introduction
The youdaonote-pull project was developed to address a specific limitation of Youdao Cloud Notes, which does not provide an option to export notes easily. This script allows users to download all their notes to their local system, tackling the inconvenience of migrating notes from Youdao Cloud. The entire process is carried out locally, assuring users of the safety and security of their data.
Features
- Comprehensive Note Download: Users can download all of their notes in their original formats, ensuring no data is left behind.
- Format Conversion: Since notes downloaded in standard Youdao formats are typically XML or JSON, the script automatically converts these into Markdown format, making them more user-friendly.
- Image Download and Upload: As images stored in Youdao's note system cannot be viewed outside the platform, the script ensures that these images are either downloaded locally or uploaded to the image hosting service SM.MS.
For Non-Technical Users
Non-technical users are not left out, as there is a straightforward executable version available here. This version requires no installation of Git, Python, or downloading of scripts. Users can follow a more straightforward guide to exporting and backing up Youdao Cloud Notes through a dedicated tutorial.
Usage Steps
A helpful video tutorial is available to assist users through the setup and execution process.
Step 1: Preparation
-
Install Git: First, users need to install Git following Liao Xuefeng's Git Guide. Verify the installation by executing:
git --version
-
Clone the Project: Use a command-line tool to clone the project repository:
pwd git clone https://github.com/DeppWang/youdaonote-pull.git cd youdaonote-pull
-
Install Python3 and Dependencies: Follow Liao Xuefeng's Python Guide for Python installation. If issues arise, such as the one listed here, installing Python 3.11.7 is recommended. Dependencies are then installed using:
For macOS:
sudo easy_install pip3 python3 -m venv venv . venv/bin/activate sudo pip3 install -r requirements.txt
For Windows:
python -m venv venv . venv/bin/activate pip install -r requirements.txt
-
Configure Login
Cookies
File: Since Youdao’s login requires graphic recognition, use cookies extracted via the Cookie-copy plugin or DevTools in a browser to set upcookies.json
. -
Configure Script Parameters in
config.json
: Users should editconfig.json
using a text editor to define directories for local storage, specific export options, and image handling through SM.MS.
Step 2: Running the Export Script
Execute the following command to run the export script:
python3 pull.py # macOS/Linux
python pull.py # Windows
Step 3: Handling Multiple Exports
Re-executing the script similarly will check for any updates through file modification dates and ensure that only new or updated notes are exported, avoiding local file overwrites unless explicitly needed.
Important Notes
-
Users editing the script should ensure that their
cookies.json
file is not pushed to GitHub. -
The unfamiliarity with command-line operations can be mitigated by carefully following each step and seeking assistance when needed.
-
To ensure the scripts are up-to-date, users should regularly update their local repository using:
git pull origin master
Underlying Principle
The script mimics the actions a user would perform in a browser by accessing the API endpoints of Youdao Cloud Notes to retrieve note data and store it locally, transforming it into a more flexible Markdown format.
Acknowledgments
This project takes inspiration from the YoudaoNoteExport project.
Motivation and Development Background
Initially, a dedicated user of Youdao Cloud Notes turned to the more WYSIWYG-focused Typora and aspired to sync notes between a computer and Youdao Cloud for seamless use of both applications. Despite an open API, limitations such as the lack of Markdown support prompted a pivot in approach. Since Youdao removed the "export all notes" function from its newer clients, the author modified the pull script to suit these needs.
Contribution
Contributions to the project are welcomed, provided contributors adhere to the specific guidelines of using English in commits, addressing one aspect per commit, and properly commenting in code. Contributors are also encouraged to validate functionality on both macOS and Windows systems by utilising:
python3 test/test.py
Through these collective efforts, the youdaonote-pull project offers a solution for users seeking greater control and flexibility over their note management and export processes.