hodgesmr / mastodon_digest

A Python script that aggregates recent popular posts from your Mastodon timeline
BSD 3-Clause "New" or "Revised" License
439 stars 58 forks source link

Local setup not working on windows #13

Open cloo opened 1 year ago

cloo commented 1 year ago

Following local setup instructions multiple steps are failing. In case it is too complex to adapt for Windows, please consider indicating that local instructions are linux-only.

221218-205442 221218-205651

hodgesmr commented 1 year ago

Added a note! https://github.com/hodgesmr/mastodon_digest/commit/7eac3104fa454a9fb86b81b8d5487192369b2454

severak commented 1 year ago

It's possible to install it on Windows, but you need to came up with different route how to run it.

I have Python3.8 installed on my machine (using py executable).

C:\Users\Spravce>py --version
Python 3.8.5

Then I cloned this repository from git and installed dependencies using py -m pip install -r requirements.txt.

Then I created batch file login.bat with content similar to this:

SET MASTODON_TOKEN=your-mastodon-token
SET MASTODON_BASE_URL=your-instance.example.org
SET MASTODON_USERNAME=your-username

This is substitute to .env as in windows command line variables are somewhat different.

Then I first run login.bat and then py -3 run.py. After this my disgest is rendered into render directory, so I cd render into it and then run HTTP server (using php -S localhost:80, but you can use whatever you want).

This is not some recommended method but it works for me on my Windows 7 machine.