Notes
This commit is contained in:
BIN
Scripts/Walmart_Screenshots/.DS_Store
vendored
BIN
Scripts/Walmart_Screenshots/.DS_Store
vendored
Binary file not shown.
5
Scripts/Walmart_Screenshots/combine_to_pdf.py
Normal file → Executable file
5
Scripts/Walmart_Screenshots/combine_to_pdf.py
Normal file → Executable file
@ -1,5 +1,6 @@
|
||||
from PIL import Image
|
||||
import glob
|
||||
import re
|
||||
import os
|
||||
from datetime import date
|
||||
|
||||
@ -16,7 +17,6 @@ def find_pictures(currentdir):
|
||||
|
||||
|
||||
def split_resources(files, currentdir):
|
||||
print(files)
|
||||
try:
|
||||
resource_title = files[0]
|
||||
resource_title = resource_title[:-6]
|
||||
@ -30,12 +30,13 @@ def split_resources(files, currentdir):
|
||||
split_resources(files, currentdir)
|
||||
process_pictures(new_list, resource_title, currentdir)
|
||||
except IndexError as e:
|
||||
pass
|
||||
print(e)
|
||||
finally:
|
||||
pass
|
||||
|
||||
|
||||
def process_pictures(new_list, resource_title, currentdir):
|
||||
resource_title = re.sub(r'[?]', "", resource_title)
|
||||
today = date.today()
|
||||
today = today.strftime("%m.%d.%Y")
|
||||
image_list = []
|
||||
|
||||
0
Scripts/Walmart_Screenshots/resources_api.js
Normal file → Executable file
0
Scripts/Walmart_Screenshots/resources_api.js
Normal file → Executable file
15
Scripts/Walmart_Screenshots/walmart_screenshots.sh
Executable file
15
Scripts/Walmart_Screenshots/walmart_screenshots.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#! /bin/zsh
|
||||
|
||||
jscript=$(node resources_api.js)
|
||||
render_pdf=$(python3 combine_to_pdf.py)
|
||||
|
||||
echo "Loading virtual environment for Python"
|
||||
. ${PYENV_ROOT}/versions/walmart/bin/activate | awk 'NR==1{print $1,$2,$3}'
|
||||
|
||||
echo "First up, Javascript's Pupeteer."
|
||||
echo "$jscript"
|
||||
|
||||
echo "JS Complete. Running Python Script to clean up PDFs."
|
||||
echo "$render_pdf"
|
||||
|
||||
echo "PDFs complete. Shutting down Virtual env."
|
||||
Reference in New Issue
Block a user