Bookwyrm β€” development thread - Programming On Unix

Users browsing this thread: 1 Guest(s)
Tmplt
Long time nixers
What follows is the first draft of the v1.0.0 specification (note: I do not know how to write specifications):
Program start:
After command line options have been parsed (and no quit-directly flag has been passed), verify them and the download directory.
Terminate if the user didn't pass any "main" options or if we can't write to the download directory.
At last, construct the wanted item from passed options.

Finding sources:
bookwyrm will first try to import any python modules found in $XDG_CONFIG_HOME/bookwyrm/sources,
after which it will do the same with modules in /etc/bookwyrm/sources/ (or your platform equivalent).

Running the scripts:
The scripts will be given the wanted item and be able to fetch configuration options β€” from $XDG_CONFIG_HOME/bookwyrm/config.ext. It will hold login credentials and whatnot. Support for external commands, such as pass, is planned. Either .yaml or ini-style, I think (to section out source-specific options).
With this, and whatever other modules it want (or perhaps a selection? Hard to force via the program itself, I think) it will search for the wanted item on a single source.
Found items will be passed to bookwyrm.

The menu:
While the scripts all run asynchronously, a menu (Γ‘la mutt) will open that presents all found items.
Each entry will represent a single found item. The item info seen on this screen will be whatever info is available from the source's search result (e.g. a lot will be available from Library Genesis, since a lot of info is available from /search.php)
From this menu, the user can enter an entry (like opening an email in mutt) to try and fetch more data about the item.
Data is fetched from some database (Worldcat, Open Library (both? priority list?)) and written out in some neat format.

Returning to the main menu, the user can select which items to download.
The downloads β€” done after a second write-OK check on the download dir (we never know, permissions might change) β€” will most likely be handled with libcurl.

I have some other ideas that might fit in, but they are better suited for releases past the first major.


Messages In This Thread
Bookwyrm β€” development thread - by Tmplt - 13-04-2017, 03:22 PM
RE: Bookwyrm β€” development thread - by Tmplt - 27-05-2017, 02:45 PM
RE: Bookwyrm β€” development thread - by venam - 28-05-2017, 07:02 AM
RE: Bookwyrm β€” development thread - by Tmplt - 28-05-2017, 09:26 AM
RE: Bookwyrm β€” development thread - by Tmplt - 09-06-2017, 09:28 PM
RE: Bookwyrm β€” development thread - by Tmplt - 19-06-2017, 05:45 PM
RE: Bookwyrm β€” development thread - by Tmplt - 07-08-2017, 07:44 PM
RE: Bookwyrm β€” development thread - by Tmplt - 12-01-2018, 08:16 AM
RE: Bookwyrm β€” development thread - by Tmplt - 12-01-2018, 07:40 PM
RE: Bookwyrm β€” development thread - by Tmplt - 24-02-2018, 08:48 AM
RE: Bookwyrm β€” development thread - by Tmplt - 05-05-2018, 08:50 AM
RE: Bookwyrm β€” development thread - by Tmplt - 11-05-2018, 07:59 PM
RE: Bookwyrm β€” development thread - by Tmplt - 27-05-2018, 06:17 PM
RE: Bookwyrm β€” development thread - by Tmplt - 26-12-2018, 10:18 PM