Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP DO NOT MERGE [fix #608] add opds feed catalog in add feed modal #735

Closed
wants to merge 6 commits into from
Closed

WIP DO NOT MERGE [fix #608] add opds feed catalog in add feed modal #735

wants to merge 6 commits into from

Conversation

panaC
Copy link
Member

@panaC panaC commented Sep 26, 2019

I have made no design to implement this feature. just a simple select html element

I saw an html glitch on the first initialisation of component : the name placeholder isn't displayed. Like a space in input field, why ?

fixes #608

@panaC panaC self-assigned this Sep 26, 2019
}

export class OpdsFeedAddForm extends React.Component<Props, State> {
constructor(props: any) {
private defaultSelectValue = "undefined";
private opdsFeedListServerUrl = "http://thorium-opds.edrlab.org/";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would strongly suggest using the secure HTTPS URL (there is no justification for using HTTP nowadays).
(for example, if the renderer process is moved to secure HTTPS in the future, then this non-HTTPS window.fetch request will fail)
https://www.eff.org/https-everywhere
:)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://thorium-opds.edrlab.org/ doesn't works. spoken with Laurent

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTTP CORS headers are missing in the root EDRLab URL, so fetch() Web API will reject the request.
Workaround: use request NodeJS API instead of window.fetch (nodeIntegration will be removed at some point, but we can still use it now).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note the discrepancy in the context where the HTTP request is created (i.e. renderer processes for library and reader BrowserWindows):

  • dev: http://localhost:8090 (WebPack dev server)
  • prod: file:// (normal Electron URL from the filesystem / ASAR bundle in a packaged app)

@danielweck danielweck changed the title [fix #608] add opds feed catalog in add feed modal WIP DO NOT MERGE [fix #608] add opds feed catalog in add feed modal Sep 27, 2019

npm install --global surge

surge THIS_FOLDER thorium-reader.surge.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also ensure --add EMAIL_ADDRESS to ensure multiple "admins" can remotely control the contents of the deployed list of OPDS feeds (otherwise, only a single developer can edit this data, which can be problematic if an urgent change is required, and the developer is not reachable).

https://surge.sh/help/adding-collaborators

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is your email address ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"aozora": "http://aozora.textlive.net/catalog.opds",
"prestigio plaza": "http://ebooks.prestigioplaza.com/feed",
"bnf.fr (gallica)": "http://gallica.bnf.fr/opds"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO @llemeurfr Curate an acceptable list of OPDS feeds (some of these are a bit, erm ... let's say "dodgy" :)

Original source:
https://github.com/readium/r2-streamer-js/blob/develop/docs/opds.md#a-selection-of-public-opds-feeds
(please contribute additions / modifications there as well, as this long list is great for testing edge-cases, including network errors, incomplete HTTP headers, invalid OPDS format, etc.)

@danielweck
Copy link
Member

Suggestion: use a catalog registry format/JSON syntax similar to the NYPL one:
https://libraryregistry.librarysimplified.org/libraries

@danielweck danielweck marked this pull request as draft November 20, 2020 15:27
@panaC panaC closed this Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a meta-catalog of interesting OPDS feeds / design the new modal "add an opds feed"
2 participants