Git Product home page Git Product logo

obsidian-file-cleaner's Introduction

File Cleaner

This is a plugin for Obsidian (https://obsidian.md).

It can help you clean up empty files and unused attachments in the obsidian vault.

Note

  • Empty Files
    • Files with a size of 0 bytes.
    • Files with only spaces and line breaks
  • Unused Attachments
    • Support jpg, jpeg, png, gif, svg, pdf.
  • Settings
    • Move to system trash
    • Move to Obsidian trash (.trash folder)
    • Permanently delete

How to use

  • Click the ribbon icon of "File Cleaner".

Known issue

  • Attachments used in Admonition code blocks are not recognized

obsidian-file-cleaner's People

Contributors

aidenlx avatar chrisgrieser avatar clemens-e avatar edo78 avatar fyears avatar gitmurf avatar johnson0907 avatar kostapc avatar lishid avatar phibr0 avatar taurelas avatar tfthacker avatar tokuhirom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

obsidian-file-cleaner's Issues

Include empty folders in cleanup

I'm using RainCat1998/obsidian-custom-attachment-location plugin that creates a folder associated with the note an image is pasted in. I've used your plugin and it works great, though it would be cool if it can get rid of the empty folders left behind too.

Needs more options to control what it does

Please add an option to turn off the deletion of unused attachments.
I skimmed over this in the summary and paid dearly for it. There are important reasons for having media and other files that are not yet attached to obsidian. It's a good thing I had a backup to restore from, but even that took quite some time.
It is really handy to have the ability to cull out empty notes and files so that part of this plug-in is valuable, but without the ability to selectively disable the deletion of media files, I'm going to delete this plug-in.

Excalidraw

Hi, is it possible to have this plugin act on orphaned excalidraw drawings too?
I'll often find my Excalidraw folder filling up with old or empty drawings over time and it'd be nice to have them cleaned up automatically somehow. This might be an issue better suited for the Excalidraw plugin though.

Potential issue

Hi @Johnson0907

Nice idea for a plugin! Just want to throw out a word of caution: due to this (as far as I know still unrersolved) bug, Mac users might want to be extra careful when using it.

Don't delete image link in Blue Topaz theme

Blue Topaz theme support image link like ![[xxx.png#position|captions|size]],use this grammar I can arrange image position and size more flexible。

But when i call "File cleaner" plugin,this will delete these image.

Preview of what gets cleaned

It'd be handy to be able to preview which files get cleaned and then a button to confirm it. That way one doesn't have to worry that files get removed which shouldn't be removed.

Obviously this could also be an opt-in flag or something to not disrupt the flow of existing users which don't want to have that :)

Plugin status

Just wondering what the status of this plugin is.

There have been no updates since April 1st 2022.

I've tried reaching out to @Johnson0907 on Discord as well to try to get some updates.

If all else fails, I do have a fork which incorporates some of the features that are requested.
https://github.com/husjon/obsidian-file-cleaner-redux

Some of the features are documented in the following pull request: husjon/obsidian-file-cleaner-redux#1

Hoping to add more over the next few days / weeks.

Add Support for Audio files

Along with png could you add support for audio files it should techinically be my searching for unused .webm files

Filter by file type

Hello,

Would it be possible to have an option to filter by file-type?

The use case is that I have pdf I do not want to delete, no matter whether they are linked or not -- a contrario, I would like to only target .jpg or .png.

Thank you,

Command for cleaning files

I don't use the ribbon (keep it hidden), so It would help me if you added a command for this (in the command palette).

Thank you.

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.