GithubHelp home page GithubHelp logo

memset0 / attachflow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yaozhuwa/attachflow

0.0 0.0 0.0 21.11 MB

This nifty obsidian plugin enables seamless management of attachments and referenced links directly from your documents. Taking advantage of an intuitive right-click menu, you can efficiently handle resources in both LIVE and READ modes.

License: GNU Affero General Public License v3.0

JavaScript 2.73% TypeScript 96.74% CSS 0.53%

attachflow's Introduction

AttachFlow

中文 / EN】

This is a plugin for Obsidian.

This nifty plugin enables seamless management of attachments and referenced links directly from your documents. Taking advantage of an intuitive right-click menu, you can efficiently handle resources in both LIVE and READ modes.

Showcase

(1) Handy Context Menu

(2) Drag to Resize Images

Details for clear file feature

Feature intro:

  1. Right-click image to delete attachment and links, and folder as appropriate.

  2. Right-click file list to delete notes and referenced attachments, and folder as appropriate.

Feature Details:

  1. Support markdown and wiki link style image link removal

  2. Supports three different formats of Internal link types (Details)

    1. Shortest path when possible
    2. Relative path to file
    3. Absolute path to vault
  3. Support processing approach after deleting image

    1. Move to system trash

    2. Move to Obsidian trash (.trash folder)

    3. Permanently delete

  4. In addition to supporting img type attachments, there are other types of attachment files such as images, videos, audio recordings, documents... (currently PDF attachments cannot be deleted by right-clicking).

    1. img type: img、gif、png、jpeg,svg, bmp...

    2. file type: docx、pptx、html、epub...

    3. media type: mp4、mkv...

Explanation of image attachment and reference link deletion:

  1. If the image/file is only referenced once in the current note, it will be deleted directly along with its link.
  2. If the image/file is referenced multiple times, only the link to the current image/file is removed, not the actual file.

Explanation of automatic deletion of referenced attachments when deleting a note:

  1. If the attachment is referenced by other notes, it will not be deleted.
  2. If the attachment is only referenced in the note to be deleted, it will be deleted.
  3. Deletion method: using the provided command of the plugin, or by right-clicking on the file list.

Explanation of automatic deletion of attachment folder depending on the situation:

  • The parent directory of an attachment (usually an attachment folder) will be deleted only if the attachment is referenced once in the note to be deleted, and the attachment folder is empty after the attachment is deleted.

Install

Install from BRAT

Add https://github.com/Yaozhuwa/AttachFlow to BRAT.

Manual installation

Go to the latest release page and download the main.js, manifest.json, style.css, and put them to <your_vault>/.obsidian/plugins/AttachFlow/.

Usage

  1. Install and enable this plug-in
  2. In LIVE MODE OR READ MODE ,right-click on image/media/file-embed will open context-menu, where you can delete file,copy file, open file with default app, open file in finder or reveal file in navigation.

Deleted File Destination

Please make sure that you select the destination for the deleted files under this plugin's setting tab. You have 3 options:

  1. Move to Obsidian Trash - Files are going to be moved to the .trash under the Obsidian Vault.
  2. Move to System Trash - Files are going to be moved to the Operating System trash.
  3. Permanently Delete - Files are going to be destroyed permanently. You won't beable to revert back.

Development

This plugin follows the structure of the Obsidian Sample Plugin plugin, please see further details there.

Credits

This plugin is a modification based on the Fast-Image-Clear plugin v0.8.1. I've added functionality to copy files to the clipboard. Furthermore, the features of opening in the default app, showing in finder, and listing in the file list were all inspired by the obsidian-copy-url-in-preview plugin. Feature of "Drag to Reesize" is modified from https://github.com/xRyul/obsidian-image-converter/.

References for these projects can be found at:

attachflow's People

Contributors

martinniee avatar yaozhuwa avatar lishid avatar edo78 avatar fyears avatar clemens-e avatar gitmurf avatar henrebotha avatar kostapc avatar taurelas avatar phibr0 avatar tfthacker avatar tokuhirom avatar reorx avatar aidenlx avatar chrisgrieser 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.