add cursed remote print functionality
This commit is contained in:
parent
fd42fed19d
commit
4bfa581e9f
5 changed files with 53 additions and 0 deletions
27
pages/remote_print.mu
Executable file
27
pages/remote_print.mu
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/python
|
||||
|
||||
import os
|
||||
from os import listdir
|
||||
from os.path import isfile, join
|
||||
|
||||
userdir = os.path.expanduser("~")
|
||||
nomaddir = userdir+"/.nomadnetwork"
|
||||
|
||||
|
||||
print("> PRINTERS")
|
||||
printers = [f for f in listdir(nomaddir+'/storage/plugins/print3d/printers')]
|
||||
if len(printers) == 0:
|
||||
print("no printer config files available :(")
|
||||
print("add printer config files to: ~/.nomadnetwork/storage/plugins/print3d/printers/")
|
||||
|
||||
else:
|
||||
for p in printers:
|
||||
print("""`<^|printer|{p}`>`b {p}""".format(p=p))
|
||||
|
||||
print("\n")
|
||||
print("> FILE")
|
||||
print("print file URL: `B444`<url`>`b")
|
||||
print("\n")
|
||||
print("> SUBMIT")
|
||||
print("""`!`[>SUBMIT<`:/page/print3d/submit_remote.mu`printer|url|nomad_dir={ndir}]`!""".format(ndir=nomaddir))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue