Coder Social home page Coder Social logo

abelche / obsidian-custom-attachment-location Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raincat1998/obsidian-custom-attachment-location

0.0 0.0 0.0 78 KB

Customize attachment location with variables($filename, $data, etc) like typora.

License: GNU General Public License v3.0

JavaScript 11.47% TypeScript 88.53%

obsidian-custom-attachment-location's Introduction

Obsidian Custom Attachment location

Customize attachment location with variables($filename, $data, etc) like typora.

Features

  • Modify location for attachment folder.
  • Modify filename for Pasted Image.

โš ๏ธ IMPORTANT: This plugin will overwrite the following two settings and restore them when the plugin is disabled.

  • "Files & Links -> New link format -> Relative path to file" for generating md links.

  • "Files & Links -> Default location for new attachments" for custom attachment folder.

How to use

Plugin Manager

  • Install via the Third Party plugins setting. Search for Custom Attachment location.
  • Activate the plugin in the settings.

Manual Install

  • Download main.js, manifest.json in the latest release.
  • Copy main.js, manifest.json to your vault VaultFolder/.obsidian/plugins/obsidian-custom-attachment-location/.
  • Enable plugin in Obsidian setting.

Settings

  • Location for New Attachments

    • Same to "Files & Links -> Default location for new attachments".
    • ${filename} representing for current note filename.
    • Put "./" at the beginning of the path if you want to use relative path.
    • example: assets/${filename}, ./assets/${filename}
    • DO NOT start with "/" or end with "/"
    • (Wrong example: /assets/${filename}/)
  • Pasted Image Name

    • ${filename} representing for current note filename. ${date} representing for current datetime in custom Date Format.
    • example: image-${date}, ${filename}-img-${date}
    • Obsidian default: "Pasted image YYYYMMDDHHmmss"
    • Note: This setting only changes image filename from clipboard. If your attachment is copied from the explorer, obsidian will just copy the original file to the attachment folder without renaming.
  • Date Format

    • Date format string for moment.js.
    • More info: Format
    • example: "YYYYMMDDHHmmssSSS".
  • Automatically rename attachment folder

    • Automatically update attachment folder name if "Location for New Attachments" contains ${filename}.
  • Automatically rename attachment files [Experimental]

    • Automatically update attachment files in target md file if "Pasted Image Name" contains ${filename}.
    • Just simply substitute ${filename} string in attachment filename. So it may be dangerous if multiple files share the same prefix.

Screenshots

image image

obsidian-custom-attachment-location's People

Contributors

raincat1998 avatar mnaoumov avatar typicalhog avatar astrodad avatar kaiiiz 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.