{"action":"created","issue":{"url":"https://api.github.com/repos/ContinuumIO/menuinst/issues/48","repository_url":"https://api.github.com/repos/ContinuumIO/menuinst","labels_url":"https://api.github.com/repos/ContinuumIO/menuinst/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/ContinuumIO/menuinst/issues/48/comments","events_url":"https://api.github.com/repos/ContinuumIO/menuinst/issues/48/events","html_url":"https://github.com/ContinuumIO/menuinst/issues/48","id":246543434,"number":48,"title":"Rework linux/osx support plus new simplified format?","user":{"login":"goanpeca","id":3627835,"avatar_url":"https://avatars3.githubusercontent.com/u/3627835?v=4","gravatar_id":"","url":"https://api.github.com/users/goanpeca","html_url":"https://github.com/goanpeca","followers_url":"https://api.github.com/users/goanpeca/followers","following_url":"https://api.github.com/users/goanpeca/following{/other_user}","gists_url":"https://api.github.com/users/goanpeca/gists{/gist_id}","starred_url":"https://api.github.com/users/goanpeca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goanpeca/subscriptions","organizations_url":"https://api.github.com/users/goanpeca/orgs","repos_url":"https://api.github.com/users/goanpeca/repos","events_url":"https://api.github.com/users/goanpeca/events{/privacy}","received_events_url":"https://api.github.com/users/goanpeca/received_events","type":"User","site_admin":false},"labels":[{"id":657775163,"url":"https://api.github.com/repos/ContinuumIO/menuinst/labels/type:discussion","name":"type:discussion","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-29T20:26:56Z","updated_at":"2017-07-31T14:40:27Z","closed_at":null,"body":"@kalefranz, @msarahan, @mingwandroid \r\n\r\nI have been wanting to update the linux/osx support for some time, but it might also be a good opportunity to reevaluate the current format. Since conda uses jinja2, yaml and selectors, it would be pretty natural to do the same for menuinst (lets say version 2.0):\r\n\r\nBased on https://github.com/ContinuumIO/menuinst/wiki/Menu-Shortcut-Config-Structure\r\n\r\nCould we turn the format into yaml, and use jinja2 and selectors, and make it more uniform among all OSs? We could still use separate files for separate OSs, but we could just have one file that knows what to do everywhere\r\n\r\nThis would create subfolders for environments and no subfolder for the root (hopefully). Overriding the creation for other envs, should probably be handed by the CLI when called, instead of including the info inside this file\r\n\r\n```\r\n../conda.recipe/\r\n   menu.yaml\r\n   icons/\r\n      someicon.ico\r\n      someicon.icns\r\n```\r\n```yaml\r\n{% set BASE_DIR = 'Anaconda'PY_VER PLATFORM %}\r\n{% set ICO_EXT = 'ico' if WIN or LINUX else 'icns' %}\r\n\r\nversion: 2.0\r\nmenu:\r\n  - path: {% if ROOT_PREFIX != ENV_PREFIX %}{{ BASE_DIR }}/{{ ENVNAME }}{% else %}{{ BASE_DIR }}{{% endif %}\r\n    shortcuts:\r\n      - name: 'SomeApp'\r\n        version: 1.8.9\r\n        cmd:    #  Or we can split cmd, and args...\r\n          - '{{ PYTHONW }}'\r\n          - '{{ PYTHON_SCRIPTS }}/someapp'\r\n        comment: 'Some description of someapp'\r\n        icon: '{{ MENU_DIR }}/someicon.{{ ICO_EXT }}'\r\n        icon_path: 'icons/someicon.{{ ICO_EXT }}'\r\n        desktop: True                         # [win]\r\n        quicklaunch: True                     # [linux and win]\r\n```\r\n\r\n\r\n\r\n```\r\n# Check the need of keys\r\nterminal\r\nid\r\n\r\n# \"new\" env variables\r\nFILEBROWSER\r\nWEBBROWSER\r\nCMD/BASH ?\r\n\r\n# deprecate keys\r\nicns \r\npywscript\r\npyscript\r\nscript\r\nscriptarguments\r\nsystem\r\nwebbrowser\r\n```\r\n\r\nPlus adding a programmatic api `menuinst.api` \r\n```python\r\nfrom menuninst.api import Menu, Shortcut\r\n\r\nmenu = Menu('My awesome thing/submenu/')\r\nshortcut = Shortcut('App', ['command'], desktop=True, icon=None)\r\nshortcut.icon = '{{ MENU_DIR }}/icon.ico'\r\nshortcut.icon_path = 'icons/icon.ico'\r\nmenu.add(shortcut)\r\nmenu.install(context={...})\r\nmenu.uninstall(...)\r\nyaml_data = menu.to_yaml()\r\njson_data = menu.to_json()\r\n```\r\n\r\nThoughts?\r\n"},"comment":{"url":"https://api.github.com/repos/ContinuumIO/menuinst/issues/comments/319087330","html_url":"https://github.com/ContinuumIO/menuinst/issues/48#issuecomment-319087330","issue_url":"https://api.github.com/repos/ContinuumIO/menuinst/issues/48","id":319087330,"user":{"login":"goanpeca","id":3627835,"avatar_url":"https://avatars3.githubusercontent.com/u/3627835?v=4","gravatar_id":"","url":"https://api.github.com/users/goanpeca","html_url":"https://github.com/goanpeca","followers_url":"https://api.github.com/users/goanpeca/followers","following_url":"https://api.github.com/users/goanpeca/following{/other_user}","gists_url":"https://api.github.com/users/goanpeca/gists{/gist_id}","starred_url":"https://api.github.com/users/goanpeca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goanpeca/subscriptions","organizations_url":"https://api.github.com/users/goanpeca/orgs","repos_url":"https://api.github.com/users/goanpeca/repos","events_url":"https://api.github.com/users/goanpeca/events{/privacy}","received_events_url":"https://api.github.com/users/goanpeca/received_events","type":"User","site_admin":false},"created_at":"2017-07-31T14:40:27Z","updated_at":"2017-07-31T14:40:27Z","body":"Probably not, would be nice though"}}
{"actor":{"display_login":"goanpeca"}}