An open API service indexing awesome lists of open source software.

https://github.com/aitjcize/pttxp

Ptt cross posting Bot
https://github.com/aitjcize/pttxp

Last synced: 8 months ago
JSON representation

Ptt cross posting Bot

Awesome Lists containing this project

README

          

PttXP - Ptt Posting/Scripting Utility

PttXP can post articles to a list of boards that you want to post automatically without manully interference. PttXP also provides a scripting environment so
that you can write a script to do things for you on PTT.

Macros:
1. #connect HOST
- connect to HOST
2. #login HOST,USER,PASSWD
- login to host with USER and PASSWD
3. #enter
- emulate pressing 'Enter'
4. #up
- emulate pressing 'Key Up'
5. #down
- emulate pressing 'Key Down'
6. #left
- emulate pressing 'Key Left'
7. #right
- emulate pressing 'Key Right'
8. #pagedown
- emulate pressing 'Key PageDown'
9. #pageup
- emulate pressing 'Key PageUp'
10. #home
- emulate pressing 'Key Home'
11. #end
- emulate pressing 'Key End'
12. #ctrl-KEY
- emulate pressing 'Ctrl+KEY'
13. #goboard BOARD
- go to board named BOARD
14. #postfile TITLE,FILENAME
- post a article titled TITLE, file content from FILENAME
15. #delete_header BOARD
- delete the header of the latest post in BOARD
16. #fromfile FILENAME
- Write content from file with FILENAME
17. #crosspost CP_LIMIT,DELETE_HEADER,BOARDLIST,TITLE,FILENAME
- Cross posting:
CP_LIMIT: the number of the posts that you will get caught
DELETE_HEADER: True or False, whether or not to delete post header
BOARDLIST: list of board names you want to post
TITLE: title of the article
FILENAME: file name of the content to be post
18. Any none macro characters are sent to PTT untouched

Example:
1. Login to PTT:
- The easy way:
#login ptt.cc,user,passwd

- The hard way:
#connect ptt.cc
user
#enter
passwd
#enter

2. Post an article in a board:
- The easy way:
#goboard BOARD
#postfile The is a testing article,content.txt

- The hard way:
#goboard BOARD
#ctrl-p
#enter
This is a testing article
#enter
#fromfile content.txt
#ctrl-x
s
#enter
#enter