chiark / gitweb /
Move SF into its own directory, to seperate SF and Cura. Rename newui to gui.
[cura.git] / Cura / cura_sf / skeinforge_application / skeinforge_plugins / meta_plugins / description.py
1 """
2 This page is in the table of contents.
3 Description is a script to store a description of the profile.
4
5 ==Settings==
6 ===Description Text===
7 Default is 'Write your profile description here.'
8
9 The suggested format is a description, followed by a link to a profile post or web page.
10
11 ==Example==
12 Example of using description follows below.
13
14 > python description.py
15 This brings up the description dialog.
16
17 """
18
19 from __future__ import absolute_import
20 #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
21 import __init__
22
23 from fabmetheus_utilities import settings
24 from skeinforge_application.skeinforge_utilities import skeinforge_profile
25
26
27 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
28 __date__ = '$Date: 2008/21/04 $'
29 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
30
31
32 def getNewRepository():
33         'Get new repository.'
34         return DescriptionRepository()
35
36
37 class DescriptionRepository:
38         "A class to handle the description settings."
39         def __init__(self):
40                 "Set the default settings, execute title & settings fileName."
41                 skeinforge_profile.addListsToCraftTypeRepository('skeinforge_application.skeinforge_plugins.meta_plugins.description.html', self)
42                 description = 'Write your description of the profile here.\n\nSuggested format is a description, followed by a link to the profile post or web page.'
43                 self.descriptionText = settings.TextSetting().getFromValue('Description Text:', self, description)
44
45
46 def main():
47         "Display the file or directory dialog."
48         settings.startMainLoopFromConstructor(getNewRepository())
49
50 if __name__ == "__main__":
51         main()