Skip to content

robperc/FavServersEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

As of 10.12 this implementation has broken. See the Notes for Mike Lynn's SFLListItem based approach.

FavServersEditor

Python module for easily adding, removing, and moving favorite servers in the "Connect to Server" window.

Example Usage:

#!/usr/bin/python

from FavServerEditor import FavoriteServers     # Import the module

servers = FavoriteServers()                     # Create a Favorite Servers instance to act on.

servers.removeAll()                             # Remove all favorite servers
servers.add("Shares", "afp://shares")           # Add 'afp://shares' favorite labelled 'Shares'
servers.add("Server", "smb://server", index=0)  # Add 'smb://server' favorite labelled 'Server' at 0th position
servers.move("Shares", 0)                       # Move 'Shares' favorite back to 0th position
servers.swap("Shares", "Server")                # Swap positions of 'Shares' and 'Server' favorites
servers.remove("Shares")                        # Remove 'Shares' favorite

servers.write()                                 # Write changes

Notes

  • Changes made to the favorites may require logout / login to appear. Consider using the module in a script meant for Outset to avoid this issue.
  • In 10.11 the introduction of '.sfl' files and 'SFLListItem's means the hip way of editing these favorites would be something like Mike Lynn's approach, however keep in mind that that approach will not work backwards compatibly with any OS before 10.11.

About

Python module for easily adding, removing, and moving positions of Favorite Servers entries in the context of the currently logged in user.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages