CLI to plan your travels in the Västra Götaland region with Västtrafik.
Find a file
2024-09-30 00:07:26 +02:00
.github Run mypy in github 2021-10-20 19:05:44 +02:00
completion Fix completion 2024-09-29 23:37:09 +02:00
conf New API key 2024-01-25 13:50:08 +01:00
debian Fix packaging for the new binary name 2024-09-30 00:06:44 +02:00
man Update manpages for the new name for trip 2024-09-29 23:35:00 +02:00
vasttrafik Change the name of the command 2024-09-30 00:07:26 +02:00
.gitignore Leave the token alone 2023-09-17 19:04:42 +02:00
CHANGELOG CHANGELOG 2024-09-29 23:35:31 +02:00
COPYING readme and license 2012-11-04 17:27:29 +01:00
Makefile Switch to pybuild 2023-09-17 20:13:02 +02:00
mypy.conf Bump minimum python version in mypy 2024-01-25 22:05:20 +01:00
README.md Fix readme 2024-09-30 00:07:07 +02:00
requirements.txt Drop unused requirement from requirements.txt 2023-09-18 20:29:45 +02:00
screenshot.png More current screenshot 2022-01-26 23:26:12 +01:00
setup.py Change the name of the command 2024-09-30 00:07:26 +02:00

vasttrafik-cli

python API for Göteborg Västtrafik public API

The project provides a python module to access the Västtrafik public API and two command line tools: trip and stops. I think the names are self explaining.

Västtrafik is the public transport company in the county of Västra Götaland, Sweden.

ScreenShot

Donations

How to install

sudo apt install vasttrafik-cli

For Debian challenged people: pip install vasttrafik-cli

How to use

Non interactive mode

resaplan skf almedal

stops brunnsparken

Interactive mode

resaplan

stops

Suggestions

Suggestions for improvements are welcome only if they come together with a patch.

Emoji in the terminal

My terminal was not able to display emoji, and would not show the vehicle icon.

There is a workaround for that here:

https://forums.debian.net/viewtopic.php?t=149181

mkdir -p ~/.config/fontconfig/conf.d

echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

  <match target="font">
    <test name="family" compare="eq">
      <string>Noto Serif</string>
    </test>
    <edit name="family" mode="assign_replace">
      <string>Noto Serif Display</string>
    </edit>
    <edit name="family" mode="append_last">
      <string>serif</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>serif</string>
    </test>
    <edit name="family" mode="prepend_first">
      <string>Noto Color Emoji</string>
    </edit>
    <edit name="family" mode="prepend_first">
      <string>Noto Serif Display</string>
    </edit>
  </match>

  <match target="font">
    <test name="family" compare="eq">
      <string>Noto Sans</string>
    </test>
    <edit name="family" mode="assign_replace">
      <string>Noto Sans Display</string>
    </edit>
    <edit name="family" mode="append_last">
      <string>sans-serif</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>sans-serif</string>
    </test>
    <edit name="family" mode="prepend_first">
      <string>Noto Color Emoji</string>
    </edit>
    <edit name="family" mode="prepend_first">
      <string>Noto Sans Display</string>
    </edit>
  </match>

  <match target="font">
    <test name="family" compare="eq">
      <string>Noto Sans Mono</string>
    </test>
    <edit name="family" mode="assign_replace">
      <string>Noto Sans Mono</string>
    </edit>
    <edit name="family" mode="append_last">
      <string>monospace</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>monospace</string>
    </test>
    <edit name="family" mode="prepend_first">
      <string>Noto Color Emoji</string>
    </edit>
    <edit name="family" mode="prepend_first">
      <string>Noto Sans Mono</string>
    </edit>
  </match>

  <alias binding="strong">
    <family>emoji</family>
    <default>
      <family>Noto Color Emoji</family>
    </default>
  </alias>
</fontconfig>' > ~/.config/fontconfig/conf.d/56-nono.conf

Restart your terminal and if the emoji font is installed you should be able to see the emojis in the terminal.