Elementary question on how to access XWiki.xxx pages

Super simple question here. I am a new user, and have setup xwiki on a localhost for testing, and was reading https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/User%20Management
I see alot page guide saying to access the XWiki.xxx, (e.g. XWiki.AdminUsersSheet) to change or add some code.

The question is: Where can I find it (the XWiki.AdminUsersSheet), I am assuming it is a page and not a file (since the page says it), how do I access it?

Another question if you are thinking of being more helpful: Anyone done scripting on scheduler before? I am trying to see if it is possible to write a python script (on xwiki) that use the scheduler application to retrieve a local csv file periodically to add and remove users (and XWikiAllGroup) based on the csv. (hoping to get an example of how the scheduler and scripting works to retrieve and open a local file)
Is it possible to script xwiki to auto import files in admin periodically also?

OR should I do it via the MYSQL, (add and remove users), because it seems impossible/hard to me because of the for SHA-512 passwording and how related users are to documents and other data

Hi,

You can check on this documentation: https://www.xwiki.org/xwiki/bin/view/FAQ/How%20can%20I%20navigate%20to%20a%20given%20page

That should be doable. You should be able to use directly the Python File API to retrieve the local CSV file. Note that you need to write this script with a user having Programming Rights.

No you shouldn’t directly perform writes in the DB, you have to use XWiki APIs for that. You can check this snippet for creating a user programmatically: https://snippets.xwiki.org/xwiki/bin/view/Extension/Create%20User/

1 Like

While it’s true that you can use Python in a wiki page the Scheduler Application only supports Groovy right now. But you could write a few lines of Groovy to execute a page which contain a Python script.

1 Like

Hi,
Thank you for the reply. I have worked out most of the scripting using velocity and could get it to run on every time the page is visited or refreshed, but I cannot seem to figure out how to execute the page using the scheduler from groovy.
I was thinking of using groovy to try and redirect it to the page, but notice it does not work as stated http://lists.xwiki.org/pipermail/users/2010-October/018021.html where I can’t redirect a scheduled job.

Are there any snippets for scheduling jobs that allows me to execute the page which contains the scripts?

Something like

xwiki.getDocument('MySpace.MyDocumentWithAPythonMacroInIt').displayDocument()

should do the trick.