aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tagit/apps/desktop.py8
-rw-r--r--tagit/apps/port-config.yaml151
-rw-r--r--tagit/config/loader.py4
-rw-r--r--tagit/config/settings.json22
-rw-r--r--tagit/config/settings.yaml10
-rw-r--r--tagit/config/user-defaults.json134
-rw-r--r--tagit/config/user-defaults.yaml130
7 files changed, 78 insertions, 381 deletions
diff --git a/tagit/apps/desktop.py b/tagit/apps/desktop.py
index 7b21336..b02c8f1 100644
--- a/tagit/apps/desktop.py
+++ b/tagit/apps/desktop.py
@@ -36,12 +36,10 @@ class TagitApp(App):
# set title
self.title = 'tagit v2.0'
- # FIXME: mb/port
- # load essentials
+ # load config
+ from tagit.config.loader import load_settings, TAGITRC
+ cfg = load_settings(TAGITRC, 0)
- #from tagit.config.loader import load_settings, TAGITRC
- #cfg = load_settings(TAGITRC, 0)
- cfg = config.Settings.Open(os.path.join(os.path.dirname(__file__), 'port-config.yaml'))
# FIXME: mb/port/bsfs
# open BSFS storage
diff --git a/tagit/apps/port-config.yaml b/tagit/apps/port-config.yaml
deleted file mode 100644
index 323d616..0000000
--- a/tagit/apps/port-config.yaml
+++ /dev/null
@@ -1,151 +0,0 @@
-session:
- first_start: false
- paths:
- searchlog: ~/.tagit.log
- bsfs: # FIXME: mb/port: rename to storage, but that space is currently polluted
- Graph:
- backend:
- SparqlStore: {}
- user: 'http://example.com/me'
- script: []
- #- ShowBrowsing
- #- [AddToken, 'hello']
-storage:
- index:
- preview_size:
- - 50
- - 200
- - 400
-ui:
- standalone:
- window_size: [1024, 768]
- maximize: True
- keytriggers:
- #- ClipboardCopy
- #- ClipboardPaste
- - CreateGroup
- - DissolveGroup
- - AddToGroup
- - MoveCursorUp
- - MoveCursorDown
- - MoveCursorLeft
- - MoveCursorRight
- - MoveCursorLast
- - MoveCursorFirst
- - NextPage
- - PreviousPage
- - ScrollDown
- - ScrollUp
- - ZoomIn
- - ZoomOut
- - Select
- - SelectAll
- - SelectNone
- - SelectMulti
- - SelectRange
- - AddToken
- - GoBack
- - GoForth
- - SearchByAddressOnce
- - SearchmodeSwitch
- - AddTag
- - EditTag
- - OpenGroup
- #- RepresentGroup
- - Search
- - ShowSelected
- - RemoveSelected
- - OpenExternal
- - ShowHelp
- browser:
- cols: 4
- rows: 3
- maxcols: 8
- maxrows: 8
- #gridmode: 'list'
- buttondocks:
- navigation_left:
- - MoveCursorFirst
- - PreviousPage
- - ScrollUp
- navigation_right:
- - NextPage
- - ScrollDown
- - MoveCursorLast
- filter:
- - GoBack
- - GoForth
- status:
- - ZoomIn
- - ZoomOut
- #- RotateLeft
- #- DeleteObject
- #- RotateRight
- sidebar_left:
- - Menu
- - AddTag
- - EditTag
- - ShowSelected
- - RemoveSelected
- #- CreateGroup
- #- DissolveGroup
- - SelectAll
- - SelectNone
- - SelectInvert
- - SelectAdditive
- - SelectSubtractive
- - SelectSingle
- - SelectMulti
- - SelectRange
- context:
- app:
- - LoadSession
- - ShowHelp
- - ShowConsole
- - ShellDrop
- - ShowSettings
- browser:
- - ZoomIn
- - ZoomOut
- # clipboard:
- # - ClipboardCopy
- # - ClipboardPaste
- grouping:
- - CreateGroup
- - DissolveGroup
- - AddToGroup
- # - RepresentGroup
- # - RemoveFromGroup
- search:
- - ShowSelected
- - RemoveSelected
- - GoForth
- - GoBack
- select:
- - SelectAll
- - SelectNone
- - SelectInvert
- - SelectSingle
- - SelectMulti
- - SelectRange
- - SelectAdditive
- - SelectSubtractive
- tagging:
- - AddTag
- - EditTag
- # - SetRank1
- # - SetRank3
- # - SetRank5
- search:
- sort_blacklist:
- - entity
- - flash
- - latitude
- - longitude
- - mime
- - author
- - camera
- - attributes
- tiledocks:
- sidebar_right:
- Info: {}
diff --git a/tagit/config/loader.py b/tagit/config/loader.py
index 87ac328..47a51fa 100644
--- a/tagit/config/loader.py
+++ b/tagit/config/loader.py
@@ -54,10 +54,8 @@ def load_settings(path=None, verbose=0):
searchpaths += SETTINGS_PATH
# create default user config on first start
- first_start = False
user_config = os.path.expanduser(os.path.join('~', TAGITRC))
if os.path.exists(DEFAULT_USER_CONFIG) and not os.path.exists(user_config):
- first_start = True
shutil.copy(DEFAULT_USER_CONFIG, user_config)
# scan searchpaths
@@ -76,8 +74,6 @@ def load_settings(path=None, verbose=0):
# update verbosity from argument
cfg.set(('session', 'verbose'), max(cfg('session', 'verbose'), verbose))
- # set first start according to previous user config existence
- cfg.set(('session', 'first_start'), first_start)
return cfg
## EOF ##
diff --git a/tagit/config/settings.json b/tagit/config/settings.json
deleted file mode 100644
index 8fd4754..0000000
--- a/tagit/config/settings.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "ui": {
- "standalone": {
- "keytriggers": [
- ],
- "buttondocks": {
- "filter": [
- ],
- "navigation_left": [
- ],
- "navigation_right": [
- ],
- "status": [
- ]
- },
- "context": {
- "root": [
- ]
- }
- }
- }
-}
diff --git a/tagit/config/settings.yaml b/tagit/config/settings.yaml
new file mode 100644
index 0000000..e9264d4
--- /dev/null
+++ b/tagit/config/settings.yaml
@@ -0,0 +1,10 @@
+ui:
+ standalone:
+ keytriggers: []
+ buttondocks:
+ navigation_left: []
+ navigation_right: []
+ filter: []
+ status: []
+ context:
+ root: []
diff --git a/tagit/config/user-defaults.json b/tagit/config/user-defaults.json
deleted file mode 100644
index 1ff7ab4..0000000
--- a/tagit/config/user-defaults.json
+++ /dev/null
@@ -1,134 +0,0 @@
-{
- "session": {
- "first_start": false,
- "paths": {
- "searchlog": "~/.tagit.log"
- }
- },
- "storage": {
- "index": {
- "preview_size": [
- 50,
- 200,
- 400
- ]
- }
- },
- "ui": {
- "standalone": {
- "window_size": "1024x768",
- "browser": {
- "maxrows": 8,
- "maxcols": 8
- },
- "buttondocks": {
- "sidebar_left": [
- "Menu",
- "ShowDashboard",
- "AddTag",
- "EditTag",
- "CreateGroup",
- "DissolveGroup",
- "SelectAll",
- "SelectNone",
- "SelectInvert",
- "SelectAdditive",
- "SelectSubtractive",
- "SelectSingle",
- "SelectMulti",
- "SelectRange"
- ]
- },
- "tiledocks": {
- "dashboard": {
- "Buttons": {
- "buttons": [
- "ShowBrowsing",
- "CreateSession",
- "CreateTempSession",
- "LoadSession",
- "ReloadSession",
- "ImportObjects",
- "ItemExport",
- "UpdateSelectedObjects",
- "ShowHelp",
- "ShowSettings"
- ]
- },
- "LibSummary": {},
- "Hints": {},
- "TagHistogram": {},
- "Tagcloud": {},
- "Searchtree": {}
- },
- "sidebar_right": {
- "Info": {},
- "CursorTags": {},
- "Venn": {}
- }
- },
- "search": {
- "sort_blacklist": [
- "entity",
- "flash",
- "latitude",
- "longitude",
- "mime",
- "author",
- "camera",
- "attributes"
- ]
- },
- "context": {
- "app": [
- "ShowSettings",
- "ShowHelp",
- "ShowConsole"
- ],
- "session": [
- "ItemExport",
- "ImportObjects"
- ],
- "search": [
- "ShowSelected",
- "RemoveSelected"
- ],
- "browser": [
- "ZoomIn",
- "ZoomOut"
- ],
- "select": [
- "SelectAll",
- "SelectNone",
- "SelectInvert",
- "SelectSingle",
- "SelectMulti",
- "SelectRange",
- "SelectAdditive",
- "SelectSubtractive"
- ],
- "clipboard": [
- "ClipboardCopy",
- "ClipboardPaste"
- ],
- "tagging": [
- "AddTag",
- "EditTag",
- "SetRank1",
- "SetRank3",
- "SetRank5"
- ],
- "grouping": [
- "CreateGroup",
- "DissolveGroup",
- "AddToGroup",
- "RepresentGroup",
- "RemoveFromGroup"
- ],
- "root": [
- "CloseSessionAndExit"
- ]
- }
- }
- }
-}
diff --git a/tagit/config/user-defaults.yaml b/tagit/config/user-defaults.yaml
index 3ec23d0..6ec51c6 100644
--- a/tagit/config/user-defaults.yaml
+++ b/tagit/config/user-defaults.yaml
@@ -1,56 +1,93 @@
session:
- first_start: false
- paths:
- searchlog: ~/.tagit.log
-storage:
- index:
- preview_size:
- - 50
- - 200
- - 400
+ bsfs:
+ Graph:
+ backend:
+ SparqlStore: {}
+ user: 'http://example.com/me'
+ script:
+ - Search
ui:
standalone:
+ window_size: [1440, 810]
+ #maximize: True
+ keytriggers:
+ - MoveCursorUp
+ - MoveCursorDown
+ - MoveCursorLeft
+ - MoveCursorRight
+ - MoveCursorLast
+ - MoveCursorFirst
+ - NextPage
+ - PreviousPage
+ - ScrollDown
+ - ScrollUp
+ - ZoomIn
+ - ZoomOut
+ - Select
+ - SelectAll
+ - SelectNone
+ - SelectMulti
+ - SelectRange
+ - AddToken
+ - GoBack
+ - GoForth
+ - AddTag
+ - EditTag
+ - Search
+ - ShowSelected
+ - RemoveSelected
browser:
+ cols: 4
+ rows: 3
maxcols: 8
maxrows: 8
buttondocks:
+ navigation_left:
+ - MoveCursorFirst
+ - PreviousPage
+ - ScrollUp
+ navigation_right:
+ - ScrollDown
+ - NextPage
+ - MoveCursorLast
+ filter:
+ - GoBack
+ - GoForth
+ status:
+ - ZoomIn
+ - ZoomOut
sidebar_left:
- - Menu
- - ShowDashboard
- AddTag
- EditTag
- - CreateGroup
- - DissolveGroup
+ - ShowSelected
+ - RemoveSelected
- SelectAll
- SelectNone
- SelectInvert
- - SelectAdditive
- - SelectSubtractive
- SelectSingle
- - SelectMulti
- SelectRange
+ - SelectMulti
+ - SelectAdditive
+ - SelectSubtractive
context:
app:
- - ShowSettings
- ShowHelp
- ShowConsole
+ - ShowSettings
browser:
- ZoomIn
- ZoomOut
- clipboard:
- - ClipboardCopy
- - ClipboardPaste
- grouping:
- - CreateGroup
- - DissolveGroup
- - AddToGroup
- - RepresentGroup
- - RemoveFromGroup
- root:
- - CloseSessionAndExit
+ - MoveCursorFirst
+ - PreviousPage
+ - ScrollUp
+ - ScrollDown
+ - NextPage
+ - MoveCursorLast
search:
- ShowSelected
- RemoveSelected
+ - GoForth
+ - GoBack
select:
- SelectAll
- SelectNone
@@ -60,46 +97,9 @@ ui:
- SelectRange
- SelectAdditive
- SelectSubtractive
- session:
- - ItemExport
- - ImportObjects
tagging:
- AddTag
- EditTag
- - SetRank1
- - SetRank3
- - SetRank5
- search:
- sort_blacklist:
- - entity
- - flash
- - latitude
- - longitude
- - mime
- - author
- - camera
- - attributes
tiledocks:
- dashboard:
- Buttons:
- buttons:
- - ShowBrowsing
- - CreateSession
- - CreateTempSession
- - LoadSession
- - ReloadSession
- - ImportObjects
- - ItemExport
- - UpdateSelectedObjects
- - ShowHelp
- - ShowSettings
- Hints: {}
- LibSummary: {}
- Searchtree: {}
- TagHistogram: {}
- Tagcloud: {}
sidebar_right:
- CursorTags: {}
Info: {}
- Venn: {}
- window_size: 1024x768