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

Multiple site support #34

Open
Californ1a opened this issue Sep 15, 2021 · 2 comments
Open

Multiple site support #34

Californ1a opened this issue Sep 15, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Californ1a
Copy link

If you edit multiple wikis it's a bit of a hassle to need to go into the settings and change everything every time you go edit a different site. It would be much nicer if you could specify more than one in the settings json, maybe with a layout like:

{
	"wikitext.hosts": {
		"mediawiki.org": {
			"apiPath": "/w/api.php",
			"articlePath": "/wiki/",
			"userName": "username",
			"password": "password"
		},
		"community.fandom.com": {
			"apiPath": "/api.php",
			"articlePath": "/wiki/",
			"userName": "username",
			"password": "password"
		}
	}
}

Then when you pull a page, you could select which host before typing in the page name, and it would keep track of which host you picked so when you push, it would know which host to push to. Similarly when using the gadget directly on a wiki, it already includes the host in the vscode:// URL, so it already knows which host it should push back to.

@zsotroav
Copy link

Bump.

Using the gadget is almost pointless if you edit multiple wikis since a reconfig is needed. Potential easy fix would be expanding the <%-- [PAGE_INFO] segment to have info about which wiki the page is pulled from and then push back to that. No need to change the main config or it's layout, instead that would operate as a "default wiki" that is used when details in page info is not supplied or if pulling from within VSC.

Example:

<%-- [PAGE_INFO]
    comment = #Please do not remove this struct. It's record contains some important information of edit. This struct will be removed automatically after you push edits.#
    pageTitle = #User:Zsotroav#
    pageID = #34935#
    revisionID = #190976#
    contentModel = #wikitext#
    contentFormat = #text/x-wiki#
    wiki = #zsotroav.fandom.com#
    apiPath = #/api.php#
    articlePath = #/wiki/#
[END_PAGE_INFO] --%>

@zsotroav
Copy link

Furthermore, I'd recommend changing the label to bug instead of enhancment, since the plugin currently pushed back to the wrong wiki if the page was pulled through a link/the gadget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants