aboutsummaryrefslogtreecommitdiff

insta.alifeee.net

https://insta.alifeee.net

Instagram web mirror, using exported data (thanks GDPR) and memento mori Python tool.

Read more about Instagram+indieweb on https://indieweb.org/Instagram

grab instagram export

export your Instagram data on this page: https://accountscenter.instagram.com/info_and_permissions/dyi/

use these settings: export to device once; all available information; all time; JSON; whatever photo quality.

screenshot of export form, showing settings

The export takes (approx) 10 minutes for Instagram to create, when you'll get an email with a download link.

build

# clone (this repo)
git clone git@git.alifeee.net:alifeee/insta.alifeee.net
cd insta.alifeee.net
git submodule update --init

# install
(
  cd memento-mori
  python3 -m venv venv
  . venv/bin/activate
  pip install -e .
)

# find export
files=$(
  find ~/Downloads -type d -name "instagram-*" | sort -R
  find ~/Downloads -name "instagram-*.zip" | sort -R
)
file=$(echo "${files}" | head -n1)
[[ "${file}" == "" ]] && echo 'no file found !!' || echo "using ${file}"

# build
backdate=$(date --date="-1 year" '+%Y-%m-%d')
echo "only adding posts newer than ${backdate}"
rm -rf memento-mori/output/
(
  cd memento-mori
  . venv/bin/activate
  py -m memento_mori.cli \
    --page-title="alifeee's instagram" \
    --no-output-stories \
    --base-url="https://insta.alifeee.net/" \
    --posts-newer-than  "${backdate}" \
    --custom-css ../custom.css \
    --extra-bio-file ../extra.html \
    --input "${file}"
)
cat memento-mori/output/index.html \
  | sed 's+ with <a href="https://github.com/greg-randall/memento-mori">Memento Mori</a>.+ · <a href="https://git.alifeee.net/insta.alifeee.net/about/">source</a> · <a href="feed.xml">feed</a>+' \
  | sponge memento-mori/output/index.html
cp hockey.ttf memento-mori/output/

# preview
python -m http.server -d memento-mori/output 8080

# upload to server
ssh server "rm -rfv /var/www/insta.alifeee.net/*"
rsync -rv memento-mori/output/* server:/var/www/insta.alifeee.net/
rsync -rv hockey.ttf server:/var/www/insta.alifeee.net/
firefox https://insta.alifeee.net

# patch CSS
nano custom.css
scp custom.css server:/var/www/insta.alifeee.net/css/