Skip to content

Commit

Permalink
update: move from fastapi to http.server
Browse files Browse the repository at this point in the history
  • Loading branch information
Rooyca committed Aug 23, 2023
1 parent f962236 commit e583060
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Create and publish a Docker image
name: Docker image

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Ronald Cantillo
Copyright (c) 2023 Ronald Cantillo <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
54 changes: 29 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# **MarkOb - Obsidian Highligter**
# **markob** - Web Highlighter for Obsidian

[![Docker image](https://github.com/Rooyca/markob/actions/workflows/deploy-image.yml/badge.svg?branch=main)](https://github.com/Rooyca/markob/actions/workflows/deploy-image.yml)

Highlight your text and send it to your Obsidian vault. It automatically creates you a file with the name of the page.

While reading your favorite articles you can highlight your texts and send them to your Obsidian vault and it will automatically create a file with the name of the page. Saving what interests you has never been easier*.

![highlighter](highlighter_obsidian.png)

Expand Down Expand Up @@ -30,14 +32,6 @@ Highlight your text and send it to your Obsidian vault. It automatically creates
| -------- | ----------- | ------- |
| `OBSIDIAN_PATH` | Path to your Obsidian vault | `/code/obsi/` |

#### Binary

Download the latest binary from the [release page](https://github.com/Rooyca/MarkOb-Obsidian-Highligter/releases/download/0.0.1/markob), make it executable and run it.

```bash
chmod +x markob
./markob
```

#### Docker

Expand Down Expand Up @@ -75,7 +69,16 @@ docker build -t markob .
docker run -d -v /home/rooyca/Documents/Obsidian/Highlights/:/code/obsi -p 8888:8888 markob
```

#### Python
#### Binary

Download the latest binary from the [release page](https://github.com/Rooyca/markob/releases/download/0.0.1/markob), make it executable and run it.

```bash
chmod +x markob
./markob
```

#### Python (FastAPI Version)

1. Clone the repo

Expand All @@ -92,10 +95,22 @@ pip install -r requirements.txt
3. Run the api

```bash
uvicorn server:app --bind 8888
uvicorn server/server.old:app --bind 8888
```

4. Go to your page and start highlighting 😊.
#### Python (http.server Version)

1. Clone the repo

```bash
git clone https://github.com/Rooyca/MarkOb
```

2. Run the server

```bash
python server/server.py
```

---

Expand All @@ -116,15 +131,4 @@ You can also use the keyboard shortcuts:

## Contributing

All contributions are welcome! If you find a bug or have a suggestion please open an issue. If you want to contribute code please open a pull request.











All contributions are welcome! If you find a bug or have a suggestion please open an issue. If you want to contribute code please open a pull request.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fastapi>=0.90.0
pydantic>=1.8.0,<2.0.0
uvicorn>=0.20.0

0 comments on commit e583060

Please sign in to comment.