TxGVNN / gnus-summary-repo

Import and export files between IMAP and local by using GNUS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gnus-summary-repo

https://melpa.org/packages/gnus-summary-repo-badge.svg http://img.shields.io/:license-gpl3-blue.svg

Story

One day, I join an IT company that is the first outsourcing company I work. They have many policies to protect the products. I’m not allowed to store anything in the internet service. It’s fine, but they also don’t provide the storage services for employees.

I need to store my notes, tips around work. Good, I found a solution to store my stuff. Any company always give you an email account.

IMAP, that’s it (APPEND Command) https://tools.ietf.org/html/rfc3501#section-6.3.11 can handle this.

How did I implement?

I use GNUS to work around email. This is why I have this package.

https://user-images.githubusercontent.com/9713793/54472395-875e2180-47fa-11e9-813a-ec08d6aeb1ac.png

gnus-summary-repo will check which article or file are newer before importing/exporting base on creation date and MD5 hash

Usage

M-x gnus-summary-repo-import-directory Import all files from a directory to the current Summary.

M-x gnus-summary-repo-export-directory Export all files in the current Summary to a directory.

M-x gnus-summary-repo-import-file Import a file to the current Summary.

M-x gnus-summary-repo-export-file Export a file in the current Summary to a directory.

M-x gnus-summary-repo-import-directory-all Rescan 9999 articles before importing

M-x gnus-summary-repo-export-directory-all Rescan 9999 articles before exporting

Best practice

;; 1. Create a new group IMAP for only store your notes.
;; Example: nnimap+Gmail:Notes

;; 2. Go to your group with all of the articles (unlimited articles, you will be Summary mode)

;; 3. Use gnus-summary-repo-* function

Customize

;; Set your default directory
(setq gnus-summary-repo-dir-local nil)
;; Set your FROM header, If is nil, it will be an importing date
(setq gnus-summary-repo-header-from nil)
;; The regex list will be ignored when importing, default include .git/ directory
(setq gnus-summary-repo-import-ignore '("^\.git.*"))

Issues

  • Not yet support multiple repositories
  • You must manually enter Summary mode.
  • You must rescan Summary after importing/exporting

About

Import and export files between IMAP and local by using GNUS

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%