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

Prior to shut down MediaWiki, ensure all "... Further results" are fully imported in static site #2

Open
renoirb opened this issue Sep 4, 2015 · 1 comment

Comments

@renoirb
Copy link
Member

renoirb commented Sep 4, 2015

Let’s make HTML some MediaWiki ASK query results.

In order to stop relying on MediaWiki, we got to make sure all contents that were linked automatically through Semantic MediaWiki is kept as static HTML.

In some views, you might see a link that links to "... further results" like below;

semantic_mediawiki_further_results

The issue is that since we won’t have MediaWiki anymore, those links will be broken.

See also: webplatform/mediawiki-conversion#9.

How to do

We hae no choice to do this manually on any page that has SemanticMediaWiki or subpages wiki macros because we’re getting out of MediaWiki and we will lose the work made to make those dynamic lists.

To keep the list content for posterity, we gotta find pages that makes reference to them (e.g. grep -rli 'subpages' content/WPD/) and attempt to rework the wiki document to make the HTML give us the full listing output.

Otherwise we’ll lose that data

  1. HTML file has a table with classname "wikitable smwtable", or just search entries that has "further results" mentioned.

    grep -rli 'further results' content
    
  2. Get Full view (if possible) by using MediaWiki ASK query helper

  3. Once we see no "more..." link at the bottom of the view. Click on "show embed code" so that you can copy query code.

{{#ask:[[Path::~*apis/*]] [[Content quality flag::~Examples Needed]]
|?Path
|?Summary
|?Modification date
|format=broadtable
|limit=500
|offset=15
|sort=Modification date
|order=desc
|headers=plain
|mainlabel=-
|searchlabel='''More results'''
|default={{{default_text}}}
}}

Converted:

Pages to review

@renoirb
Copy link
Member Author

renoirb commented Sep 4, 2015

I had to adjust two templates so that the {{#ask: ... }} contains |limit=1000 so that we hopefully get all the entries and remove the "further results...". Default limit= value is below 1000. Documentation doesn’t tell, but with 1000 we had no more "further results" in the output.

Once you modify a template, you have to run maintenace/runJobs.php on production.

The following templates had been edited:

  1. https://docs.webplatform.org/wiki/Template:See_Also_Section?action=edit
  2. https://docs.webplatform.org/wiki/Template:API_Object?action=edit

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

1 participant