Giter Site home page Giter Site logo

leanote2md's Introduction

leanote2md

Export all you Markdown notes in Leanote (a.k.a 蚂蚁笔记) to local Markdown files.

Prerequisite

  • Python 3
  • pip3
  • git

Dependencies

Use your pip tool to install the dependencies

  • anytree
  • requests

You can install these packages by this command

pip3 install anytree requests --user

Usage

Clone this repo, and run the exporter.py script. You can easily do this by running the following command on your terminal

git clone https://github.com/gaunthan/leanote2md.git
cd ./leanote2md
chmod +x exporter.py
./exporter.py

If you don't want to save your notes interactively, you need to modify config.py and run exporter.py with command argument config.py

./exporter.py config.py

leanote2md's People

Contributors

gaunthan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

leanote2md's Issues

无法正常使用,请求帮助

运行环境: Debian 9,python --version 3.5.1,pip3 --version pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)

leanote自建,已修改lea.pyLEANOTE_API_BASE。用户名、密码、导出目录均已输入,但运行后报错如下,能看得出来已经登录成功。我并不是软件开发人员,请见谅。

Login success, welcome XXX (XXX@XXX).
Traceback (most recent call last):
  File "./exporter.py", line 208, in <module>
    localize_image=True, forced_save=False, only_blog=only_blog)
  File "./exporter.py", line 143, in save_note_as_md
    mkdir_p(final_path)
  File "/root/leanote2md/utils.py", line 11, in mkdir_p
    os.makedirs(path)
  File "/usr/lib/python3.5/os.py", line 226, in makedirs
    head, tail = path.split(name)
  File "/usr/lib/python3.5/posixpath.py", line 103, in split
    i = p.rfind(sep) + 1
AttributeError: 'PosixPath' object has no attribute 'rfind'

AttributeError: 'PosixPath' object has no attribute 'rfind'

Python 3.5.2
xx@xxx-PC:~/leanote2md$ ./exporter.py config.py
Login success, welcome admin ([email protected]).
Traceback (most recent call last):
File "./exporter.py", line 208, in
localize_image=True, forced_save=False, only_blog=only_blog)
File "./exporter.py", line 143, in save_note_as_md
mkdir_p(final_path)
File "/home/xxx/leanote2md/utils.py", line 11, in mkdir_p
os.makedirs(path)
File "/usr/lib/python3.5/os.py", line 226, in makedirs
head, tail = path.split(name)
File "/usr/lib/python3.5/posixpath.py", line 103, in split
i = p.rfind(sep) + 1
AttributeError: 'PosixPath' object has no attribute 'rfind'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.