Skip to content

Commit

Permalink
Version 335
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrusnetwork committed Jan 9, 2019
1 parent 4bb6c31 commit 4a52a55
Show file tree
Hide file tree
Showing 148 changed files with 4,432 additions and 4,992 deletions.
17 changes: 12 additions & 5 deletions client.py
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
Expand All @@ -8,6 +8,10 @@

try:

from include import HydrusPy2To3

HydrusPy2To3.do_2to3_test()

from include import HydrusExceptions
from include import HydrusConstants as HC
from include import HydrusData
Expand Down Expand Up @@ -48,9 +52,9 @@

db_dir = HC.DEFAULT_DB_DIR

if not HydrusPaths.DirectoryIsWritable( db_dir ):
if not HydrusPaths.DirectoryIsWritable( db_dir ) or HC.RUNNING_FROM_OSX_APP:

db_dir = os.path.join( os.path.expanduser( '~' ), 'Hydrus' )
db_dir = HC.USERPATH_DB_DIR


else:
Expand Down Expand Up @@ -80,7 +84,10 @@

HydrusData.Print( 'hydrus client started' )

threading.Thread( target = reactor.run, kwargs = { 'installSignalHandlers' : 0 } ).start()
if not HG.twisted_is_broke:

threading.Thread( target = reactor.run, kwargs = { 'installSignalHandlers' : 0 } ).start()


controller = ClientController.Controller( db_dir, no_daemons, no_wal )

Expand Down Expand Up @@ -130,7 +137,7 @@

dest_path = os.path.join( db_dir, 'crash.log' )

with open( dest_path, 'wb' ) as f:
with open( dest_path, 'w' ) as f:

f.write( traceback.format_exc() )

Expand Down
12 changes: 8 additions & 4 deletions client.pyw
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
Expand All @@ -8,6 +8,10 @@

try:

from include import HydrusPy2To3

HydrusPy2To3.do_2to3_test()

from include import HydrusExceptions
from include import HydrusConstants as HC
from include import HydrusData
Expand Down Expand Up @@ -48,9 +52,9 @@ try:

db_dir = HC.DEFAULT_DB_DIR

if not HydrusPaths.DirectoryIsWritable( db_dir ):
if not HydrusPaths.DirectoryIsWritable( db_dir ) or HC.RUNNING_FROM_OSX_APP:

db_dir = os.path.join( os.path.expanduser( '~' ), 'Hydrus' )
db_dir = HC.USERPATH_DB_DIR


else:
Expand Down Expand Up @@ -153,7 +157,7 @@ except Exception as e:

dest_path = os.path.join( db_dir, 'crash.log' )

with open( dest_path, 'wb' ) as f:
with open( dest_path, 'w' ) as f:

f.write( traceback.format_exc() )

Expand Down
4 changes: 1 addition & 3 deletions help my client will not boot.txt
Expand Up @@ -2,9 +2,7 @@ If running the client executable does nothing or gives you an odd error before d

1. Look for a 'crash.log' in your 'db' directory. Failing that, is there a 'client - [date].log' file? Does it have an error in it? If there is something, please send it in to me, hydrus_dev (see contact.html in the help directory for my contact details).

2. Try running the 'client_debug' executable. This will launch the program in a terminal with a lot of additional load information and hopefully a neat error at the end. The terminal might close too quickly for you to take a screenshot, so you may need to run the program from the terminal manually (right-click or shift+right-click on the install folder and select 'open in terminal/command window' and then type 'client_debug' or './client_debug' or '.\client_debug' depending on your OS and hit enter). If the fix is not immediately obvious to your situation, please send a screenshot of the error to me.

3. Some anti-virus program updates falsely detect that one of the dlls or other files in the client is bad and quietly quarantine them. Please check your anti-virus logs or compare your install directory with the 'extract only' release archive to see if there are missing files. Avast has done this several times. Instances of this are useful to know about as several users usually get hit by the same thing at the same time. Please feel free to also start a conversation if you just want to double-check it is a false-positive after all.
2. Some anti-virus program updates falsely detect that one of the dlls or other files in the client is bad and quietly quarantine them. Please check your anti-virus logs or compare your install directory with the 'extract only' release archive to see if there are missing files. Avast has done this several times. Instances of this are useful to know about as several users usually get hit by the same thing at the same time. Please feel free to also start a conversation if you just want to double-check it is a false-positive after all.

3. Extract a fresh 'extract only' client to your desktop and try running it. If an empty and new client boots but your existing client doesn't, that suggests there is either a problem with your database or a conflict with some older dlls from a previous install. A database problem will typically be reported in one of the log files, so you might like to try making a 'clean' install.

Expand Down
53 changes: 53 additions & 0 deletions help/changelog.html
Expand Up @@ -8,6 +8,59 @@
<div class="content">
<h3>changelog</h3>
<ul>
<li><h3>version 335</h3></li>
<ul>
<li class="dealwithit">important:</li>
<li>hydrus now runs completely and exclusively on python 3!</li>
<li>for users who are updating, the client has special install instructions for just this week:</li>
<li>if you are a windows or linux user who extracts to install, you will have to delete your old install's files (but keep your db folder!!!) before installing/extracting the new version so there are no 2/3 dll/so conflicts (don't delete your db folder!)</li>
<li>if you use the windows installer to install, this v335 installer will do the clean install for you! there is absolutely no way this could go wrong, so no need to make a backup beforehand :^)</li>
<li>if you are an os x user, I am now only releasing the client in the app. furthermore, the default app db location is now ~/Library/Hydrus (i.e. /Users/[you]/Library/Hydrus). you will have to move your existing db to this location to update, and thereafter you'll just be replacing the app in Applications!</li>
<li>if you try to boot a non-clean mixed 2/3 install, the client will try to recognise that and give an error and dump out</li>
<li>please check the release post for more detailed instructions here</li>
<li>.</li>
<li>semi-important:</li>
<li>the db password feature may be one-time broken for unusual keyboard languages, so failures this version will be forgiven with an appropriate error message explaining the situation. feedback from ???? ????? lads appreciated</li>
<li>I may have fixed the issue some linux/os x users were having launching external programs, including OS ffmpeg (it was a child process environment issue related to pyinstaller)</li>
<li>although I did most of my devving here on py 3.6, the client seems to run ok on 3.5. I doubt 3.4 will do it, if you mean to run from source</li>
<li>I moved from the old pycrypto to the new pycryptodome, so users who run from source will want to get this. I also dropped some libraries</li>
<li>.</li>
<li>misc bug fixes:</li>
<li>fixed the 'load one of the default options' button on manage tag import options when a set of default options is orphaned by a deleted url class</li>
<li>removed some popup flicker related to long error messages</li>
<li>fixed some parsing testing ui error handling</li>
<li>cleared up some bad text ctrl event handling that could sometimes cause a recursive loop</li>
<li>listctrls should now sort text that includes numbers in the human-friendly 2 < 10 fashion</li>
<li>cleaned up some bad external process calling code and improved how child process environment is set up</li>
<li>finally figured out the basic problem of a long-time nested dialog event handling error that could sometimes freeze the ui. I may have fixed it in one case and will keep working on this</li>
<li>.</li>
<li>boring details:</li>
<li>ran 2to3 to auto-convert what could be done</li>
<li>updated environment to python 3</li>
<li>went over a whole ton of unicode encoding/decoding manually to update it to python 3</li>
<li>removed all the old tobytestring/tounicode calls in favour of new python 3 handling</li>
<li>fixed all the file io to do bytes/str as appropriate</li>
<li>corrected a bunch of / vs // int/float stuff</li>
<li>fixed up twisted, which has some str/bytes stuff going on</li>
<li>fixed all the listctrls to deal with column sorting None values amongst ints/strs</li>
<li>fixed png export/import, which had some fun bytes/bytearray/int/str issues</li>
<li>updated the swf header parsing code to py3 (more str/bytes stuff)</li>
<li>misc float/int fixes</li>
<li>fixed up some http.cookies handling, which has changed in py3</li>
<li>improved some ancient loopback connection code that was only really checking to see if ports were in use</li>
<li>cleaned up a bunch of now-invalid parameter tuples that 2to3 helpfully marked</li>
<li>numerous misc other refactoring and so on</li>
<li>updated the new network engine to now decode non-utf-8 responses correctly based on actual response header</li>
<li>removed some old py2 manual http multipart code</li>
<li>removed the old py2 'matroska or webm' parsing py, replacing it with some direct ffmpeg format inspection</li>
<li>replaced all % formatting with the new .format system. I will slowly move to this rather than the current endless concatenation mess</li>
<li>deleted some more misc old code</li>
<li>tightened up some spammy network error reporting</li>
<li>converted all /r/n to /n in my environment project, ha ha ha</li>
<li>the ui seems to better support rarer unicode characters like ??</li>
<li>updated some of the install/update/backup help for all this, and some misc other stuff as well</li>
<li>fixed misc bugs</li>
</ul>
<li><h3>version 334</h3></li>
<ul>
<li>wrote a system:file viewing stats to comprehensively search the new viewing stats--it _should_ also be synced with the exact current values</li>
Expand Down
6 changes: 3 additions & 3 deletions help/getting_started_files.html
Expand Up @@ -8,7 +8,7 @@
<div class="content">
<p><a href="getting_started_installing.html"><---- Back to the installing and updating</a></p>
<h3 class="warning">a warning</h3>
<p class="warning">Hydrus can be powerful, and you control everything. By default, absolutely nothing is shared with other users--and you can't accidentally one-click your way to exposing your whole collection--but if you screw around, you can make a mistake. If you only want to do private sexy slideshows of your shy wife, that's great, but think twice before you upload files or tags anywhere, particularly as you learn. It is <b>impossible</b> to contain leaks of private information.</p>
<p class="warning">Hydrus can be powerful, and you control everything. By default, you are not connected to any servers and absolutely nothing is shared with other users--and you can't accidentally one-click your way to exposing your whole collection--but if you tag private files with real names and click to upload that data to the Public Tag Repository, the program won't try to stop you. If you want to do private sexy slideshows of your shy wife, that's great, but think twice before you upload files or tags anywhere, particularly as you learn. It is <b>impossible</b> to contain leaks of private information.</p>
<p class="warning">There are no limits and few brakes on your behaviour. It is possible to import millions of files. For many new users, their first mistake is downloading too much too fast in overexcitement and becoming overwhelmed. Take things slow and figure out good processing workflows that work for your schedule before you start adding 500 subscriptions.</p>
<h3>the problem</h3>
<p>If you have ever seen something like this--</p>
Expand All @@ -20,7 +20,7 @@ <h3>so, what does the hydrus client do?</h3>
<p>When you first boot the client, you will see a blank page. There are no files in the database and so there is nothing to search. To get started, I suggest you simply drag-and-drop a folder with a hundred or so images onto the main window. A dialog will appear affirming what you want to import. Ok that, and a new page will open. Thumbnails will stream in as the software processes each file.</p>
<p><a href="import.png"><img src="import.png" width="960" height="540" /></a></p>
<p>The files are being imported into the client's database. <a href="faq.html#filenames">The client discards their filenames.</a></p>
<p>Notice your original folder and its files are untouched. You can move the originals somewhere else, delete them, and the client will still return searches fine. In the same way, you can delete from the client, and the original files will remain unchanged; import is a <b>copy</b>, not a move, operation. The client performs all its operations on its internal database. If you find yourself enjoying using the client and decide to completely switch over, you can delete the original files you import without worry. You can always export them back again later.</p>
<p>Notice your original folder and its files are untouched. You can move the originals somewhere else, delete them, and the client will still return searches fine. In the same way, you can delete from the client, and the original files will remain unchanged--import is a <b>copy</b>, not a move, operation. The client performs all its operations on its internal database. If you find yourself enjoying using the client and decide to completely switch over, you can delete the original files you import without worry. You can always export them back again later.</p>
<p><a href="faq.html#external_files">FAQ: can the client manage files from their original locations?</a></p>
<p>Now:</p>
<ul class="bulletpoint">
Expand Down Expand Up @@ -90,7 +90,7 @@ <h3>filtering</h3>
<p>This saves time.</p>
<h3>lastly</h3>
<p>The hydrus client's workflows are not designed for half-finished files that you are still working on. Think of it as a giant archive for everything excellent you have decided to store away. It lets you find and remember these things quickly.</p>
<p>And although the client can hold millions of files, it starts to creak and chug when displaying or otherwise tracking more than about 10,000 or so in a single gui window. As you learn to use it, please try not to let your download queues or subscriptions or general search pages regularly sit at more than 10 or 15k, or you'll start to slow other things down. Another common mistake is to leave one large 'system:everything' or 'system:inbox' page open with 70k+ files. For these sorts of 'ongoing processing' pages, try adding a 'system:limit=256' to keep them snappy. One user mentioned he had regular gui hangs of thirty seconds or so, and when we looked into it, it turned out his handful of download pages had three million files queued up! Just try and take things slow until you figure out what your computer's limits are.</p>
<p>And although the client can hold millions of files, it starts to creak and chug when displaying or otherwise tracking more than about 40,000 or so in a single gui window. As you learn to use it, please try not to let your download queues or general search pages regularly sit at more than 40 or 50k total <i>items</i>, or you'll start to slow other things down. Another common mistake is to leave one large 'system:everything' or 'system:inbox' page open with 70k+ files. For these sorts of 'ongoing processing' pages, try adding a 'system:limit=256' to keep them snappy. One user mentioned he had regular gui hangs of thirty seconds or so, and when we looked into it, it turned out his handful of download pages had three million files queued up! Just try and take things slow until you figure out what your computer's limits are.</p>
<p class="right"><a href="getting_started_more_files.html">I want to learn more about files! ----></a></p>
<p class="right"><a href="getting_started_tags.html">No, let's learn about tags! ----></a></p>
</div>
Expand Down

0 comments on commit 4a52a55

Please sign in to comment.