Menu

#159 File: Support reading from a single directory (instead of a MediaWiki hive)

v1.3.*
closed
nobody
file (4)
v1.3.1
2014-03-21
2013-07-06
gnosygnu
No

XOWA can download images from either an internet wiki site or a local tarball. In both cases, the folder structure has a specific layout. For example, the A.png file would be in the following hierarchy "/root/7/70/A.png"

A request was made for XOWA to be able to read images from a single directory. Using the above example, this would be "/root/A.png"

This requires non-trivial changes to the code. It may be implemented whenever the thumbnails initiative is completed.

Discussion

<< < 1 2 (Page 2 of 2)
  • gnosygnu

    gnosygnu - 2014-03-10

    I followed your instructions and I can confirm that that worked;

    I'm glad to hear that you followed my instructions and got it to work.

    With your proposed folder hierarchy, the windows xowa is directly under /atcolib/ without the /xowa_win_v1.3.1.1/-folder in between (so having the xowa.exe at C:\atcolib\xowa.gfs and the bin, user, ... folder at /atcolib/bin/, /atcolib/user/).

    No, this is incorrect. My proposed hierarchy has it at "C:\atcolib\xowa\xowa.exe" (see my instruction above about installing to "C:\atcolib_test\xowa\xowa.exe"). Not "C:\atcolib\xowa.gfs"

    Only windows-computers can run this xowa-version, so to be able to run xowa on a linux machine for example, using the exact same same files; you would need to:

    Honestly, this makes no sense. Please look at my instructions again. To repeat:


    This is how I've used XOWA on different OS's with my memory card

    • Create a root folder of /xowa/
    • Unzip the xowa_app_windows, xowa_app_linux, xowa_app_macosx into this same root folder
    • Plug it into a Windows machine. Run "X:\xowa\xowa.exe"
    • Plug it into a Linux machine. Run "sh /media/mnt/SDCARD/xowa/xowa_linux.sh"
    • Plug it into a Mac OS X machine. Run "sh /Volumes/SDCARD/xowa/xowa_macosx.sh"

    Please try these instructions out. If you can't try them out, then please read through them carefully before replying. I can't understand what could possibly compel you to go out and delete all the files. I've literally done this a hundred or so times, and never had to delete files.

    download linux imagemagick and inkscape and unzip to /bin/linux/

    This is also incorrect. By default, most distributions "download" imagemagick and inkscape to their /usr/bin directories (or something comparable). Nothing goes into /xowa/bin/linux.

    It's way simpler to say simply be able to run the xowa_linux.jar at /atcolib/xowa_lin_v1.3.1.1/ and run xowa.exe at /atcolib/xowa_win_v1.3.1.1/

    No, it's way simpler to say the following:

    • Plug it into a Windows machine. Run "X:\xowa\xowa.exe"
    • Plug it into a Linux machine. Run "sh /media/mnt/SDCARD/xowa/xowa_linux.sh"
    • Plug it into a Mac OS X machine. Run "sh /Volumes/SDCARD/xowa/xowa_macosx.sh"

    Which is exactly what I've been doing for each machine I've tested it on.

    the ability to put all offline wiki files at a higher folder (say /atcolib/atcolibdata/ )

    There's already a ticket for this...

    a changable path for the user_custom_cfg.gfs file (say at /win_configfiles/, /lin_configfiles/, ...)

    ... and I've also replied in that ticket regarding this request

     
  • gnosygnu

    gnosygnu - 2014-03-10

    one does not know which version is used for the windows, linux or osx version. the only way to check this is by opening the file and then looking for the version number inside xowa

    One doesn't need to know which version is windows / linux / osx. The only thing the user needs to know is the .exe or the xowa_*.sh. The rest is transparent to the user.

    there is a very large number of folders, files, ....

    As there are in many other applications. Have you looked at the files and sub-folders in a Firefox installation?

    Regular users won't be able to see what's what anymore

    As I've said before, regular users shouldn't have to care about anything except the .exe or the xowa_*.sh.

    let alone update xowa's to new versions.

    This makes no sense. A large number of files / folders does not prevent them from updating to a new version.

    As I've said above, an update would merely involve unzipping the update into the root folder. Whether there is 1 file or 1 million, the update still occurs.

     

    Last edit: gnosygnu 2014-03-10
    • Anonymous

      Anonymous - 2014-03-17

      Regarding the unzipping of the update into the root folder, you stated that "whether there is 1 file or 1 million, the update still occurs".

      I thought about this, and came to realize you just unzip the new folder at the location of the old one, after which the system automatically overwrites the old files.

      I didn't do things that way for one reason: since the previous version of xowa, some files might no longer be in use, and/or may have changed their filename. That means that these older files won't be overwritten and no longer used (effectively having no effect/impact to xowa any more), but they will still be there (and over time, these redundant files increase as I keep updating). I don't like to have redundant files in the xowa folders (besides having little files per folder, ...). So I generally always use the manual method.

      Regarding the folders, changable path for the user_custom_cfg.gfs, ...: you mentioned you replied to this in a different ticket (I assume that was http://sourceforge.net/p/xowa/tickets/320/ ) I read there that you are working on putting all custom files into a seperate file (sqlite file, called xowa.user.anonymous.sqlite3). I can allready find that file in the current xowa at C:\atcolib\xowa_win_v1.3.1.1\user\ I find it a bit odd though that you are not placing the xowa.user.anonymous.sqlite3 directly with the other offline wiki files (currently located at xowa_win_v1.3.1.1\wiki\atcolib ) Perhaps that if you confine all the other data in following folders:
      /xowa_win/wiki, xowa_win/user/anonymous/wiki and xowa_win/file to that location, it might be simpler (not sure).

       
  • gnosygnu

    gnosygnu - 2014-03-18

    Hi again.

    I didn't do things that way for one reason: since the previous version of xowa, some files might no longer be in use, and/or may have changed their filename.

    I do not think this is not a meaningful objection.

    XOWA rarely obsoletes files. The last time this happened was several months ago, when I moved the lua script files from php to lua. So your concern of "some files might no longer be in use, and/or may have changed their filename" simply happens rarely. Even in this case, the total size of files was < 1 MB -- hardly anything to be concerned about

    I don't like to have redundant files in the xowa folders (besides having little files per folder, ...)

    Your particular preference is simply not worth the troubles of creating separate directories per operating system / version. Again, if you want to do this, you're more than free to do so. But please, do not ask me to devote time and resources to support your personal preferences -- especially when I provided an alternate scenario that works just as well.

    I find it a bit odd though that you are not placing the xowa.user.anonymous.sqlite3 directly with the other offline wiki files (currently located at xowa_win_v1.3.1.1\wiki\atcolib )

    You're thinking only of your situation where you are using one wiki. Most users will use multiple wikis. When there are multiple wikis, the xowa.user.anonymous.sqlite3 cannot go into one wiki directory. (like your xowa_win_v1.3.1.1\wiki\atcolib). They need to go into a folder that's higher in the layout.

     
    • Anonymous

      Anonymous - 2014-03-20

      OK, I didn't know only so little redundant files were made.

      When there are multiple wikis, the xowa.user.anonymous.sqlite3 cannot go into one wiki directory. (like your xowa_win_v1.3.1.1\wiki\atcolib). They need to go into a folder that's higher in the layout.
      --> You're correct. I just wanted to mention that it's currently in a place where a user might easily remove it by mistake . Perhaps consider placing it in an own folder under /anonymous, like C:\atcolib\xowa_win_v1.3.1.1\user\anonymous\data or even better, put it even much higher so that accidental removal of these files will even be less likely to occur, so with something like this: C:\atcolib\user\anonymous\data

      BTW: perhaps that in time, you might need to allow using different users (so other maps can be put in this higher folder too, like C:\atcolib\user\user1\data Supporting users more might prove useful in the future, for example for cooperative editing of a same wiki (in which people can ie upload their version of the same xowa to an FTP site for sharing article changes/updates they did). With multiple users, one other user can then see what he has added/changed on the articles (user history) and remove things he doesn't like.

       
  • gnosygnu

    gnosygnu - 2014-03-21

    OK, I didn't know only so little redundant files were made.

    Ok. I'm glad we're in agreement.

    I just wanted to mention that it's currently in a place where a user might easily remove it by mistake.

    Thanks for the details, but I don't understand

    You say...

    Perhaps consider placing it in an own folder under /anonymous, like C:\atcolib\xowa_win_v1.3.1.1\user\anonymous\data

    And...

    so with something like this: C:\atcolib\user\anonymous\data

    This really seems like the same as above (they both end up in "user\anonymous\data")

    Currently, the sqlite3 file is a C:\xowa\user\xowa.user.anonymous.sqlite3. I wanted to keep it closer to the root, because I wanted easier access.

    Ultimately, I'm planning to put this in the root: C:\xowa\xowa.user.anonymous.sqlite3

    If this increases the risk that a user might delete it by mistake, then so be it. They can also delete the xowa.jar, and they'd be similarly ruined. I can't go burying files deep in directories in hopes of tricking the inept user.

    At any rate, I'm going to mark this ticket closed. Your last comment is more related to the other ticket, so if you have other questions, please comment there.

    Thanks.

     
  • gnosygnu

    gnosygnu - 2014-03-21
    • status: investigating --> closed
     
<< < 1 2 (Page 2 of 2)

Anonymous
Anonymous

Add attachments
Cancel