ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class ImageSharing.ImageSharing(system, config, itype=None)

This is the public interface for <no title> objects to interact with an image sharing site, without the <no title> having to know anything about the actual site being used.

Parameters:

  • system: the <no title> object to interact with the remote system

  • conf: the <no title> object defining this user

  • itype: optionally the Image Sharing site to use, ignoring whatever the conf would use

comment(msg)

Add the given message as a comment to the currently viewed entry.

Parameters:

  • msg: a string that ConsoleUser will type into the comment box

go_home()

Return to the Home page, regardless of where we are now.

upload(path, desc)

Upload a new image with a given description, which can be empty to add no description/text to the image.

Parameters:

  • path: the path to the file to upload

  • desc: the text to add as a description of the image

view(identifier)

View/read the page with the given identifier

Parameters:

  • identifier: the way the client will find the appropriate entry to view

view_random()

Pick an entry at random and view it