2016-3-11 The best way to crawl Pengyouquan Pictures is to use Droid4x+Anyproxy, get the pictures url and wget them together
- Export wiznote's note to be some printable content
- The text content will be the first page
- The images will be in the following pages
Check pdfservice for more options.
-
Put your content in wiznote in some specific directory, like 'We chat'.
-
Find the we chat record like following and export them to csv file
select * from wiz_document where document_location="/We chat/";
The document_location can be various. copy the csv file to the location specified in server/config/index.js. or server/config/environment/development.js. For example, ./server/wechat/notes/wechat.csv
- Copy ~/.wiznote/your_account/data/notes to some where.
#!/bin/bash
# sample
cp -r ~/.wiznote/[email protected]/data/notes/* ./server/wechat/notes/
- Download the file from the front-end. (Because the jspdf need it, the nodejs wrapper doesnot work. You can improve it) Use following command to run the server at the root of the project
npm install && bower install && grunt
Use node-canvas, which is a Cairo backed Canvas implementation for NodeJS, to make picture from text.
I think nodejs is obviously not suitable for some download work. It really make the page slow and cannot accept new connections.
You cannot insert utf-8 character using jsPDF, though obviously it is much better than pdfmake.
Using custom font like Using Custom Font.
You need to get some ttf file from windows/fonts folder. Trust me, it is the fastest way to get ttf folder rather than download them from some where on the internet. It was completely a fault to search anything contains Chinese from the internet.
Then encode them into base64:
base64 -w 0 xxx.ttf > somefile.out
Then copy the file content into my_fonts.js under assets/fonts/
-
Using javascript to manipulate image is ... a bad solution... it is CPU sensitive
-
Use node-canvas, PDF itself can embed fonts, but I need more time.
-
Reduce memory usage, nodeJS it self has GC, but not investigate.
-
NodeJS memory management, it must be a limitation, how to increase it and is it possible to make some cache?
-
Is nodeJS not suitable for download-oriented site? I mean, can it accept connections when downloading?
-
What is canvas
-
Why dont you try ES6? and reduce the use of promise style programming. The return type change will significantly change your thinking style