Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new parameters #2118

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"json-lines",
"query-istex",
"query-conditor",
"query-conditor-for-halcnrs",
"query-openalex",
"rss",
"atom",
Expand Down
2 changes: 1 addition & 1 deletion packages/ezsLodex/src/formatOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function formatOutput(data, feed) {
if (keys.length > 0) {
let check = false;
keys.forEach((k, index) => {
if (values[index]) {
if (values[index] !== undefined) {
feed.write(!check ? ' ' : ',');
check = true;
feed.write(json(k));
Expand Down
11 changes: 5 additions & 6 deletions src/app/custom/themes/voscouleurs/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<meta name="msapplication-TileColor" content="#ffc40d" />
<meta name="theme-color" content="#ffc40d" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" />
<% if(custom.font.family){ %>
<% if (custom.font) { %>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=<%= custom.font.family %>:700" />
<% } %>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Quicksand:400,500" />
Expand All @@ -23,14 +23,13 @@
/* import palette */
<%=theme.cssVariable %>
/* import config theme color */
<% if(custom.font) {%>
<% if (custom.font) {%>
:root {
--font-title: <%= custom.font.title %>;
--font-text: <%= custom.font.text %>;
}
<%}%>
<% } %>
/* import config theme color */
<% if(custom.color) {%>
<% if (custom.color) {%>
:root {
--bgBody: <%= custom.color.bgBody %>;
--bgHeader: <%= custom.color.bgHeader %>;
Expand All @@ -47,7 +46,7 @@
--textContrast: <%= custom.color.textContrast %>;
--bgContrast: <%= custom.color.bgContrast %>;
}
<%}%>
<% } %>
</style>
</head>

Expand Down
76 changes: 38 additions & 38 deletions src/app/custom/themes/voscouleurs/lodex-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,44 @@
"files": {
"index": "index.ejs",
"palette": ""
}
},
"variables": {
"information": "toutes les configurations ci-dessous sont optionnelles.Pour les désactiver, supprimer \"le texte entre les guillemets\"",
"siteTitle": "titre du site",
"summary": "promesse du site, sous-titre",
"logo": {
"file": "url fichier du logo de l'organisme",
"alt": "nom de l'organisme",
"url": "url de l'organisme",
"size": "100"
},
"font": {
"information": "utiliser strictement https://fonts.google.com/",
"family": "nom d'une famille de googlefont construit le lien dans head ",
"title": "nom de cette font pour les titres déclaration css"
},
"color": {
"info-theme": "EN DEVELOPPEMENT : les trois couleurs suivantes permettent de mémoriser les codes hexadecimaux de 2 couleurs qui font l'identité de votre organisme",
"themePrimary": "code hexa ",
"themeSecondary": "code hexa",
"themeRGBA": "code rgba de primary ou secondary",
"info-fond": "bg, pour 'background' en css, permet de mettre une couleur de fond sur les différents éléments de structure de vos pages",
"bgBody": "#fff",
"bgHeader": "",
"headerTitle": "",
"bgContent": "",
"bgFacet": "",
"titles": "",
"titleGraph": "",
"text": "",
"info-bouton": "ci-dessous, les couleurs des liens et boutons",
"icon": "",
"iconHover": "",
"button": "",
"buttonHover": "",
"textContrast": "",
"bgContrast": ""
"variables": {
"information": "toutes les configurations ci-dessous sont optionnelles.Pour les désactiver, supprimer \"le texte entre les guillemets\"",
"siteTitle": "titre du site",
"summary": "promesse du site, sous-titre",
"logo": {
"file": "url fichier du logo de l'organisme",
"alt": "nom de l'organisme",
"url": "url de l'organisme",
"size": "100"
},
"font": {
"information": "utiliser strictement https://fonts.google.com/",
"family": "nom d'une famille de googlefont construit le lien dans head ",
"title": "nom de cette font pour les titres déclaration css"
},
"color": {
"info-theme": "EN DEVELOPPEMENT : les trois couleurs suivantes permettent de mémoriser les codes hexadecimaux de 2 couleurs qui font l'identité de votre organisme",
"themePrimary": "code hexa ",
"themeSecondary": "code hexa",
"themeRGBA": "code rgba de primary ou secondary",
"info-fond": "bg, pour 'background' en css, permet de mettre une couleur de fond sur les différents éléments de structure de vos pages",
"bgBody": "#fff",
"bgHeader": "",
"headerTitle": "",
"bgContent": "",
"bgFacet": "",
"titles": "",
"titleGraph": "",
"text": "",
"info-bouton": "ci-dessous, les couleurs des liens et boutons",
"icon": "",
"iconHover": "",
"button": "",
"buttonHover": "",
"textContrast": "",
"bgContrast": ""
}
}
}
}
}
2 changes: 2 additions & 0 deletions src/app/custom/translations.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@
"bib-comment" "BibTeX uses a style-independent text-based file format for lists of bibliography items, such as articles, books, and theses" "BibTeX est format de fichier texte dédié aux références bibliographiques."
"query-conditor" "TXT - query for Conditor" "TXT - requête d'interrogation pour Conditor"
"query-conditor-comment" "Direct loading of query results for the Conditor database." "Chargement direct des résultats d'une requête d'interrogation pour la base Conditor."
"query-conditor-for-halcnrs" "TXT - query conditor for halcnrs" "TXT - requête Conditor pour traitements hal"
"query-conditor-for-halcnrs-comment" "Direct loading of query results for the Conditor database and needed processing for the HAL CNRS service." "Chargement direct des résultats d'une requête d'interrogation pour la base Conditor et transformations pour exploitation par le service hal cnrs."
"query-istex" "TXT - query for ISTEX" "TXT - requête d'interrogation pour ISTEX"
"query-istex-comment" "Direct loading of query results for the ISTEX archive." "Chargement direct des résultats d'une requête d'interrogation pour l'archive ISTEX."
"query-openalex" "TXT - query for OpenAlex" "TXT - requête d'interrogation pour OpenAlex"
Expand Down
162 changes: 162 additions & 0 deletions workers/loaders/query-conditor-for-halcnrs.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
append = pack
label = query-conditor-for-halcnrs
extension = json
mimeType = application/json

# load some plugins to activate some statements
[use]
plugin = conditor
plugin = basics

# Toggle ezs traces (see server stderr log)
[debug]
ezs = false

# {{{
[TXTConcat]

[replace]
path = q
value = self().trim()

[CORHALFetch]
url = https://corhal-api.inist.fr
retries = 3
timeout = 60000

[assign]
path = uri
value = get('business.sourceUidChain')
# }}}

[assign]
path = typologie
value = get("business.duplicateGenre")

path = titre
value = get("title.default")

path = resume
value = get("abstract.default")

path = auteurs
value = get("authors").map("fullname")

path = identifiantsAuteurs
value = get("authors").map(author => _.pick(author, ['orcId', 'idRef', 'idHal','viaf']))

path = affiliations
value = get("authors").map( author =>_.flatMap(author.affiliations, 'address'))

path = identifiantsAffiliations
value = get("authors").map("rnsr")

path = domaine
value = get("classifications")

path = keywords
value = get("keywords")

path = ppn
value=get("sourceUids").filter( id => id.startsWith('sudoc')).replace("sudoc-theses$","")

path = nnt
value = get("fulltextUrl").replace(/^(?!http:\/\/www\.theses\.fr\/).*$/, '').replace("http://www.theses.fr/","").replace("/document","")

[assign]
path = autresIdentifiants
value = fix({pmcid: self.pmcId,arxiv : self.arxiv,pmid: self.pmId,nnt: self.nnt,ppn : self.ppn})

path = funders
value = get("funders").map("fullname")

path = publicationDate
value = get("host.publicationDate")

path = electronicPublicationDate
value = get("host.electronicPublicationDate")

path = volume
value = get("host.volume")

path = issue
value = get("host.issue")

path = pages
value = get("host.pages.range")

path = nomConference
value = get("host.conference.name")

path = dateDebutConference
value = get("host.conference.date")

path = villeConference
value = get("host.conference.place")

path = langueDocument
value = get("host.language")

path = issn
value = get("host.issn")

path = nomRevue
value = get("host.title")

path = publisherRevue
value = get("host.publisher")

path = isbn
value = get("host.isbn")

path = editors
value = get("host.editors").map("fullname")

path = sourceUids
value = get("sourceUids")

path = halID
value = get("halId")

path = doublonsHal
value = get("sourceUids").filter(uid => uid.includes('hal')).size().gt(1).replace(true,"Oui").replace(false,"Non")

[assign]
path=isHal
value=get("business.sourceUidChain").replace(/\$.*?!/g,"!").split("!").compact().some(item=>(/hal/).test(item)).replace(false,"Non").replace(true,"Oui")

path = fulltextURL
value = get("fulltextUrl")

# Ensures that each object contains an identification key (required by lodex)
[swing]
test = pick(['URI', 'uri']).pickBy(_.identity).isEmpty()
[swing/identify]

# Ignore objects with duplicate URI
[dedupe]
ignore = true

# Prevent keys from containing dot path notation (which is forbidden by nodejs mongoDB driver)
[OBJFlatten]
separator = fix('.')
reverse = true
safe = true

# Uncomment to see each data sent to the database
#[debug]

[exchange]
value = omit(["abstract","authors","classifications","business","pii","arxiv","inspire","localRef","pmcId","articleNumber","nnt","ppn","origins","technical","halId","title","originalGenre","pmId","fulltextUrl","enrichments","host"])

# Add contextual metadata related to the import
[assign]
path = lodexStamp.importedDate
value = fix(new Date()).thru(d => d.toDateString())
path = lodexStamp.usedParser
value = env('parser')
path = lodexStamp.uploadedFilename
value = env('source')
path = uri
value = get('uri').trim()

Loading
Loading