Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/TxGVNN/gnus-summary-repo

Import and export files between IMAP and local by using GNUS
https://github.com/TxGVNN/gnus-summary-repo

emacs gnus imap repository

Last synced: 4 months ago
JSON representation

Import and export files between IMAP and local by using GNUS

Awesome Lists containing this project

README

        

* gnus-summary-repo
[[https://melpa.org/#/gnus-summary-repo][file:https://melpa.org/packages/gnus-summary-repo-badge.svg]]
[[http://www.gnu.org/licenses/gpl-3.0.html][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
#+BEGIN_SRC emacs-lisp :tangle yes
;; 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

#+END_SRC
*** Customize
#+BEGIN_SRC elisp
;; Set your default directory
(setq gnus-summary-repo-dir-local nil)
#+END_SRC

#+BEGIN_SRC elisp
;; Set your FROM header, If is nil, it will be an importing date
(setq gnus-summary-repo-header-from nil)
#+END_SRC

#+BEGIN_SRC elisp
;; The regex list will be ignored when importing, default include .git/ directory
(setq gnus-summary-repo-import-ignore '("^\.git.*"))
#+END_SRC

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