Hello,
On Thu, 9 May 2019 at 00:26, Eric Drechsel <
er...@pdxhub.org> wrote:
>
> Hi Dave,
>
> On Wed, May 8, 2019 at 1:56 PM dx25 <
dfrib...@gmail.com> wrote:
>>
>> I finally got around to looking at this video server idea again -- as Mathieu suggested, I created a folder in web UI and moved all video files to the folder. Now when pk-mounted, the new folder is not visible in "roots" unless I manually set the camliRoot attribute to it, and none of the videos are visible within unless I set, say, a camliPath:filename.mp4 attribute on the folder permanode. Mathieu, you mentioned adding a custom handler. As I look through the source, I see a number of other blobservers, but I have no clue how to use them or what they are for. I'm assuming that was how were suggesting I deal with this camliRoot/camliPath problem?
>>
>> The other idea I had was an approach similar to how <pkmount>/recent folder is working. Within that folder, I can see filenames for some recently added stuff, apparently without the need for these redundant camliPath: attributes (since the fileName is stored with the blob content for the videos). Was curious to see how this actually populates the /recent folder, but was unable to locate the implementation.
As Eric said, if you want to see how the magic of pk mount works, it's
all in pkg/fs. But honestly if you want things to show up as files in
pk mount, I maintain that it's probably easier to do a bit of glueing
and scripting on top of things, to add the relevant camliRoots and
camliPaths to your permanodes, than to hack a new "magic directory" in
pkg/fs. Dealing with fuse stuff isn't easy imho.
> Mathieu, you mentioned adding a custom handler. As I look through the source, I see a number of other blobservers, but I have no clue how to use them or what they are for. I'm assuming that was how were suggesting I deal with this camliRoot/camliPath problem?
The other idea I had mentioned earlier is also harder than the very
first option, but probably not as hard as inventing new things in
pkg/fs. But it still requires you to understand what typically happens
to a blob when Perkeep receives it, with regard to how the conditional
blobserver only passes it to the indexer if it is a schema blob, then
how the indexer treats it depending on what kind of mutation it is,
etc. My very rough idea was that you could add your own custom piece
in the middle that does the job of creating the camliPaths and
camliRoots somewhere along the line, when e.g. the indexer sees it is
a video file. But again, that is pretty involved too, and wouldn't be
a very adaptable/reusable mechanism, so all in all, probably not a
very good idea.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/perkeep/CAGTxtWiNUbSG_m4mLYqHsPfinxaVqUGB29G2J%2Bjr5VZuYrUTYA%40mail.gmail.com.