관심사/기타

Evernote <-> Haroopad <-> imgur <-> Tistory 블로그 동기화 1

xzpluszone 2020. 9. 10. 13:24
 

Evernote <-> Haroopad <-> imgur <-> Tistory 블로그 동기화 1 @LINUX-TIP #티스토리

리눅스 기반에서 마크다운 같은 형식으로 블로그에 동기화 하는 방법을 공유합니다.
에버노트 베이스로 작성된 문서를 티스토리 블로그에 글을 개시 합니다.
글은 horoopad 마크다운 형식이며, 이미지 첨부는 로컬이 아닌 클라우드 이미지 저장소(imgur)를 사용합니다.

1. imgur 가입
2. CLIENT_ID 확보
3. GIT에서 스크립트 다운로드

Imgur-Screenshot (2.0.0 version)
ref : https://github.com/jomo/imgur-screenshot

4. imgur 기본설정
sudo apt install curl grep libnotify-bin scrot xclip jq
---------------------------------------
cd /usr/local/bin
---------------------------------------
chmod 755 imgur-screenshot
---------------------------------------
mkdir ~/.config/imgur-screenshot
---------------------------------------
vi ~/.config/imgur-screenshot/settings.conf
CLIENT_ID="e6891xxxxxxxx"
CLIENT_SECRET="bc7470c8498f85acfa7122d14c0xxxxxxxxxxxxxx"
LOGIN="true"

#스크립트 실행 후에 기존 사용하던 스크린캡처사용하고 싶을때 (커스텀)
#screenshot_select_command="shutter --select --exit_after_capture --output=%img"

---------------------------------------
cd /usr/local/bin
5. imgur 로그인
./imgur-screenshot -c
# 아래의 URL을 호출하여 콜백값을 얻는다.
You need to authorize imgur-screenshot to upload images. Please visit
https://api.imgur.com/oauth2/authorize?client_id=e689120bxxxxxxx&response_type=token
and grant access to this application.

Then copy and paste the URL from your browser.
It should look like 'https://imgur.com/#access_token=...'. Paste here:

# 여기에 콜백받은 URL을 붙여넣는다.
https://app.getpostman.com/oauth2/callback#access_token=f3705d8d1be2e2xxxxxxxxxxxxxxxx&expires_in=315360000&token_type=bearer&refresh_token=ef617cf248xxxxxxxxxxxxxxxxxxxx&account_username=user&account_id=1xxxxxxx

# 로그인 출력되는 결과
Logged in as user.
https://user.imgur.com
5. 토큰이 저장되는 경로는 다음과 같으며 토큰값을 확인할 수 있다.
cat ~/.config/imgur-screenshot/credentials.conf
6. imgur 사용
./imgur-screenshot
7. imgur 단축키 등록

해당 imgur 사용에서 명령어를 설정합니다.
각 OS마다 단축키 등록방법이 다르기 때문에 OS에 맞도록 단축키를 설정합니다.

8. 이미지 저장확인
  • 로컬에는 다음과 확인할 수 있다.
  • 클라우드에 업로드 된 이미지는 : https://i.imgur.com/XXXXXX.png 로 user 계정의 위치로 어디서든지 접근이 된다.

다음 블로그에서 haroopad에서 markdown을 사용하여 에버노트에 개시하며 더 나아가 에버노트와 티스토리 동기화를 설명합니다.

'관심사 > 기타' 카테고리의 다른 글

2020 민방위 사이버 교육 동영상 스킵  (7) 2020.09.03