scriptotek / emnesok

Realfagsbibliotekets emnesøk
http://www.ub.uio.no/om/prosjekter/scriptotek/emnesok-og-infrastruktur-for-emneord.html
MIT License
1 stars 0 forks source link

Dependency Status DOI

UiO Library Subject Search

Frontend for subject search against the vocabularies Realfagstermer (Bokmål, Nynorsk, English) and Humord (Bokmål).

The frontend uses a Skosmos instance to query for subjects, and the Primo Search API through LSM to query for catalogue records.

Develop

After cloning the repository, run npm install to fetch dependencies. To make a development build in the build folder and start a development server, run npm run dev. To make a production build, run npm run build.

Translation

The application is translated on Transifex, and the translation workflow is supported by angular-gettext, angular-gettext-cli and transifex-api-es6.

Code style

This project tries to adher to:

.htaccess

Atm. we have two .htaccess files, one in htdocs:

RewriteEngine on
RewriteBase /ub/emnesok/

# Serve data from some folders directly

RewriteCond %{REQUEST_URI} ^/ub/emnesok/(data|legacy|program|skosmos)
RewriteRule ^.+$ - [NC,L]

# Redirect from old URLs

RewriteCond "%{QUERY_STRING}" "^id=UHS$"
RewriteRule "^.*$" "humord?" [R,L]

RewriteCond "%{QUERY_STRING}" "^id=UREAL$"
RewriteRule "^.*$" "realfagstermer?" [R,L]

RewriteCond "%{QUERY_STRING}" "^id=TEK$"
RewriteRule "^.*$" "tekord?" [R,L]

RewriteCond "%{QUERY_STRING}" "^id=MR$"
RewriteRule "^.*$" "mrtermer?" [R,L]

RewriteRule "^test/oria/(.*)$" "$1" [R,L]

# Alias / to /2/build/

RewriteRule ^(.*) 2/build/$1 [NC,L]

and one in /htdocs/2/

RewriteEngine on
RewriteBase /ub/emnesok/2/

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) build/index.html [NC,L]

TODO: Simplify and merge into one file.