How to convert a jupyter notebook to a python script with cell delimiters (#%%)?
I've already checked nbconvert , but it doesn't seem to have the one. Also, the same question found, the answer doesn't satisfy the need because actual raw source codes of jupyter notebook isn't structured as such. (It'd be better to be able to convert at once, instead of converting with nbconvert first and then pattern matching)
Any tools recommended? Or could you share a script to achieve this?

How to convert a jupyter notebook to a python script with cell delimiters (#%%)?
That looks similar to the percent delimiter that Jupytext handles, see the top few commands here also. The specific commands I'm referencing:
jupytext --to py:percent notebook.ipynb         # convert notebook.ipynb to a .py file in the double percent format
jupytext --to py:percent --opt comment_magics=false notebook.ipynb   # same as above + do not comment magic commands

See the bottom of the percent format section for more about that last command and further customization options.
