{"id":19933878,"url":"https://github.com/henriwahl/seafadm","last_synced_at":"2025-05-03T12:30:22.794Z","repository":{"id":10640585,"uuid":"12867119","full_name":"HenriWahl/seafadm","owner":"HenriWahl","description":"Seafile web interface wrapper for administration via CLI","archived":false,"fork":false,"pushed_at":"2022-10-10T18:45:21.000Z","size":146,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-07T15:51:47.947Z","etag":null,"topics":["admin","cli","python","seafile"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HenriWahl.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-16T12:46:53.000Z","updated_at":"2022-10-09T17:20:43.000Z","dependencies_parsed_at":"2023-01-13T16:04:05.349Z","dependency_job_id":null,"html_url":"https://github.com/HenriWahl/seafadm","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenriWahl%2Fseafadm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenriWahl%2Fseafadm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenriWahl%2Fseafadm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenriWahl%2Fseafadm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HenriWahl","download_url":"https://codeload.github.com/HenriWahl/seafadm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252190419,"owners_count":21708878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin","cli","python","seafile"],"created_at":"2024-11-12T23:15:12.850Z","updated_at":"2025-05-03T12:30:22.500Z","avatar_url":"https://github.com/HenriWahl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"seafadm - Seafile CLI Administration\n====================================\n\nABOUT:\n------\n\nSeafadm allows to do some administration tasks for Seafile (https://github.com/haiwen/seafile) from command line. It collects informations and executes commands by internally calling the web interface of Seafile, Seahub. The used BeautifulSoup module allows the command line tool to be seen as a browser from Seahub's perspective.\nUsing seafadm one can collect informations about users, groups, links and libraries. These objects also can be deleted. Quotas can be set for users and domains. Searches can be done in users, libraries and groups. Reports can be generated to be sent to users by mail.\n\n**Attention:** I try to keep as close as possible with seafadm to the official Seafile releases. There are minor differences between releases which make small corrections necessary. Especially if you use an older version of Seafile you will need to use an older one of seafadm too. See the tags to find a matching version.\n\nREQUIREMENTS:\n-------------\n\nSeafadm is tested with Python 2.7 and needs the great BeautifulSoup module from http://www.crummy.com/software/BeautifulSoup/ version 4 as well as the Python Requests library from http://docs.python-requests.org. Fedora and CentOS users do a \n\n    yum install python-beautifulsoup4 python-requests\n\nDebian users install via\n\n    apt-get install python-bs4 python-requests\n\nThen run simply on command line using the following instructions.\n\nUSAGE:\n------\n\nseafadm [option...] [command] [argument]\n\nValid options are:\n\n    -c, --config      location for config file for URL, username and password\n    -U, --url         URL of Seafile server, e.g. https://seafile.local\n    -u, --username    username of Seafile admin account\n    -p, --password    password for givern username\n    -F, --force       disable confirmation for delete and quota command\n\nValid commands are:\n\n    show              show informations about users, libraries, groups and links\n    add               add users, libraries and files\n    update            update user password\n    delete            delete users, libraries, groups and links\n    quota             set quota for single users and whole domains\n    search            search for users, groups and links\n    report            generate report per user to be sent by mail\n    check             check for invalid links\n    clean             check for invalid links and delete them\n\nArguments for show command:\n\n    users             show all users, their ID, creation date and quota as list\n    user \u003cusername\u003e   show extra details about \u003cusername\u003e, its libraries, shares and groups\n    libs              show all libraries, their ID and owners as list\n    groups            show all groups, their ID, owner, creation date and members as list\n    group \u003cgroup\u003e     show details about single \u003cgroup\u003e\n    links             show links, their ID, creation date and URL as list ordered by owner\n    all               show extra details about all users\n\nArguments for add command:\n\n    user \u003cemail\u003e \u003cpassword\u003e     add user \u003cemail\u003e with password \u003cpassword\u003e\n    library \u003cname\u003e \u003cemail\u003e      add library \u003cname\u003e for owner with \u003cemail\u003e\n    files \u003cfilepath\u003e \u003crepo-id\u003e  add file from \u003cfilepath\u003e to \u003crepo-id\u003e\n\nArguments for update command:\n\n    password \u003cemail\u003e \u003cnew_password\u003e     update \u003cemail\u003e password with \u003cnew_password\u003e\n\nArguments for delete command:\n\n    user \u003cusername\u003e   delete \u003cusername\u003e\n    lib \u003crepo-id\u003e     delete library with ID \u003crepo-id\u003e\n    link \u003clink\u003e       delete link \u003clink\u003e identified by URL or ID\n    group \u003cgroup\u003e     delete group identified by group name \u003cgroup\u003e\n\nArguments for quota command:\n\n    user \u003cusername\u003e \u003cquota\u003e        set quota for \u003cusername\u003e to \u003cquota\u003e MB\n    domain \u003cdomain\u003e \u003cquota\u003e        set quota for users from \u003cdomain\u003e to \u003cquota\u003e MB\n    domain not \u003cdomain\u003e \u003cquota\u003e    set quota for users NOT from \u003cdomain\u003e to \u003cquota\u003e MB\n    domain min \u003cdomain\u003e \u003cquota\u003e    set quota for users from \u003cdomain\u003e to a minimum of\n                                   \u003cquota\u003e MB\n\nArguments for search command:\n\n    user \u003cstring\u003e    search in users for \u003cstring\u003e\n    group \u003cstring\u003e    search in groups for \u003cstring\u003e\n    link \u003cstring\u003e     search in links for \u003cstring\u003e\n\nArguments for report command:\n\n    user \u003cusername\u003e   generate report for user \u003cusername\u003e, to be sent by mail for example\n\nArguments for check command:\n\n    links             check validity of links and display them ordered by validity\n\nArguments for clean command:\n\n    links                       check validity of links and delete them if invalid\n    garbage [threads] [path]    run seaf_gc threads for faster garbace collection\n                                [threads] defaults to 10 and [path] to /opt/seafile\n\n\nCONFIG FILE:\n------------\n\nThe optional config file allows to omit sensitive information like username and password at the command line. These informations are stored in the config file that has to be given by the --config option and to look like that:\n\n    [seafadm]\n    url=https://seafile.example.com\n    username=admin@example.com\n    password=secret\n\nEXAMPLES:\n---------\n\nShowing all users, their libraries, groups and memberships:\n\n    seafadm -c ./seafadm.conf show all\n\nShowing users as list:\n\n    seafadm -c ./seafadm.conf show users\n\nShowing details about one single user:\n\n    seafadm -c ./seafadm.conf show user joe@example.com\n\nAdding an user:\n\n    seafadm -c ./seafadm.conf add user joe@example.com bar1234\n\nAdding a library:\n\n    seafdm -c  ./seafadm.conf add library 'Joe Library' joe@example.com\n\nAdding a file:\n\n    seafdm -c  ./seafadm.com add file './joe photo.jpg' 1c17cddc-2864-407c-8fcf-6a325964d00b \n\nUpdate user password:\n\n    seafdm -c  ./seafadm.conf update password joe@example.com foo1234\n\nDeleting an user:\n\n    seafadm -c ./seafadm.conf delete user joe@example.com\n\nDeleting a library:\n\n    seafadm -c ./seafadm.conf delete lib 1c17cddc-2864-407c-8fcf-6a325964d00b\n\nSetting quota to 10240 MB for an user:\n\n    seafadm -c ./seafadm.conf quota user joe@example.com 10240\n\nSetting quota to 4096 MB for users of domain example.com:\n\n    seafadm -c ./seafadm.conf quota domain example.com 4096\n\nSetting quota to a minimum of 20480 MB for all users of domain example.com:\n\n    seafadm -c ./seafadm.conf quota domain min example.com 20480\n\nSetting quota to 1 MB for all users NOT in domain example.com:share/link/\n\n    seafadm -c ./seafadm.conf quota domain not example.com 1\n\nSearch for user joe in users:\n\n    seafadm -c ./seafadm.conf search user joe\n\nGenerate report for user joe@example.com\n\n    seafadm -c ./seafadm.conf report user joe@example.com\n\nCheck validity of links\n\n    seafadm -c ./seafadm.conf check links\n\nDelete invalid links\n\n    seafadm -c ./seafadm.conf clean links\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriwahl%2Fseafadm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenriwahl%2Fseafadm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenriwahl%2Fseafadm/lists"}