📜 ⬆️ ⬇️

Own selection of news for reading on the road for a couple of minutes

Last week I bought myself a long-sought-after Sony PRS-300 e-book reader, a review of which I can write separately. This reader suits me all, but
lacked the ability to read rss news, as the morning is much nicer to spend with a newspaper, drinking coffee in the kitchen on the weekend or
during workdays on the road for work or institute in public transport. For several evenings, I wrote a small qt application that solved this problem, and I will write about it later.

YourOwnNewsMaker is a simple application written in qt / c ++ that allows you to create pdf, the design of which you can configure yourself from the rss news feeds you have chosen.






Why did I choose pdf format?
All e-book readers are friendly with this format without any problems, besides, if you do not have a reader, you can simply print a pdf file, then read the news from the paper, which is also
quite comfortable. And in the next versions of the application, I plan to add support for the fb2 format. I don’t see any sense in supporting other formats.

The basic principle of the application.
After adding rss to the application, you can delete uninteresting news from the “content” list by pressing delete. Pressing the update button will update the selected stream.
news or update all news if selected is not. Further, when you click the pdf creation button, each news is downloaded entirely, and then, if there are settings for the news site
Content is parsed.
')
A little more about how to parse the contents of the downloaded page.
There is a page-templates directory in the application directory. It already has two ready-made properties files for Fontanka.ru and Habrahabr.




<! - ITEM_CONTENT -> and similar tags are replaced with content, so you should not remove them from templates.


An example pdf file can be downloaded from here .
The application itself is downloaded from here . There is a build for Windows and for Linux (for linux, binaries were built using qt 4.5, so the application should work on all distributions without problems).
Unfortunately for Mac build I can not do it, because I can not imagine how to test the application. The sources are open and distributed under the GPL license.
There are several bugs, for example, I do not check the rss news link and the results can be very different, the application also behaves inadequately if there is no Internet connection or is lost, which will be fixed in future releases.

If you liked the application, then I will not refuse PayPal donate)

Source: https://habr.com/ru/post/84216/


All Articles