Skip to content
/ pyxis Public

Pyxis is a simple twtxt client

License

Notifications You must be signed in to change notification settings

andinus/pyxis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

                               ━━━━━━━━━
                                 PYXIS

                                Andinus
                               ━━━━━━━━━


Table of Contents
─────────────────

1 Demo
.. 1.1 Screenshots
2 Documentation
.. 2.1 Commands
.. 2.2 Examples
.. 2.3 Configuration
3 Installation
.. 3.1 Dependencies


Pyxis is a simple twtxt client.

[twtxt] is a decentralised, minimalist microblogging service for
hackers.

• Website: [https://andinus.nand.sh/pyxis]
• Source: [https://git.tilde.institute/andinus/pyxis]
• Mirror: [https://github.com/andinus/pyxis]


[twtxt] https://github.com/buckket/twtxt


1 Demo
══════

1.1 Screenshots
───────────────

  • timeline [2020-08-30 Sun]
  [https://andinus.nand.sh/static/pyxis/2020-08-30_timeline.png]


2 Documentation
═══════════════

  The feeds are saved in `$XDG_DATA_HOME/pyxis', if it's not defined
  then `$HOME/.local/share/pyxis' is used. Feeds are configured in
  `$XDG_CONFIG_HOME/pyxis.pl' or `$HOME/.config/pyxis.pl'.


2.1 Commands
────────────

2.1.1 fetch
╌╌╌╌╌╌╌╌╌╌╌

  fetch will fetch all the latest feeds from config file. You can use
  Pyxis without this feature by fetching the files yourself manually to
  data directory.


2.1.2 timeline
╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  timeline will print your timeline from all the feeds. You can also
  pass an optional argument to load custom feeds.

  For example, you can pass multiple feeds like `pyxis timeline f1 f2',
  it'll load both `f1' & `f2'. If you pass an invalid feed then it
  prints a warning & goes to the next one.


2.2 Examples
────────────

  ┌────
  │ pyxis fetch # fetch all feeds
  │
  │ # dispay emacs & perl feeds (if available)
  │ pyxis timeline emacs perl
  │
  │ pyxis timeline # display all feeds
  └────


2.3 Configuration
─────────────────

  There is an example config file under `share/config.pl', move it to
  config directory & rename to `pyxis.pl'.

  ┌────
  │ cp share/config.pl $HOME/.config/pyxis.pl
  └────

  *Warning*: Pyxis will evaluate the configuration file, which means an
  attacker can use it to run malicious code.

  *Note*: They could always add malicious code to `.profile' & do harm.
  Just thought I should put the warning.

  ┌────
  │ #!/usr/bin/perl
  │
  │ use strict;
  │ use warnings;
  │
  │ my %feeds = (
  │     andinus => "https://andinus.nand.sh/static/twtxt",
  │ );
  │
  │ sub get_feeds { return %feeds; }
  │
  │ 1;
  └────

  Add your feeds to `%feeds' hash like shown above. You can remove those
  2 `use' lines but it's good if you keep them.


3 Installation
══════════════

  Install these dependencies from CPAN. Then just clone the repository,
  copy the config & run pyxis!


3.1 Dependencies
────────────────

  • Getopt::Long is required only for options.
  • [HTTP::Tiny] is only required if you use `fetch'.
  • Path::Tiny can be replaced with perl core.
  • Term::ANSIColor is just for good looks.
  • Time::Moment can be replaced with DateTime or you can just `sort' it
    directly. Sorting directly will mess up the order a bit but should
    be okay for most cases.