summaryrefslogtreecommitdiff
path: root/docs/usage-manual/export-usage-manual.py
diff options
context:
space:
mode:
authorJosh Morman <jmorman@gnuradio.org>2021-11-24 12:50:06 -0500
committermormj <34754695+mormj@users.noreply.github.com>2021-11-24 14:41:53 -0500
commit0cfb70212d219e8729b7fddb94f393f469665ecd (patch)
tree53889b076b674cdf599da7fd0ca02c27692d9856 /docs/usage-manual/export-usage-manual.py
parent166dc18941de6b5bddbab7cd6ef1a9cf48d4d4b4 (diff)
docs: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
Diffstat (limited to 'docs/usage-manual/export-usage-manual.py')
-rw-r--r--docs/usage-manual/export-usage-manual.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/usage-manual/export-usage-manual.py b/docs/usage-manual/export-usage-manual.py
index 74f3d4d30c..836d882ea9 100644
--- a/docs/usage-manual/export-usage-manual.py
+++ b/docs/usage-manual/export-usage-manual.py
@@ -4,7 +4,7 @@
# sudo chmod +x geckodriver
# export PATH=$PATH:/home/marc/Downloads (or wherever you put it)
-from selenium import webdriver
+from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from html.parser import HTMLParser
@@ -27,7 +27,8 @@ pages_to_save = ['Handling Flowgraphs',
'Polyphase Filterbanks']
# set up web driver
-driver = webdriver.Firefox('/home/marc/Downloads/geckodriver') # dir that contains geckodriver
+# dir that contains geckodriver
+driver = webdriver.Firefox('/home/marc/Downloads/geckodriver')
print("STARTING")
for page_name in pages_to_save:
print("Processing", page_name)
@@ -43,7 +44,7 @@ for page_name in pages_to_save:
# hit Export
submit_button = driver.find_element_by_xpath("//*[@value='Export']")
- submit_button.click()
+ submit_button.click()
# get HTML of new page
raw_html = driver.page_source
@@ -52,7 +53,8 @@ for page_name in pages_to_save:
# save text to file
h = HTMLParser()
- cropped_html_text = h.unescape(cropped_html) # makes it so stuff like &gt shows up as a greater than sign
+ # makes it so stuff like &gt shows up as a greater than sign
+ cropped_html_text = h.unescape(cropped_html)
text_file = open("(exported from wiki) " + page_name + ".txt", "w")
text_file.write(cropped_html_text)
text_file.close()