Skip to content

Commit

Permalink
chore: 🤖 v 0.2.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaddeusJiang committed Oct 23, 2024
1 parent 45cd19a commit c04fbdb
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 11 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Save it

A telegram bot who save what you love in internet.
A telegram bot can Save photos and Search photos

- [x] Save photos via a link
- [x] Search photos using semantic search
- [x] Find similar photos by photo

## supported services

Expand All @@ -11,10 +15,30 @@ A telegram bot who save what you love in internet.

## Usage

### Save Photos

Just send the link to the bot.

https://github.com/user-attachments/assets/4a375cab-7124-44f3-994e-0cb026476d39

### Search Photos

messages:

```
/search cat
/search dog
/search girl
/similar photo
/similar photo
```

https://github.com/user-attachments/assets/b0dedcc0-3305-42b2-8101-6b0b5d32f17a

## Playground

https://t.me/save_it_playground
Expand All @@ -24,6 +48,7 @@ https://t.me/save_it_playground
- [Elixir](https://elixir-lang.org/)
- [ex_gram](https://github.com/rockneurotiko/ex_gram)
- [cobalt api](https://github.com/imputnet/cobalt/blob/current/docs/api.md)
- [Typesense](https://typesense.org/)

## Development

Expand All @@ -35,8 +60,8 @@ mix deps.get
```sh
# run
export TELEGRAM_BOT_TOKEN=
# export GOOGLE_OAUTH_CLIENT_ID=
# export GOOGLE_OAUTH_CLIENT_SECRET=
export TYPESENSE_URL=
export TYPESENSE_API_KEY=

iex -S mix run --no-halt
```
7 changes: 4 additions & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import Config
config :save_it, :telegram_bot_token, System.get_env("TELEGRAM_BOT_TOKEN")
config :ex_gram, token: System.get_env("TELEGRAM_BOT_TOKEN")

config :save_it, :google_oauth_client_id, System.get_env("GOOGLE_OAUTH_CLIENT_ID")
config :save_it, :google_oauth_client_secret, System.get_env("GOOGLE_OAUTH_CLIENT_SECRET")

config :save_it, :typesense_url, System.get_env("TYPESENSE_URL", "http://localhost:8100")
config :save_it, :typesense_api_key, System.get_env("TYPESENSE_API_KEY", "xyz")

# optional
config :save_it, :google_oauth_client_id, System.get_env("GOOGLE_OAUTH_CLIENT_ID")
config :save_it, :google_oauth_client_secret, System.get_env("GOOGLE_OAUTH_CLIENT_SECRET")

config :save_it, :web_url, System.get_env("WEB_URL", "http://localhost:4000")
3 changes: 3 additions & 0 deletions lib/save_it.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule SaveIt do
@moduledoc false

@doc false
def hello do
:world
end
Expand Down
2 changes: 1 addition & 1 deletion lib/save_it/bot.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ defmodule SaveIt.Bot do
setup_commands: true

command("start")
command("similar", description: "Find similar photos")
command("search", description: "Search photos")
command("similar", description: "Find similar photos")
command("about", description: "About the bot")

command("login", description: "Login")
Expand Down
9 changes: 5 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ defmodule SaveIt.MixProject do
def project do
[
app: :save_it,
version: "0.1.0",
deps: deps(),
start_permanent: Mix.env() == :prod
version: "0.2.0-rc.1",
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end

# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
extra_applications: [:logger, :crypto, ex_unit: :optional],
mod: {SaveIt.Application, []}
]
end
Expand Down

0 comments on commit c04fbdb

Please sign in to comment.