Easy image controller for obsidian. Change internal file links to externa
Project description
obs3dian
Easy image controller for obsidian. Change internal file links to external S3 links. Obs3dian converts local image file path to external url by uploading file in S3.
obs3dian converts image link text to external link.

will change to

obs3dian allows alt option or size options like
![[test.jpeg|500]]

and it also can converts image links used in obsidain
![[test.jpg|500]]
Installation
$ pip install obs3dian
Requirements
- python > 3.10
- AWS accounts with permissions to
- create bucket
- put image
- set bucket public
Commands
$ obs3dian config
Config file is not founded... Input your configuration
AWS Profile Name [your aws profile]:
S3 bucket Name [your bucket name]:
Output Path [your ouput path]:
Image Folder Path [your local image folder path]:
$ obs3dian apply
Connected to AWS S3
Bucket obs3dian is created
Create Output Folder in ./ouput
$ obs3dian run [your mark down path (file or directory)]
Processing [############################--------] 78%
Finished [README.md]
Processing [#############################-------] 82%
Finished [CONTRIBUTING.md]
Processing [###############################-----] 86%
Finished [LINKS.md]
Processing [################################----] 91%
Finished [SUPPORTED_PLATFORMS.md]
Processing [##################################--] 95%
Finished [ISSUE_TEMPLATE.md]
Processing [####################################] 100%
Total converts: 23 obs3dian is successfully finished
run command got options
--overwritewill overwrites all markdown files and not create output files under output folder.--usekeyforces obs3dian to use access key when connects to S3. In default obs3dian using CLI profile in connection.
You can get more info by --help option
$ obs3dian --help
$ obs3dian run --help
$ obs3dian apply --help
How it works
obs3dianreads config data to set enviroment- It creates S3 public read bucket by your aws account info
- It creates output folder
obs3dianreads markdown files in given path- It also reads all .md files under subdir
obs3dianextracts all image names used in markdown and finds matching paths with names from given image folder- upload mathced images
- Replace local image links to S3 external links
Info
obs3dianconverts all *.md files under input path.- If given path is dir then dir/.md, dir/subdir/.md is all converted.
- Created Bucket is public read.
runcommand automatically executes apply before runobs3dianuses AWS CLI profile first. If you want to use access key pleas give--usekeywhen run.- obs3dian only supports
.png, .jpg, .jpeg, .giftype images.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file obs3dian-0.3.1.tar.gz.
File metadata
- Download URL: obs3dian-0.3.1.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701353a28cdc4b52b71010fd5a176aee55f0d9f6b625a44ed81345b8a5999291
|
|
| MD5 |
cbc86c082d129aad1f989fd3c032a4e9
|
|
| BLAKE2b-256 |
08c4fb9013db8a682c6ad6eedb4b1803e72f06e24cdc476c34442c79a13d46c4
|
File details
Details for the file obs3dian-0.3.1-py3-none-any.whl.
File metadata
- Download URL: obs3dian-0.3.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9a2eb15a0b0d94e35a5be35124cf0b64eea56b355d8355b37360015bea206ea
|
|
| MD5 |
e702b6ccbce50aa11d6f497b2e8bcfd7
|
|
| BLAKE2b-256 |
2851c90d0e5ea3e5a7263f19d5db3dd8da1e2455932c634a391072a388d4b02e
|