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

On curation pages, add pages linked to/from target item #1428

Closed
Daniel-Mietchen opened this issue May 3, 2021 · 18 comments · Fixed by #1497
Closed

On curation pages, add pages linked to/from target item #1428

Daniel-Mietchen opened this issue May 3, 2021 · 18 comments · Fixed by #1497
Assignees
Labels
tools+workflows about ways in which Scholia integrates with WikiCite curation workflows

Comments

@Daniel-Mietchen
Copy link
Member

as per https://twitter.com/egonwillighagen/status/1387489358136201219

@Daniel-Mietchen Daniel-Mietchen added the tools+workflows about ways in which Scholia integrates with WikiCite curation workflows label May 3, 2021
@Daniel-Mietchen Daniel-Mietchen added this to the 31 May 2021 milestone May 3, 2021
@Adityachaturvedi2906
Copy link

Hey! this issue seems interesting, Can I work on this? Please guide me further on the same

@Daniel-Mietchen
Copy link
Member Author

@Adityachaturvedi2906 Yes, please give it a go!

@Adityachaturvedi2906
Copy link

@Adityachaturvedi2906 Yes, please give it a go!

Can you please guide me How can I start with this?
Looking forward to hearing from you

@Daniel-Mietchen Daniel-Mietchen changed the title Add pages linked to/from target item On curatotin pages, add pages linked to/from target item May 23, 2021
@Daniel-Mietchen Daniel-Mietchen changed the title On curatotin pages, add pages linked to/from target item On curation pages, add pages linked to/from target item May 23, 2021
@Daniel-Mietchen
Copy link
Member Author

Daniel-Mietchen commented May 23, 2021

@Adityachaturvedi2906 here are some pointers:

  • I clarified the title of this ticket
  • The curation pages are those in the scholia/app/templates directory that have the string curation in their name.
  • These curation templates contain all the essential information to build a Scholia curation page, with two main exceptions:
    • some page elements are inherited from other templates, especially base.html
    • the template needs to be called with the Wikidata identifier of the target item, which is handled by the variable q
  • What we want is for each of these curation pages to automatically link to the Wikidata Special pages for items linking to and from the target item

Using q=Q202864 (Zika virus) as example, this would mean that the page
https://scholia.toolforge.org/topic/Q202864/curation
should have links if the sort

Given a specific Wikidata identifier, these two links would be identical on each potential curation page for the different aspects (e.g. /author/curation, /topic/curation etc.), so it would make sense to include this new functionality into base.html. I have used the notation q' here to indicate that it might be useful to have the label represented slightly differently than just by the identifier, e.g. with the label added, i.e. Wikidata pages linking to Zika virus (Q202864).

As a refinement, the label part could perhaps also be internationalized, as per our internationalization tickets.

@Adityachaturvedi2906
Copy link

Adityachaturvedi2906 commented May 23, 2021

@Adityachaturvedi2906 here are some pointers:

* I clarified the title of this ticket

* The curation pages are those in the [scholia/app/templates directory](https://github.com/fnielsen/scholia/tree/master/scholia/app/templates) that have the string `curation` in their name.

* These curation templates contain all the essential information to build a Scholia curation page, with two main exceptions:
  
  * some page elements are inherited from other templates, especially [base.html](https://github.com/fnielsen/scholia/blob/master/scholia/app/templates/base.html)
  * the template needs to be called with the Wikidata identifier of the target item, which is handled by the variable `q`

* What we want is for each of these curation pages to automatically link to the Wikidata Special pages for items linking to and from the target item

Using q=Q202864 (Zika virus) as example, this would mean that the page
https://scholia.toolforge.org/topic/Q202864/curation
should have links if the sort

* [Wikidata pages linking to `q'`](https://www.wikidata.org/w/index.php?hidecategorization=1&target=Q202864&showlinkedto=1&limit=500&days=7&enhanced=1&title=Special:RecentChangesLinked&urlversion=2) and

* [Wikidata pages linked from `q'`](https://www.wikidata.org/w/index.php?hidecategorization=1&target=Q202864&showlinkedto=0&limit=500&days=7&enhanced=1&title=Special:RecentChangesLinked&urlversion=2).

Given a specific Wikidata identifier, these two links would be identical on each potential curation page for the different aspects (e.g. /author/curation, /topic/curation etc.), so it would make sense to include this new functionality into base.html. I have used the notation q' here to indicate that it might be useful to have the label represented slightly differently than just by the identifier, e.g. with the label added, i.e. Wikidata pages linking to Zika virus (Q202864).

As a refinement, the label part could perhaps also be internationalized, as per our internationalization tickets.

Okay, So I have to link these pages especially base.html with Wikidata specials

@Adityachaturvedi2906
Copy link

Adityachaturvedi2906 commented May 23, 2021

Hey@Daniel-Mietchen can you please tell me how can I see the changes because it's not working on the live server(vs code)?
image

@Daniel-Mietchen
Copy link
Member Author

Scholia is running on Toolforge, and deploying it there means pulling the latest version of the code from GitHub. So if you got your changes working on a branch, you can send us a pull request, so we can review your code, and if it fits, we will merge it, so that it will be included when we restart the tool on Toolforge.

@Adityachaturvedi2906
Copy link

Adityachaturvedi2906 commented May 23, 2021

I am asking that How can I run this in my system and test the code(see the changes which I made)

@Adityachaturvedi2906
Copy link

Can you please guide me where I have to add those target link for the Wikidata specials?

@Daniel-Mietchen
Copy link
Member Author

I do not see your code, so cannot provide feedback. Please provide a link. I did check your Scholia fork and its branch tree, but did not see any changes you made there. Did you commit them?

If you are having trouble getting the environment going, you can also try launching Scholia via GitPod, as per README.

@Adityachaturvedi2906
Copy link

I am trying to make changes locally first and I want to see the changes locally on my PC so that I can manipulate them and then I'll commit that code

@Daniel-Mietchen
Copy link
Member Author

Have you tried http://localhost:8100/topic/Q202864?

@Daniel-Mietchen
Copy link
Member Author

In general, you would need to replace the URLS of the type https://scholia.toolforge.org/topic/Q202864 with their localhost equivalents, using port 8100.

@Adityachaturvedi2906
Copy link

Have you tried http://localhost:8100/topic/Q202864?

It's not working but I have launched Scholia in GitPod and can you please guide me where I have to add those links?

@Daniel-Mietchen
Copy link
Member Author

Daniel-Mietchen commented May 23, 2021

@fnielsen
Copy link
Collaborator

I am wondering whether you have seen this page: https://github.com/fnielsen/scholia/blob/master/CONTRIBUTING.rst

If you have a running Python environment you should be able to see you local Scholia running:

python runserver.py

And opening the link provided by the script.

@carlinmack
Copy link
Collaborator

carlinmack commented Jul 9, 2021

@Daniel-Mietchen earlier you posted these links:

I think you wanted this instead:

However I can't seem to find a page which lists the pages linked from from q'. For now I will work with just the pages linked from.

@carlinmack
Copy link
Collaborator

Ah looking at the original tweet, it is in fact the recent changes pages that are of interest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools+workflows about ways in which Scholia integrates with WikiCite curation workflows
Projects
Development

Successfully merging a pull request may close this issue.

4 participants