Habr export to FB2
Greetings!
Some time ago I came across an article about exporting selected Habr to FB2 format.
I liked the idea, but there was one 'but': it was necessary to manually start the export on the local machine, but I wanted it right away in the browser; and secondly - to run it was necessary to install PHP locally and download the sources.
Therefore, I decided to write a browser extension that would allow me to simply export to FB2. In the course of writing, he also added export to FB2 and for Samizdat .
First decided to write userscript under Greasemonkey, but at some stage I came across the inconvenience of developing and launching such extensions in Chrome, so I switched to developing a native extension for Chrome (maybe I will return to finalizing the userscript version later).
Now the project is still at an early stage and much of the plan has not been implemented, but even in this state, the extension can already be used. The extension itself can be taken here , and the source code can be viewed here .
Screenshots:



From currently implemented:
From planned to implementation:
At the moment, I checked the functionality of the extension on only a small number of pages, so bugs are possible.
Please indicate all problems found and broken sites in the comments or on the github.
Comments and improvements to the extension code are also welcome.
Upd. Changelog moved here .
Some time ago I came across an article about exporting selected Habr to FB2 format.
I liked the idea, but there was one 'but': it was necessary to manually start the export on the local machine, but I wanted it right away in the browser; and secondly - to run it was necessary to install PHP locally and download the sources.
Therefore, I decided to write a browser extension that would allow me to simply export to FB2. In the course of writing, he also added export to FB2 and for Samizdat .
First decided to write userscript under Greasemonkey, but at some stage I came across the inconvenience of developing and launching such extensions in Chrome, so I switched to developing a native extension for Chrome (maybe I will return to finalizing the userscript version later).
Now the project is still at an early stage and much of the plan has not been implemented, but even in this state, the extension can already be used. The extension itself can be taken here , and the source code can be viewed here .
Screenshots:



From currently implemented:
- For Habr's articles:
- Convert text to FB2.
- Insert images from an article.
- Almost correct code tag conversion (spaces are squeezed at the beginning of the line).
- Convert tables to text view.
- Convert a , b , i , s and img tags to the corresponding FB2 tags.
- For samlib:
- Convert text to FB2.
From planned to implementation:
- Support for adding custom converters for other sites.
- Support for adding other types of converters (XSLT conversion is currently used).
- Support for other types of saving results (now saved to a local file): GDrive, Dropbox, ...
At the moment, I checked the functionality of the extension on only a small number of pages, so bugs are possible.
Please indicate all problems found and broken sites in the comments or on the github.
Comments and improvements to the extension code are also welcome.
Upd. Changelog moved here .