felixp7 / gophersnake Goto Github PK
View Code? Open in Web Editor NEWStand-alone Gopher client for modern desktops
License: MIT License
Stand-alone Gopher client for modern desktops
License: MIT License
Please add a possibility of choosing font(size), or perhaps zooming - the fonts are very, very small on a high dpi display.
Hi there. It doesn't look like this is too actively maintained, but since I am working on a similar project I thought I might be able to help out with GIF image display:
I had been having trouble with GIFs as well. The byte string was coming back from the server solidly, but I couldn't get it to display or download properly. I then tried a PNG and found that using PIL or Pillow (depending on python version) worked. The added bonus is that it will display ALL of your images pretty cleanly (including GIFs). So you can treat type 'g' and type 'I' files the same (as well as type 'p' which I found to be PNG on floodgap).
from PIL import Image, ImageTk
from io import BytesIO
def build_image(bytes_str):
# pass the response string (as a bytes string)
stream = BytesIO(bytes_str)
print(type(stream))
pil_image = Image.open(stream)
tkimage = ImageTk.PhotoImage(pil_image)
return tkimage
def show_image(data):
# 'site_display' is a tk Text widget
current_image = self.build_image(data)
site_display.config(state=tk.NORMAL)
site_display.delete(1.0, tk.END)
site_display.image_create(tk.END, image = self.current_image)
site_display.config(state=tk.DISABLED)
io is in the standard library, but you'll need to pip or easy_install pillow (which gets imported as PIL in python3).
Hopefully that is useful to you.
I have been having trouble with search for my project. I cannot find documentation anywhere for how an item type '7' expects the query to be transmitted. I looked at your code, but couldnt quite figure out what form a querystring is to take (or if it is actually a querystring?). Any help you can provide would be much appreciated!
Attempting to connect to an IPv6 address or a DNS name that with only an AAAA record gives an "Unknown address type." error message.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.