Skip to content

Commit

Permalink
chrome dependency found...
Browse files Browse the repository at this point in the history
  • Loading branch information
John Major committed Aug 17, 2021
1 parent b4bfa99 commit cc248ab
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
4 changes: 3 additions & 1 deletion bin/install_chrome_driver_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

from chromedriver_py import binary_path

print('''This command will fail if you have not run the setup.py script AND "source environment/env.sh" first.\n\n\nIt is installing a headless chrome web browser driver to allow making an image out of the big demo script sessions. It's not required to run the s/w, but nice to have''')
print(
"""This command will fail if you have not run the setup.py script AND "source environment/env.sh" first.\n\n\nIt is installing a headless chrome web browser driver to allow making an image out of the big demo script sessions. It's not required to run the s/w, but nice to have"""
)
os.chdir(f"{os.environ['RGBW_CC_ROOT']}/bin/")
cmd = f"cp {binary_path} {os.environ['RGBW_CC_ROOT']}/bin/chrome; chmod a+x ./chrome; ln -s chrome chromium;"
os.system(cmd)
12 changes: 1 addition & 11 deletions bin/run_color_module_RGB_HSV_HEX_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
from rgbw_colorspace_converter.colors.converters import RGB, HSV
from rgbw_colorspace_converter.tools.color_printer import print_colors

from chromedriver_py import binary_path # this will get you the path variable

# This is required to make an image of the session out of the html recording
os.environ["PATH"] = ".:" + os.environ["PATH"]
os.system(f"chmod a+x {binary_path}")
os.system(
f"ln -s {binary_path} ./chrome; ln -s {binary_path} ./chromium;"
) # Might need another for windows. This should cover linux and mac


# This is all meant to work in even basic teminal sessions that do not
# have X11 running. So, I loose a lot of flexibility in color range
# but, it is a fun challenege. Below, I'm doing some terminal prep.
Expand Down Expand Up @@ -470,7 +460,7 @@ def _write_msg(msg):
ilength = int((N_ROWS * 16))

os.system(
f"hti --chrome_path ./ -H {ansi_html_f} --chrome_path ./ -o ./rgbw_pnggen/ -s {iwidth},{ilength}; mv ./rgbw_pnggen/screenshot.png {ansi_png_f}; rm -rf ./rbgw_pnggen/"
f"hti -H {ansi_html_f} --chrome_path ./ -o ./rgbw_pnggen/ -s {iwidth},{ilength}; mv ./rgbw_pnggen/screenshot.png {ansi_png_f}; rm -rf ./rbgw_pnggen/"
)
os.system(exit_cmd)

Expand Down
1 change: 0 additions & 1 deletion environment/HBP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ dependencies:
- aadict==0.2.3
- ansi2html==1.6.0
- arabic-reshaper==2.1.3
- chromedriver_py
- colr==0.9.1
- coverage==5.5
- docopt==0.6.2
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
html2image
ansi2html
black
chromedriver_py
Colr
ipython
ipython-genutils
Expand Down

0 comments on commit cc248ab

Please sign in to comment.