Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1033)

Unified Diff: tools/privacy_whitepaper/README.md

Issue 2008283002: Tool to generate screenshots of Chrome in various languages Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/privacy_whitepaper/README.md
diff --git a/tools/privacy_whitepaper/README.md b/tools/privacy_whitepaper/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..4d722499eebbad88ce807a85f182c6310e8f5818
--- /dev/null
+++ b/tools/privacy_whitepaper/README.md
@@ -0,0 +1,63 @@
+# generate\_screenshots.py
+
+The generate\_screenshots.py script is a utility to create a screenshot of the
+same UI element across all 50+ language into which Chrome is translated.
+It has been written to generate screenshots for the privacy whitepaper but you
+may feel free to add more screenshots for other cases (e.g. help center
+articles).
+
+The script supports two kinds of screenshots:
+ * Screenshots of web content (e.g. chrome://settings pages).
+ For this kind of screenshot, HTML elements can be addressed by CSS selectors
+ and captured.
+ * Screenshots of pixels (e.g. for the omnibar).
+ For this kind of screenshot, a Chrome window is positioned at the top left
+ of the desktop and set to a window size of 800x600 pixels.
+
+## Dependencies
+
+Install pyautogui:
+ sudo apt-get install python-Xlib pip scrot
+ sudo pip install pyautogui
+
+## Executing generate\_screenshots.py
+
+ # Expand PYTHONPATH
+ export PYTHONPATH="$PYTHONPATH:$CHROMESRC/third\_party/webdriver/pylib"
+
+ # Execute generator
+ python generate\_screenshots.py \
+ --chrome-path /usr/bin/google-chrome-beta \
+ --chromedriver-path $CHROMESRC/out/Debug/chromedriver \
+ --safebrowsing-path ~/.config/google-chrome-beta/ \
+ --profile-path /tmp/temp-profile \
+ -v \
+ --screenshots uma \
+ --languages en \
+ --output-path /tmp/screenshots
+
+The parameters are as follows:
+ * `--chrome-path`: The path to the Chrome binary to execute.
+ * `--chromedriver-path`: The path to the Chrome driver binary. Compile it
+ yourself or download it from
+ [here](https://sites.google.com/a/chromium.org/chromedriver/)
+ * `--safebrowsing-path`: A path to an existing Chrome profile. This allows
+ the screenshot generator to copy the current safebrowsing database and
+ use it for safebrowsing related screenshots. Chrome downloades them
+ lazily after up to 10 minutes and we don't want to wait that long.
+ * `--profile-path`: A directory that will be deleted before each execution
+ and used to host a user profile.
+ * `--v`: Enable debug output.
+ * `--screenshots`: A list of screenshots to create. If this parameter is not
+ passed, all known screenshots are generated.
+ * `--languages`: A list of languages for which screenshots should be
+ generated. If this is not passed, screenshots are generated for all known
+ languages.
+ * `--output-path`: Directory in which screenshots are written.
+
+## Dealing with enterprise policies.
+
+Some screenshots may contain UI elements that are controlled by corporate
+policies. On Linux your enterprise policies may be stored at
+`/etc/opt/chrome/policies/managed`. You may want to delete them before creating
+screenshots.

Powered by Google App Engine
This is Rietveld 408576698