Closed jarun closed 6 years ago
@jarun sorry it may take some time as i focus on other things on these recent days
Sure! Please take your time.
@questor are you working on the plugin framework?
Also @questor, please raise a PR for the template stuff so we can review it.
I'm thinking through the stuff and the things I want to have (which of course might not necessarily is the same the rest want to have). my current idea is to have a template-output (already done, will make a PR later) with the possibility to have a static webpage with the output and some javascript code to make filtering in the page (something like filtrify). here bringing plugins into play would mean (when I want to use additional infos in the html-export) that I have to make special handling of template export for plugins (which also would mean bigger changes needed) or I can somehow put the additional infos into the main database of buku and the export-plugin can use the "normal" database to do the export with the additional information from other plugins.
I opted for the "template-export" orthogonal to "plugin-concept" approach simply because it's easier to code as I'm not a python-guru myself. but I can push what I have so far (but I have to admit it's not that much up to now). the more extensive option would be to make the template-export somehow aware of plugins and make the export query the plugins for more information (more work, but cleaner design).
If the requirement is to have a template from which a static webpage can be generated I don't think we would really need a plugin. Have the template and build it up by fetching data from the webpages separately. What one really needs is the links. Why would we need to store additional data for this requirement in the Buku database. If you want a cool page, you need to ave the thumbnails which would need page fetches anyway.
okay, you are thinking about a datascraper-plugin and another export-plugin or something combined thinking about an export-plugin using the buku-db-url, downloading some more data and doing the export? having two separate plugins would allow to use custom data-scraping plugins also for normal database population, but having the additional data in an extra database would mean that using the special data in an export plugin creates an dependency hierarchy (export plugin X needs scrape-plugin A and B to be able to work correctly).
my approach would have been to make separate scrape-plugins (with the tables in the main-database) and an generic export-plugin where you can specify from where to take the data to insert into the page (and the possibility to specify multiple tables in one page).
To get things going I try to do an complete example to be able to transport my idea what I want to have and then you can decide if you want to go that way or another one.
My idea is pretty straight for this plugin (set of plugins): get the urls from the DB and do whatever you want with your own data.
Rolled at #233.
Continued from #135.
Notes
The list below is a growing one. While suggesting new features please consider contributing to
Buku
. The code is intentionally kept simple and easy to understand with comments. We'll be happy to assist any new contributor. We need your help!Some of the fresh-baked features may not have been released yet. Grab the master branch for those.
Identified tasks
profiles.ini
(see #212, thanks @alex-bender)--format
in search results (ref, thanks @mosegontar)importdb()
]