version 1.3, 2007/08/13 15:06:38
|
version 1.6, 2007/08/14 06:13:58
|
Line 139 my $Parse = GetOptions( \%Opt,
|
Line 139 my $Parse = GetOptions( \%Opt,
|
'prop_opt_backdated|backdated|back-dated|backdate|back-date|back!', |
'prop_opt_backdated|backdated|back-dated|backdate|back-date|back!', |
'subject|subj|s=s', |
'subject|subj|s=s', |
'taglist|tags|tag|t=s' => \@opt_taglist, # Will tweak |
'taglist|tags|tag|t=s' => \@opt_taglist, # Will tweak |
|
'notaglist|notags|notag|not|no-taglist|no-tags|no-tag|no-t' => sub {undef @opt_taglist}, |
'usejournal|use-journal|use|journal|j=s', |
'usejournal|use-journal|use|journal|j=s', |
'prop_current_mood|current_mood|mood=s', |
'prop_current_mood|current_mood|mood=s', |
'prop_current_music|current_music|music=s', |
'prop_current_music|current_music|music=s', |
Line 206 if ( exists $Opt{'comments'} ) {
|
Line 207 if ( exists $Opt{'comments'} ) {
|
# with other parameters. |
# with other parameters. |
$Opt{'prop_taglist'} = join( ", ", @opt_taglist ) if ( @opt_taglist ) ; |
$Opt{'prop_taglist'} = join( ", ", @opt_taglist ) if ( @opt_taglist ) ; |
|
|
# Convert all command line options to unicode. |
# Convert $opt_ljcut_text to UTF8. |
|
if ( defined $opt_ljcut_text ) { |
|
$opt_ljcut_text = |
|
to_utf8({ -string => $opt_ljcut_text, -charset => $SystemCharset }) ; |
|
} |
|
|
|
# Convert all %Opt command line options to unicode. |
# Function href2utf8() uses a reference to input hash, so %Opt is |
# Function href2utf8() uses a reference to input hash, so %Opt is |
# being modified "in-place". |
# being modified "in-place". |
href2utf8( \%Opt, $SystemCharset) ; |
href2utf8( \%Opt, $SystemCharset) ; |
Line 522 sub post_body2href {
|
Line 529 sub post_body2href {
|
|
|
# Changed by LG - added 'tags' option. |
# Changed by LG - added 'tags' option. |
} elsif ($var =~ /^tags?$/ || $var eq "taglist") { |
} elsif ($var =~ /^tags?$/ || $var eq "taglist") { |
$req_data->{prop_taglist} = $val; |
$req_data->{prop_taglist} = $val; |
|
|
|
# Changed by LG - added 'notags' option. Empty the preceding |
|
# taglist if set to true, otherwise do nothing |
|
} elsif ($var =~ /^no-?tags?$/ || $var eq "no-?taglist") { |
|
$req_data->{prop_taglist} = "" if $val =~ /^\s*((on)|(yes))\s*$/i ; |
|
|
# Anything else - just assign. |
# Anything else - just assign. |
} else { |
} else { |
Line 598 sub post_me2req {
|
Line 610 sub post_me2req {
|
|
|
# Changed by LG - added options to add the 'From' field to the |
# Changed by LG - added options to add the 'From' field to the |
# posted message. |
# posted message. |
|
# |
|
# NOTE: $from is already in UTF8. Strictly speaking, everything |
|
# that we add to it MUST ALSO BE IN UTF8 (i.e. you need to run |
|
# a to_utf8() function on it). But since all I'm adding is in |
|
# ISO-8859-1 lower ASCII characters (which are guaranteed to |
|
# have the same values in UTF8 as in plain ISO-8859-1), I'm |
|
# cheating here and taking a shortcut. If you want to add |
|
# something non-ASCII, you MUST convert it to UTF8 first! |
|
# Be forewarned! |
if ( $opt_addfrom ) { |
if ( $opt_addfrom ) { |
$hr->{event} = "From: $from" . "\n\n" . $hr->{event} ; |
$hr->{event} = "From: $from" . "\n\n" . $hr->{event} ; |
} elsif ( $opt_addfromh ) { |
} elsif ( $opt_addfromh ) { |
Line 898 Options:
|
Line 919 Options:
|
single or double quotes to protect from the shell. Multiple |
single or double quotes to protect from the shell. Multiple |
'-t' options are allowed and taglists will be combined. |
'-t' options are allowed and taglists will be combined. |
|
|
|
--notaglist, --notags |
|
Unsets all previously defined tags. Thus, a call to |
|
$shortname ... --tags X --tags Y ... --notags --tags Z |
|
will yield a taglist consisting of just "Z". This option is |
|
rarely needed and added only for the sake of completeness. |
|
|
-d DATE, --date DATE |
-d DATE, --date DATE |
Label posting with this date. Date should be in LiveJournal's |
Label posting with this date. Date should be in LiveJournal's |
format: DD.MM.YYYY HH:mm. If absent, current date/time is used. |
format: DD.MM.YYYY HH:mm. If absent, current date/time is used. |
Line 1007 command line options), they should look
|
Line 1034 command line options), they should look
|
Security: private |
Security: private |
Subject: Rzhevskij zhiv! |
Subject: Rzhevskij zhiv! |
Tags: Junk, Viva Rzhevskij! |
Tags: Junk, Viva Rzhevskij! |
|
Notags: yes # Clears all preceding tags |
Formatted: on # Or equivalent "Autoformat: off" |
Formatted: on # Or equivalent "Autoformat: off" |
Usejournal: gusary |
Usejournal: gusary |
Mood: okay |
Mood: okay |