![]() ![]() ![]() Stoltenberg: I expect all those allies who have not yet reached the 2 percent to do so soon as possible. Stoltenberg: Germany, like many other allies, has expressed its intention to achieve the 2 percent as quickly as possible.ĭER SPIEGEL: At the moment, it doesn't look as if the German government will be able to keep this promise in the longer term. Since then, it has been going up, although not as much as I would like.ĭER SPIEGEL: Germany still hasn’t reached 2 percent. Until then, defense spending was going down. Stoltenberg: The agreement we reached together in Wales in 2014 has made a significant difference. What is the point of setting new targets if the old ones aren’t even met? But this 2-percent target was set nine years ago, and yet only seven of the then 30 member states had achieved it as of last year. ![]() SPIEGEL Media Menü SPIEGEL Media aufklappenĭER SPIEGEL: You have advocated for the alliance to set 2 percent of gross domestic product as the minimum threshold for defense spending.Alle Magazine Menü Alle Magazine aufklappen.SPIEGEL-Heft Menü SPIEGEL-Heft aufklappen.Gutscheine Anzeige Menü Gutscheine aufklappen.Marktplatz Anzeige Menü Marktplatz aufklappen.Wissenschaft Menü Wissenschaft aufklappen.Formel 1 – Liveticker, Kalender, WM-Stand.The app didn't crash anymore, but I still didn't get any response. Let response = extractor :: extract( & mut res, & url) ? The Bytes object implements Read and I can use it to call extractor::extract. Luckily, the reqwest::Response has a bytes method that returns a Bytes object. So I needed to convert it to a Readable type myself. However, the reqwest::Response doesn't implement Read (in contrast to the reqwest::blocking::Response). Fortunately they provide a function named extractor::extract that takes something that implements Read and returns the extracted content. Now I had the content of the article, but I still needed to pass it to readability. Let client = reqwest :: blocking :: Client :: new() I fixed this by using a reqwest::Client instead of the reqwest::blocking::Client. After that request, the client is dropped which causes the runtime to be shut down. This meant that I started a runtime inside a runtime.Īfter checking the source code of the readability crate, I found that it builds a reqwest::blocking::Client and uses that to fetch the URL. This happens when a runtime is dropped from 'Cannot drop a runtime in a context where blocking is not allowed. However when I wanted to fetch a website from the proxy, I got an error: thread 'tokio-runtime-worker' panicked at I used extractor::scrape just like above and the proxy started locally. When I integrated the readability crate into the project I hit a minor roadblock. This creates a small Axum app with a simple hello world route. □ Let's call the app readable: cargo shuttle init -axum -name readable It's my second project after zerocal, which is hosted on shuttle and I'm very happy with how smooth the process is. The proxy setup is super simple with shuttle. The Golang cleanup code is here: func GetArticle ( url string, title string, width int, indentationSymbol string ) ( string, error ) placeholder with the actual content. The tool did a solid job at rendering website content and I wondered if I can retrofit that into a proxy server. Lately I saw a post about circumflex, a Hacker News terminal client. It's very basic, but I use it to read articles on my older devices and it could also make content more accessible in regions with low bandwidth or while travelling. So I built a reader mode as a service with a focus on beautiful typography which works across all browsers. Other browsers, like the one on my eBook reader, don't come with a reader mode at all, which leaves me with a subpar and slow browsing experience on my main device used for reading. There are reader modes in other browsers as well, but some of them - like Chrome - hide it behind a feature flag. I'm a big fan of the Slow Web movement and of little sites that do one thing well.įor reading long-form text clutter-free I use Reader View in Firefox, and while it doesn't always work and it's not the prettiest I like it. I just want to read long-form posts without distractions with a good cup of tea, the cat sleeping on the windowsill and some light snow falling in front of the window. Trackers, ads, bloat, fullscreen popups, autoplaying videos. It is similar to Reader View in Firefox/Safari, but also works on older browsers, can be shared and has a focus on beautiful typography. Tl dr: I built a service that takes any article and creates a pleasant-to-read, printable version. ![]()
0 Comments
Leave a Reply. |