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

For review: A developer's toolkit for OPML support #1

Open
scripting opened this issue Jul 4, 2021 · 11 comments
Open

For review: A developer's toolkit for OPML support #1

scripting opened this issue Jul 4, 2021 · 11 comments

Comments

@scripting
Copy link
Owner

A new toolkit, in the form of an NPM package.

https://github.com/scripting/opmlpackage

I wanted to get a review before putting it out there, in case there are any glaring mistakes, omissions and typos. I understand of course it's a national holiday, this just happened to be when it was ready for review. 

If you have any comments or questions or whatever, please add to this thread. Any time in the next few days would be helpful. Thanks! :-)

@andysylvester
Copy link

I downloaded the repo and played around with it - I like it! I do have a few comments:

  1. The Node example should have a copy of states.opml in the repo. I had to get a copy from dummer.scripting.com for the example code to work
  2. I know there are not too many functions in opmlpackage.js, but it would be nice to have a list of the functions on the main repo README page and what each one does. You actually provide this in the podcast, but having it on the README page would make it easier to scan.

I created a version of the client demo using a OPML booklist file (http://andysylvester.com/files/opmlclient/), it was easy to modify the example code/files.

Overall - looks good! I am planning to use this for my Federated Bookshelves project.

@scripting
Copy link
Owner Author

@andysylvester -- thanks for the quick feedback.

  1. You're right -- states.opml should be in the node example. It's there now.
  2. I updated the What's in this package section to name all the routines including the two sanity-preserving extras.

I'm glad you'll put this package to use in your application, that's the real test.

@andysylvester
Copy link

Updates look good - thanks!

@andrewshell
Copy link

The node side looks great, exactly how I'd imagine it would work.

It might not be reasonable, but I'd love to see if there was a way to make a single library work as either client or server-side instead of having two separate implementations to manage. I'll do some research to see how isomorphic packages work. Either way, do you think some of the files in the client folder should actually be under examples?

@scripting
Copy link
Owner Author

@andrewshell --

  • There are obstacles in the way of them being the same code, but if you want to explore it, go for it. Honestly I think there are so many other things that need to be dealt with..
  • I'll take a look at that -- might actually work. When I originally wrote the example things weren't so nicely factored. ;-)

@scripting
Copy link
Owner Author

BTW, there is a problem with the way it works in Node. It really shouldn't appear to be asynchronous, because -- it's quite synchronous. The xml2js package made imho a poor design decision, it has been debated in their issues section long before I arrived on the scene. I pitched in my two cents, but they aren't budging.

Simple proof that it doesn't need to be async -- JSON.parse is synchronous.

Anyway, it's a nit, but I cared about this nit for this foundational code.

@scripting
Copy link
Owner Author

scripting commented Jul 6, 2021

@andrewshell -- if I had my druthers, this is what you'd work on next...

  1. Rewrite the howto for setting up PagePark on Glitch now that the default folder feature is in PP. I have the new version running on my latest production server, I trust it, I added the feature very carefully and tested it carefully too. (BTW, it should be an OPML file served from PP.)
  2. Did you know that people can clone your projects on Glitch? So let's set up a project that they can clone that's a perfect back-end for Drummer. All it uses beyond PP is daveappserver, which is a public NPM package. From there, it's a matter of setting up config.json so it's running Drummer from that folder. It's a very clever set up, imho, IIDSSM, makes unnecessary the kind of hack that was necessary to run your own LO2 server. Progress! ;-)

@scripting
Copy link
Owner Author

@andrewshell --

I implemented your suggestion of splitting off the example from the client code.

Very clean and simplifying.

Look for broken links which always come with these kinds of reorgs. ;-)

@andrewshell
Copy link

  1. Rewrite the howto for setting up PagePark on Glitch now that the default folder feature is in PP. I have the new version running on my latest production server, I trust it, I added the feature very carefully and tested it carefully too. (BTW, it should be an OPML file served from PP.)

First, I'll update instructions with the default folder and index.md because a markdown file can easily be created in the glitch interface.

Next, I'll write a section about hosting an OPML file using the mirrors feature because that will include information about how to create an OPML file with http://littleoutliner.com/ and get the public URL.

@scripting
Copy link
Owner Author

@andrewshell -- Sorry for the confusion -- I meant that the howto document should be an opml file served by pagepark. I think having the first file they create be a markdown file is the right choice.

@andrewshell
Copy link

@andrewshell -- Sorry for the confusion -- I meant that the howto document should be an opml file served by pagepark. I think having the first file they create be a markdown file is the right choice.

http://glitch-howto.shll.me/index.opml

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

No branches or pull requests

3 participants