Editorial tools¶
Some tips for working with files
Download a website with httrack or wget¶
Tip
Use httrack or wget
httrack website.html
find . -name "*.ht*" | while read i; do pandoc -s -f html -t rst "$i" -o "${i%.*}.rst"; done
Tip
convert to rst or md
fix inner routes
For check the inner routes¶
Check the generated rst file
change the extension to rst and add a route to file inside an index.rst
The command for replace it
'<,'>s/ </ <devops\/Books\/Asterisk\//g
After that now go to change the routes for images
find ./layers/ -type f -iname '*.rst' -print0 | xargs -0 grep --color image::
Made the change¶
find ./layers/ -type f -iname '*.rst' -exec sed -i "s/thumbnail:: /thumbnail:: ..\/..\/..\/..\/_static\/img\/asterisk\//g" {} \;
Last update:
Nov 20, 2024