Coder Social home page Coder Social logo

Comments (10)

michelesalvador avatar michelesalvador commented on June 5, 2024 1

I have moved some content of this issue to the wiki page Import GEDCOM with media files.

from familygem.

IzzySoft avatar IzzySoft commented on June 5, 2024

I've meanwhile managed to trick Family Gem into accepting the media. I doubt this is the intended approach โ€“ but until that one gets clear, it might be a good work-around:

  1. Import the GedCom file to Family Gem
  2. In the "Main page" listing available trees, tap the overflow-menu (the "3 stapled buttons") for the tree and select "Info". Note the name of the file, which e.g. is /data/user/0/app.familygem/files/1.json
  3. Again via the overflow menu, select "Save Zip Backup"
  4. Same place, select "Delete"
  5. Add your media to the zip file (including the relative path as used in the GedCom file)
  6. Also add the media to your SD card into Android/data/app.familygem/files/1/ (the files/1 correspond to the path from step 2) using the relative path (yes, this is doing it twice โ€“ but adding it just to the Zip didn't work out for me but just yielded errors on import; maybe it's sufficient to just add the media to the card, I didn't test that anymore)
  7. Now, from the main menu, hit the Fav button ("+") and chose "Recover a Zip backup". Pick your new Zip (the one with the media added).

A bit nasty, but it worked for me this way. I guess step 5 can be skipped โ€“ but once it worked, I didn't feel to try more. This approach hopefully is a temporary one anyway, there must be an easier one ๐Ÿ˜„ Meanwhile, leaving these notes in case they prove helpful to someone else.

from familygem.

michelesalvador avatar michelesalvador commented on June 5, 2024

Where would I need to store these so they get found and integrated?

Short answer, in the same Android folder with the Gedcom you import.

Suppose you have a Gedcom with many records containing properties like
FILE C:\Users\Michele\Documents\images\John Doe.jpg
It's a path in the Windows file system and obviously has no meaning in Android.
But Family Gem is smart enough to take the important part John Doe.jpg.

To import the Gedcom with all media files, follow these steps:

  1. Take your Gedcom as is (no need to change any FILE path) and upload it to the folder you prefer of your Android device.
  2. Upload to the same folder John Doe.jpg and all other media files.
  3. From Family Gem import the Gedcom.
  4. That's it, Family Gem will look for John Doe.jpg in that Android folder.

You can see this folder path under Trees > โ‹ฎ > Info > Media folders.

from familygem.

IzzySoft avatar IzzySoft commented on June 5, 2024

Hm, funny โ€“ that was the first thing I tried (with the only difference that I first imported the *.ged and then placed the directory with the images (izzy/*.jpg) exactly where the Gedcom file was imported from. Must have been some caching issue then.

You can see this folder path under Trees > โ‹ฎ > Info > Media folders.

Yes. And it shows a completely different folder from what you describe: /storage/emulated/0/Android/data/app.familygem/files/1. I don't remember if that was shown there before I did the backup โ€บ delete โ€บ restore-with-images described above. But maybe it could be edited as well? If so desired, the user then also could change the path here (e.g. if imported the Gedcom file from "Downloads" (and the media path points there) and preferring "things-to-stay" to rather be located in "Documents" (or "Pictures"). Then, having the media placed there, the user can adjust the path and hit the rescan button (which seems to be there already).

from familygem.

michelesalvador avatar michelesalvador commented on June 5, 2024

I reproduced the experiment you described before and actually it works, but you are right, I'd try to make it easier. ๐Ÿ˜…

Must have been some caching issue then.

I think it's not a caching issue.
As you have guessed, it's simply a matter of matching of relative paths. Maybe your paths didn't match.

Suppose you have the file family.ged with media records containing relative paths such as izzy/myphoto.jpg:

  1. Put this Gedcom file in some folder of Android (e.g. Documents/family.ged).
  2. From Family Gem import it.
  3. Add the directory containing images exactly where the Gedcom file was imported from, so Documents/izzy/*.jpg. Yes, you can do it after too.
  4. Just open your tree and voilร , images.

And it shows a completely different folder from what you describe: /storage/emulated/0/Android/data/app.familygem/files/1

This is the path to the media folder of your tree in the Android external storage.
It's there because you exported and then re-imported a Zip backup (also if tricky way).
Family Gem try to collect all the media files and puts them in a directory named media inside the Zip. Then, when you re-import the backup, all the media are placed into a folder of the external storage, that in your case is /storage/emulated/0/Android/data/app.familygem/files/ + the tree number. Finally this path is put in the media folders list.

But maybe it could be edited as well?

I agree to add the ability to edit the media folders list in Info โ€บ Media folders. Probably the most important here is to be able to add new paths.
At the moment the logic is only that, when you pick a file from the file system, the corresponding directory path is automatically added to the media folders list.

the user can adjust the path and hit the rescan button

I don't understand. What should the button scan for?

from familygem.

IzzySoft avatar IzzySoft commented on June 5, 2024

Actually, those 4 steps was what I tried first (though only with a single JPG) and it didn't seem to work. Maybe I did something wrong, or Family Gem had issues with the sample image I used (I didn't use the real one, I just wanted to figure first where to put things).

Assuming it was my fault then, maybe those instructions should be placed where "Average Joe" can easily find them? Suggestions: Readme, or better: Wiki (you didn't yet start a wiki, but this seems a good time to do so โ€“ I'm pretty sure there will be more things to fill the pages, and the Readme then could just point there).

I follow your description that the "external storage location" was set because of backup/restore. But would the images have ended up there if they'd been located in Documents/izzy/*.jpg on backup? That'd be a bit unexpected. Though technical perfectly fine (user can access it using any file manager).

What should the button scan for?

Images? ๐Ÿ˜„ Remember, I assumed a caching issue. And there is this "recycle" button on the Info screen. What is it supposed to do? When I called up that screen, it said "0 media". After hitting that button, the 0 changed into the real number of media (though none of them was present). Conclusion: when I press this button, it counts media โ€“ so maybe it cross-checks with the media location as well. I might have been wrong with that again โ€“ but lacking a documentation (which I just proposed to start via the wiki), you must admit it was a good guess ๐Ÿคฃ

PS: Would you consider using English comments in the code? That would make it easier for possible contributors. I tried figuring things browsing the code, but with everything being in Italian, including comments, variable and method names, I was completely lost there. Nothing against Italian of course ๐Ÿ˜‰ And before you ask: like @mondstern my native tongue is German, so it's not about "use my language please" but rather finding a "common denominator".

PPS: Where did the translation issue disappear? Was it accidentally made confidential?

from familygem.

michelesalvador avatar michelesalvador commented on June 5, 2024

those 4 steps was what I tried first (though only with a single JPG) and it didn't seem to work.

This is weird.
I just tried again the 4 steps and it works for me.
If you want to help me understand what the problem was, consider kindly retry this procedure.

would the images have ended up there if they'd been located in Documents/izzy/*.jpg on backup?

If I well understand your question, yes.
When you do Trees โ€บ โ‹ฎ โ€บ Save Zip backup, Family Gem collects all the media files that you can see in โ˜ฐ โ€บ Media. These files maybe come from different locations of the device, for example Documents/izzy/*.jpg and others. All the collected files are stored in the Zip backup into a single folder named media (with no sub-directories).
Then on restore, all the files are placed in one single folder on the external storage (usually Android/data/app.familygem/files/ + the tree number).
In all the backup/restore process the paths in media records remain unmodified.
Maybe there is something that can be improved? ๐Ÿค”

And there is this "recycle" button on the Info screen. What is it supposed to do?

If the tree contains more than 100 persons, in Trees and in Info the data (number of persons etc.) are not automatically updated, just to avoid slowdowns, but the โ™บ button appear to let you refresh the data.
Well, I admit this can be clearer... At least labeling the button Refresh.

PPS: Where did the translation issue disappear? Was it accidentally made confidential?

No. It's @mondstern that vanished from GitHub, and with him the issue he opened.

from familygem.

IzzySoft avatar IzzySoft commented on June 5, 2024

Thanks! That would make a good wiki page already (explaining the backup/restore process) ๐Ÿ˜ƒ May I suggest you enable the wiki (see #9) so we can at least use it already to collect documentation pieces? Regardless of where you finally decide to have the documentation, that would make it easier to find pieces we already have.

I currently lack the time to reproduce it. If you say it works for you, I must have had a misspelling somewhere (or some other fault at my end).

No. It's @mondstern that vanished from GitHub, and with him the issue he opened.

Ugh! Indeed ๐Ÿ˜ข I'll ping him for clarification. Apart from that, I didn't think issues would disappear in such cases. Usually ownership gets transferred to @ghost in such cases, IIRC.

from familygem.

mondlicht-und-sterne avatar mondlicht-und-sterne commented on June 5, 2024

i was/ am the one with the translations. with new account.

from familygem.

michelesalvador avatar michelesalvador commented on June 5, 2024

And the backup process has been synthesized on the wiki page ZIP file backup.

from familygem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.