Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/wisehackermonkey/markdown-image-clipboard


https://github.com/wisehackermonkey/markdown-image-clipboard

Last synced: 17 days ago
JSON representation

Awesome Lists containing this project

README

        

# markdown-image-clipboard
----
[![Open Source Love svg2](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![](assets/2021-02-16-03-23-43.png)

Add images from a phone to markdown documentation with ease

This app requires you have a pushbullet account api key


# Quick start
### Install from [here](https://github.com/wisehackermonkey/markdown-image-clipboard/tags)
##### Open exe and click run
```bash
```

# Summary

### - *[Installation](#Installation)*
### - *[For developers](#For-developers)*

### - *[License](#License)*

# Installation
### Download
```bash
cd ~
git clone https://github.com/wisehackermonkey/markdown-image-clipboard.git
cd markdown-image-clipboard
pip install -r requirements.txt
```
### run
```bash
echo "PUSHBULLETAPI=" >> .env

```

-----------------
# For developers
### How to build exe for app
#### windows (simple)
```bash
pyinstaller --noconsole --onefile ./src/Markdown-Image-Clipboard.py
```
#### windows (automated)
```bash
cd src
pip install -r requirements.txt
pyinstaller --noconsole --specpath ${PWD}/builds --distpath ${PWD}/builds/dist --workpath ${PWD}/builds/build --onefile ./Markdown-Image-Clipboard.py ; mv -force ${PWD}/builds/dist/Markdown-Image-Clipboard.exe ${PWD}/windows_build/Markdown-Image-Clipboard.exe ; $date = Get-Date -Format "yyyyMMdd"; Compress-Archive -force -Path ${PWD}/windows_build/Markdown-Image-Clipboard.exe -DestinationPath ${PWD}/windows_build/Markdown-Image-Clipboard_windows_${date}.zip

pyinstaller --noconsole --onefile ./src/Markdown-Image-Clipboard.py
pyinstaller --noconsole --specpath ${PWD}/builds --distpath ${PWD}/builds/dist --workpath ${PWD}/builds/build --onefile ./src/Markdown-Image-Clipboard.py
```
### Dev log
```bash
how to interact with pushbullet api
curl --header 'Access-Token: ' \
https://api.pushbullet.com/v2/users/me

bash
PUSHBULLETAPI=""
curl --header "Access-Token: ${PUSHBULLETAPI}" https://api.pushbullet.com/v2/users/me

# how to get latest push from user (i want the image from the user)
curl --header "Access-Token: ${PUSHBULLETAPI}" https://api.pushbullet.com/v2/pushes
```
### what data im looking for
```bash
{
"accounts": [],
"blocks": [],
"channels": [],
"chats": [],
"clients": [],
"contacts": [],
"devices": [],
"grants": [],
"pushes": [
{
"active": true,
"iden": "ujwPGnFffbgsjBhE2rsE9c",
"created": 1613451908.3619251,
"modified": 1613451909.6910138,
"type": "file",
"file_name": "711VBTMInpL._SL1600_.jpg",
"file_type": "image/jpeg",
"file_url": "https://dl3.pushbulletusercontent.com/mSnwSJ89SX78Cl9igkkTAyaRXO2Qf1KC/711VBTMInpL._SL1600_.jpg",
"image_width": 1600,
"image_height": 1200,
"image_url": "https://lh3.googleusercontent.com/lYODfrKgRm9nyN0x6hw-SL583g7GnC5aR3Ybx0DmEMgVMa3A0CjC32txRMEQnTjoFHQNjVQG0OHEb1irBUkjtzjCZXT2VItv_WxSwN3V"
},
]
}

pushes[first one ]?.image_url
```
### how to connect to pushbullet websocket for realtime updates
```bash
$Env:PUSHBULLETAPI=""
python -m websockets wss://stream.pushbullet.com/websocket/$env:PUSHBULLETAPI

python -m websockets wss://stream.pushbullet.com/websocket/$env:PUSHBULLETAPI
```

# Product definition
- component
- data
- url of photo
- image data
- date
- copy to clipboard
- pull from pushbullet api image url

- Behavor
- copy photo to clipboard

-----------------
# TODO
- [ ] text box for specifying pushbullet api key
- [x] reduct build size : try change env, or create virtualenv
- [ ] auto build exe [JackMcKew/pyinstaller-action-windows-example: Example Repository for Windows PyInstaller Action](https://github.com/JackMcKew/pyinstaller-action-windows-example)
- [ ] windows github action auto-build on commit

-----------------
# Contributors

[![](https://contrib.rocks/image?repo=wisehackermonkey/markdown-image-clipboard)](https://github.com/wisehackermonkey/markdown-image-clipboard/graphs/contributors)

##### Made with [contributors-img](https://contrib.rocks).

-----------------
# License
#### MIT © wisehackermonkey
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
```bash
by oran collins
github.com/wisehackermonkey
[email protected]
______________________
```

----