Git Product home page Git Product logo

org-download's Introduction

This extension facilitates moving images from point A to point B.

Point A (the source) can be:

  1. An image inside your browser that you can drag to Emacs.
  2. An image on your file system that you can drag to Emacs.
  3. A local or remote image address in kill-ring. Use the org-download-yank command for this. Remember that you can use "0 w" in dired to get an address.
  4. A screenshot taken using gnome-screenshot, scrot, gm, xclip (on Linux), screencapture (on OS X) or , imagemagick/convert (on Windows). Use the org-download-screenshot command for this. Customize the backend with org-download-screenshot-method.

Point B (the target) is an Emacs org-mode buffer where the inline link will be inserted. Several customization options will determine where exactly on the file system the file will be stored.

They are: org-download-method:

  1. 'attach => use org-mode attachment machinery
  2. 'directory => construct the directory in two stages:
    1. first part of the folder name is:

      • either "." (current folder)

      • or org-download-image-dir (if it's not nil).

        org-download-image-dir becomes buffer-local when set, so each file can customize this value, e.g with:

            -*- mode: Org; org-download-image-dir: "~/Pictures/foo"; -*-
        

        To set it for all files at once, use this:

            (setq-default org-download-image-dir "~/Pictures/foo")
        
    2. second part is:

      • org-download-heading-lvl is nil => ""

      • org-download-heading-lvl is n => the name of current heading with level n.

        Level count starts with 0, i.e. * is 0, ** is 1, *** is 2 etc. org-download-heading-lvl becomes buffer-local when set, so each file can customize this value, e.g with:

            -*- mode: Org; org-download-heading-lvl: nil; -*-
        

org-download-timestamp: optionally add a timestamp to the file name.

Customize org-download-backend to choose between url-retrieve (the default) or wget or curl.

org-download's People

Contributors

abo-abo avatar bricewge avatar david-sitsky avatar diadochos avatar et2010 avatar ic4907 avatar lorniu avatar lxutn avatar stardiviner avatar wandersoncferreira avatar yevgnen avatar yitang avatar youngfrog 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.