An addon need not have a script with the same name as the directory.
However, if there is such a script, then it can be loaded using a
short form. For example, the following are all the same:

  load 'convert/pjson'
  load 'convert/pjson/pjson'
  load '~addons/convert/pjson/pjson.ijs'

To load another script or where the addon does not have a script with
the same name as the directory, use the last two methods, e.g.

  load 'net/clientserver/jsss'
  load '~addons/net/clientserver/jsss.ijs'

I haven't checked the wiki documentation. Please update as needed, thanks.

On Wed, Apr 8, 2020 at 9:04 AM Raul Miller <rauldmil...@gmail.com> wrote:
>
> Adding in the file with the same name as the directory works, but..
> when I look in addons, I see a variety of addons which don't follow
> this convention (I see a variety of addons without an .ijs file whose
> base name matches the containing directory name):
>
> api/java games/minesweeper misc/classroom
> api/python3 general/joddocument misc/miscutils
> convert/misc general/jodsource net/clientserver
> demos/coins general/misc profiles/profiles
> demos/isigraph graphics/color sockets/socklib
> demos/publish graphics/fvj4 sockets/sockutils
> demos/wd ide/jhs stats/jserver4r
> demos/wdplot math/misc stats/r
> docs/help media/videolabs stats/rlibrary
>
> And I know that at least some of these addons aren't broken (ide/jhs
> for example).
>
> But when I try to test some of these, using require, some do seem broken.
>
> So even if you've worked around the issue, it seems like something is
> still not right.
>
> If it's supposed to work like this, I think we've got missing
> documentation. If it's supposed to work like it's documented I think
> we've got a different problem.
>
> Thanks,
>
> --
> Raul
>
> On Tue, Apr 7, 2020 at 4:26 PM Vanessa McHale <vamch...@gmail.com> wrote:
> >
> > Thanks! It does install now, but into the base locale…
> >
> > Cheers,
> > Vanessa
> >
> > > On Apr 7, 2020, at 3:00 PM, chris burke <cbu...@jsoftware.com> wrote:
> > >
> > > The brief doc is at https://code.jsoftware.com/wiki/Pacman#github .
> > >
> > > Trying this:
> > >
> > >  install 'github:vmchale/elliptic-fourier'
> > > installed: vmchale/elliptic-fourier master into folder: 
> > > math/elliptic-fourier
> > >   dir '~addons/math/elliptic-fourier'
> > > manifest.ijs         310 07-Apr-20 12:55:53
> > >
> > > This looks like a work in progress. The other file referenced in the
> > > manifest doesn't exist.
> > >
> > > On Tue, Apr 7, 2020 at 12:24 PM Vanessa McHale <vamch...@gmail.com> wrote:
> > >>
> > >> Hi Raul,
> > >>
> > >> I haven’t actually tried out pacman at all! I just cargo-culted that 
> > >> from tables/csv.
> > >>
> > >> Right now I think I need to figure out locales before it would be a 
> > >> “release” of sorts
> > >>
> > >> Cheers,
> > >> Vanessa
> > >>
> > >>> On Apr 7, 2020, at 1:46 PM, Raul Miller <rauldmil...@gmail.com> wrote:
> > >>>
> > >>> I was looking at an interesting bit of J --
> > >>> https://github.com/vmchale/elliptic-fourier
> > >>>
> > >>> And, while the code basically works (need to run plot plot_points
> > >>> after executing the data building lines of demo.ijs), the presence of
> > >>> a manifest.ijs suggested that I could use
> > >>> https://code.jsoftware.com/wiki/Pacman#github but that doesn't work.
> > >>>
> > >>> So, I forked it, and changed the manifest, and restarted J, and .. it
> > >>> still doesn't work.
> > >>>
> > >>>  install'github:rdm/elliptic-fourier'
> > >>> installed: rdm/elliptic-fourier master into folder: 
> > >>> math/elliptic-fourier
> > >>>  require'math/elliptic-fourier'
> > >>> not found: 
> > >>> /users/rauldmiller/j901/addons/math/elliptic-fourier/elliptic-fourier.ijs
> > >>>
> > >>> And, looking at the developer's guide for addons --
> > >>> https://code.jsoftware.com/wiki/Addons/Developers_Guide -- I don't see
> > >>> that there's any description there of what should be done about this
> > >>> issue.
> > >>>
> > >>> (The issue is that load/require/getscripts wants to load a file which
> > >>> is not listed in the manifest.ijs)
> > >>>
> > >>> So I think this should be treated as a core J issue rather than just a
> > >>> problem with that particular example.
> > >>>
> > >>> If I'm wrong, can someone point me at the right documentation?
> > >>>
> > >>> Thanks,
> > >>>
> > >>> --
> > >>> Raul
> > >>> ----------------------------------------------------------------------
> > >>> For information about J forums see http://www.jsoftware.com/forums.htm
> > >>
> > >> ----------------------------------------------------------------------
> > >> For information about J forums see http://www.jsoftware.com/forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to