diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-18 14:09:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-18 14:09:55 +0000 |
commit | 200aaa0dd6813f19eb7ed67a0fdc301d091fc2d7 (patch) | |
tree | f89388586fbf00a3b7c985b2b28bb74abda3a364 /src/fs/gnunet-publish.c | |
parent | 640ae593fd34d27034f994a2e945a8942f1a4d5d (diff) | |
download | gnunet-200aaa0dd6813f19eb7ed67a0fdc301d091fc2d7.tar.gz gnunet-200aaa0dd6813f19eb7ed67a0fdc301d091fc2d7.zip |
localization
of scopes
Diffstat (limited to 'src/fs/gnunet-publish.c')
-rw-r--r-- | src/fs/gnunet-publish.c | 121 |
1 files changed, 59 insertions, 62 deletions
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 8313c2467..18c4fd78e 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -524,7 +524,7 @@ run (void *cls, | |||
524 | &ex)) | 524 | &ex)) |
525 | { | 525 | { |
526 | if (strlen (ex) > 0) | 526 | if (strlen (ex) > 0) |
527 | l = EXTRACTOR_plugin_add_config (l, ex, EXTRACTOR_OPTION_DEFAULT_POLICY); | 527 | plugins = EXTRACTOR_plugin_add_config (plugins, ex, EXTRACTOR_OPTION_DEFAULT_POLICY); |
528 | GNUNET_free (ex); | 528 | GNUNET_free (ex); |
529 | } | 529 | } |
530 | } | 530 | } |
@@ -555,7 +555,7 @@ run (void *cls, | |||
555 | meta = GNUNET_CONTAINER_meta_data_create (); | 555 | meta = GNUNET_CONTAINER_meta_data_create (); |
556 | GNUNET_FS_meta_data_extract_from_file (meta, | 556 | GNUNET_FS_meta_data_extract_from_file (meta, |
557 | args[0], | 557 | args[0], |
558 | l); | 558 | plugins); |
559 | fi = GNUNET_FS_file_information_create_from_file (ctx, | 559 | fi = GNUNET_FS_file_information_create_from_file (ctx, |
560 | NULL, | 560 | NULL, |
561 | args[0], | 561 | args[0], |
@@ -615,66 +615,6 @@ run (void *cls, | |||
615 | } | 615 | } |
616 | 616 | ||
617 | 617 | ||
618 | /** | ||
619 | * gnunet-publish command line options | ||
620 | */ | ||
621 | static struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
622 | {'a', "anonymity", "LEVEL", | ||
623 | gettext_noop ("set the desired LEVEL of sender-anonymity"), | ||
624 | 1, &GNUNET_GETOPT_set_uint, &anonymity}, | ||
625 | {'d', "disable-creation-time", NULL, | ||
626 | gettext_noop | ||
627 | ("disable adding the creation time to the metadata of the uploaded file"), | ||
628 | 0, &GNUNET_GETOPT_set_one, &do_disable_creation_time}, | ||
629 | {'D', "disable-extractor", NULL, | ||
630 | gettext_noop | ||
631 | ("do not use libextractor to add keywords or metadata"), | ||
632 | 0, &GNUNET_GETOPT_set_one, &disable_extractor}, | ||
633 | {'e', "extract", NULL, | ||
634 | gettext_noop | ||
635 | ("print list of extracted keywords that would be used, but do not perform upload"), | ||
636 | 0, &GNUNET_GETOPT_set_one, &extract_only}, | ||
637 | {'k', "key", "KEYWORD", | ||
638 | gettext_noop | ||
639 | ("add an additional keyword for the top-level file or directory" | ||
640 | " (this option can be specified multiple times)"), | ||
641 | 1, &GNUNET_FS_getopt_set_keywords, &topKeywords}, | ||
642 | {'m', "meta", "TYPE:VALUE", | ||
643 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), | ||
644 | 1, &GNUNET_FS_getopt_set_metadata, &meta}, | ||
645 | {'n', "noindex", NULL, | ||
646 | gettext_noop ("do not index, perform full insertion (stores entire " | ||
647 | "file in encrypted form in GNUnet database)"), | ||
648 | 0, &GNUNET_GETOPT_set_one, &do_insert}, | ||
649 | {'N', "next", "ID", | ||
650 | gettext_noop | ||
651 | ("specify ID of an updated version to be published in the future" | ||
652 | " (for namespace insertions only)"), | ||
653 | 1, &GNUNET_GETOPT_set_string, &next_id}, | ||
654 | {'p', "priority", "PRIORITY", | ||
655 | gettext_noop ("specify the priority of the content"), | ||
656 | 1, &GNUNET_GETOPT_set_uint, &priority}, | ||
657 | {'P', "pseudonym", "NAME", | ||
658 | gettext_noop | ||
659 | ("publish the files under the pseudonym NAME (place file into namespace)"), | ||
660 | 1, &GNUNET_GETOPT_set_string, &pseudonym}, | ||
661 | {'s', "simulate-only", NULL, | ||
662 | gettext_noop ("only simulate the process but do not do any " | ||
663 | "actual publishing (useful to compute URIs)"), | ||
664 | 0, &GNUNET_GETOPT_set_one, &do_simulate}, | ||
665 | {'t', "this", "ID", | ||
666 | gettext_noop ("set the ID of this version of the publication" | ||
667 | " (for namespace insertions only)"), | ||
668 | 1, &GNUNET_GETOPT_set_string, &this_id}, | ||
669 | {'u', "uri", "URI", | ||
670 | gettext_noop ("URI to be published (can be used instead of passing a " | ||
671 | "file to add keywords to the file with the respective URI)"), | ||
672 | 1, &GNUNET_GETOPT_set_string, &uri_string}, | ||
673 | {'V', "verbose", NULL, | ||
674 | gettext_noop ("be verbose (print progress information)"), | ||
675 | 0, &GNUNET_GETOPT_set_one, &verbose}, | ||
676 | GNUNET_GETOPT_OPTION_END | ||
677 | }; | ||
678 | 618 | ||
679 | 619 | ||
680 | /** | 620 | /** |
@@ -687,6 +627,63 @@ static struct GNUNET_GETOPT_CommandLineOption options[] = { | |||
687 | int | 627 | int |
688 | main (int argc, char *const *argv) | 628 | main (int argc, char *const *argv) |
689 | { | 629 | { |
630 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
631 | {'a', "anonymity", "LEVEL", | ||
632 | gettext_noop ("set the desired LEVEL of sender-anonymity"), | ||
633 | 1, &GNUNET_GETOPT_set_uint, &anonymity}, | ||
634 | {'d', "disable-creation-time", NULL, | ||
635 | gettext_noop | ||
636 | ("disable adding the creation time to the metadata of the uploaded file"), | ||
637 | 0, &GNUNET_GETOPT_set_one, &do_disable_creation_time}, | ||
638 | {'D', "disable-extractor", NULL, | ||
639 | gettext_noop | ||
640 | ("do not use libextractor to add keywords or metadata"), | ||
641 | 0, &GNUNET_GETOPT_set_one, &disable_extractor}, | ||
642 | {'e', "extract", NULL, | ||
643 | gettext_noop | ||
644 | ("print list of extracted keywords that would be used, but do not perform upload"), | ||
645 | 0, &GNUNET_GETOPT_set_one, &extract_only}, | ||
646 | {'k', "key", "KEYWORD", | ||
647 | gettext_noop | ||
648 | ("add an additional keyword for the top-level file or directory" | ||
649 | " (this option can be specified multiple times)"), | ||
650 | 1, &GNUNET_FS_getopt_set_keywords, &topKeywords}, | ||
651 | {'m', "meta", "TYPE:VALUE", | ||
652 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), | ||
653 | 1, &GNUNET_FS_getopt_set_metadata, &meta}, | ||
654 | {'n', "noindex", NULL, | ||
655 | gettext_noop ("do not index, perform full insertion (stores entire " | ||
656 | "file in encrypted form in GNUnet database)"), | ||
657 | 0, &GNUNET_GETOPT_set_one, &do_insert}, | ||
658 | {'N', "next", "ID", | ||
659 | gettext_noop | ||
660 | ("specify ID of an updated version to be published in the future" | ||
661 | " (for namespace insertions only)"), | ||
662 | 1, &GNUNET_GETOPT_set_string, &next_id}, | ||
663 | {'p', "priority", "PRIORITY", | ||
664 | gettext_noop ("specify the priority of the content"), | ||
665 | 1, &GNUNET_GETOPT_set_uint, &priority}, | ||
666 | {'P', "pseudonym", "NAME", | ||
667 | gettext_noop | ||
668 | ("publish the files under the pseudonym NAME (place file into namespace)"), | ||
669 | 1, &GNUNET_GETOPT_set_string, &pseudonym}, | ||
670 | {'s', "simulate-only", NULL, | ||
671 | gettext_noop ("only simulate the process but do not do any " | ||
672 | "actual publishing (useful to compute URIs)"), | ||
673 | 0, &GNUNET_GETOPT_set_one, &do_simulate}, | ||
674 | {'t', "this", "ID", | ||
675 | gettext_noop ("set the ID of this version of the publication" | ||
676 | " (for namespace insertions only)"), | ||
677 | 1, &GNUNET_GETOPT_set_string, &this_id}, | ||
678 | {'u', "uri", "URI", | ||
679 | gettext_noop ("URI to be published (can be used instead of passing a " | ||
680 | "file to add keywords to the file with the respective URI)"), | ||
681 | 1, &GNUNET_GETOPT_set_string, &uri_string}, | ||
682 | {'V', "verbose", NULL, | ||
683 | gettext_noop ("be verbose (print progress information)"), | ||
684 | 0, &GNUNET_GETOPT_set_one, &verbose}, | ||
685 | GNUNET_GETOPT_OPTION_END | ||
686 | }; | ||
690 | return (GNUNET_OK == | 687 | return (GNUNET_OK == |
691 | GNUNET_PROGRAM_run (argc, | 688 | GNUNET_PROGRAM_run (argc, |
692 | argv, | 689 | argv, |