GithubHelp home page GithubHelp logo

getting-started-guide-scripts's Introduction

Getting Started Helper Scripts

This WIP repo allows generating content for the Getting Started guide, including device-specific screenshots using Selenium.

Note, this runs headless, and screenshots are captured at all points to try and find the point of failure if selectors are updated.

Sample screenshot

Screenshots

To capture all screenshots for all devices, after installing dependencies in a virtual environment, and renaming config.sample to config.py and adding in credentials, simply run:

python3 add_application.py

This script creates and deletes an application for each device, so will take a while to run (though it's much quicker than doing it manually!)

Screenshots are saved in the /screenshots/ folder. The original screenshot is saved together with an edited version for the docs. The Pillow image library is used to edit the screenshots. These can then be exported to the relevant image folder in the docs repo.

Note: This script will only work on a paid plan due to the available applications available and selectors would need to be updated for alternatives.

python3 cli_release.py

This script optionally generates the latest CLI installer screenshot and saves to screenshots/cli/cli-release.png.

Device dictionary

python3 device_config.py

This script generates the device config file for the docs. It also includes the instructions for each board, which are optionally output if no custom content for each board is found. Instructions are formatted to work with Mustache templating.

Known Issues

  • There is a hack to use a massive viewport due the device dropdown (and not being selectable). I've tried various alternatives but this is the only thing I can get to currently work...
  • Related to the above, I haven't yet found a clean way to count the devices in the dropdown, so it loops through until it hits an exception. It's currently catching a general exception, so this could be an error, or it has finished looping through devices. #TODO
  • There are a couple of lengthy sleep statements. I tried (unsuccessfully) to use ExplicitWait, and adding this would greatly improve the speed of this as currently, the wait is likely very excessive. #TODO
  • There is no way to easily generate a single image (other than to manually set the counter to the correct device). #TODO
  • Would be nice to run it in a Docker container

getting-started-guide-scripts's People

Contributors

garethtdavies avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.