Base media is a nested series of empty folders

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Base media is a nested series of empty folders

Doug-11
Following up "Media Manager - replace substring doesn't work": My media
paths were very long nested absolute paths which Benny helped me to
convert to short relative paths.

But looking at 'base media' itself  I find that it consists of a long
series of nested folders, corresponding to the original long absolute
paths I was trying to get rid of, each one containing nothing but
another folder. Only the ultimate folder contains actual images.

If I remove all intermediate folders and copy actual images directly
into the topmost folder of  <basename>.gpkg.media I am unable to load
gramps. Evidently the rest of the database information is somewhere else.

Where?
Does ~/.gramps have files that can be edited manually to clean up the
structure of 'base media'?

Doug

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Base media is a nested series of empty folders

Benny Malengier
2008/6/21 Doug <[hidden email]>:
Following up "Media Manager - replace substring doesn't work": My media
paths were very long nested absolute paths which Benny helped me to
convert to short relative paths.

But looking at 'base media' itself  I find that it consists of a long
series of nested folders, corresponding to the original long absolute
paths I was trying to get rid of, each one containing nothing but
another folder. Only the ultimate folder contains actual images.

You should put your base media file to what you think is the most logical choice.

Note however that on import of a gpkg, the system cannot just guess a media path. In the gpkg (you can open it with ark or another unzipper), the data is stored relative to the media path, or with a directory structure reflecting the absolute path. Also the old media path is present in the xml file. Normally on import  of gpkg, the system will take the most obvious media path, or ask you for it (depending on the situation).

Anyway, if you do not like the automatic choice, one can do as you want to do: change it in the preferences, then run the media manager to change all paths to the correct string.


If I remove all intermediate folders and copy actual images directly
into the topmost folder of  <basename>.gpkg.media I am unable to load
gramps. Evidently the rest of the database information is somewhere else.

what do you mean with load? Gramps crashes? Or opening gpkg data shows no pictures?  Or import fails?

Where?
Does ~/.gramps have files that can be edited manually to clean up the
structure of 'base media'?

No, there is only a database file there, which you cannot just edit. Export to .gramps xml files allows edit, but the media manager does the same search/replace as you could do with xml. 

My advise would be to start from zero. Create an empty family tree, set a media path as you want to use it, then import your gpkg, and experiment with how it works. Once you find what works best for you, you stick to that procedure.

Benny

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Base media is a nested series of empty folders

Doug-11
Benny Malengier wrote:

> 2008/6/21 Doug <[hidden email]
> <mailto:[hidden email]>>:
>
>     Following up "Media Manager - replace substring doesn't work": My
>     media
>     paths were very long nested absolute paths which Benny helped me to
>     convert to short relative paths.
>
>     But looking at 'base media' itself  I find that it consists of a long
>     series of nested folders, corresponding to the original long absolute
>     paths I was trying to get rid of, each one containing nothing but
>     another folder. Only the ultimate folder contains actual images.
>
>
> You should put your base media file to what you think is the most
> logical choice.
>
> Note however that on import of a gpkg, the system cannot just guess a
> media path. In the gpkg (you can open it with ark or another
> unzipper), the data is stored relative to the media path, or with a
> directory structure reflecting the absolute path. Also the old media
> path is present in the xml file. Normally on import  of gpkg, the
> system will take the most obvious media path, or ask you for it
> (depending on the situation).
>
> Anyway, if you do not like the automatic choice, one can do as you
> want to do: change it in the preferences, then run the media manager
> to change all paths to the correct string.
>
>
>     If I remove all intermediate folders and copy actual images directly
>     into the topmost folder of  <basename>.gpkg.media I am unable to load
>     gramps. Evidently the rest of the database information is
>     somewhere else.
>
>
> what do you mean with load? Gramps crashes? Or opening gpkg data shows
> no pictures?  Or import fails?

Import fails.

>
>     Where?
>     Does ~/.gramps have files that can be edited manually to clean up the
>     structure of 'base media'?
>
>
> No, there is only a database file there, which you cannot just edit.
> Export to .gramps xml files allows edit, but the media manager does
> the same search/replace as you could do with xml.
>
> My advise would be to start from zero. Create an empty family tree,
> set a media path as you want to use it, then import your gpkg, and
> experiment with how it works. Once you find what works best for you,
> you stick to that procedure.
>
> Benny


Thanks, Benny. I'll experiment as you suggest.

Doug


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Base media is a nested series of empty folders

Doug-11
In reply to this post by Benny Malengier
Benny Malengier wrote:

> 2008/6/21 Doug <[hidden email]
> <mailto:[hidden email]>>:
>
>     Following up "Media Manager - replace substring doesn't work": My
>     media
>     paths were very long nested absolute paths which Benny helped me to
>     convert to short relative paths.
>
>     But looking at 'base media' itself  I find that it consists of a long
>     series of nested folders, corresponding to the original long absolute
>     paths I was trying to get rid of, each one containing nothing but
>     another folder. Only the ultimate folder contains actual images.
>
>
> You should put your base media file to what you think is the most
> logical choice.
>
> Note however that on import of a gpkg, the system cannot just guess a
> media path. In the gpkg (you can open it with ark or another
> unzipper), the data is stored relative to the media path, or with a
> directory structure reflecting the absolute path. Also the old media
> path is present in the xml file. Normally on import  of gpkg, the
> system will take the most obvious media path, or ask you for it
> (depending on the situation).
>
> Anyway, if you do not like the automatic choice, one can do as you
> want to do: change it in the preferences, then run the media manager
> to change all paths to the correct string.
>
>
>     If I remove all intermediate folders and copy actual images directly
>     into the topmost folder of  <basename>.gpkg.media I am unable to load
>     gramps. Evidently the rest of the database information is
>     somewhere else.
>
>
> what do you mean with load? Gramps crashes? Or opening gpkg data shows
> no pictures?  Or import fails?
>
>     Where?
>     Does ~/.gramps have files that can be edited manually to clean up the
>     structure of 'base media'?
>
>
> No, there is only a database file there, which you cannot just edit.
> Export to .gramps xml files allows edit, but the media manager does
> the same search/replace as you could do with xml.
>
> My advise would be to start from zero. Create an empty family tree,
> set a media path as you want to use it, then import your gpkg, and
> experiment with how it works. Once you find what works best for you,
> you stick to that procedure.
>
> Benny
I'm not sure if I fully understand:
The path for the base media is now reasonably short and the media paths
are all relative to this.

However, does the base media path itself have to be an absolute path
starting from root?
If I make the base path a relative one,  attempts to edit an individual
medium get the message "unable to find file
/home/dougb/Documents/Genealogy/Family_Tree/Gramps/Images/xxx.jpg"
(although that's where it is).

Thanks,
Doug

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Base media is a nested series of empty folders

Benny Malengier


2008/6/23 Doug <[hidden email]>:
I'm not sure if I fully understand:
The path for the base media is now reasonably short and the media paths
are all relative to this.
yes

However, does the base media path itself have to be an absolute path
starting from root?
If I make the base path a relative one,  attempts to edit an individual
medium get the message "unable to find file
/home/dougb/Documents/Genealogy/Family_Tree/Gramps/Images/xxx.jpg"
(although that's where it is).

It is now considered absolute. If relative the problem becomes 'relative to what'? 
We cannot expect the casual user to take it relative to ~/.gramps/grampsdb/dir/ where the family tree database is, and not giving media path in the preferences defaults already to the home directory, which looks like the sane default to me.

As to your problem, please submit a bug report. The preference setting should or not allow relative base path, or should in the case that it allows it, know how to handle this when retrieving media files.

Benny



Thanks,
Doug

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users