Skip to content

Commit

Permalink
Merge pull request #21 from theslavicbear/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
theslavicbear authored Feb 18, 2019
2 parents 72ceb03 + 77cdacf commit a706bb0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Site/Chyoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
import sys
from Site import Progress
#from subprocess import Popen, PIPE

class Chyoa:

Expand Down Expand Up @@ -47,6 +48,7 @@ def __init__(self, url):
for i in range(len(inputs)):
print('Input immersion variable '+str(i)+' '+soup.find('label', attrs={'for':'c'+str(i)}).get_text()+' ('+inputs[i].get('placeholder')+') (Leave blank to keep placeholder name)')
try:
sys.stdin = open('/dev/tty')
newname=input()
self.renames.append(newname)
except:
Expand Down Expand Up @@ -97,7 +99,7 @@ def __init__(self, url):
#TODO regular expressions go here

for i in range(len(self.temp)):
self.temp[i]='<h4>by '+self.authors[i]+'</h4>'+self.temp[i]
self.temp[i]='\n<h4>by '+self.authors[i]+'</h4>'+self.temp[i]
self.rawstoryhtml.append(BeautifulSoup(self.temp[i], 'html.parser'))
#print(self.rawstoryhtml[len(self.rawstoryhtml)-1].get_text())
self.author=self.authors[0]
Expand All @@ -118,6 +120,8 @@ def __init__(self, url):
for j in self.renames:
self.truestoryhttml[i]=self.truestoryhttml[i].replace('\n '+j+'\n', j)
self.truestoryhttml[i]=self.truestoryhttml[i].replace(' </span>\n ', '</span> ')

self.story=self.story.replace('\n', '\n\n')
#print(self.story)
#print(self.truestoryhttml[len(self.truestoryhttml)-1])
#for i in range(len(self.renames)):
Expand Down

0 comments on commit a706bb0

Please sign in to comment.