Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

I need help to try and add functionality #58

Open
0k4 opened this issue Sep 30, 2018 · 3 comments
Open

I need help to try and add functionality #58

0k4 opened this issue Sep 30, 2018 · 3 comments

Comments

@0k4
Copy link

0k4 commented Sep 30, 2018

Hey,

I was wondering if it's a good idea to perhaps add probuilds.
We could add a button that adds runes from probuilds, and then also includes a link to the page where it got the runes from to quickly check the build :)
Could you tell me where in the code you'd add a new site, and how I'd create a button?
I'll try do it and fork and a pull request if you like the idea.

Kind Regards.

@OrangeNote
Copy link
Owner

Hi! I'm happy to hear that you're interested in adding a new source for pages.

RuneBook has a plugin system for external sites. The only thing you have to do is to create a new js file in the /plugins folder. RuneBook will take care of the rest, and it will add a tab for you. The js plugin must export a default object that has some properties and methods. I actually never documented this part, but you can look at other existing plugin as reference. Every site is different, so it's up to you how to configure the plugin and how to implement the required methods. Again, looking at existing plugins might be a good way to get started.

@OrangeNote
Copy link
Owner

For the link to the external site: it's something that RuneBook doesn't support at the moment and I don't think there's a way to make it happen only through custom logic in the plugin.

@0k4
Copy link
Author

0k4 commented Oct 3, 2018

Hey!
Thanks for the pointers! I have some free time next week and will have a crack at it then.
I've take a quick look at the code already and it's as you mentioned. I could easily add it, but the hard part will be getting the content from the divs on probuilds itself. But I'll use your extractfunctions on other sites and run it on them to check exactly what you expect to be extracted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants