te
This commit is contained in:
parent
074c918f1c
commit
40a3cff4d3
@ -419,14 +419,11 @@ def pdfGen(request):
|
||||
|
||||
template = get_template('test.tex')
|
||||
latex = template.render(context)
|
||||
print('LATEX', latex)
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
direct = tempdir
|
||||
with open(os.path.join(direct, 'tmp.tex'), 'x', encoding='utf-8') as f:
|
||||
f.write(latex)
|
||||
|
||||
with open(os.path.join(direct, 'tmp.tex'), 'r', encoding='utf-8') as f:
|
||||
print('FILE', f.read())
|
||||
|
||||
command = f'xelatex -interaction=batchmode tmp.tex'
|
||||
try:
|
||||
subprocess.run(command, shell=True,
|
||||
|
@ -13,14 +13,12 @@ export const WebsocketProvider = ({ children }) => {
|
||||
const [isConnected, setConnected] = useState(false);
|
||||
const router = useRouter();
|
||||
const connect = (url) => {
|
||||
if (isBrowser) {
|
||||
if (isBrowser) {
|
||||
|
||||
var url = url.startsWith('/')? url: '/' + url
|
||||
console.log(
|
||||
`ws://${process.env.NEXT_PUBLIC_HOSTNAME}:${process.env.NEXT_PUBLIC_PORT}${url}`
|
||||
);
|
||||
|
||||
ws.current = new ReconnectingWebSocket(
|
||||
`ws://${process.env.NEXT_PUBLIC_HOSTNAME}:${process.env.NEXT_PUBLIC_PORT}${url}`
|
||||
`ws://${process.env.NEXT_PUBLIC_HOST}${url}`
|
||||
);
|
||||
|
||||
ws.current.onopen = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user