# HG changeset patch # User igor@chub.in # Date 1295618385 -7200 # Node ID be6336e98b3c34bb8b165103cdde16d12a00f934 # Parent f95804355b0f0d8019544f9e6601c8d28004d9ca new-words.py started diff -r f95804355b0f -r be6336e98b3c new-words.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/new-words.py Fri Jan 21 15:59:45 2011 +0200 @@ -0,0 +1,130 @@ +#!/usr/bin/env python + +import optparse + +parser = optparse.OptionParser() + +parser.add_option( + "-a", "--no-marks", + help="don't add marks (and don't save marks added by user)", + action="store_true", + dest="no_marks") + +parser.add_option( + "-c", "--compressed", + help="show compressed wordlist: one word per group", + action="store_true", + dest="compressed") + +parser.add_option( + "-k", "--known-words", + help="put higher words that are similar to the known words (only for English)", + action="store_true", + dest="compressed") + +parser.add_option( + "-l", "--language", + help="specify language of text", + action="store", + dest="language") + +parser.add_option( + "-m", "--merge-tag", + help="merge words tagged with specified tag into the main vocabulary", + action="store", + dest="merge_tag") + +parser.add_option( + "-M", "--merge-tagged", + help="merge words tagged with ANY tag into the main vocabulary", + action="store_true", + dest="merge_tagged") + +parser.add_option( + "-n", "--non-interactive", + help="non-interactive mode (don't run vi)", + action="store_true", + dest="non_interactive") + +parser.add_option( + "-N", "--no-filter", + help="switch off known words filtering", + action="store_true", + dest="no_filter") + +parser.add_option( + "-p", "--pages", + help="work with specified pages only (pages = start-stop/total )", + action="store", + dest="pages") + +parser.add_option( + "-r", "--remove-tag", + help="remove subvocabulary of specified tag", + action="store", + dest="remove_tag") + +parser.add_option( + "-s", "--text-stats", + help="show the text statistics (percentage of known words and so on) and exit", + action="store_true", + dest="text_stats") + +parser.add_option( + "-S", "--voc-stats", + help="show your vocabulary statistics (number of words and word groups)", + action="store_true", + dest="voc_stats") + +parser.add_option( + "-t", "--tag", + help="tag known words with tag", + action="store", + dest="tag") + +parser.add_option( + "-T", "--show-tags", + help="tag known words with tag", + action="store_true", + dest="show_tags") + +parser.add_option( + "-2", "--two-words", + help="find 2 words' sequences", + action="store_true", + dest="two_words") + +parser.add_option( + "-3", "--three-words", + help="find 3 words' sequences", + action="store_true", + dest="three_words") + +(options, args) = parser.parse_args() + +def get_words(): + pass + +def add_stat(): + pass + +def two_and_three_words(): + pass + +def grep_v_english(): + pass + +def group_words(): + pass + +def add_marks(): + pass + +def remove_marks(): + pass + +def text_from_url(): + pass + +def part(): + pass