用于编辑查找工具边栏的收藏夹项的模块。
finder-sidebar-editor的Python项目详细描述
FinderSidebarEditor
Python模块,用于在登录用户的上下文中方便地添加、删除和移动Finder侧边栏上的收藏夹。
用法示例:
fromfinder_sidebar_editorimportFinderSidebar# Import the modulesidebar=FinderSidebar()# Create a Finder sidebar instance to act on.sidebar.remove("All My Files")# Remove 'All My Files' favorite from sidebarsidebar.remove("iCloud")# Remove 'iCloud' favorite from sidebarsidebar.add("/Library")# Add '/Library' favorite to sidebarsidebar.add("/SomeShare",uri="smb://shares")# Mount 'smb://shares/SomeShare' to '/Volumes/SomeShare' and add as favorite to sidebarsidebar.add("/SomeOtherShare",uri="afp://username:pw@server")# Mount pw protected 'afp://server/SomeOtherShare' to '/Volumes/SomeOtherShare' and add as favorite to sidebarsidebar.move("Library","Applications")# Move 'Library' favorite to slot just below 'Applications'
- 项目
标签: