xref: /aosp_15_r20/external/skia/tools/svg/README.md (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard WorkerSVG Tools
2*c8dee2aaSAndroid Build Coastguard Worker=========
3*c8dee2aaSAndroid Build Coastguard Worker
4*c8dee2aaSAndroid Build Coastguard WorkerThis directory contains the following-
5*c8dee2aaSAndroid Build Coastguard Worker
6*c8dee2aaSAndroid Build Coastguard Worker
7*c8dee2aaSAndroid Build Coastguard Workersvgs.txt
8*c8dee2aaSAndroid Build Coastguard Worker--------
9*c8dee2aaSAndroid Build Coastguard WorkerThis text file contains an SVG URL per line.
10*c8dee2aaSAndroid Build Coastguard WorkerIt is a list of the SVG files used to test rendering correctness.
11*c8dee2aaSAndroid Build Coastguard Worker
12*c8dee2aaSAndroid Build Coastguard Workersvg_images.txt
13*c8dee2aaSAndroid Build Coastguard Worker--------------
14*c8dee2aaSAndroid Build Coastguard WorkerThis text file contains an image URL per line.
15*c8dee2aaSAndroid Build Coastguard WorkerIt is a list of images used by the SVGs in svgs.txt.
16*c8dee2aaSAndroid Build Coastguard Worker
17*c8dee2aaSAndroid Build Coastguard Workersvgs_parse_only.txt
18*c8dee2aaSAndroid Build Coastguard Worker-------------------
19*c8dee2aaSAndroid Build Coastguard WorkerThis text file contains an SVG URL per line.
20*c8dee2aaSAndroid Build Coastguard WorkerIt is a list of the SVG files used to exercise the SVG parsing code.
21*c8dee2aaSAndroid Build Coastguard Worker
22*c8dee2aaSAndroid Build Coastguard Workersvg_downloader.py
23*c8dee2aaSAndroid Build Coastguard Worker-----------------
24*c8dee2aaSAndroid Build Coastguard WorkerThis python script parses txt files and downloads SVGs and images into a specified directory.
25*c8dee2aaSAndroid Build Coastguard Worker
26*c8dee2aaSAndroid Build Coastguard WorkerThe script can be run by hand:
27*c8dee2aaSAndroid Build Coastguard Worker$ python svg_downloader.py --output_dir /tmp/svgs/
28*c8dee2aaSAndroid Build Coastguard WorkerOR
29*c8dee2aaSAndroid Build Coastguard Worker$ python svg_downloader.py --output_dir /tmp/svgs/ --input_file svgs_parse_only.txt --prefix svgparse_
30*c8dee2aaSAndroid Build Coastguard Worker
31*c8dee2aaSAndroid Build Coastguard WorkerIf the --keep_common_prefix argument is specified, URL components after the common prefix
32*c8dee2aaSAndroid Build Coastguard Workerwill be preserved in the destination directory hierarchy. For example, if the input file contains
33*c8dee2aaSAndroid Build Coastguard WorkerURLs https://example.com/images/a.png and https://example.com/images/subdir/b.png, the downloaded
34*c8dee2aaSAndroid Build Coastguard Workerfiles will go to output_dir/a.png and output_dir/subdir/b.png.