Cataloging/circulation

2 views
Skip to first unread message

...

unread,
Oct 14, 2010, 1:30:57 PM10/14/10
to koc...@googlegroups.com

I've got a circulation prototype up and running in django.  The purpose of this app is to be the circulation ILS for a "book sharing" or "book bank" library. Books come into the library through a loan, and it is possible for the library to loan books out with permission to loan out further.  It is easily works for a conventional library if the first loan is from central library to central library with a practically infinitely far away due date.  giving a patron permission to loan the resource further has to be done in the administrative backend, and so can be easily ignored.

Anyways, I got kochief up and running, but havent uploaded any marc records yet.  I wanted to check out the cataloging app, but nothing in urls.conf points to it.  Is the cataloging app working?  and what does it do?

The only front end page I havent written yet is the "import new book" page.  The rough draft takes a marc record and checks that the most important fields are present, and prompts the user to fill in ISBN and other important things.  Then it concatenates the records, and creates a primal loan fromowner to library w/ permission to lend and a due date that reflects the lease length.

For use with kochief it should probably index those records also.

My "book" model just has a primary key (a solr id) and a title for __str__() to output, so the resource model in cataloging (assuming it does something already) could easily be used. the resource model seems much more flexible than something with only books in mind, but since the "book" for me is just a solr id and title, I'm not sure it matters. 

So, before I write the 'add new book' page, I'd like to know what the state of the cataloging app is, and if it is reuseable in this ILS.

thanks,
Elliot

Gabriel Farrell

unread,
Oct 14, 2010, 2:25:31 PM10/14/10
to koc...@googlegroups.com
The cataloging app is little more than a stub. What's there are my
starts and sputters at something RDFish for the storage of records. As
you can see, there's only the one model and one simple "display" view
on that model.

In short, there's not much cataloging going on yet in Kochief, so
you're not duplicating any prior effort. Glad to hear you got Kochief
up and running, and that you're beginning to feel your way around. I'm
happy to look over any code you want help integrating.

> --
> You received this message because you are subscribed to the Google
> Groups "Kochief" group.
> To post to this group, send email to koc...@googlegroups.com
> To unsubscribe from this group, send email to
> kochief+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/kochief

...

unread,
Oct 24, 2010, 9:35:29 PM10/24/10
to koc...@googlegroups.com
http://bitbucket.org/permafacture/django-ils/

haven't checked if the marc records it creates are indexable by kochief (I didn't get a response as to why lib of congress ones spat errors).  I'll be working on it more though.  If ya'll have any comments or requests, let me know.

-elliot

Gabriel Farrell

unread,
Oct 27, 2010, 1:05:02 PM10/27/10
to koc...@googlegroups.com
Great that you got something going. About the django-ils code:
1. You should alter your .hgignore file so you don't include *.pyc
files. You should also avoid committing editor copies, such as
admin.py~ and forms.py~ in circulation/.
2. You should avoid hardcoding anything about your setup, such as
ADMINS and DATABASE_NAME, in settings.py. See the kochief settings.py
for one way to get around that.
3. When I attempted a "python manage.py syncdb" I got "Error: No
module named bookshare.circulation". If the project is expected to be
in bookshare/, it should be in that directory in the repo, as the
kochief code is in kochief/.

Otherwise, looks like a good start for your needs.

Sorry no one got back on the MARC encoding issues. They can be hairy.
I don't have any experience with the LoC MARC dumps, but if it
continues to be a problem post a detailed message to the list and
maybe someone here can help.

...

unread,
Oct 29, 2010, 11:56:04 PM10/29/10
to koc...@googlegroups.com
good advise.

I have implemented your suggestions

Though I wonder if having the project in a directory called bookshare is really the right solution.  My version of kocief is in ~/library/kochief/kochief/kochief/

(i created one to clone into, clone created one and one was in the repo)

with this method, would it be possible/convinient to be pulling changes in from django-ils and kochief on a system where both are being used in conjunction?  then you have ~/library/kochief/kochief and ~/library/django-ils/bookshare, where really you would want (i assume) ~/library/kochief/ and ~/library/bookshare/

maybe i'll replace the name bookshare in my code with django-ils and then not have only a single file at the root of my repo as you suggest (ie, put it back the way it was with manage.py in the root of the repo).  sorry if that doesnt make sense, I'm sure there is proper terminology...


anyways, thanks.  I'm working on other things but when I get around to wanting to load marc files from django-ils in kochief I'll bother y'all about any errors I get.

-elliot

Gabriel Farrell

unread,
Oct 31, 2010, 10:52:31 AM10/31/10
to koc...@googlegroups.com
On Fri, Oct 29, 2010 at 11:56 PM, ... <offonoff...@gmail.com> wrote:
> good advise.
>
> I have implemented your suggestions

Looks better. It's great to be able to run "python manage.py syncdb &&
python manage.py runserver" in a freshly-cloned repo and see a working
project. You might still want to add an .hgignore with lines as
follows:

syntax: glob

*.pyc
bookshare/.DdBb

> Though I wonder if having the project in a directory called bookshare is
> really the right solution.  My version of kocief is in
> ~/library/kochief/kochief/kochief/
>
> (i created one to clone into, clone created one and one was in the repo)
>
> with this method, would it be possible/convinient to be pulling changes in
> from django-ils and kochief on a system where both are being used in
> conjunction?  then you have ~/library/kochief/kochief and
> ~/library/django-ils/bookshare, where really you would want (i assume)
> ~/library/kochief/ and ~/library/bookshare/
>>
> maybe i'll replace the name bookshare in my code with django-ils and then
> not have only a single file at the root of my repo as you suggest (ie, put
> it back the way it was with manage.py in the root of the repo).  sorry if
> that doesnt make sense, I'm sure there is proper terminology...

It's a good idea to keep the code as it is, in a directory with the
project name within the repo. You can't control the name of the
directory people will clone the code into, but the project needs to be
in "bookshare" because the project name is in settings.INSTALLED_APPS.
So if you put manage.py, etc. in the root of the repo but I check out
the repo into a directory called "ils-thing" or even "bookshare-dev"
then the code won't run.

In production, the reasons for this become more clear. For Kochief, I
have a single machine with a few instances running, so the directory
structure looks as follows:

/srv/www/inst1/kochief
/srv/www/inst1-dev/kochief
/srv/www/inst2/kochief
/srv/www/inst2-dev/kochief

Each of the dev instances are cloned from the public repo (e.g., "hg
clone https://kochief.googlecode.com/hg/ inst1-dev") while the
production instances are cloned from the dev instances (e.g., "hg
clone file:///srv/www/inst1-dev inst1").

> anyways, thanks.  I'm working on other things but when I get around to
> wanting to load marc files from django-ils in kochief I'll bother y'all
> about any errors I get.

The commit I made last night might address some of your character
encoding issues, so pull and update and give that a try.

...

unread,
Oct 31, 2010, 7:20:23 PM10/31/10
to koc...@googlegroups.com

> I have implemented your suggestions

Looks better. It's great to be able to run "python manage.py syncdb &&
python manage.py runserver" in a freshly-cloned repo and see a working
project. You might still want to add an .hgignore with lines as
follows:

   syntax: glob

   *.pyc
   bookshare/.DdBb


?

The reason I destroyed and recreated my repo was to make sure none of these files were still included.  .hgignore has those lines and also excludes *~

I checked the repo on bitbucket and didn't see any files like those...  maybe they were still around from the last time you pulled the repo?

will pull and retry kochief soon.  Thanks.

Elliot

Gabriel Farrell

unread,
Oct 31, 2010, 7:44:12 PM10/31/10
to koc...@googlegroups.com
On Sun, Oct 31, 2010 at 7:20 PM, ... <offonoff...@gmail.com> wrote:
> The reason I destroyed and recreated my repo was to make sure none of these
> files were still included.  .hgignore has those lines and also excludes *~
>
> I checked the repo on bitbucket and didn't see any files like those...
> maybe they were still around from the last time you pulled the repo?

They weren't around, but were created when I ran "python manage.py
syncd". If you add that .hgignore file you created to the repo then I
won't see them when I do "hg st".

Reply all
Reply to author
Forward
0 new messages