From 97a077854a2cda0097c7518fee13d95a9efbc754 Mon Sep 17 00:00:00 2001 From: Freddy Martinez Date: Sun, 14 Jan 2018 18:45:18 -0800 Subject: [PATCH 1/6] this commit cleans up the README.md --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ad1263eb..c83636b0 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,21 @@ [![Build Status](https://travis-ci.org/micahflee/onionshare.png)](https://travis-ci.org/micahflee/onionshare) -OnionShare lets you securely and anonymously share files of any size. It works by starting a web server, making it accessible as a Tor onion service, and generating an unguessable URL to access and download the files. It doesn't require setting up a server on the internet somewhere or using a third party file-sharing service. You host the file on your own computer and use a Tor onion service to make it temporarily accessible over the internet. The other user just needs to use Tor Browser to download the file from you. +[OnionShare](https://onionshare.org) lets you securely and anonymously share files of any size. It works by starting a web server, making it accessible as a Tor Onion Service, and generating an unguessable URL to access and download the files. It does _not_ require setting up a separate server or using a third party file-sharing service. You host the files on your own computer and use a Tor Onion Service to make it temporarily accessible over the internet. The receiving user just needs to open the URL in Tor Browser to download the file. -**To learn how OnionShare works, what its security properties are, and how to use it, check out the [wiki](https://github.com/micahflee/onionshare/wiki).** +## Documentation -**You can download OnionShare for Windows and macOS from . It should be available in your package manager for Linux, and it's included by default in Tails.** +To learn how OnionShare works, what its security properties are, and how to use it, check out the [wiki](https://github.com/micahflee/onionshare/wiki). + +## Downloading Onionshare + +You can download OnionShare for Windows and macOS from the [OnionShare website](https://onionshare.org). It should be available in your package manager for Linux, and it's included by default in [Tails](https://tails.boum.org). + +## Developing OnionShare You can set up your development environment to build OnionShare yourself by following [these instructions](/BUILD.md). +# Screenshots + ![Server Screenshot](/screenshots/server.png) ![Client Screenshot](/screenshots/client.png) From 3d6309ba94ebbcab744a7dce2a9e036c2e57bf1a Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 16 Jan 2018 14:50:00 +1100 Subject: [PATCH 2/6] Link to the Linux Distribution Support wiki doc for help building from source, due to various differences in Tor, Stem, Stdeb versions --- BUILD.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILD.md b/BUILD.md index fc31ce3c..848eeb05 100644 --- a/BUILD.md +++ b/BUILD.md @@ -30,6 +30,8 @@ Create a .rpm on Fedora-like distros: `./install/build_rpm.sh` For ArchLinux: There is a PKBUILD available [here](https://aur.archlinux.org/packages/onionshare/) that can be used to install OnionShare. +If you find that these instructions don't work for your Linux distribution or version, consult the [Linux Distribution Support wiki guide](https://github.com/micahflee/onionshare/wiki/Linux-Distribution-Support), which might contain extra instructions. + ## Mac OS X Install Xcode from the Mac App Store. Once it's installed, run it for the first time to set it up. From ce1b2bd513ce68d9ea0291620ec1a6ca6bcfcacc Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 16 Jan 2018 16:17:23 +1100 Subject: [PATCH 3/6] Update the check_lacked_trans.py script to work with latest codebase and use python 3 --- install/check_lacked_trans.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/install/check_lacked_trans.py b/install/check_lacked_trans.py index 6dc145a7..dcaa9fda 100644 --- a/install/check_lacked_trans.py +++ b/install/check_lacked_trans.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @@ -54,7 +54,6 @@ def main(): src = files_in(dir, 'onionshare') + files_in(dir, 'onionshare_gui') pysrc = [p for p in src if p.endswith('.py')] - htmlsrc = [p for p in src if p.endswith('.html')] translate_keys = set() # load translate key from python source @@ -67,20 +66,12 @@ def main(): key = arg.split(',')[0].strip('''"' ''') translate_keys.add(key) - # load translate key from html source - for line in fileinput.input(htmlsrc, openhook=fileinput.hook_encoded('utf-8')): - # search `{{strings.translate_key}}` - m = re.search(r'{{.*strings\.([-a-zA-Z0-9_]+).*}}', line) - if m: - key = m.group(1) - translate_keys.add(key) - if args.show_all_keys: for k in sorted(translate_keys): - print k + print(k) sys.exit() - locale_files = [f for f in files_in(dir, 'locale') if f.endswith('.json')] + locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json')] for locale_file in locale_files: with codecs.open(locale_file, 'r', encoding='utf-8') as f: trans = json.load(f) @@ -92,10 +83,10 @@ def main(): locale, ext = os.path.splitext(os.path.basename(locale_file)) for k in sorted(disused): - print locale, 'disused', k + print(locale, 'disused', k) for k in sorted(lacked): - print locale, 'lacked', k + print(locale, 'lacked', k) if __name__ == '__main__': From c3bf8f0739486d3273c6aadf01b77d0c5c09e069 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 16 Jan 2018 16:32:26 +1100 Subject: [PATCH 4/6] Add -l arg to check_lacked_trans.py, to filter on a specific language code --- install/check_lacked_trans.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install/check_lacked_trans.py b/install/check_lacked_trans.py index dcaa9fda..8ed3636f 100644 --- a/install/check_lacked_trans.py +++ b/install/check_lacked_trans.py @@ -36,7 +36,9 @@ def arg_parser(): p.add_argument('-d', default='.', help='onionshare directory', metavar='ONIONSHARE_DIR', dest='onionshare_dir') p.add_argument('--show-all-keys', action='store_true', - help='show translation key in source and exit') + help='show translation key in source and exit'), + p.add_argument('-l', default='all', help='language code (default: all)', + metavar='LANG_CODE', dest='lang_code') return p @@ -55,6 +57,8 @@ def main(): src = files_in(dir, 'onionshare') + files_in(dir, 'onionshare_gui') pysrc = [p for p in src if p.endswith('.py')] + lang_code = args.lang_code + translate_keys = set() # load translate key from python source for line in fileinput.input(pysrc, openhook=fileinput.hook_encoded('utf-8')): @@ -71,7 +75,10 @@ def main(): print(k) sys.exit() - locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json')] + if lang_code == 'all': + locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json')] + else: + locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json') and lang_code in f] for locale_file in locale_files: with codecs.open(locale_file, 'r', encoding='utf-8') as f: trans = json.load(f) From 83e0d9f4de7c368c1e78b950c343cbd973836b7b Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 16 Jan 2018 16:45:54 +1100 Subject: [PATCH 5/6] Better match for lang code filter --- install/check_lacked_trans.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/check_lacked_trans.py b/install/check_lacked_trans.py index 8ed3636f..2486758e 100644 --- a/install/check_lacked_trans.py +++ b/install/check_lacked_trans.py @@ -78,7 +78,7 @@ def main(): if lang_code == 'all': locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json')] else: - locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json') and lang_code in f] + locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('%s.json' % lang_code)] for locale_file in locale_files: with codecs.open(locale_file, 'r', encoding='utf-8') as f: trans = json.load(f) From 0333ec915c8a39b96d17226b4a73925112b70cb3 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 16 Jan 2018 16:48:35 +1100 Subject: [PATCH 6/6] Fix indentation... --- install/check_lacked_trans.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/check_lacked_trans.py b/install/check_lacked_trans.py index 2486758e..3313db7c 100644 --- a/install/check_lacked_trans.py +++ b/install/check_lacked_trans.py @@ -78,7 +78,7 @@ def main(): if lang_code == 'all': locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('.json')] else: - locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('%s.json' % lang_code)] + locale_files = [f for f in files_in(dir, 'share/locale') if f.endswith('%s.json' % lang_code)] for locale_file in locale_files: with codecs.open(locale_file, 'r', encoding='utf-8') as f: trans = json.load(f)