Skip to content

Instantly share code, notes, and snippets.

@sodejm
Last active June 24, 2020 22:55
Show Gist options
  • Save sodejm/cb5147de814947a5b3d9cab89945f975 to your computer and use it in GitHub Desktop.
Save sodejm/cb5147de814947a5b3d9cab89945f975 to your computer and use it in GitHub Desktop.

Triumph decided not to do paper manual anymore so here is a not so straight forward way of downloading the manual for offline use. This could all be scripted but I only own 1 bike and downloaded it once.

Also, fyi search doesn't work right now as I have not bothered to correct that code yet. Will update when that happens.

  1. Sign in an get a subscription to tritun.net
  2. Export your browsers tritun.net cookies to a netscape cookie file
  3. Find the document root from the portal and use the number in the following command

The following is for a 2020 Triumph T120

  1. wget -r --no-clobber --load-cookies="./cookies-tritun-net.txt" --adjust-extension --convert-links -w 1 --restrict-file-names=windows 'https://www.tritun.net/tritun/service/document/1997'

  2. Once downloaded you will need to add image extensions to get them to work correctly

In Bash
find ./service/graphic/SVG/ -name "en_GB" -type file -exec mv {} {}.svg \;
find ./service/graphic/BINARY/ -name "en_GB" -type file -exec mv {} {}.png \;
  1. Open the root folder in VSCode
  2. Search all files for the SVG and PNG files and add extensions
In VS Code

Find: (BINARY\/.*\/en_GB)
Replace: $1.png

Find: (SVG\/.*\/en_GB)
Replace: $1.svg
  1. You should be good to open the html file under 'services'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment