rafaelmardojai / share-preview Goto Github PK
View Code? Open in Web Editor NEWTest social media cards locally
License: GNU General Public License v3.0
Test social media cards locally
License: GNU General Public License v3.0
Any chance for Mastodon support in this?
Minds share preview will be nice: https://www.minds.com
PS: Why X is still Twitter in the application?
We need a proper icon to release a first version.
People have been steadily requesting keyboard shortcuts and other typing enhancements, but I wanted to go the other way.
When the text entry field is filled with a URL, there's no way to clear it quickly and easily with the mouse (no, Context menu → Select All; Context Menu → Delete does not count as quick and easy), should one wish to restore the initial blank canvas in preparation for future URL typing/pasting.
Something like Qt's QLineEdit.clearButtonEnabled
, which automatically shows a clear icon at the end of the input area whenever it's non-empty, would be cool. Of course, GtkEntry
doesn't seem to have anything quite so convenient, and you're already using that part of the widget to display the "Go"/"Submit" button... 🤷♂️
I keep pressing Ctrl+L
, trained from browsers. Any sort of shortcut to focus the entry to achieve a reasonable focus driven control would be nice.
Tried to fix up a banner for flathub new site and my trusty tool is crashing :)
$ flatpak run com.rafaelmardojai.SharePreview
(share-preview:2): Gtk-WARNING **: 09:59:55.354: GtkText - did not receive a focus-out event.
If you handle this event, you must return
GDK_EVENT_PROPAGATE so the default handler
gets the event as well
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Unsupported(UnsupportedError { format: Exact(WebP), kind: GenericFeature("VP8L") })', src/backend/image.rs:51:85
stack backtrace:
0: 0x55776793a3bc - <unknown>
1: 0x55776795f6cc - <unknown>
2: 0x557767933663 - <unknown>
3: 0x55776793cce2 - <unknown>
4: 0x55776793c8c5 - <unknown>
5: 0x55776793d333 - <unknown>
6: 0x55776793d050 - <unknown>
7: 0x55776793a864 - <unknown>
8: 0x55776793cd89 - <unknown>
9: 0x557767696571 - <unknown>
10: 0x557767696663 - <unknown>
11: 0x5577677193c4 - <unknown>
12: 0x55776791b96f - <unknown>
13: 0x55776791c9fa - <unknown>
14: 0x7fa52d400cdb - g_main_context_dispatch
15: 0x7fa52d4011e8 - <unknown>
16: 0x7fa52d4012b4 - g_main_context_iteration
17: 0x7fa52d5de3ed - g_application_run
18: 0x5577676990f3 - <unknown>
19: 0x5577676e3458 - <unknown>
20: 0x5577676eb3a3 - <unknown>
21: 0x55776772fac9 - <unknown>
22: 0x557767939a70 - <unknown>
23: 0x5577676eb6a2 - <unknown>
24: 0x7fa52d0a1b80 - __libc_start_main
25: 0x557767696d3e - <unknown>
“Hm. There’s a search field at the bottom of the dialog. I wonder what it does. Oh, it shows more details and not search.”
Please consider picking a different icon (the circled i for information, perhaps) or just spell out “Details” or “<meta>” instead?
Version 0.2.0 via Flathub.
I don't know if there's a way to simulate this too, but it would be pretty nice to be able to preview what a link may look like when shared on a Discourse forum, because the way it previews tends to be very different from the rest of social media, and it has progressively become the most popular modern open source forum software (and that's what GNOME uses for its forums, like many other communities use nowadays).
Thank you for this useful utility!
reddit.com support would be neat.
You can see an examples here
https://www.reddit.com/r/gnome/comments/os1rjd/oh_my_svg_visual_svg_optimizer/
https://www.reddit.com/r/gnome/comments/n4kgzi/commit_message_editor_gitmercurial/
The repository had "Social preview" setting enabled.
I would love to see an option to download the image from a preview link. It could be in the files tab but would be more useful on the main page with the preview.
The app says “Card Error” when a page contains og: stuff but no twitter: stuff. Twitter falls back to opengraph when there’s no twitter card data on the page.
A share-preview.doap
file is missing. Note that it has to have the same name/capitalization as the GitHub repository.
For the maintainer to appear in Apps for gnome it must be in the form
<maintainer>
<foaf:Person>
<foaf:name>User Name</foaf:name>
<foaf:mbox rdf:resource="mailto:[email protected]" />
<gnome:userid>gnome-user-acc</gnome:userid>
<foaf:account>
<foaf:OnlineAccount>
<foaf:accountServiceHomepage rdf:resource="https://github.com/"/>
<foaf:accountName>user-github-acc</foaf:accountName>
</foaf:OnlineAccount>
</foaf:account>
</foaf:Person>
</maintainer>
After a new installation via flatpak on Arch Linux, Share Preview does not work for any url or type of selected social network. Returning the message "Network error, unable to connect to the provided URL", or it simply loads indefinitely.
Share Preview version: v0.5.0
OS information:
Arch Linux
Kernel: Linux 6.8.9
Should it be possible to use this with a local app?
Expected: It should remember my last selection and default to it.
Actual: It always reset to Facebook (the topmost selection.)
Version 0.2.0 via Flathub.
Just as the title says, I would like to have multiple up at once
If you copy some URL and, instead of using Ctrl+V
, you paste it into the URL field by doing "Right-click -> Paste", the GtkTextEntry will be defocused, and when you hit Enter
:
Totally a corner case, but I thought I'd report it anyway ;)
Nice application!
For some reason the preview for https://www.eicas.nl currently doesn't load in the Signal desktop app. It would be really helpful if share-preview could detect what's wrong.
(earlier I found out the Signal desktop app doesn't load preview images for which the HTTP response doesn't have a Content-Length
header - I haven't checked what's wrong this time yet)
Both Facebook and Twitter are bad at extracting perfectly valid metadata. The app should detect some such cases and display a warning to indicate that the markup might have compatibility issues.
I discussed some such issues in my article Why are Facebook and Twitter so bad at parsing RDFa metadata? A quick test-run and neither networks have improved on the discussed issues.
I get a crash every time when I try to preview https://cockpit-project.org/ or one of its blog posts, such as https://cockpit-project.org/blog/cockpit-244.html
I'm not sure if something is just wildly wrong with what I'm doing on website or if I just happen to triggering an issue in Share Preview. (Either way, Share Preview shouldn't crash.)
And also: thanks for this app! It looks very useful. I'm looking forward to finally fixing cockpit-project/cockpit-project.github.io#224 (it's been on my TODO backburner for quite some time), thanks to Share Preview.
The dark toggle button is currently inactive when in light mode, and active when in dark mode. That's a bit weird IMO, since the two views are semantically at the same level.
A potential alternative could be what Icon Library does, where the button doesn't stick but the icon changes between a filled and an outline sun.
Facebook, Reddit (#12), and Twitter supports WebP images in og:image (and twitter:image), but the app shows an o-slash icon instead.
It’s probably correct to show the o-slash and a warning for Mastadon as support varies depending on the ImageMagic version installed on each server instance (upstream issue #14983).
For Open Graph it is an optional metadata, which only makes sense if the link you share is part of a larger website.
Maybe it should be an "Info"?
This is required to lookup some data needed to fully mimic Mastodon previews.
See https://github.com/mastodon/mastodon/blob/main/app/lib/link_details_extractor.rb
After opening the "details section" (magnifying glass) twitter is not selectable anymore. This seem to be a bug ^^
Social media sites' built-in share preview tools typically cache their opengraph previews, particularly images, but there usually is a button to force them to refresh / fetch the latest version. This is useful if you are actively working on improving the metadata on a website and are testing things with trial and error.
Would it be possible for this app to plug into those APIs to provide a Refresh button (when available)? If the refresh has a cooldown time limit for a particular site, the button could have a label (or GtkTooltip) that indicates that cooldown in real time while the button is in GTK "insensitive" status.
I know i am asking for a lot here, but is it possible to add LinkedIn preview to this application. A great application, love to see it grow. Thank you.
There's a size limit for images which can be turned into Twitter cards, specifically 5 MB. There are probably similar limits elsewhere.
It would be handy to have some sort of warning if this is a problem.
Hi! I'd like to contribute Norwegian translations to the app, but I can't add Norwegian as a language on Weblate. Could you loosen the restrictions on the Weblate page or add Norwegian manually? 😃
Would a Mastodon account be possible for this project?
The following things could then run on it:
Mastodon now seems to show bigger card images in some cases.
I'm using SharePreview 0.4.0 installed with flatpak on Ubuntu 23.10
It works pretty well but fail with the URL: https://pescara.python.it/
The landing page is hosted as a static HTML file on GitHub page, and contains PNG image.
$ RUST_BACKTRACE=full flatpak run com.rafaelmardojai.SharePreview
(share-preview:2): Gtk-WARNING **: 08:07:20.689: GtkText - did not receive a focus-out event.
If you handle this event, you must return
GDK_EVENT_PROPAGATE so the default handler
gets the event as well
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: http::Error(InvalidUri(InvalidFormat))', /run/build/share-preview/vendor/http-client/src/isahc.rs:58:42
stack backtrace:
0: 0x556c85b40281 - <unknown>
1: 0x556c85b6b9cf - <unknown>
2: 0x556c85b3d107 - <unknown>
3: 0x556c85b40095 - <unknown>
4: 0x556c85b415c3 - <unknown>
5: 0x556c85b41354 - <unknown>
6: 0x556c85b41b49 - <unknown>
7: 0x556c85b41a47 - <unknown>
8: 0x556c85b406e6 - <unknown>
9: 0x556c85b41792 - <unknown>
10: 0x556c857ad983 - <unknown>
11: 0x556c857ade23 - <unknown>
12: 0x556c85867b79 - <unknown>
13: 0x556c8584858c - <unknown>
14: 0x556c8584937a - <unknown>
15: 0x556c85855d25 - <unknown>
16: 0x556c8584e665 - <unknown>
17: 0x556c8584de36 - <unknown>
18: 0x556c85839282 - <unknown>
19: 0x556c8582f8c9 - <unknown>
20: 0x556c85b1ce4a - <unknown>
21: 0x556c85b1c368 - <unknown>
22: 0x7effffa68d47 - <unknown>
23: 0x7effffa6ae57 - <unknown>
24: 0x7effffa6b513 - g_main_context_iteration
25: 0x7effffc50b1d - g_application_run
26: 0x556c857b8d46 - <unknown>
27: 0x556c857d7a53 - <unknown>
28: 0x556c857d8949 - <unknown>
29: 0x556c85b38beb - <unknown>
30: 0x556c857b9255 - <unknown>
31: 0x7efffec3b08a - <unknown>
32: 0x7efffec3b14b - __libc_start_main
33: 0x556c857ae825 - <unknown>
34: 0x0 - <unknown>
Please decide upon the translation platforms: Hosted Weblate or Transifex!
Recently I got emails about Transifex notifications, but there is just one file: share-preview_po-share-preview-pot--master_en.po. There are no translated languages!
On the other hand most translations exist at Hosted Weblate, which you specify in the section Translations of the ReadMe.md
file.
My suggestion:
Get rid of Transifex! IMO, Hosted Weblate is better anyhow.
Cheers,
Milo
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.