mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-27 16:29:41 -05:00
Merge branch 'master' of github.com:micahflee/onionshare into windows-1.2
This commit is contained in:
commit
09f09c7d44
2
BUILD.md
2
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. Also, run this to make sure command line tools are installed: `xcode-select --install`. And finally, open Xcode, go to Preferences > Locations, and make sure under Command Line Tools you select an installed version from the dropdown. (This is required for installing Qt5.)
|
||||
|
14
README.md
14
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 <https://onionshare.org/>. 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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
@ -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
|
||||
|
||||
|
||||
@ -54,7 +56,8 @@ 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')]
|
||||
|
||||
lang_code = args.lang_code
|
||||
|
||||
translate_keys = set()
|
||||
# load translate key from python source
|
||||
@ -67,20 +70,15 @@ 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')]
|
||||
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)]
|
||||
for locale_file in locale_files:
|
||||
with codecs.open(locale_file, 'r', encoding='utf-8') as f:
|
||||
trans = json.load(f)
|
||||
@ -92,10 +90,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__':
|
||||
|
Loading…
Reference in New Issue
Block a user