Browse Source

Fixed #42

master
Abrax 3 years ago
parent
commit
211df1fa63
2 changed files with 22 additions and 14 deletions
  1. 3
    1
      README.md
  2. 19
    13
      lizard/__init__.py

+ 3
- 1
README.md View File

@@ -21,7 +21,9 @@ This version changes syntax for some commands:
* `lizard r` does conservative refresh
* Refresh all threads: `lizard ra` instead of `lizard r`
* Changed packaging system: Now building wheels which are compatible with `pip`
* Basic Tor support: `lizard to` will open the threads using the onion domain.
* Basic Tor support:
* `lizard to` will open the threads using the onion domain.
* `lizard tor` will also open the CAPTCHA page

### 0.2 (current)
* Help message now shows version. (issue #24)

+ 19
- 13
lizard/__init__.py View File

@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import sys
import webbrowser

import pkg_resources

@@ -25,22 +26,23 @@ def help_info():
Usage: lizard [command] [options]

Available commands:
l - Lists all threads in database. Legend: ! - new replies, x - 404'd, Y - >(You).
r - Refresh threads which are likely to receive new replies (to reduce unnecessary network activity).
ra - Refresh all threads and update database.
rl - Conservative refresh and list threads.
ro - Conservative refresh and open threads with new replies in browsed.
o - Open threads with new replies in the default browser. Will also update the "new replies"
l - Lists all threads in database. Legend: ! - new replies, x - 404'd, Y - >(You).
r - Refresh threads which are likely to receive new replies (to reduce unnecessary network activity).
ra - Refresh all threads and update database.
rl - Conservative refresh and list threads.
ro - Conservative refresh and open threads with new replies in browsed.
o - Open threads with new replies in the default browser. Will also update the "new replies"
field accordingly.
oa - Open all threads.
to - Open threads with new replies, using the onion URL. Use this if you are using Tor.
p - Purge (remove) 404'd threads from database.
b - Backup current database.
e - Export list of threads. This will create a list of lizard add commands for all threads currently in the
oa - Open all threads.
to - Open threads with new replies, using the onion URL. Use this if you are using Tor.
tor - Same as to but also opens the Tor CAPTCHA page for convenience.
p - Purge (remove) 404'd threads from database.
b - Backup current database.
e - Export list of threads. This will create a list of lizard add commands for all threads currently in the
database. Useful for migrating between database versions.
a - Add thread to database. Requires option (URL of the thread). Will also attempt to download
a - Add thread to database. Requires option (URL of the thread). Will also attempt to download
the thread.
d - Remove all instances of a thread (board & number) from the database.
d - Remove all instances of a thread (board & number) from the database.
Example: "lizard d b 123" will remove thread >>>/b/123
create - Create new database.
""".format(version))
@@ -78,6 +80,10 @@ def main():
elif command == 'to':
db_methods.check_database()
db_methods.open_threads(only_threads_with_new_replies=True, use_onion_link=True)
elif command == 'tor':
db_methods.check_database()
db_methods.open_threads(only_threads_with_new_replies=True, use_onion_link=True)
webbrowser.open('http://oxwugzccvk3dk6tj.onion/dnsbls_bypass.php')
elif command == 'p':
db_methods.check_database()
db_methods.remove_404_threads()

Loading…
Cancel
Save