Skip to content

akazukin5151/koneko

Repository files navigation

Note: the haskell branch is an ongoing rewrite of koneko in Haskell using Brick, to enable a more responsive, less buggy, and easier to maintain code

koneko

GPLv3 license PyPI commits since master docs status

Browse pixiv in the terminal using kitty's icat to display images (or ueberzug for all terminals)

Gallery view 1 Gallery view_square_medium1 Gallery view 2 Gallery view_square_medium2 Image view Image_view Artist search (artist profile picture on the left, 3 previews on right) artist_search View artists you're following following_users_view

For the icat, backend, the kitty terminal is needed. Alternatively, the ueberzug backend can be used in any terminal in X11 linux.

Why the name Koneko? Koneko (こねこ) means kitten, which is what icat is, a kitty +kitten

Features

See the manual for more details

  1. View artist illustrations (eg)
  2. View a post (eg)
    • View related images suggested by pixiv (eg: scroll down from the above example)
  3. View the artists that you are following (or any other user ID) (eg)
  4. Search for an artist/user (eg)
  5. View new illustrations from all the artists you are following (eg)
  6. View recommended illustrations (now called 'discovery') (eg)
  • Save images individually in full resolution (PixivUtil would be more suitable for batch download)

  • Open post in browser

  • Browse the offline cache

  • Frequently used modes and searches

Why?

  • Terminal user interfaces are minimalist, fast, and doesn't load Javascript that slows down your entire browser or track you
    • Image loading is so much faster, especially if you don't delete the cache

I get 32 trackers on Pixiv. Plus, you have to disable ublock if you ever get logged out

The mobile app even directly tells you Google "and our 198 partners" "collect and use data"! See prompt 1, prompt 2 and this list of trackers

  • TUIs make you cool
  • TUIs with embedded pictures make you even cooler
  • TUIs embedded with pictures of cute anime girls make you the coolest
  • Keyboard driven
  • Familiar, vim-like key sequences
  • I use arch btw

Installation

Requirements

  • Python 3.8+
  • icat:
    • It has been tested on kitty v0.17.2 onwards, but should work on older versions
    • Linux and macOS
  • Ueberzug: Linux with X11
  • Dependencies on external programs (your responsibility to install them):
    • xdg-mime and update-desktop-database to handle the pixiv login callback
      • For update-desktop-database, try install the desktop-file-utils package with your package manager
    • xdg-open (linux) or open (mac) for opening links in your browser
    • curl to download koneko's welcome and about images if they are missing (not needed unless if you deleted them)
If koneko crashes (it shouldn't), it might be because pip didn't 'install' the welcome pictures, *and* the program failed to download them for some reason. Try:
mkdir -p ~/.local/share/koneko/pics
   
curl -s https://raw.githubusercontent.com/akazukin5151/koneko/master/pics/71471144_p0.png -o ~/.local/share/koneko/pics/71471144_p0.png
    
curl -s https://raw.githubusercontent.com/akazukin5151/koneko/master/pics/79494300_p0.png -o ~/.local/share/koneko/pics/79494300_p0.png

Steps

See also: manual installation

  1. If not using kitty, you have to use the ueberzug backend. Follow the instructions to install ueberzug here
  2. pip install koneko (or if you use conda...)
  3. Run koneko. It will open a pixiv login page in your default browser and quit.
  4. Login to pixiv in your browser.
  5. If prompted, open the pixiv:// link with "koneko pixiv login handler".
  6. If successful you should see a notification saying "Login finished!". If not, make a bug report at https://github.com/akazukin5151/koneko/issues/
  7. Run lscat 1 8 to get the recommended settings for your screen size.
    • (Don't skip this step! Image display in the terminal is very sensitive to your settings!)
    • If you get command not found, try adding $HOME/.local/bin to your $PATH
  8. Copy the recommended settings to ~/.config/koneko/config.ini. See example_config.ini for reference
  9. If using ueberzug, add use_ueberzug = on under [experimental] in the config
  10. Run koneko again. Hopefully you don't see any error messages about login failing.
  11. See usage for how to use.

Usage and manual

See the MANUAL.md

FAQ

I'm having problems logging in

Try these steps in order:

  • If you successfully logged in, but the redirect did not work (the handler did not launch), ensure koneko-url-login is in your $PATH
    • eg, look at where it is with whereis koneko-url-login and symlink it to $HOME/.local/bin/
  • Update your system and reboot. No seriously, that's what worked for me.
  • Try a different browser
  • Set said different browser as your default browser
  • Make a bug report at https://github.com/akazukin5151/koneko/issues/ for support and debugging
  • Use the original script here to get your refresh token. Copy the example config to ~/.config/koneko, and add the line refresh_token=XXXX under the [Credentials] section.

I'm having problems with lscat

For the best experience use the terminal in full screen, unless your screen is big enough. Moving and resizing it abruptly will not be good for icat, which is really kitty's problem not mine. icat moves the cursor around, which makes it prone to creating buggy behavior when text is printed. You can disable such text with print_info = off under [misc]

Contributing

See CONTRIBUTING.rst

Trackers avoided

This is a list of trackers present when you use the official pixiv website or app. koneko frees you from them.

Nine trackers in the Android app, according to exodus:

  • Amazon Advertisement
  • AMoAd
  • Google Ads
  • Google CrashLytics
  • Google DoubleClick
  • Google Firebase Analytics
  • Integral Ad Science
  • Moat
  • Twitter MoPub

Advertisers from pixiv's privacy policy:

  • Looker
  • Repro
  • Qualaroo
  • DDAI(Date Driven Advertising Initiative)
  • YourAdChoices
  • Rubicon Project
  • i-Mobile Co., Ltd.
  • Akinasista Corporation
  • Axel Mark Inc.
  • AppLovin
  • Amazon Japan G.K.
  • AmoAd Inc.
  • AOL Platforms Japan K.K.
  • OpenX
  • Google Inc.
  • CRITEO K.K.
  • CyberAgent, Inc.
  • Geniee, Inc.
  • Supership Inc.
  • GMO AD Marketing Inc.
  • F@N Communications, Inc.
  • Facebook Inc.
  • Fluct, Inc.
  • Platform One Inc.
  • MicroAd Inc.
  • MoPub Inc.
  • Yahoo! Japan Corporation
  • United, Inc.
  • 株式会社Zucks
  • PubMatic, Inc.
  • Liftoff Mobile, Inc.
  • Mobfox US LLC
  • OneSignal
  • Smaato, Inc.
  • SMN株式会社
  • 株式会社アドインテ