Skip to content

Latest commit

 

History

History
202 lines (141 loc) · 4.73 KB

README.md

File metadata and controls

202 lines (141 loc) · 4.73 KB

Nofan

CLI for Fanfou

Nofan

Features

  • Fetch home-timeline
  • Fetch public-timeline
  • Fetch mentions-timeline
  • Fetch context-timeline
  • Fetch self-timeline
  • Fetch user-timeline
  • Fetch trends-timeline
  • Fetch status item
  • Search statuses
  • Post statuses
  • Post photos
  • Reply status
  • Repost status
  • Multiple account login
  • HTTPS secure connection
  • Customizable timeline
  • Customizable color themes
  • Customizable GET/POST request

Install

npm i -g nofan

Login

nofan login

Usage

Commands

nofan -h                     # Show help
nofan config                 # Config nofan
nofan colors                 # Customize color style
nofan login                  # Login fanfou account
nofan logout                 # Logout current account
nofan switch                 # Switch fanfou account
nofan                        # Fetch home timeline
nofan home|h                 # Fetch home timeline
nofan mentions|m             # Fetch mentions timeline
nofan me                     # Fetch self timeline
nofan public|p               # Fetch public timeline
nofan context|cont           # Fetch context timeline
nofan trends|tr              # Fetch trends timeline
nofan search|se <query>      # Search public timeline
nofan user <id>              # Fetch user timeline
nofan show <id>              # Fetch status item
nofan reply|re <id> [text]   # Reply status
nofan repost|rt <id> [text]  # Repost status
nofan undo                   # Delete last status
nofan <text> [more...]       # Post status
nofan get <uri>              # Create GET request
nofan post <uri>             # Create POST request

Tips

Color Scheme

Use nofan colors to customize your color scheme.

Format

Use dot . to separeate multiple styles.

Here is valid styles list.

Example

> #ff99cc
> bold.#ff0000
> pink.underline
> cyanBright
> orange.inverse.underline
> bgYellow.black

Photos Posting

Nofan support post a photo from a local path or clipboard:

Use -p or --photo to post photo from local path

nofan unicorn -p ~/Desktop/heart.png

Use -c or --clipboard to post photo from clipboard (only support macOS, Windows and WSL)

nofan hi my love -c

Verbose Mode

Now we have a verbose mode for the timeline.

image

Reply & Repost

You could do a quick action by use reply and repost command:

Use re or reply to reply

nofan re _5gqZTpjAlM hi litomore

Use rt or repost to repost

nofan rt _5gqZTpjAlM hi litomore

API Parameter Flags

Nofan is very easy to use, but also very powerful. You could pass to API parameters as flags to the CLI.

Fetch home-timeline with pagination

nofan --page=2

Search statuses with specific page size

nofan search unicron --count=60

Customizable GET/POST Request

Use nofan get or nofan post to make a GET/POST request:

Make a GET request

nofan get account/notification

Make a GET request with parameters

nofan get statuses/home_timeline --mode=lite

Make a POST request with parameters

nofan post statuses/update --status=hi

Specify a console type

You could specify a console type for output, default is console.log:

nofan get account/notification --console-type=table

REPL

You could use --repl option to inspect the result in REPL:

nofan get users/show --id=litomore --repl

#=> result.name
#=> 'LitoMore' 

Related

License

MIT