Things. You need things in your life. Up to a point where those things start to own you. Your space, your mind, your time.
I like some of my things, some I simply need, and some, well, do not spark joy. I declutter mostly using three options: giving stuff away, selling and throwing away. The last is last resort option - I tend to lean toward the two first one.

As the process is usually quite a chore - you have to snap some pics, write some meaningful description, establish reasonable price, then post it in one or two different places - I thought about automating it a little bit. Seems like LLM APIs are a commodity nowadays I went with vision offered by openai - it turned out single API call with a simple prompt and few pics attached can yield some meaningful results.

Aw shiet, another weekend project it is then.

Iteration, iteration, iteration

I knew I would new need some sort of UI - I started to look into Phoenix - because why not plan with Elixir again? Framework introduced a new concepts (live view) and overall I felt extremely rusty and overwhelmed and made zero progress in an hour or so.

When quickly bootstrapped Rails just to be annoyed with the complexity of the front-end/JS world, also learning another assets pipeline tool felt like waste of time for what I was trying to achieve.

I quickly ditched whole web-app idea and decided that simple CLI would do the job. I thought that it’s a great time to play with bubbletea, but I struggled to structure maintainable multi-step so in the end I laded with Ruby again as tty-prompt covered like 99% of my needs. Ruby again it was then.

Flow

The data flow was relatively simple:

As a result I would get a json response with title, description and suggested price as a response

Getting more price data

The thing with price it that it usually will be off, so I quickly fired up mitmproxy, opened local OLX app on my phone and decoded how their search works to get some more price-related data.

As a follow-up step I prepped a new prompt which exposed a function to item search that was piggybacked on the OLX one—just to have some confirmation on the suggested price.

Posting an ad

I wanted to automate posting ad as well on two different services, but after looking what happens in the mobile OLX API I decided it will be way easier just to automate browser at this point just to fill like 90% of the form. I decided to connect with existing Chrome profile to not have to deal with constant sign-in/captchas which turned out to be more complicated than expected; thankfully someone solved this problem in this pull request; after monkey patching Ferrum I was ready to go. I appreciate that both services were nice enough to have data-testid attributes on elements I needed so scripting whole thing took minutes in the end.

Show me the money

I failed to record proper demo of this thing but I made a poor screenshot for posterity.

The answer is obviously in Polish as I'm posting it on OLX and Allegrolokalnie at the moment of writing this.

The cool thing about it in the example above is that I attached a SMART scan screenshot and told llm to read it’s technical condition (and hoped for the best).