Code Monkey home page Code Monkey logo

misskey-drive-helper's Introduction

misskey-drive-helper

batch delete misskey drive files and folders

Components

  • getFolderId: get folder ids from folder name, only search the root directory, recursive search will be implemented in the future
  • rmFiles: delete all files in folders by folder ids without deleting folder
  • rmFolders: batch delete folders by folder ids, folder must be empty

Note: rmFiles will delete all files in folder regardless of whether they were attached to notes. Due to misskey api drive/files/attached-notes's low performance, rmFiles will not check whether files were attached to notes.

To obtain the folder ID using getFolderId, it is necessary to move the folder to be operated on to the root directory

Usage

Envirionment variables MISSKEY_SITE and MISSKEY_TOKEN are required.

Token must have read:drive and write:drive permissions.

$ export MISSKEY_SITE="https://m.isle.moe"
$ export MISSKEY_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
$ ./getFolderId folder1 folder2 ... folderN | ./rmFiles
$ ./getFolderId folder1 folder2 ... folderN | ./rmFolders
$ unset MISSKEY_SITE; unset MISSKEY_TOKEN
> $Env:MISSKEY_SITE="https://m.isle.moe"
> $Env:MISSKEY_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
> .\getFolderId.exe folder1 folder2 ... folderN | .\rmFiles.exe
> .\getFolderId.exe folder1 folder2 ... folderN | .\rmFolders.exe
> Remove-Item -Path Env:\MISSKEY_SITE; Remove-Item -Path Env:\MISSKEY_TOKEN

misskey-drive-helper's People

Contributors

creamlike1024 avatar

Stargazers

Takuenn Li avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.